Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 18:40 29 Apr 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Waking up the uM.....

     Page 2 of 2    
Author Message
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9063
Posted: 08:40pm 21 Oct 2014
Copy link to clipboard 
Print this post

Thanks once again, for the technical explination and forumla examples.

I am using two pins, cos the WAKEUP pin needs to peroidically wake up the CPU to check the battery, then go back to sleep. The other input pin is connected to a button, which when pressed, also wakes the CPU and processes the button press.

I can't put the PB on the WAKEUP pin, or this will trigger false processing of a button press, each time the cap/resistor wake the CPU to check the battery.

I missed a component on my last schematic - you need the diode, to prevent the pull-up on the I/O pin from holding the uM off forever.





EDIT: With a 22uF cap and 1M8 resistor, I am getting a sleep time of about 35 seconds, which is around the figure I wanted. Is 22uF too much? The only way I can get the time to 35 or so seconds with 10uF is to up the resistor to 4M7, which Rob has hinted might be a little on the high side.

So, the choices are:

1) 10uF + 4M7
2) 22uF + 1M8

I am inclined to go for option 2.........Edited by Grogster 2014-10-23
Smoke makes things work. When the smoke gets out, it stops!
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2289
Posted: 03:33am 22 Oct 2014
Copy link to clipboard 
Print this post

i'd say 22uF and 1M8 would be fine, or even better 33uF and 1M2. for a 33uF capacitor the charging (at 20mA) will take about 10mS or so. i'd want to make sure the time awake was no less than 20mS to ensure the capacitor is fully charged.

the circuit (with diode added) now makes more sense. just be cautious to ensure the switch has been released before engaging "CPU sleep" - if it is not released, then it risks discharging the capacitor (via R2 and D1) before the CPU goes into sleep mode, from which there is no recovery (watchdog does not seem to work when asleep).

an alternative approach is to connect pin 43 to the junction between R2 and D1, and then replace D1 with a 0.1uF capacitor. this should generate a short negative-going pulse on the wakeup pin whenever the switch is closed. you may need to drop the value of R2 down to 100 ohms for this to work (or increase the time that the micromite is awake for).


rob :-)
 
     Page 2 of 2    
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024