Go Down

Topic: Relay curcuit not switching on (Read 2 times) previous topic - next topic

MAS3

#10
Dec 26, 2012, 03:34 am Last Edit: Dec 26, 2012, 03:45 am by MAS3 Reason: 1
Some more questions.
Is the transistor a 2n2222 as mentioned in the link you supplied ?
I can't see what relay you used in the first pic (the blue one), so can't tell you anything about that and will ignore it for the rest of this reply.

Make a measurement on your diode, the side that does not have the line and the other measuring pin at 0 volt.
Measure voltage.
At the moment the relay should be off, you should measure close to 5 volts there.
At the moment the relay should be on, you should measure 0.6 volts.
Tell us what you measure in both states please.

The second relay is a solid state relay.
It does not click and you cannot feel it switching when you touch it during switching.
It has a LED on it, so you can see that lighting up when the relay is supposed to switch.

You can check the blue relay to see if you connected it correctly.
Measure Ohms across the used pins.
You should measure something between 200 and 1500 Ohms or so.
Also check whether it is to be polarised, so if it has a + and - side at the coil.
Most of the times you can see that on the top of it.


So after writing all of this, i decided i'd check again assuming the transistor you used is indeed a 2N2222.
Looked up (Googling) where Collector, Base and Emittor are.
Looking towards the flat side of that transistor, holding the pins downwards, they are at C B E.
You have the red wire connected to + at the solid state relay, and at the Emittor.
This cannot be correct.
The green wire is at the 0 volts of the relay, at the Cathode of the diode and at an orange wire going nowhere (i'll assume it would go to either 5 volts or 0 volts) .
This is also incorrect.
There is also a yellow wire going somewhere unknown, and connected to the collector.
The diode is not neccesary when using a solid state relay, but if you still want to use it, connect it directly to that relay's screw terminal.
Connect the Cathode (the side with the line) to + and the Anode to - (this would suggest it is "upside down", but is exactly what it is supposed to do in this case).
Check the drawing in the link you posted for this.
You can also see that the + side of the relay is supposed to be directly connected to + 5 volts.
The - side is to be connected to the Collector of your transistor.
And the Emittor is to be directly connected to 0 volts.

Short: Your transistor is probably upside down, and so are your relay and diode.

Tip:
Print the photo from your link.
Use colored crayons or so to mark each different line, corresponding to the colors you have available in your jumper wires.
So now each connection should be in its own color.
You need 4 colors, not counting the connection to your Arduino.
Mark each connection once you connected it.

You might think this is a bit of a childish approach, but it makes it very clear and easy to keep everything in track.

Recheck everything i told you here as it is 3:34 AM over here, and i might have missed something or assumed too much.


[Edit]Typo's[/edit]
Have a look at "blink without delay".
Did you connect the grounds ?
Je kunt hier ook in het Nederlands terecht: http://arduino.cc/forum/index.php/board,77.0.html

yoavac

WOW! Finally (1/2 of it works)

Solid state circuit - you were right, I had the green and red wires going to the + and - wrong. switched it and now the led finally turns on, and the lamp works on my command!!

the n2222 circuit still doesn't work. I haven't changed anything. I hear it clicking when the relay turns on and off. I checked resistance on all the top 3 pin pairs of the relay (when the circuit is not connected to anything) and they were all infinite.

also measured the diode, the side that does not have the line and the other measuring pin at 0 volt.
Measured voltage.
At the moment the relay should be off, you should measure close to 5 volts there. - I measured close to zero.
At the moment the relay should be on, you should measure 0.6 volts. - I measured close to 5V

I verified again, the actual circuit up to the blue relay are the same in both circuits

Thanks again for your help, hopefully we can figure this one out as well...

MAS3

Quote from: yoavac

the lamp works on my command!!


How do you command it then ?

Quote from: yoavac

the n2222 circuit still doesn't work. I haven't changed anything.
also measured the diode, the side that does not have the line and the other measuring pin at 0 volt.
Measured voltage.
At the moment the relay should be off, you should measure close to 5 volts there. - I measured close to zero.
At the moment the relay should be on, you should measure 0.6 volts. - I measured close to 5V


Ok, i Googled again and downloaded a Fairchild datasheet (instead of just a quick look at some pictures like i did yesterday).
The 2N2222 is E B C so not what i said yesterday, sorry for that.
So the yellow wire should be connected to 0 volts.
The red wire in the picture should be connected to - of your solid state relay.
The green wire in the picture should be connected to +5 volts.
Leave the other end of the diode (orange wire) disconnected.
Remember that these observations are to the pictures you posted, and might be different to what you have at this moment as you have done some changes since.

Do the same measurements, measure at 0 volts (black measuring pin) and relay - (red measuring pin).
Again, you should see relay off = 5 volts, on = 0.6 volts.
Have a look at "blink without delay".
Did you connect the grounds ?
Je kunt hier ook in het Nederlands terecht: http://arduino.cc/forum/index.php/board,77.0.html

Go Up