digitalRead current

Working on a project and now wondering if my schematic has a short.

Using a nano to read the voltage coming from a switch. The switch has a built-in LED and was made for 12V (car).

When the switch is closed, current is supplied from a transformer (12V->5V) through the switch and to pin 11 on the nano which then reads it on/off and writes from a different pin if the read from pin 11 is HIGH.

Is this a problem? It's getting 5V, but i'm worried it's too much current. To measure the current I'd have to unsolder (until I get a clamp meter). Everything seems to work, but I don't want to burn out the nano.

Thanks.

It is not really evident how you have it all connected and whether your arrangement is safe. There is a clear risk of damage to the Arduino.

Let's have a proper circuit diagram and/ or at least a good picture in proper light showing all parts.

Add a resistor in series with the pin, say 10k, then its protected should the voltage be wrong, or if the voltage
happens to be present when the Nano is powered down.

disclaimer: this schematic has a few issues not related to my question/project and hopefully doesn't complicate my original question. I used a free Linux app to try and make less of a mess than freehand.

The issues you need to ignore are: 1. I have no idea what chip/processor is in this drawing, I just tried to find something that had a similar pin arrangement 2. the relays weren't quite right either. I am actually using 2 spdt relays that run and trigger off 5V, but are ultimately controlling 12V to a motor. 3. the switches have 3 poles because of an internal LED that lights when the circuit is closed. One pin to ground, a second pin to 5V supply from transformer, 3rd pin connected on towards the arduino to digitalRead the voltage coming in.

thanks in advance to the gurus. it'd be nice if the readingpin impedance is high enough that I don't need to worry about current.

Can't see the LEDs in the switches on that diagram. Otherwise it looks OK but we would of course, wire the switches to ground and use pull-up resistors.

For future reference, another issue with the schematic and written description is that you've described and drawn the 12 to 5 volt conversion device as a "transformer". Transformers only work with AC power so you presumably have what would be accurately described as a "DC to DC converter".

here is a hand drawn version

OP’s schematic.

5v on the Vin pin will not work.

So it's currently working, I was just concerned I had too much current coming from the switches back into the reading pins.

Would you:

  1. Leave it alone because it's working
  2. Move the 5V supply on the VIN to the 5V pin
  3. Remove the 5V to the VIN and use the 12V supply to the VIN instead.

Please confirm you do indeed have regulated 5VDC.

If so, feed this 5v into the 5v pin on the Arduino.

The way you are drawing your voltage converter is ‘not’ correct.

What voltage converter are you using?

I have 5VDC...not sure if it's regulated. I'm using a cheap 12V to 5V converter from Amazon. "Magnolian Car LED Display Power Supply 12V to 5V 3A DC/DC Buck Converter Module."

I didn't realize there was a difference between AC transformer and DC converter. Is the drawing wrong because I drew it as a transformer?

Amazon- Converter 12V to 5V

Is the drawing wrong because I drew it as a transformer?

Yes.

I have 5VDC...not sure if it's regulated. I'm using a cheap 12V to 5V converter from Amazon. "Magnolian Car LED Display Power Supply 12V to 5V 3A DC/DC Buck Converter Module."

Yes that is regulated.

You should be okay connecting that converter o/p to the 5v pin.

There are a few bad reviews by people with that converter :frowning: