Go Down

Topic: Diode question in my Arduino project... (Read 614 times) previous topic - next topic

SkyDyno

Jan 18, 2019, 12:40 pm Last Edit: Jan 18, 2019, 01:51 pm by SkyDyno
Hi there...

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...



Is the diagram correct? Will it work as I want?


Thanks for your time, help and patience...

bos1714

Hello there!

The diode part of the circuit looks good, as each diode would prevent powering the unwanted unit.


Just a couple things.

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?
Time line? Time isn't made out of lines. It is made out of circles. That is why clocks are round.

SkyDyno

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:-

1.  No

2.  I'd get relevant ones (with guidance)

3.  I thought the Arduino could run from 12v (supplied to VIN)?

This is why I ask those that know... :-[


bos1714

Excellent.

So you are going to need some current limiting device, unless you want the warning light to explode.

When you decide what current you want through the light, we can look at some diodes.

You are correct in that the Vin pin can take 12V! I just wanted to double check.

Have you already selected the light and the switch that you are going to use? If so can you post some electrical specifications like a datasheet?
Time line? Time isn't made out of lines. It is made out of circles. That is why clocks are round.

SkyDyno

I was thinking of an automotive dashboard light or 12v LED (12v LED)

The switch is a generic spdt one... it has  6A 125VAC ; 2A 250VAC  on it's side.

So, I have the switch the rest I can get once I know what will work....

bos1714

Awesome.

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.

Time line? Time isn't made out of lines. It is made out of circles. That is why clocks are round.

SkyDyno

The socket is so that the battery can be trickle charged in situ rather that used for power which is why I don't want it live all the time...

bos1714

Oh I see now.

I'd say you are ready to get the components and start assembling.
Time line? Time isn't made out of lines. It is made out of circles. That is why clocks are round.

SkyDyno

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.

amdkt7

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.

MarkT

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!
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

SkyDyno

bos1714 - many thanks for your help, very much appreciated.

Thanks guys... Wasn't looking to increase the load, just if it would be an OK alternative  :)


This is exactly what forums should be like.. friendly, informative and helpful.  Thank you.

amdkt7

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.

Paul__B

3.  I thought the Arduino could run from 12v (supplied to VIN)?
Sort of.

Only if you do not expect to power anything from the 5 V or 3.3 V pins, or more than a couple of LEDs on the data pins.

No relay modules, no display modules, no shields ...

If you anticipate doing any of these things, you need a "buck converter" module to provide 5 V.

SkyDyno

Sort of.

Only if you do not expect to power anything from the 5 V or 3.3 V pins, or more than a couple of LEDs on the data pins.

No relay modules, no display modules, no shields ...

If you anticipate doing any of these things, you need a "buck converter" module to provide 5 V.
only to send a signal to a servo.

Go Up