Page 201 - Build Your Own Quadcopter_ Power Up Your Designs with the Parallax Elev-8
P. 201

180     Bu il d  Y o ur  O w n  Q u a d c o p t e r


























                             Figure 7.18  Early version of an Elev-8 LED-lighting controller.



                             LED strips flash in a variety of patterns that just kept repeating, in a way that reminded folks
                             who saw it of the Close Encounters of the Third Kind movie without the music.
                                The more I thought about it, the more I wanted to be able to send a signal to the
                             quadcopter to dynamically change the lighting. One thought was to flash just the LEDs
                             attached to the forward booms so that I could easily see in which direction the quadcopter
                             was moving, especially as daylight faded. I also wanted to stop the flashing entirely in order
                             to conserve battery energy. These ideas would lead to the following requirements:

                                 •  Forward boom LEDs flashing
                                 •  All LEDs flashing
                                 •  No LEDs flashing
                                These requirements meant that I needed an unused three-state control switch. By
                             serendipity, the switch happened to be available on the DX-8 in the form of the Aux-1, or
                             Flaps, control switch. This light control is an ideal use of the three-position switch because
                             the Elev-8 does not and will never require flaps.
                                I tested the switch shown in Figure 7.19 and determined that it generated the following
                             pulse widths for the three switch positions, as shown in Table 7.2.
                                The LED light strips cannot be run directly from the BOE because the current draw is too
                             high. Therefore, I created four transistor driver circuits that control the four strips based on



                                             Switch Position      Pulse Width (ms)
                                             0                    1.898
                                             1                    1.505
                                             2                    1.111

                                           Table 7.2  Aux-1 (Flaps) Pulse Width versus Switch Position
   196   197   198   199   200   201   202   203   204   205   206