I want to power either a 12v socket or an Arduino using a spdt switch.
so, ON(socket) - OFF - ON(Arduino) but not both at the same time.
I wish to have a single warning light on when the switch is in either of the ON positions. Obviously I can't just power the light from both of the switch terminals - it would make all of it live.
I am, therefore, looking to use 2 diodes to resolve this...
bos1714:
First, do you have any sort of current-limiting device for the warning light?
Second, can the diodes withstand the current you want flowing through the warning light.
Third, are you making sure that the voltage you are applying to the Arduino is not too much for the on-board regulator?
Thanks for your reply... Unfortunately for me, I'm not an electronics person, so I'm always open to advice from those that are... As it stands at the moment the answers are:-
No
I'd get relevant ones (with guidance)
I thought the Arduino could run from 12v (supplied to VIN)?
So the datasheet for the LED says that at 12VDC you do not need a resistor for current limiting. The datasheet also mentions, indirectly, that the current would not exceed 50mA, so a 1N4148 diode should work just fine.
As for the socket, how much current would it be drawing at any given time? You will have to make sure that the switch can handle that much current.
OK.. on looking at these, the LED is from RS and they only list the 1N4148TR as a 400ma not 200ma... will this make a difference? If not, I can order it all from the same place.
Yes, you can use the RS diode. It can handle far more current than the LED can. That LED has a current limiting resistor built in so it is ready to operate at 12V. Looks like a good design to me.
The absolute maximum DC forward current for the 1N4148 is listed as 300mA, you want to be well
below that, 150mA perhaps, for trouble-free use and long life. That 400mA is the absolute maximum pulse
rating, not useful to you...
The 1N4148 is a high speed signal diode, not a rectifier diode designed for power, but here the
load current is within its limitations, just be aware its not going to scale to higher current uses!
He is only running one led on the diode. That is less than 20ma. But yes, I would not want to run more than 100ma through a 1N4148 on a long term bias. I would pick a different diode if I needed current higher than that.
Sounds like power is leaking from the Arduino. Do you have it hooked up to the computer at the same time? The Arduino is the only place I can see power coming from resulting in 2 volts on the other switch contacts.
amdkt7:
Sounds like power is leaking from the Arduino. Do you have it hooked up to the computer at the same time? The Arduino is the only place I can see power coming from resulting in 2 volts on the other switch contacts.
To protect it whilst I checked, the Arduino is not connected at all. The 2v only happens when the LED is wired in. Take it out and the system works as I want.
To check that all the components are OK I built a second basic switch.. just the switch, LED and 2 diodes... it does the same. OK when no bulb, 2v when a bulb is included... I can only assume it's something to do with resistance or some such... but i sure as help can't see why I get a voltage when the switch contacts aren't touching....
Perhaps you are just seeing residual voltage due to the capacitance of the LED. If you hold your meter on it for a little while does it start to drop? The caps on the Arduino might be feeding it, they might take a while to discharge. If you put a 10K resistor to ground I bet it would go to zero fast. Probably nothing to worry about.