Question Regarding Vin Pin of Arduino

Discussion in 'The Projects Forum' started by bluexdynasty, Nov 3, 2014.

  1. bluexdynasty

    Thread Starter New Member

    Oct 3, 2014
    17
    0
    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!
     
  2. ronv

    AAC Fanatic!

    Nov 12, 2008
    3,290
    1,255
    Schematic?
     
  3. bluexdynasty

    Thread Starter New Member

    Oct 3, 2014
    17
    0
  4. djsfantasi

    AAC Fanatic!

    Apr 11, 2010
    2,809
    834
    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.
     
    DerStrom8 likes this.
  5. ronv

    AAC Fanatic!

    Nov 12, 2008
    3,290
    1,255
    Yes, looks like a problem.... Strange.
     
  6. b1u3sf4n09

    Member

    May 23, 2014
    115
    14
    I agree that 12V would exceed the comparator's limits. You may want to ask on the Arduino forum: http://forum.arduino.cc/
     
  7. bluexdynasty

    Thread Starter New Member

    Oct 3, 2014
    17
    0
    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.

    Thanks, I'll try that :)
     
  8. b1u3sf4n09

    Member

    May 23, 2014
    115
    14
    Let us know what they have to say. I'm curious as to where the error lies.
     
  9. pwdixon

    Member

    Oct 11, 2012
    488
    56
    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.
     
  10. bluexdynasty

    Thread Starter New Member

    Oct 3, 2014
    17
    0
    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".
     
  11. pwdixon

    Member

    Oct 11, 2012
    488
    56
    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.
     
  12. GopherT

    AAC Fanatic!

    Nov 23, 2012
    6,058
    3,820
    Are you talking about the Vin pin?
    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.

    [​IMG]
     
    DerStrom8 likes this.
  13. pwdixon

    Member

    Oct 11, 2012
    488
    56
  14. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    Last edited: Nov 27, 2014
  15. pwdixon

    Member

    Oct 11, 2012
    488
    56
  16. bluexdynasty

    Thread Starter New Member

    Oct 3, 2014
    17
    0
    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
     
  17. DerStrom8

    Well-Known Member

    Feb 20, 2011
    2,428
    1,328
    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!
     
  18. bluexdynasty

    Thread Starter New Member

    Oct 3, 2014
    17
    0
    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.
     
  19. GopherT

    AAC Fanatic!

    Nov 23, 2012
    6,058
    3,820
    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.
     
  20. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    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.
     
Loading...