relay not working

boot1210

New Member
I am using a picaxe 40x2 and I want to simply turn a relay on or off based on the push of a button. The relay I have is an omron model #G5SB, 5V coil, coil resisitance of 63 ohms, rated nominal current of 80mA and a minimal load on the conacts of 10mA at 5VDC.
I set the circuit up exactly as shown in manual 3, I used a 10K resisitor in series with my output pin, and I used a BCX38C transistor, along with a 1N4001 diode across the coil.
When I turn the power on, nothing happens. The relay isn't energizing for some reason. I checked and re-checked my wiring and my components to see if they are all good and they are all good. I can use the transistor to turn on and off an LED, but I can't make it energize the relay for some reason.
I broke my code down to be super simple for testing and troubleshooting. At the moment I am simply turning my output pin high.
According to the datasheet, the transistor should be more than capable of handling the 80mA of the relay. I can use the transistor to drive a 30mA LED I have, setting the resistor to a value to obtain between 25 and 30mA and it works just fine every time.
Can anyone help me out a little? what am I missing or overlooking? A relay circuit is fairly simple, or so I thought.
 

hippy

Ex-Staff (retired)
Welcome to the PICAXE forum.

If you can control a LED it seems your circuit is wired up correctly. Two things you can try ...

1) Put the LED+R in parallel with the relay coil. If that lights the relay should be energising.

2) Check the relay energises when connected directly across 0V and +V. If it doesn't it won't do so when switched by the transistor.
 

bgrabowski

Senior Member
Have you checked that the 1N4001 diode is the correct way round? Does the darlington transistor energise the coil when the base is connected to +V instead of the Picaxe?
 

boot1210

New Member
I checked the diode, the end with the silver band on it, the cathode, I have connected to my +5V and the other end to the collector of my transistor. When I jumpered +5V to the base of my transistor nothing happened except my voltage regulator almost fried. I started to smell something so I shut down the power right away and my voltage regulator was HOT.
When I parallel the LED and resistor, the LED doesn't light at all. But as soon as I remove the +5V lead to the relay coil, the LED will light. The relay chatters occasionally, like it is trying to energize but can't for some reason. And yes the relay does energize when I connect it directly to my power supply.
I am using a 220ohm resistor in series with my LED, when I parallel this with the relay, the LED won't light. The resistance of the relay coil is 63 ohms. Am I correct in thinking the relay coil is in essence shorting out the LED? When the circuit is set up like this, I can hear a slight noise coming from the relay itself. almost like the relay is trying to energize again but can't. The noise is very faint.
 

boot1210

New Member
Problem solved! It was my power supply going bad. When I connected the relay directly to my power rails it was enough voltage to pull in the relay, however, when I hooked up the rest of the circuit my input voltage was dropping to less than the minimum coil voltage for the relay. Further experimentation confirmed the voltage on my power supply is dropping when a load is applied to it. Everything is working fine now that I have a new power supply. Thanks for helping everyone.
 
Top