Notifications
Clear all

Reverse voltage protection on the Arduino nano

21 Posts
4 Users
11 Reactions
219 Views
Josiah
(@josiah430)
Member
Joined: 1 month ago
Posts: 31
Topic starter  

Hello, Does the AMS1117 voltage regulator on the Arduino nano and uno have reverse voltage protection?


   
Quote
(@dronebot-workshop)
Workshop Guru Admin
Joined: 5 years ago
Posts: 1091
 

I'm not sure which Nano you are talking about, as there are several models, but the Uno does have a diode to prevent reverse voltage.  That diode is also present on the original 8-bit ATMega286 version of the Nano.  

As most other Nano boards are 3.3-volt devices (except for the Nano Every) they have a different regulator.

😎

Bill

"Never trust a computer you can’t throw out a window." — Steve Wozniak


   
Josiah reacted
ReplyQuote
Josiah
(@josiah430)
Member
Joined: 1 month ago
Posts: 31
Topic starter  

On the uno does the diode protect the power Jack and the Vin pin from reverse voltage or just the power jack?

I am using the first Arduino Nano.

Because I am powering it through the Vin pin I was wondering if there is any reverse voltage protection on the regulator?


   
ReplyQuote
(@davee)
Member
Joined: 3 years ago
Posts: 1725
 

Hi @josiah430,

 Sorry, I don't know how to equate "first Arduino Nano" to a particular version, but Google suggested a possible source of schematic for Arduino at https://www.arduino.cc/en/uploads/Main/Arduino_Nano-Rev3.2-SCH.pdf

This drawing is labelled

image

 with a date of December 2014, so it is heading towards 10 years old.

Looking at the schematic for Vin I found:

image

&

image

 which suggests PIN 1 of the Header connects directly to the input pin of the LM117-IMPX-5.0 5V voltage regulator, with no indication of diodes or other (protection) parts in this part of the path.

So if by 'reverse voltage', you mean protection against positive and negative of the incoming power to the Vin Pin 1 and a GND pin, then it will be applied directly to the regulator chip input, probably with unfortunate consequences.

-------------------

However, I suspect you are referring to the possibility that current passes from the output of the 5V regulator, to the input.

This might be an issue, if 5V was 'available' from another source at the output of the LM1117-5.0, and no voltage was applied to Vin. To answer this question, the nature of the protection you are considering becomes relevant.

THe data sheet at https://www.ti.com/lit/ds/symlink/lm1117.pdf, in section 8.4.1 Protection Diodes, shows a possible additional diode,

image

but also explains that the device has an internal diode, stating that the internal diode is normally sufficient. (Please consult the reference for the full explanation.)

--

The Arduino schematic snip above does not show an external diode, of the type discussed in the LM1117 data sheet.

--------------------

A third consideration, is what happens if power is supplied to both the USB port and Vin at the same time?

The USB input connector is shown here:

image

 with the incoming 5V from the USB host 'emerging' as VUSB, having passed through a 500mA 'resettable (?) fuse'. It then encounters a pair of capacitors and a diode, as shown in the next two snips:

image
image

The +5V at the output of the diode, shows it is connected to the output of the LM1117 voltage regulator.

The diode should prevent any current from the Vin Pin, via the LM1117 being sent to the USB host, typically the host computer.

In addition, it will impose a voltage drop of (probably) around 0.5V to any power being supplied from the USB host, so that in the event the LM1117 is outputting 5V from Vin, and the host USB is supplying 5V, then the diode voltage drop from the USB host will probably mean the diode does not conduct any current, and all of the current to the +5V net will be supplied through the LM1117.

-------

However, if there is no power input from Vin, then the power draw will be from the USB host.

-------

An unlikely, but possible scenario to be aware of, is that when the supply to Vin is unpowered, the 'supply unit' might provide a conduction path to ground. Because of the diode built into the LM1117-5.0, if power is now provided from the USB host, some of that power will flow from the output to the input of the LM1117-5.0, and onwards through the unpowered supply to ground.

--------------------

I am sorry, this is a much more complicated answer than the simple yes/no you were probably hoping for.

In addition, I can only leave you to check whether the schematic I found, matches the Nano you have. If you have a different board, then the analysis above may be inaccurate.

----------------

I hope it is useful and gives you a guide. Unfortunately, analysing what happens when there are two possible power sources is a common issue with contemporary development boards, and it can be hard to find explanations. This explanation was just typed as I looked at the diagrams, so a mistake is possible. Please try to understand the whole sequence, and add further questions for any queries, etc.

 

Best wishes, Dave


   
Josiah and Ron reacted
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 4 years ago
Posts: 7140
 

@davee @josiah430 Bill (dronebot-workshop) did an excellent video/article about this type of thing for the PICO. I know it's a totally different board, but I suspect the concepts are the same, namely do NOT allow VIN input voltage to get back to the attached computer via the USB. I had a quick peek at the Arduino.cc site but didn't see what I expected other than that +5V Autoselector but got distracted and did not follow up.

Dave is an excellent datasheet reader and the engineers at Arduino know what they are doing as well.

Bottom line is it is considered poor practice to supply power to an MCU or MPU from more than one source.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.


   
Josiah and DaveE reacted
ReplyQuote
Josiah
(@josiah430)
Member
Joined: 1 month ago
Posts: 31
Topic starter  

