Page 65 - Hacking Roomba
P. 65

46       Part I — Interfacing




                             up so its output voltage sags. The capacitor gives the voltage regulator a more steady power
                             supply to work from, filtering out noise and smoothing out small dropouts. It smooths out
                             dropouts by acting like a little charge reservoir for them, and it filters out noise by averaging
                             out small variations in the voltage. Capacitor values are measured in Farads (symbol: F), which
                             is a measure of how large their charge reservoir is.



                                      Noise       Dropouts

                                                                   5V
                              Voltage





                                 Time
                             FIGURE 3-4: Noise and dropouts on an otherwise stable DC voltage

                             The output capacitor C2 performs a similar role for the users of the +5 VDC power it creates.
                             Since this output voltage is used as the positive supply voltage to an IC (specifically the RS-232
                             transceiver IC), it’s historically called Vcc, Vdd, or V+. Vcc will be used here.

                             Capacitor Voltage Ratings
                             Another parameter of capacitors is their voltage rating. This is often 16V, 50V, or 100V. There’s
                             no great trick to choosing this value: the general rule-of-thumb is to pick a voltage rating
                             about twice the maximum voltage the capacitor will see. In this circuit, the maximum voltage
                             is around 16V. Double that is 32V, so the 50V capacitors will work fine.

                             Understanding LEDs

                             The next sub-circuit is the status LED, shown in Figure 3-5. Its simple purpose is to shine
                             when there is power present. This sub-circuit is not strictly necessary to make the serial tether
                             function, but it does provide some visual indication as to whether there is a current running
                             through the circuit. Also, always follow the general rule: if an LED can be added to a circuit
                             without otherwise affecting its functionality, add it! It’s fun, and it helps you troubleshoot
                             whether there is any power in your circuit.

                             In order to light an LED, you must pass current through it. The amount of current determines
                             the brightness of the LED, up to some maximum current. Beyond that maximum, the LED
                             blows up. This is entertaining once or twice but doesn’t really solve the problem of letting you
                             know when your circuit is functioning.
   60   61   62   63   64   65   66   67   68   69   70