I am building a circuit for user to interface with relays, and I am trying to build a protection to the circuit against fly-back from the inductor coil of the relay. Since there is no specific relay it is quite hard to choose the parts. All that is certain is the relay must be 5V and draws up to max of 250 mA (my recommended limit), but a protection for higher amp rating would be better.
The protection in my circuit is a diode - resistor combo. with the diode being 1n4007 which is greatly way more than what I need (which is good). the resistor is a bit tricky and what I am not sure about.
Assuming from what I know about inductors, is that it is a current source, and the voltage will depend on the resistor.
Here is my computation
V = I × R
5 = 0.25A (largest 5V coil current I found) × X ohms
X = 5/0.25
X = 20 ohms
20 ohms is for my absolute max, but for lower current loads it could go up to 50 ohms + (assuming 5V is our desired voltage). I don't know which is a better safe side value — is higher the better or the opposite? My guess is lower, but how low a resistor that generates 1 volt?
On a similar note, the power rating required for this resistor:
P = I × V
P = 0.25A × 5V
P = 1.25 watts
1.25 watt resistor are hard to find on resistor values that low. Will a 1/4 or 1/2 watt resistor work since the current is not continuous and it goes down?
Please help me if what I know is correct, thank you.