Changes

Jump to: navigation, search

Classes/2010/VIS147A/Lab8

8 bytes removed, 15:51, 2 March 2010
Analog Output
* ...try it out? What do people in the Arduino forums say?
==== Analog Output ====
Continually varying signals, rather than discrete "steps". How does a digital microprocessor create an analog output?
Using Pulse Width Modulation (PWM), setting the duty cycle (and effective voltage) of an on-off signal. This happens 500 times per second (500 Hz).
===== LED Dimming =====
Open the example ''Examples->Analog->Fading''. The crux of this sketch is the <code>analogWrite</code> function.
Get this working.
===== Drive a Lightbulb =====
Same as the LED, but with a higher current load: your microprocessor can not source enough current to power the bulb. (Or maybe it can, but you probably don't want to test it!) We need to use a power transistor: TIP120. This allows you to control a larger current (the bulb) with a smaller current (digital out from the chip).
[[Image:Lamp_fader.png]] [[Image:BULB.JPG|400px]]
===== Drive a Motor / Speed Control =====
* Basic motor speed control (for a DC motor).
* Same circuit as above, swapping the motor for the lamp.

Navigation menu