I'm using Arduino and relay shield to control five 24 VDC Solenoid Valves.
Now I want to place an indicator light (LED) for each valve, so whenever the valve is open, the light comes on.
Do I need 24VDC LED lights in order to do so?
There is no such thing as a "24 V LED". However, you can use a resistor in series with a LED so that the combination can be safely lit from 24 V. Let's say you want 5 mA thru the LED, and that the LED drops 2.1 V (typical of normal green LEDs). From Ohm's law, (24V - 2.1V) / 5 mA = 4.4 kΩ, which is roughly a suitable resistance.
Keep the power dissipation in mind. The resistor will drop about 22 V, which times 5 mA is 110 mW. That's getting close to the limit of a "1/8 W" resistor, so either make sure a 1/8 W resistor is properly mounted at the right temperature or use a 1/2 W resistor. Note that the power dissipation in the resitor is proportional to the LED current, which is one consideration for keeping the current low.
You can place the LED in parallel with the solenoid, or in parallel with the relay input:
simulate this circuit – Schematic created using CircuitLab
Either could work. In either case, you need to select a series resistor (R6
or R7
) to limit the current in the LED, but a significant difference is that the voltage across R6
much be must higher than R7
, because it is connected to a higher voltage. Say that the forward voltage of the LED is \$2V\$, and you want the current to be \$10mA\$. The power in R6
is then:
$$ P_{R6} = 10mA \cdot (24V-2V) = 0.22W $$
You would want to use a \$0.5W\$ resistor for R6
to handle the heat without danger of of damage. You could also decrease the LED current, which will also reduce the brightness, but maybe that's fine.
In the other case of R7
and D4
being powered by the \$5V\$ input and \$10mA\$:
$$ P_{R7} = 10mA \cdot (5V-2V) = 0.03W $$
An ordinary \$0.25W\$ resistor is in no danger of overheating at this power.