@davee @zander @dronebot-workshop Thank you so much for the help that answered my question.


   
ReplyQuote
Josiah
(@josiah430)
Member
Joined: 1 month ago
Posts: 31
Topic starter  

@davee @dronebot-workshop Sorry for not specifying which Arduino Nano. Would you consider this the original Arduino Nano?


   
ReplyQuote
(@davee)
Member
Joined: 3 years ago
Posts: 1725
 

Hi @josiah430,

  Sorry, I have not followed, nor do I have any Nano boards, so I am not the right person to identify a particular version.

In your situation, I would compare the schematic with the actual board. Start with identifying the individual components, particularly the integrated circuits. If they match, then check the connections between the components, particularly the paths I discussed previously.

------

Note, it is not completely clear why you asked the question. I would expect you had a particular situation or configuration that concerned you. A common concern, as Ron @zander mentioned, is supplying power via USB and directly to the board, such as via the Vin pin. This particular one can be addressed by using a USB cable, with the 5V power line from the host cut, so that the Vin connection is the only supply to the Nano.

Perhaps others have experience in identifying different versions and variants of Nanos?

Best wishes, Dave


   
Josiah reacted
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 4 years ago
Posts: 7140
 

@josiah430 I don't see the label Arduino, what about the other side. I have almost every other Nano except an original NANO. Some have Arduino on the front, some on the back. My hunch is from just looking at it that it is a genuine NANO. It is for sure the right chip, Atmel M328P. The M is for Mega.

Show us the back but if you can see it says Arduino, you have your answer.

I have a few clones, and no troubles with any other than some real cheapos are ATmega168P. I select that processor using the IDE Tools menu and it works fine, but it did take me a few hours to figure it out.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.


   
DaveE reacted
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 4 years ago
Posts: 7140
 

@davee FYI @josiah430 Great idea Dave, I never thought of modifying the cable, I always disconnected the VIN voltage then plugged in a standard USB cable to do an upload. Your idea saves a lot of time. Now to find some way to mark the cables as Data only. I will do one for a Mini-B that the NANO uses, as well as a Micro-B that most other boards use, but a USB-C is a challenge depending on how many pins are wired.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.


   
Josiah and DaveE reacted
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 4 years ago
Posts: 7140
 

@davee @josiah430 It's much easier than that Dave, just turn the board over. I don't know how many members have microscopes to do as you suggest, I am contemplating one but aside from the large number of questionable quality devices, I am out of room on my workbench. Also the good ones are pricey.

Screenshot 2024 04 19 at 13.16.35

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.


   
ReplyQuote
(@davee)
Member
Joined: 3 years ago
Posts: 1725
 

Hi Ron @zander,

Show us the back but if you can see it says Arduino, you have your answer.

Yes, but be careful to think what question you are answering.

  • Is it a 'genuine' Arduino?

 Then, possibly, you have an answer, though I wouldn't be surprised if some 'fakes' duplicated the Logo as well. (I am only being my usual cynical self; I have no evidence.)

  • Did Arduino ever make more than 1 version of Arduino Nano?

  I don't know, but the schematic was marked Rev 3.2 ... Did any previous Revs make it to the marketplace?

----------

As for USB cable surgery to cut the power input, I have only done it for the earlier 4 or 5 wire versions. USB-C might well be a tougher challenge. Perhaps, you would need two identical cables, and sacrifice the first finding out the construction and colour coding, so the second cable could be treated with a more precise strategy?

Best wishes, Dave


   
ReplyQuote
(@davee)
Member
Joined: 3 years ago
Posts: 1725
 

Hi Ron @zander,

Re I don't know how many members have microscopes to do as you suggest, 

I don't have a microscope, nor did I suggest one.

I do have a couple of cheap magnifying glasses, with simple LED lights built-in, which were about £3 or so each, from AliExpress.

Plus a multimeter and  a buzzer arrangement for checking continuity.

I used them to draw out the complete circuit of an ESP32 board that used a more unusual CHxxxx chip, and found the faulty part that prevented it from downloading new code automatically.

The tricky boards are the ones with all the part numbers scrubbed off. I was relying on Arduino not to play that game.

Remember, whenever possible, I aim for the cheapskate approach! 😊 

Best wishes, Dave


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 4 years ago
Posts: 7140
 

@davee If it is labelled Arduino that is good enough for me. Spending any time at that price point to see if I can determine if it is fake or not simply isn't worth it especially since the odds of it being fake  are extremely low.

As far as versions, that is a valid question and I have no answer. If I was interested I would craft a google search to find the Arduino document that spells it out. My hunch is it makes no difference, but maybe not. Not worth mytime to worry about it.

Here are a couple devices to make the USB-C cable surgery easier. There are others.

FULL 22 lead breakout

6 lead breakout

 

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 4 years ago
Posts: 7140
 

@davee Even with a magnifying glass as you suggest, I am unable to reliably follow all the traces, remember, some are on other levels so a bright back light is needed at least. I have seen pros using  small X-Ray devices to ferret out deeper traces but even they can fail if there are too many layers.

In any case, just turning the board over is all that is needed in this case.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.


   
ReplyQuote
Page 1 / 2