• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Analog Read Questoin

Palbert

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

ronsimpson

Well-Known Member
Most Helpful Member
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!
 

Sceadwian

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

Palbert

Member
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 :D
 

Latest threads

EE World Online Articles

Loading

 
Top