Electronic Circuits and Projects Forum



Analog Read Questoin

  1. #1
    Palbert Palbert is offline

    Analog Read Questoin

    Since the range of the analogRead() function ranges from 0 to 1023, if I were to supply the Arduino with +9V, would 1023 represent 9V input or would it be 5V? I'm assuming it would be 9V but I want to be sure.

    Thanks.
    "Black holes are where God divided by zero."

  2. #2
    Ian Rogers Ian Rogers is online now
    Super Moderator
    You can only read 0-5V... If you need to read 9V then you need to scale it down with a potential divider 5k1 and 3k9 is quite close..
    0
    I'd give my left arm to be ambidextrous
    Nigel's tutorials in asm... http://www.winpicprog.co.uk/
    Nigel's tutorials.. re-written in C. http://www.electro-tech-online.com/c...torials-c.html

  3. #3
    ronsimpson ronsimpson is offline
    Quote Originally Posted by Palbert View Post
    Since the range of the analogRead() function ranges from 0 to 1023, if I were to supply the Arduino with +9V, would 1023 represent 9V input or would it be 5V? I'm assuming it would be 9V but I want to be sure.
    The 1023 equals the supply voltage. Some parts run at 3.3 volts so 1023=3.3 volts. Or with a 5 volt supply 1023=5V.
    The Arduino has a maximum supply of 5.4volts so don't go to 9 volts!
    0

  4. #4
    Sceadwian Sceadwian is offline
    If you were to supply the pin with 9volts directly without proper current limiting the protection diodes will fail and you'll likely fry the I/O port.
    0

  5. Thread Starter #5
    Palbert Palbert is offline
    Sorry for the late response but thanks everyone. I just changed the functionality of the circuit I was using from analog to digital so there was no frying of the I/O port
    0
    "Black holes are where God divided by zero."

Tags
Similar Threads
Thread Starter Forum Replies Last Post
Variable Analog Delay Lines AndyWhittle Electronic Projects Design/Ideas/Reviews 5 15th October 2012, 02:41 PM
Dspic30f4011 ADC 4 analog sensor data read scn33 Microcontrollers 2 10th May 2009, 10:31 PM
PIC 16F877 read 2 analog signal chilly85 Microcontrollers 3 24th September 2008, 03:48 PM
how to read analog frquency swh Microcontrollers 2 11th May 2004, 03:15 AM
How to read Capacitors SeanHatch General Electronics Chat 4 2nd January 2003, 05:22 AM
Electronic Circuits  |  Learning Electronics

Join our community with over 100,000 Members! It's free, easy and when you're logged in you have many more features! Click to register.
Page Time: 0.07074 seconds      Memory: 7,617 KB      Queries: 17      Templates: 0