Question Regarding Vin Pin of Arduino

Thread Starter

bluexdynasty

Joined Oct 3, 2014
17
I'm trying to understand a section of the Arduino Uno's schematic. http://i.stack.imgur.com/r9NgC.gif From the arduino's site it recommends that Vin should be between 7 and 12V. However, I was reading the datasheet for the comparator (http://www.ti.com/lit/ds/symlink/lmv358.pdf) and it seems that the voltage range is -0.2 to 5.7V for the input pin.

As a result, wouldn't 12V damage the chip since 12V would input 6V into the comparator?

Thanks for the help in advance!
 

djsfantasi

Joined Apr 11, 2010
9,183
Why are you using Vin to go to the comparator?

Vin is where an external power supply is connected to power the Arduino. It's used as an alternate to powering the Uno from USB, supplying power from a battery or as an output when powering the unit with a wall wart.
 

Thread Starter

bluexdynasty

Joined Oct 3, 2014
17
Why are you using Vin to go to the comparator?

Vin is where an external power supply is connected to power the Arduino. It's used as an alternate to powering the Uno from USB, supplying power from a battery or as an output when powering the unit with a wall wart.
This schematic is from the Arduino's site. From my understanding is so that you do not have two voltages competing for the same Rail. which is why it gets compared with 3.3V indicating that you have an external supply and the P-channel would turn off, cutting off the USB supply (if you have the USB plugged in). However, this is drifting away from my original question to how 12V is handled if it's exceeding the comparator's limits.

I agree that 12V would exceed the comparator's limits. You may want to ask on the Arduino forum: http://forum.arduino.cc/
Thanks, I'll try that :)
 

pwdixon

Joined Oct 11, 2012
488
While the datasheet does say keep the input less than 5.7V there appears to be a protection diode to the positive rail so while not ideal operating conditions for the chip it may well operate as a comparator under these conditions with little danger to the diode since the input is a 10k resistor divider which would at least limit the input current and reduce power dissipation in the chip. Still it's not good practice and perhaps they could have done it better. Maybe they could have potted down the 3.3V to the comparator and have made the pot down on Vin to a lower value just to bring everything into spec on the comparator but perhaps they didn't want to add two more resistors.
 

Thread Starter

bluexdynasty

Joined Oct 3, 2014
17
Let us know what they have to say. I'm curious as to where the error lies.
Just want to update everyone on what answers I got, if any would be useful.

I talked to Sparkfun since there seems to be a lag in the arduino community regarding this. As a result, sparkfun was also stubbed but guaranteed that nothing would happened. This can be due to a tolerance on these pins going beyond the maximum rating. However, no one really knows why it works the way it does even though it's going beyond the input ratings of the op-amp.

For future references for those who want to design their own arduino-like boards, it would be best to add clamping diodes to ensure that you are not going beyond the comparators limits like the Uno32
See page 2: https://www.digilentinc.com/Data/Products/CHIPKIT-UNO32/ChipKIT Uno32_bysa_c_sch.pdf.

Sorry if this wasn't much help to where the error actually lies, I guess it's just overseeing the issue and going with "because it just works".
 

pwdixon

Joined Oct 11, 2012
488
Was my posting invisible?
I already said the chip has a protection clamping diode so that would/should do exactly what you have ended deciding is the solution.
 

GopherT

Joined Nov 23, 2012
8,009
Are you talking about the Vin pin?
I'm trying to understand a section of the Arduino Uno's schematic. http://i.stack.imgur.com/r9NgC.gif From the arduino's site it recommends that Vin should be between 7 and 12V. However, I was reading the datasheet for the comparator (http://www.ti.com/lit/ds/symlink/lmv358.pdf) and it seems that the voltage range is -0.2 to 5.7V for the input pin.

As a result, wouldn't 12V damage the chip since 12V would input 6V into the comparator?

Thanks for the help in advance!
are you talking about the Vin pin in the photo below? If so, THAT IS NOT A COMPAIRITOR INPUT!

Vin is one possible way to power the board and input (supply) voltage can be from 7 to 12 volts.
The Vin pin is just below the bar that says POWER (to the right of ground pin at the bottom of the photo).

Analog pins (including compairitor) are in the Analog pins (A0 to A5) in the bottom right of the photo.

 

Thread Starter

bluexdynasty

Joined Oct 3, 2014
17
Was my posting invisible?
I already said the chip has a protection clamping diode so that would/should do exactly what you have ended deciding is the solution.
Sorry, didn't really mean to ignore your comment. However, I doubled checked. The diode is to the Power jack not the VIN header pin itself. (see red lines I drew)
upload_2014-11-27_12-15-22.png
 

DerStrom8

Joined Feb 20, 2011
2,390
As already mentioned, VIN is for an external power input. It is connected to a 5v regulator to supply power to the board.

It is NOT used for the comparator input!
 

Thread Starter

bluexdynasty

Joined Oct 3, 2014
17
As already mentioned, VIN is for an external power input. It is connected to a 5v regulator to supply power to the board.

It is NOT used for the comparator input!
Yes, however, it also goes into the comparator to "turn off" the PMOS to subsequently cut the USB power supply(if any) to indicate there's an external power.
If you take a look at the schematic outlined in my previous comment, to the left the the image you can clearly see that VIN indeed goes into the comparator.
 

GopherT

Joined Nov 23, 2012
8,009
Ok, now I understand where the OP is going with this. The datasheet for the LmV358 says supply voltage maximum is 5.5 volts AND, max input voltages is 5.7 volts.

In the case of non-USB supply of 7 to 12 volts, the supply to the op amp (used as a comparitor), may be controlled by regulated 5 volts. Therefore, may not be a problem. The voltage divider is supplying too high of voltage to the input if supply is greater than 11.4 volts (5.7 v max is exceeded). It is ok if it comes in through the diode-protected (power In because the diode drops the 12v in to 11.4 v), but Vin should be limited to 11.4 V.

A better op amp for the application should have been selected.
 

MikeML

Joined Oct 2, 2009
5,444
I'm trying to understand a section of the Arduino Uno's schematic. http://i.stack.imgur.com/r9NgC.gif From the arduino's site it recommends that Vin should be between 7 and 12V. However, I was reading the datasheet for the comparator (http://www.ti.com/lit/ds/symlink/lmv358.pdf) and it seems that the voltage range is -0.2 to 5.7V for the input pin.

As a result, wouldn't 12V damage the chip since 12V would input 6V into the comparator?

Thanks for the help in advance!
Yes, the posted Arduino circuit violates the absolute max input spec for the LMV358. If powered from 5.0V, the LMV358 input should be constrained from going higher than 0.2V more positive than 5.0V, so 5.2V. Look at the sim below: If V(in) = 12V, the input pad of LMV358 is forced to 5.59V, 0.59V higher than V(dd), which is a violation of the spec.

234.gif

However, since the current injected into the input pin is only 8uA, that is not likely to damage anything, or cause the CMOS circuitry inside the LMV358 to latchUp.
 
Top