More relay module problems

Tony P

Member
I know that this is an old problem but please bear with me.

I intend to control the light and heat in my vivarium using an 18m2 Pic and a two relay module - 5v coil, active on LOW (cheap as chips from Ebay ;))

After much testing on my Axe091 project board (without any loads on the relays) I produced an 18M2 board programed to:

  • Switch the light on/off at certain times.
  • Control the 100w ceramic heater (screw in type to replace infrared heat lamp). (Various temperatures depending on the time of day/night).

Everything runs fine on the test bench until I connect the ceramic heater to the relay board. Occasionally when the circuit calls for heat, the heater relay switches on but the 18M2 board resets.

Note: This does not happen when switching the fluorescent light on/off.

Reading through various posts and following very useful links I have tried the following:

  • Decoupling capacitor across Picaxe input pins.
  • 100uf capacitor across Picaxe power supply pins.
  • Remove the relay module 'jumper' and add a separate power supply to feed the VCC and GND.

Still I have occasional problems with the Picaxe resetting.


Today I had a total re-think and have set up the 18M2 project board to send IR signals to an 08M2 project board. This new 08M2 board now controls the relays.

Again, all works fine on the test bench WITHOUT connecting the heater. As soon as I connect it I have problems with the 18M2 board resetting only this time it is happening more often. :(

Note: The 08M2 board may reset also but at the moment this does not matter as the heat/light reset as the 18M2 board comes back to life.

My question is, why should the 18M2 board reset? It has it's own power supply and is no longer connected in any way to the relay module.

The only thing that these two boards now have in common is the same power outlet on the wall. Could this be the problem?
 

The bear

Senior Member
Hi Tony P,
Suggest you change your 100uF for a 1000uF.
Monitor your supply volts, as the heater operates (Mains powered?).
Try powering your Picaxes from 3x AA batteries.

Regards, Bear.. (Beginner with Picaxes).

P.S. Waiting for the circuit diagram.
 

hippy

Ex-Staff (retired)
The only thing that these two boards now have in common is the same power outlet on the wall. Could this be the problem?
It is possible. I sometimes hear clicks on my mains-powered PC-connected speakers when electrical items switch on or off so there could be some noise being induced on the mains which is then making its way through to the PICAXE. Heaters and lights are notorious for having high in-rush current.

Some sort of surge protection may help. See if you can find a surge-protected mains distribution board and try powering things through that.
 

Tony P

Member
Thanks Hippy, I will try that tomorrow.

As a side note, I have been monitoring the set up and it only fails when the heater switches off, never when it switches on
 

buntay

Senior Member
I had the same problem in the USA. The problem is the load of the heater,(mine was the load of a 1/2hp motor that draws a lot of amps) imagine this, your driving a manual transmission car with the cruise control on and your going up hill......now push in the clutch, what happens? The engine revs for a split second before the cruise turns off. The same thing is happening to you and I, its that spike that is causing the reset.

All I did was pull power for the motor from a different breaker in the breaker panel and the problem went away :)
 

Tony P

Member
I do have a separate ring main in my garage to the rest of the house. I will try this just out of curiosity.
 

Tony P

Member
I have tried running the 18m2 board from batteries but as I have a serial OLED amongst other things running from the same power supply the batteries did not last for long.
Although I had a couple of resets it was not anywhere as bad as when running from the mains power.

Question: Could I add a 5v Super capacitor to the supply circuit?
Would this hold the Picaxe stable as the power surges or whatever is happening?
 

Technoman

Senior Member
Sometimes ago, while trying to run a robot with 2 motors under PWM control and a single supply (4 x AA battery), I had some resets.

I fixed it in supplying the micro controller (20M2) through a diode, and adding a high value capacitor (470uF). In case of short voltage drops on the motor side, the chip is not affected.

A sort of half-wave rectification capacitor filtering circuit diagram.

May be, It could help...
 

Goeytex

Senior Member
Make sure that the relay board has a diode across the coils of the relays. Most do but you you just never know with these cheap boards purchased on auction sites.

I highly suspect that noise due to relay contact arcing is causing the Picaxe to reset. A common remedy is to place an RC Snubber across the relay contacts.

Another option is to use solid state relays instead of electromechanical relays.
 
Last edited:
Top