pcomp help session notes

Pulse Width Modulation:

  • Digital microcontrollers can’t produce a varying (analog) voltage; can only produce high or low
    • PWM is a “fake” analog voltage produced by a series of voltage pulses at regular intervals
    • switch flips on and off (arduino does it 250x a second)
      • width of pulses is “on”: called pulse width
    • not actually lowering the voltage; it is pseudo-analog output
  • duty (output) 0 – 255; arduino voltage is 0-5
    • maps duty to voltage; every change of one point changes the output voltage by 5/255 (because 255 duty corresponds to 5 volts)
    • 50% duty cycle when on and off is the same; effective voltage is half the total voltage
      • pwm_50_percent
    • if duty cycle is less than 50% (ie, pulses for a shorter amount of time than it pauses), the effective voltage is lower
      • pwm_33_percent

Transistors are switches

robotshop.com

Analog Output

Leave a Reply

Your email address will not be published. Required fields are marked *