element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Arduino
  • Products
  • More
Arduino
Arduino Forum 5V on ADC that is set to a reference of 3.3V? What happens?
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Arduino to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Verified Answer
  • Replies 13 replies
  • Answers 1 answer
  • Subscribers 393 subscribers
  • Views 3708 views
  • Users 0 members are here
  • aref
  • analogreference
  • arduino
Related

5V on ADC that is set to a reference of 3.3V? What happens?

Former Member
Former Member over 11 years ago

Hi,

 

Normally you can put up to 5V to the analog-pins. Let's say you set your reference to 3.3V by connecting the 3.3V to the AREF-pin and call analogReference(EXTERNAL).

 

What happens now if you put 5V to the pin? Will it still put out 1024 as MAX-value or will it burn the arduino?

 

Background:

I have a thermal sensor that has a range from 500 to about 1700 Ohm for a temperature range from 0°C to 200°C. Combined with a 1kOhm resistor I want to use this as a voltage divider for the analog-in. With these settings the voltage will be between 1.6V and 3.15V, so i can't use the full range of the ADC but by setting the reference voltage to 3.3V I can increase the useable area from about 30% to 50% which gives me a better temperature resolution (0.4°C/step instead of 0.6°C).

 

BUT when the temperature increases above 235°C the input voltage will increase over 3.3V!

 

Thx in advance for your answers!

  • Sign in to reply
  • Cancel
Parents
  • Robert Peter Oakes
    0 Robert Peter Oakes over 11 years ago

    If you read the datasheet on the ATMEGA328, it states that the Analog VCC should be the same as the Digital VCC, this would be typically 5V on an arduino and if you want max speed, it can operate way lower if needed but at ta slower speed

     

    The analog inputs should not exceed the chip supply voltage byno more than what appears to be 0.5V

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • jw0752
    0 jw0752 over 11 years ago in reply to Robert Peter Oakes

    Hi Peter- You are the expert in this area as far as I am concerned. Doesn't the use of the analogReference() function allow one to set the ADC to a shorter domain thus giving a better resolution? I don't think that Marc expects to have an input to the analog pin on the UNO greater than 3.3V. Therefore he wanted the 1023 points of resolution to be between 0 volts and 3.3 volts. His concern was that since a voltage of more than 3.3 volts is possible would it harm the UNO and what would the analogRead() return for a value. I am very new to the analogReference () function so any light you can shine on it would be appreciated.

    John

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Robert Peter Oakes
    0 Robert Peter Oakes over 11 years ago in reply to jw0752

    YYou are correct in that by setting Aref to different values you can change the equivalent full scale range, so if you make Aref to 3.3v then you will get 1023 at 3.3v, he also was concerned about when the input went up to potentially 5v or more in extreamly high temp scenarios, this is where you can not exceed supply voltage by more than 0.5v

     

    also you should not really use the supply as the Aref as it will produce a noisy reading and effectively loose resolution

     

    your available options re 1.1v Aref from internal, 5v internal but from supply so will be noisy and dependent on supply of course or an external Aref, I would suggest a low cost band gap reference chip set to say 2.048 volts to vice a nice range to the reading.

    also there is mention of an input offset which will also reduce effective resolution, this could be removed with a simple OpAmp circuit

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Reply
  • Robert Peter Oakes
    0 Robert Peter Oakes over 11 years ago in reply to jw0752

    YYou are correct in that by setting Aref to different values you can change the equivalent full scale range, so if you make Aref to 3.3v then you will get 1023 at 3.3v, he also was concerned about when the input went up to potentially 5v or more in extreamly high temp scenarios, this is where you can not exceed supply voltage by more than 0.5v

     

    also you should not really use the supply as the Aref as it will produce a noisy reading and effectively loose resolution

     

    your available options re 1.1v Aref from internal, 5v internal but from supply so will be noisy and dependent on supply of course or an external Aref, I would suggest a low cost band gap reference chip set to say 2.048 volts to vice a nice range to the reading.

    also there is mention of an input offset which will also reduce effective resolution, this could be removed with a simple OpAmp circuit

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Children
  • Former Member
    0 Former Member over 11 years ago in reply to Robert Peter Oakes

    The voltage will definitely not go over 5V so i should be fine. Would it make sense to put a 10 µF in parallel to the 3.3V and GND close to the AREF pin to smooth the signal?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • jw0752
    0 jw0752 over 11 years ago in reply to Former Member


    Hi Marc - Adding a capacitor will effecively average your signal and slow its response. You could experiment with different values to see if you like the effect.

    John

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • jw0752
    0 jw0752 over 11 years ago in reply to Former Member


    Hi Marc - I thought of one more thing of consequence. Depending on the mass of the heat source that you are measuring a capacitor could make your sensor lag the heat source. If the heater can heat up faster than the sensor can register, your heat will oscillate between a peak high and a peak low as the sensor chases the actual temperature and over compensates. This is where the experimentation will come in. If your heat source is high mass this will be less of a problem as the sensor and circuit will be able to keep up.

    John

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 11 years ago in reply to jw0752

    well, I didn't think about that. I think i will just leave the capacitor out. I don't have the heat source yet (should arrive tomorrow) so I couldn't do any measurements.yet. Either way I won't react on every measured value. I will always average over the last X measurement. X depends on the heating speed of the source. I will have to do some experiments there.

    Another point is the way of controling the source. Basically I aim for a temp-range from 160°C to 200°C.  I think about driving the MOSFET with a PWM-signal. The arduino PWM is rated at 490 or 980 Hz. This should be slow enough because even with 980Hz and a PMW-rate of 1% one pulse is about 10 µs long and all timings of the MOSFET are rated in low ns. I don't know exactly how the MOSFET will distort the signal, but because it's a simple heating coil, I think that the output should still be some kind of PWM-signal but maybe not as sqare as directly from the arduino. By that I could put the source in an "always on"-state, providing just enough heat to keep the temperature.

    Hmm. I think of something like that. At first heating up to a certain base level, maybe 160°. From that point on I map the temp-difference to the PWM-rate. HIgh distance => high rate. This should slow down the heating rate, the closer I get to the target value of maybe 180°.  I think this could avoid jumping around between two values or at least decrease the range.

     

    looks like I have to check out some things when all the parts are here, but Hey! isn't it that what this is all about? image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • jw0752
    0 jw0752 over 11 years ago in reply to Former Member

    Hi Marc - Sorry I misread your post and thought you were talking about putting the 10uF cap between your input and ground to stabilize the input from your sensor. The placement you originally proposed would not effect your readings as I indicated.

    John

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube