Download presentation
Presentation is loading. Please wait.
Published byJeffry Sparks Modified over 9 years ago
1
Analog on the Arduino int k; // integer = 16 bits k = analogRead(1); Analog volts value (0V → 5V) returns from 0 to 1023 into “k” (10 “bits” = 1024 values)
2
Analog range: ● dynamic range ● precision ● accuracy – repeatability ● calibration for accuracy?
3
Resolution 2 bits 0 - 3 8 bits 0 – 255 10 bits0 – 1023 16 bitsto 65000 32 bitsto over 4 billion
4
Resolution / precision 5 volts 1024 possible measurements So resolution = 5000 / 1024 millivolts Ie about 5 mV
5
● Pullups and Voltage Dividers
6
READING REFERENCE DOCUMENTS LDR THERMISTOR “NTC” LM35 Temp SENSOR
7
LDR
8
“50k OHM Thermistor NTC 3950 MF52AT”
9
Accurate temp sensor LM35 But analog sensor resolution could be better matched than this
10
● Modulo division – remainders ● Long integers – preventing rollover errors
11
PWM to LEDs (remember that?) PWM output (dimming a LED) used analogWrite(3, 150); // pin d3, 150/255 bright This was “8 bit” resolution (0 - 255)
12
Industrial Common industrial analog signalling has been 4 – 20 mA full range. How could Arduino handle that? Why start from 4 mA, not 0mA?
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.