So I have a high/low level trigger single channel relay that I am using for a project and it wont seem to send voltage through it. I am using the 5v pin to supply power to the relay and the breadboard with the button (project) works great, however, I cannot get voltage through the contactor to save my life. Here is the code that I am using to allow the button to control the relay:
int buttonApin = 9;
int relay = 6;
boolean flag = true;
I read somewhere that you cant use these relays with low voltage but I purposely bought a low level trigger. I even cut up an old power supply and gave it 24v, still nothing. I have continuity with the NC part of the relay but no voltage. I have been on this for hours because it just doesn't make sense.
My apologies that was the first time that I have ever posted code as I am very new to the forum. Wont happen again and thank you for letting me know the proper way.
I dont know what simulator code is but it is what I am using in the IDE to achieve using a button to control the relay. The code works just fine but the relay isnt and I am wondering if its something in the code but i figured it was just mechanical
Your relay might need a 5vdc power supply on the (+) and (-) pins to drive the coil. Your code works. Try using a multimeter at the relay pins where you have the orange jumper wires.
So ive tried 5v from the arduino, 9v battery from arduino kit, 12v, and 24 volts from an old charger I cut and attached. If I use a multimeter I have 5v at the DC+ to DC - and also 5v between IN and DC -. I have continuity between the NC and COM when relay is not on and continuity between NO and COM when relay is on, yet my voltage [DC and AC] isnt present.
The only thing i can think of is that I pulled the high/low voltage jumper off and changed it while the relay was powered and maybe damaged it? Or I was sold bad relays...
Sounds like the relay is working, can you show the wiring on the contact side of the relay? How are you supplying voltage to the relay contacts, and what kind of load are you controlling?
I do not have any wiring on the contact side of the relay because I have no voltage present across the contact. When I check with a multimeter there is no 5v present on the contact side so I didnt bother wiring anything up. I did try to put dupont wires in the contact side and checked to see if there was voltage but there wasnt.
The relay contacts are just a switch, controlled by a magnetic coil. The is no connection at all between the voltage driving the relay coil and the contacts. You have to supply a voltage to the relay contacts (generally to the COM contact), which is then connected to the load through either the NC or NO contact.
So ive been doing this backward? I thought that the 5v from the side i have hooked up would supply the voltage to energize the coil therefore closing the contact and supplying voltage through the relay?
So basically i am just powering the relay right now ? When i press the button the relay clicks as if its making contact
It has been mentioned several times that you need to provide power to the center contact of the relay so that the N.O. side of the contact can provide power when the relay is energized.
Damn, Ive been looking at this all wrong. Thats what they meant by power supply in the earlier posts. I thought they meant on the side I have hooked up now.. makes sense now.
Okay okay I see that. So maybe you can help me understand this.. so how would I wire up some sort of load to the relay? Sorry I am extremely new to this.
Having a hard time visualizing how youd get something with higher voltage to hook up to the relay.