Go Down

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

SkyDyno

So I connect it all up as per my diagram.  Just to make sure that it's behaving as I want I've checked the voltages at the switch

12v at the centre pin, OFF - LED off

ON 1 - 12v out to Aruino, 0v to Socket, LED on

ON 2 - 12v out to Socket, 0v to Arduino, LED on

now the problem is that in the centre - OFF position the LED is off but there is 2v at the other 2 switch pins.... and I need it to be 0v out, LED off

now, if I unplug the bulb, it all works as expected.

So, how do I fix it...

As I stated at the beginning, I'm not an electronics bod, so help and a solution is very much appriciated.

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.

SkyDyno

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

amdkt7

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.

SkyDyno

#19
Jan 21, 2019, 11:25 pm Last Edit: Jan 21, 2019, 11:29 pm by SkyDyno
The Arduino isn't / hasn't been connected at all...

As for a 10k resistor, how would that be added, exactly?

...and thanks for all your time and help again.

TomGeorge

Hi,
What have you got the Arduino I/O connected to?
What model Arduino are you using?

If you have something plugged into the 12v outlet and turned ON, what voltages do you get when your selector switch is in the middle OFF position?

Thanks.. Tom... :)
Everything runs on smoke, let the smoke out, it stops running....

amdkt7

#21
Jan 22, 2019, 01:35 pm Last Edit: Jan 22, 2019, 01:37 pm by amdkt7
The Arduino isn't / hasn't been connected at all...

As for a 10k resistor, how would that be added, exactly?

...and thanks for all your time and help again.
The resistor would go across your LED. One side to ground, one side to hot side of your LED. It would only be there to prove that the voltage is due to diode leakage, and has no significant meaning (any load will make it vanish). Probably just hooking the Arduino up would bleed it off.

I remember seeing two volts on a circuit recently when there was a diode involved. Pretty much the same situation, I was not expecting to see any voltage, but there was 2 volts anyway. I'm pretty sure it is normal diode leakage and will not be an issue because it is micro amps, very high impedance.

Tom's reply is also a way to test it. Any load on the 12V output will make that 2V disappear.

SkyDyno

Tom...

I have a NRF24L01 tx/rx for receiving a go command which in turn actuates a servo.The servo is powered independently from a dc/dc buck converter 12v -> 6.5v

The socket is to enable the battery to be charged without removing it from the system. The switch was to ensure that whilst the battery is being charged, the Arduino is isolated.


I have since had a play and, by putting a 2k2 resistor inline with the power to the LED the 2v discrepancy has disappeared and I get 0v at both switch terminals when in the OFF position.

Now to test it as a whole and see if it all works as I hope....

Thanks for all the advice, help and your time... :-)

amdkt7

It sounds like you put the resistor in parallel, not "inline" with the LED. 2.2k is pretty low for a bleed off resistor. If you did put in in series your LED will not be very bright.

It should be about 10-47K, probably even 100k would make that phantom voltage go away.

I don't think you even need a resistor at all, all that does is confirm that the 2 volts was leakage from the diodes.

arduin_ologist

only to send a signal to a servo.
As long as it is only the signal, not the power.


Go Up