Award
Congratulations rb550f, for answering the question and has received an EZ-Credit award! Share what you have learned and create a tutorial to help others by clicking here.

5v Relay Not Responding As It Should

Assistance Requested

Help Steve G with their question and receive $10 of EZ-Credit to get more robots and parts from our store. The following information was provided about their previous efforts searching tutorials for a resolution.

Steve G claims to have checked these sources:
 
#1

So I've just been trying out a 5v relay (with 5v regulator) on port D0 but it's not working as expected. I first tried "Set(D0,on)" and it closed the relay switch. I then tried "Set(D0,off)" and it wouldn't open. I disconnect it from the EZ-B and it opens, plug it back in and it closes again but can't control it from then onwards. I even tried a combined script...

Code:


Set(D0,on)
Sleep(2000)
Set(D0,off)



but no change. I'm I missing something here or is there something else I can try?

Thanks.

User-inserted image

I have found a few conversations, tutorials and activities that may help with your question. Take a look at these links. I've sorted them by what I believe to be most relevant but that is not always the case as I'm still learning.


Also, consider reviewing the Learn section for informative lessons and activities. Check it out!


#2

Just guessing, but maybe put a resistor on the signal pin?

#3

Thanks for replying @Doombot. I just tried it with a 10K Ohm resistor (that's all I have to try it with) in line with the signal wire, but unfortunately no difference.

#4

Soooo, if I understand, you are powering the relay (gnd and vcc) with 5 volts regulated from an external source other than the EZb, is that right?

Then you have the signal line (1nc) going to the D0 signal port on the EZb, is that right?

If the above is true, the solution is simple, you are missing a ground connection between the relay and the EZb.

#5

@Justin
He said he had a 5V regulator coming from the ezb...maybe the regulator just doesnt have enough amps to power the coil...Then the solution maybe is to have an external source of power that has enough juice...of course with the grounds all shorted together.

#6

Did you try a different port?

#7

Steve G, is there a driver transistor on the relay PCB?

#8

I use one of these TTL level converter for that relay board..Logic level from EZB is 3.3 v and you need to be 5 v...3.3V-5V 2 Channel Logic Level Converter TTL Bi-Directional Shifter Module.Available on Ebay .

User-inserted image

#9

The relay is being powered from the EZ-B through the regulator. I have tried serval ports but to no avail. The regulator I'm using is a 5v, 3 amp output unit. The relay itself is stated as being able to be used with an ARM processor (and a range of others), and needs 15-20mA Driver Current, so I believe it has a driver transistor on the PCB. Here's a close up...

User-inserted image

#10

Steve G, yes I can now see the drive SMT transistor (bottom left with 3 pads) just below the back emf protection diode.