User Tools

Site Tools


arduino:arduino_crash_course:analog_output

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
arduino:arduino_crash_course:analog_output [2012/11/12 18:31] – [PWM] mithatarduino:arduino_crash_course:analog_output [2017/12/06 00:55] (current) – [Analog Output] mithat
Line 1: Line 1:
 ====== Analog Output ====== ====== Analog Output ======
  
-An analog signal is one that can have any value over a continuous range. Arduino employs an approximation to analog outputs and calls these outputs "analog" outputs--even though they are actually a special implementations of Boolean output.+An analog signal is one that can have any value over a continuous range. Arduino employs an approximation to analog outputs and calls these outputs "analog" outputs---even though they are actually a special implementations of Boolean (i.e., "digital"output.
  
 ===== PWM ===== ===== PWM =====
  
-Arduino achieves analog-like outputs by using a technique called **Pulse Width Modulation** (**PWM**). PWM is technique where a Boolean output is switched on and off very quickly (in the case of the Arduino Uno, it's about TODO times per second). The ratio of the time the output is in the HIGH state to the total period time (i.e., time HIGH + time LOW) is called the duty cycle. If the duty cycle is 100%, then the output will appear to be at maximum output. If the duty cycle is 50%, then the output will appear to be at half the maximum output; a duty cycle of 25% makes the output appear to be at a quarter of maximum.+Arduino achieves analog-like outputs by using a technique called **Pulse Width Modulation** (**PWM**). PWM is technique where a Boolean output is switched on and off very quickly (in the case of the Arduino Uno, it's about 490 times per second). The ratio of the time the output is in the HIGH state to the total period time (i.e., time HIGH + time LOW) is called the **duty cyle**. If the duty cycle is 100%, then the output will appear to be at maximum output. If the duty cycle is 50%, then the output will appear to be at half the maximum output; a duty cycle of 25% makes the output appear to be at a quarter of maximum. Arduino lets you the duty cycle of its PWM outputs to one of 256 (0 to 255) values,
  
-So one way that Arduino "analog" outputs are not really analog outputs is that they are actually rapidly switched "digital" outputs. Another way that Arduino "analog" outputs are not really analog outputs is that you are only able to set the duty cycle to one of 256 (0 to 255) values. If you want something in between any two values, you're stuck.+So one way that Arduino "analog" outputs are not really analog outputs is that they are actually rapidly switched "digital" outputs. Another way that Arduino "analog" outputs are not really analog outputs is that you are only able to set the duty cycle to one of 256 values. If you want something in between any two values, you're stuck.
  
 Check the documentation for your Arduino device to determine which outputs can be used as analog outputs and which can only be used as digital outputs. Check the documentation for your Arduino device to determine which outputs can be used as analog outputs and which can only be used as digital outputs.
arduino/arduino_crash_course/analog_output.1352745098.txt.gz · Last modified: 2012/11/12 18:31 by mithat

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki