ENGR

Arduino Uno: Analog vs. Digital (5)

eng-life 2025. 6. 3. 07:48
반응형

A program that uses Arduino to convert analog input to digital output (ADC).

Analog: continuous, real-world. ex) voltage, temperature, pressure, humidity...

 

Digital: Bits and Bytes, On/Off, 1 or 0, high or low, non-continuous.

Arduino: Analog Vs. Digital

Arduino takes care of tith through the ADC

  • Low resolution conversion (1 bit or 2 states)

  • Higher resolution 

  • A state is one unique combination of bits

 

   - More bits provides more precision over a given voltage range.

   - If it is necessary to record small changes, more precision (bits), is reuired.

   - 8 bits is a byte

   - 10 bits is how many bytes?

How many dots per inch (DPI) do yo need to communicae your message?

Do you need to know: Is something there or is it a circule?

 

Level of Precision: Figure out what yo NEED to know

Say you wnat to hit a barn from 10 feet away with a rock. What do yo need to kkow to do that?

  • Hit the varn Yes or No = one bit  ▶ tow states

      ※ 0 = Miss,  1 = Hit

 

Say you want to know if you hit specific part of the barn…

※ 00 = Right Barn Door

     01 = Left Barn Door

     10 = Roof

     11 = Side barn

Two bits ▶ Four States

 

How many bits (states) does this knowledge require?

   4 bits → 16 states

  • More resolution costs more memory / storage / bandwidth

A state os one unique combination fo bits

  • More bits provides more precision over given voltage range
  • If it is necessary to record small changes, more precision (bits) is required.
  • 8 bits is a byte
  • 10 bits is how many bytes?

What is the difference between 8 - bit and 10 - bit conversions?

  • An 8 - bit conversion has 2 power of 8 (0 to 255) possible values
  • 8 - bit Resolution is  

  • A 10-bit conversiton has 2 powr of 10 (0 - 1023) possible values.
  • Resolution is 

  • For a device that is very precise, a 10-bit conversion allows for a higher resolution on the data (high-range accelerometers) 

 

An example of Analog to Digital Conversion: Voltage to Binary