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?
Wow this forum is a real hotbed of knowledge sharing isn’t’ it
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.
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.
Put a schottky diode in series with the power to Vin
All linear regulators have an internal diode from output to input.