# Electronic Circuits and Projects Forum

1. ## 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.

2. 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..

3. Originally Posted by Palbert
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!

4. 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.

5. 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

 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