power on reset question

wagp

New Member
I'm using 20X2 and 40X2's in a remote location monitoring project and am concerned what happens if a power failure occurs.
When the power comes back on will the computers "reset" and start running again?

manual 1 states..

"A reset switch is optional, but highly recommended.
This should be a ‘push to make’ type and connected between the
reset pin and 0V."

Why is an external reset switch "highly recommended"?

thanks in advance.
 

nick12ab

Senior Member
I'm using 20X2 and 40X2's in a remote location monitoring project and am concerned what happens if a power failure occurs.
When the power comes back on will the computers "reset" and start running again?
The built-in brown out detect ensurews that the PICAXE is automatically and cleanly reset when there is a power failure or brown out.

Without the brown out the PICAXE might be frozen in an erroneous state if a brown out occurs but the brown out detect prevents that.

With that said, if using an external crystal with the PICAXE it might switch to the internal oscillator due to it detecting an 'error' with the external oscillator. If your testing shows that this happens, then you can add an external brown out of a higher voltage using an op-amp and zener diode or a dedicated brown out detect IC.

Why is an external reset switch "highly recommended"?
Because Rev-Ed sell them?

They are also a convenient way to initiate a download if the PICAXE is doing an activity which prevents the firmware from detecting a download (long pause, or use of the disconnect command...) or can be used as a quick way to stop the PICAXE blowing stuff up if something goes wrong and disconnecting the power is difficult.
 

AllyCat

Senior Member
Hi,

The power consumption of a PICaxe alone is (or can be) so low that continuing to run it from a small "emergency" battery, or sleep/hibernate on an electrolytic or "supercap" may be the best solution. It really depends on the nature of the "remote monitoring". What power levels are needed (e.g. wireless transmission) and for how long might power be lost (seconds, minutes, hours, days)? Would any logging be useful during the failure; is there a local real-time clock?

A very different strategy might be used for e.g. weather data logging (rain, wind, solar, etc.) as opposed to the parameters of some type of "machinery" which becomes dead when there is no power.

Cheers, Alan.
 

westaust55

Moderator
@wagp,

Why is an external reset switch "highly recommended"?
A reset switch provides a convenient and fast way to restart the PICAXE program which may be useful if:
(a) the program/project locks up during testing new code and hardware
(b) certain commands can make starting to down a new program more difficult so a “Hard Reset” often overcomes that problem.

The alternative (and only option of M and M2 parts) is to cycle the power to the PICAXE chip. When using this technique, the capacitors on the power supply rails can retain the supply to the PICAXE for a while (since a PICAXE does not draw a large current) and therefore you need to wait a while (few seconds) with the power disconnected before reconnection to ensure the PICAXE restarts correctly. By comparison a fleeting press on the reset switch and the PICAXE has reset and the program restarted.

For power cycling (off and back on) how are you going to do that?
remove a battery (slower and fumbling), pull out a plug (did you put it back with correct polarity?) or put a switch in the circuit (Ah good but a switch! why not go for the reset switch?).
 
Top