DISABLEBOD

mymps3

New Member

EDIT:UPDATE...... IF I turn on a light switch in another room, the picaxe 08 reboots..... hmmmmm.....


-------------------------------------------------------------------------------------------------


OMG, this command fixed my picaxe glitch when switching a 12 volt relay that switched 240 volts about 7 metres away.​

DISABLEBOD​

I never knew it existed !!!!!!!!😍😍

 
Last edited:
Hi, However, this does not solve the problem at its root; the chip's power supply needs to be improved. A diagram?
I will research more. The old chips used to have a resistor on the reset pin. I don't recall the ones needing that anymore. 7805 and 7812 regulators on my prototype board. 0.1uf caps, and I think 2x 100uf caps.
 

Attachments

  • 880eb34a-845f-4d37-bbf9-2b83768b5f9c.jpg
    880eb34a-845f-4d37-bbf9-2b83768b5f9c.jpg
    431.7 KB · Views: 19
It's a PSU issue you need to fix. When the relay is switched ON, it pulls a high current pulse for a few mS. If the PSU is 'weak', the supply voltage to the PICAXE drops. The 'Brown Out Detector' ( BOD ) then resets the chip safely before the supply reaches a dangerously low level. With BOD disabled there is a chance of the glitch permanently corrupting the chip.

A quick & dirty fix is to put a big, at least 100uF, cap close to the relay, directly across the coil. This acts as a reservoir that can hold up the supply for the few mS that the PSU is struggling. Another similar cap across the PICAXE chip will add an extra layer of protection.

However, as already mentioned, the root cause is poor PSU configuration. 78xx regulators need the 0.1uF and 100uF as close to the device pins as possible. ( I'd personally use 0.1uF & 470uF ) Another important aspect of PSU config is how you wire the 0v connections, and how chunky they are.

As already mentioned, a circuit diagram will be helpful.
 
It's a PSU issue you need to fix. When the relay is switched ON, it pulls a high current pulse for a few mS. If the PSU is 'weak', the supply voltage to the PICAXE drops. The 'Brown Out Detector' ( BOD ) then resets the chip safely before the supply reaches a dangerously low level. With BOD disabled there is a chance of the glitch permanently corrupting the chip.

A quick & dirty fix is to put a big, at least 100uF, cap close to the relay, directly across the coil. This acts as a reservoir that can hold up the supply for the few mS that the PSU is struggling. Another similar cap across the PICAXE chip will add an extra layer of protection.

However, as already mentioned, the root cause is poor PSU configuration. 78xx regulators need the 0.1uF and 100uF as close to the device pins as possible. ( I'd personally use 0.1uF & 470uF ) Another important aspect of PSU config is how you wire the 0v connections, and how chunky they are.

As already mentioned, a circuit diagram will be helpful.
Thank you. Weird becasue I haven't seen this kind of behavior in a Picaxe chip before and I have had many pcb's made over the last 15 years. This prototype had 12v and 5v supplies (running off the one power supply). I will change the 100uf caps to larger ones and test. I thought that I made the power supply overkill but maybe I'm wrong. The transformer is 10w 12 volt ac.


for reference.
 
The circuit is resetting when another 240v applicance is being switched on...... like a light switch or even a tumble dryer. This happens even if the picaxe circuit isn't actually doing anything... just waiting for an input from a magentic reed switch on a garage roller door.

I just unplugged the 3.5mm plug that plugs into my black box that runs to the door switch...... Now the picaxe chip doesn't RESET when I turn on other 240 volt applicances....... seems to be picking up maybe inductance. The switch cable is in square conduit that also has the 240 volt cable and 12v cable for the 12 volt relay (relay is like 7 metres away.).... Interesting!!!!!!
 
Last edited:
Ahh ! The picture is getting clearer. It definitely looks like cross-wire interference. I learnt many years ago, in industrial electronics, never put signal wires in the same conduit as power wires. Noise on the power wires is hundreds of times more powerful than the voltage on the signal wires, and it can easily disrupt the signal.

What does the circuitry around the PICAXE input from the reed switch look like ? Have you included noise suppression ?
 
Ahh ! The picture is getting clearer. It definitely looks like cross-wire interference. I learnt many years ago, in industrial electronics, never put signal wires in the same conduit as power wires. Noise on the power wires is hundreds of times more powerful than the voltage on the signal wires, and it can easily disrupt the signal.

What does the circuitry around the PICAXE input from the reed switch look like ? Have you included noise suppression ?


I just used the usual 1k to input pin and 10k to 5v +.

I will take it off the wall and put it back on the work bench and try and simulate.

Also, it still does glitch when the input switch cable is disconnected but DOES NOT glitch when the cable carrying 12V when OUTPUTED, is disconnected from the picaxe box.
Thank you !!!!!!
 
Back
Top