Preventing Arduino Nano sending power OUT of VIN?

Hi all,

I've just started tinkering with Arduino and electronics in general after a long break. My electronics knowledge is basic so please excuse me if this is a 'stupid' question. I've had a search of google but can't find the answer to my specifi question, perhaps I'm using the wrong terms to describe it.

I have an Arduino nano, L298N motor driver, DHT11 sensor and Ardufruit SPI LCD display.

The L298N has a 12V input (this will drive a small DC fan). It also has a 5v regulated output. I am taking that 5v output and using to to power the LCD backlight, DHT11 sensor and the Arduino nano via VIN.

This seems to work fine.

Now let's say I'm programming the NANO without the 12v supply to the L298N connected, the Nano back feeds 5v out of the VIN pin to the LCD, DHT11 and L298N. I want to avoid this.

How do I allow the Adruino to take IN power via the VIN pin but stop it from pushing power out of that pin?

I initially thought I might be able to put a diode between VIN and the external components so that the Nano would still received ~4.3v when the external supply is on, but, would not pass voltage/current back to the external components when it's sourcing the current. I had a 1N4001 sitting around so tried to pop that in. It delivered the expected 4.3v to the Nano when the external supply was providing power, however, when powering the Nano via USB it still feeds back ~2.7v to the external components (LCD flickers a little).

Clearly I've done something wrong. As I said my electronics knowledge is basic and I have a lot to learn. I'd like to understand if what I'm trying is plain wrong, if the diode is simply not the correct component or is there's a more correct/better way to achieve what I want without making things too complicated?

Many Thanks,

Justin.

Wow this forum is a real hotbed of knowledge sharing isn’t’ it :confused:

JBF_UK:
I initially thought I might be able to put a diode between VIN and the external components so that the Nano would still received ~4.3v when the external supply is on, but, would not pass voltage/current back to the external components when it's sourcing the current.

Here's the schematic diagram of the Nano https://www.arduino.cc/en/uploads/Main/Arduino_Nano-Rev3.2-SCH.pdf

Please explain again how VIN becomes a VOUT under your scenario?

I have no idea, but, the Nano appears to power other devices (connected to the NANO VIN) when it's connected to USB. To me this seems undesirable.

JBF_UK:
I have no idea, but, the Nano appears to power other devices (connected to the NANO VIN) when it's connected to USB. To me this seems undesirable.

Post your schematic.

.

  1. You need to supply power to connected digital devices when it's connected to USB, since you have data lines connected to those devices, and the arduino will (likely, depending on your code) attempt to drive them high; almost no device is rated to get a voltage on any I/O pin that exceeds the supply voltage; usually these are protected by an internal diode - this results in the device being "back powered" from the voltage you're applying to it's I/O lines via these internal protection diodes, however these protection diodes are generally not rated for more than 1mA (often less). You can damage the external devices by backpowering them this way. This is probably why your diode trick didn't work.

  2. When using external 5v, it should not go to Vin - vin is connected to the input of a regulator with more than a volt of dropout, so the arduino would be running on 3.something volts, instead of 5. External 5v should go to the 5v pin. Only external voltage 7~9v (up to 12v works, but only if current used is very low) is appropriate for the Vin pin.

  3. The regulator will bring Vin to the voltage of Vout (ie, the 5v pin) if it's not being externally powered; this is almost universal behavior for LDOs.

Dears

I am having the same problem.

I use an Arduino Nano Every (it's an original product, not a clone) for a small air quality project.

I use the +5V Vout pin to power an LCD, DHT22, BMP388, SGP30 and PMS5003 sensors.

For the development and troubleshooting part I've used the microUSB to power the Arduino and all was fine and working as expected.

I've then added a buck converter and used the VIN pin to power the board. The buck converter delivers +7V (stepped down from a +9V 1Ah power adapter).

All seemed to work fine.

But, one day I wanted to review a bit the code. I've unplugged the external adapter (the buck converter was still connected to the VIN pin) and inserted the usb plug. The small 7-segment display on the buck converter dimly lit up and i was unable to connect to the arduino.

I've plugged the power adapter back and i was able to use the usb connection.

So indeed, it seems that the arduino every back feeds +5v to the VIN pin whenever there is power applied via the USB socket. To me, this is not a desirable behavior. Because the unit (arduino + sensors + LCD + buck converter) needs to be sealed, i want to be able to program the board by simply supplying the power via the USB. I do not want to have to also power the board externally.

Is there a way to stop this behavior? The OP said that even using a diode this is still happening.

Any feedback is more than appreciated.

The alternative would be to use a switch to open the circuit between VIN and the buck converter. But hopefully there is another way.

Thanks!
Bogdan

Put a schottky diode in series with the power to Vin

All linear regulators have an internal diode from output to input.