Hi.
I am building greenhouse automation with Arduino mega and 4 channel 5 V relay. I am about to choose power supply and solenoids and important question came to my head about the general principle.
Solenoids will be: 12V, (two of them, not sure about their power, etc as I didn't chose them yet)
Power supply: 12 V , either 5A, 10A or 20A with 9 channel output.
Do I have to provide resistors to limit the current in a circuit so the solenoids wouldn't burn?
Or as long as power supply and solenoids are 12 V I don't have to worry about the current, as long as power supply provides enough?
Sorry for maybe obvious question but I am not sure how it works..
If you are asking about whether you need a current limiting resistor when powering a 12V solenoid from 12V the answer is no. They are called 12V solenoids because they are designed to work on 12V. If that was not your question then I misunderstood what you are asking.
You should put a flyback diode across the solenoid, see the tutorial at the top of the general electronics section.
Personally I would switch the solenoids with N channel MOSFETs, not relays.
If you're using a relay board, current limiting resistor is not needed. You can connect your solenoid to the relay board
Thanks. Yes, each solenoid will be in a separate circuit with a relay and power supply. Relays will be powered from different power supply (5V).
If you are asking about whether you need a current limiting resistor when powering a 12V solenoid from 12V the answer is no. They are called 12V solenoids because they are designed to work on 12V.
I was worried more about current. I mean if 12 V power supply is 10 A and solenoid is 0.5 mA for example. I wasn't sure if I need resistor to not damage it.
Never heard about fly-back diode. I will research it. Thanks
We need to know the solenoid's current or wattage to answer your question.
Well, let's say solenoid's current will be from 300 mA to 2.5 A. I don't think it matters here. I am just asking about general principle.
From the answers I understand that I don't need resistors as long as I have 12 V power supply for 12 V solenoids.
Thank you for your fast response. Much appreciated.
This is a common misunderstanding of people new to electronics. The load (solenoid) takes the current it needs. The current rating of the supply is the most it can supply without damage to itself. In the UK mains electrical sockets are rated for 13A, a table lamp might take 50mA, the lamp does not explode with excess current when plugged into a 13A socket.
You need to learn about Ohm's Law, which explains the relationship between voltage, resistance and current.
While not relevant to your question I suggest you also learn about Kirchhoff's circuit laws, which are also fundamental to how all electrical circuits work.
Thanks very much for mentioning fly-back diode. Just checked it out, I must include it in my circuit.
I will have 4 circuits:
-12v power supply with relay1 and solenoid (lets say 5W) in first,
-12v power supply with relay2 and solenoid2 (5W) in second,
-12v power supply with relay3 and linear actuator in third to open windows,
-230V AC mains with relay4 and fan (40W) in fourth for ventilation.
Would you know if the same 4 diodes for example - 1N4007 would be good for each circuit/relay or will I need different diode for circuit4 (230V AC)?
For the DC circuits any diode with a voltage rating greater then the supply voltage and current rating greater than the current drawn by the solenoid when it is on will do. I would add at least 25% to both those figures for safety. A 1N4007 meets both requirements by a good margin. Note the diode is for the solenoid, probably not needed for the linear actuator.
Please clarify, do you mean a relay with a 12V coil being used to switch 23VAC? You can't use a diode like that on AC, it will short the mains when the polarity makes the diode forward conduct. I guarantee that the diode will come off worse. You should not need it for a fan anyway.
Unfortunately you are now causing me concern because you are working with AC at dangerous voltages and asking questions that suggest you don't know the basics of electricity. I strongly suggest you get qualified help with the high voltage side because I fear you are putting yourself and others at risk.
I am sorry for confusing you.
Lets forget about AC at the moment.
Just seen few videos and it looks like fly-back diodes are used on relays as well as on solenoids (as you said in other post). That's why I got mixed up a bit. I understand that linear actuator won't need fly-back diode, but will the relay which turns on the actuator need one?
The diodes are to go across the solenoid coils. No coils, no diode required. If you are using relay modules with built in circuits to drive the relay coils then those circuits will include a diode across the relay coil.
At the risk of confusing you a relay is a solenoid operating some mechanical contacts, which is why I would not use a relay to drive a solenoid, it is using a solenoid (relay) to operate another solenoid, I'd just use a MOSFET to drive the solenoid. However, I guess if you are just starting out then a relay module provides a good, easy solution for you.