Voltage needed for IN pin of relay

Hi everyone, ive been having this issue for a while. What I am trying to do is control a pump with a 12v relay with a 12v power supply. But when i turn it on the relay just does random actions not specified in the code.
What I want to know is that because its a 12v relay and the digital pins of arduino only output 5v do I need a step up boost converter for the IN pin of the relay. (The dc+ and COM are both wired to 12v).

Any help with this would be great because I am very confused.

Thanks in advance.

Please give a link the the relay/module you have, and provide a full schematic of your wiring! As well as your code.

Yes, you will need a transistor to act as a 12V switch for your relay. You will also need to have a snubber diode across your pump so you don't get voltages spikes back into the system when turning it on/off

Post a link to the motor. If You only use one direction a logic level N channel MOSFET can replace both relay and transistor.

Relays have 2 voltage specs.

The coil voltage (the "input" or "control" voltage). There are relays with 5V coils but you need a driver circuit because the Arduino can't put-out enough current. If you have 12V available you can use a relay with a 12V coil and the driver circuit can boost the voltage and the current.

The maximum contact voltage ("output" or "switched" voltage). This is the maximum so it's OK to use 120V rated contacts with 12V.

If you have a relay board or a relay module it should have the driver built-in.

Try your software with just an LED (with the usual series resistor). If that works there's probably something wrong with your driver circuit.

This is a reply for all the comments I have seen

Here is the schematic, for just one pump. Multiple will be used once working.

This is the relay link

The code is just to turn it on for 2 seconds then off so the problem isnt in the code.

I dont have a link to the pump, sorry.

Put a meter on the 12V t check for voltages whiles the relay is off and then switch the relay on. Does the 12V drop?

Just buy a 5V relay! Save you lots of time!

I had a 5v relay same problem, cause i need 12v for the pumps to run as fast as they can.

This makes no sense! A 5V relay uses the 5V supply to run, but can switch the 12V no problem.

Mine is a 12v supply though, and if you wire up dc+ and COM to 5v then the pump will only run at 5v. But i did try with a 5v relay with 12v supply and it still didnt work.

But you have a 5V regulator outputting 5V.

Yes true, im not sure what you are trying to say, if i wire up the relay to run on the 5v then the pump doesnt run at full power


A relay just closes contacts, it does not matter what the turn on voltage is, they are independent!

When the contacts close, its like turning on a switch (exactly like it actually, using electricity instead of a finger)

Ok the reason I say this is because the pump has power and ground, the power is connected to normally open pin. This means that the only way the pump gets power is through the relay. So if you power the relay with 12v the pump will operate at 12v if you power the relay with 5v then the pump will operate at 5v. Maybe this isnt the best way to wire it, if theres a better way please let me know. Thanks in advance.

Notice how the relay is operated with 5V BUT switches 12V?

According to the link, there is a configuration jumper to allow HIGH or LOW signals to control the relay. Since you are not supply a +12V HIGH signal, you could try changing that jumper to active LOW. That way, when the arduino puts out 0V, it activates the relay. When the arduino puts out +5V, it might be high enough for the relay to consider it OFF. I don't know, you could try it.

Better, drive a transistor with the arduino which drives the relay at +12V

Even better, buy a 5V relay

Right I have 5v relays but I had the same issue, thats why i bought 12v relays thinking that was the problem. I wired up the 5v relay the same as I did the 12v relay but it the relay still just turned on and off randomly. Do I need to wire it up differently? Currently DC+ and COM are at 12v, DC- to ground NORMALLY OPEN is positive of pump and IN is from one of arduino digital pins

What is your 12V supply? How much current can it produce for the motor? What happens if you connect the 12V directly to the motor? Your drawing shows a lot of GNDS - are they all tied together?

The source plugs into mains
Its a 2A source
All the grounds are tied
And if i connect pump straight to the 12v source it runs at full power perfectly fine/ normally