APM Status LEDs using a ULN2803 Darlington Transistor Array

Successful Evening Flying

Successful Evening Flying

As purchased, my QuadCopter/UAV came with strips of LEDs wrapping each of the motor arms wired directly to the power distribution board. When I plug the battery into the board, all of the lights come on. This is good for recognizing the orientation of the UAV but does nothing for recognizing the status of the control board.

The control board I am using is an ArduPilot Mega 2.5 including the GPS and Ground Station Telemetry. I often refer to it as the APM. The APM has several LEDs that blink to indicate various status information, which is useful if you can remember what they mean, but they are individual LEDs and hard to see from any distance. I have installed my APM on the interior of my UAV, which makes the LEDs only visible from certain angles.

I decided that I wanted the primary lights to be useful as status indicators.

Researching the topic I came up with two approaches. One is to use a Darlington Transistor Array driven directly from signal pins in the APM to control LEDs running at higher voltage and amperage than provided directly from the APM. The other is to have a device spliced into the serial telemetry link that interprets the messages being sent to the ground station, controlling and powering the LEDs appropriately.

An example of the direct driven version is shown on the Arducopter website. It also links to a board that is available from JDrones that can be used for the second version.  The JDrones board requires further hardware to be able to properly splice into the serial link. The JDrones hardware looks nice, and I may still go and buy it, but I wanted to try the direct driven version first. Part of my reason was cost, and part of my reason was wanting more experience with the DIY process as opposed to the Off-the-Shelf process. The JDrones solution would cost ~$20 for the first item and ~$10 for the second, while the ULN2803 chips themselves cost under 75¢. None of that includes the wiring or time involved, but most of this is related to the fun of learning so my decision seemed like a good plan.

The most useful post related to my decision was on the DIYDrones site. It’s over two years old but still relevant. This post on configuring the APM firmware was also useful.

Turnigy Waterproof LED Packaging

Turnigy Waterproof LED Packaging

Because I had banged up some of the original LEDs I also am replacing the strips with new LEDs that have waterproof protection and should provide slightly more impact resistance. Before working on this project I had priced individual LEDs and they always seem to be priced so that they cost close to $1 per LED. These LED strips sold at hobby supply stores are designed to be powered simply by applying 12 volts. They are designed to be cut at specific locations between each three LEDs. The hobby store I got them from sells them in 1 meter lenghts, providing 60 LEDs. The 1 meter strip is rated at 400mA at 12 volts, so that should work out to 20mA per segment.
My original lighting used 7 segments to wrap each arm. If the power requirements are the same it would have drawn 140mA per arm, or a total of 560mA for the 4 arms. By reducing to 6 segments per arm, I should reduce the power requirement for lighting below 500mA. This might be important because the ULN2803 lists its capacity as 500mA per channel.

Radio Shack DIP Project Board

Radio Shack DIP Project Board

Before starting my soldering I came across a radio shack board designed to take a DIP package and give multiple conductivity pads per pin. I decided that it was absolutely the correct tool for my first project. After getting a successful system, I could reproduce the system in a much smaller package, but this would be a good first direction. I found an inexpensive package of short servo extensions online and decided that I’d rather use those to connect the LEDs than build my own connectors or solder the LEDs directly to my project. This lets me change the device driving my LEDs in the future without resoldering everything.

My soldering skills are still not what I’d like, and I spent much time soldering the wires to the board. The finished product is not as nice as what I was envisioning before I started the process.

ULN2803 Mounted Radio Shack Board with wires soldered in place.

ULN2803 Mounted Radio Shack Board with wires soldered in place.

Back of Radio Shack Board showing the soldering.

Back of Radio Shack Board showing the soldering.

The two long leads going to the left are designed to connect to the signal pins 4 through 9 of the APM. The short lead on the left is supposed to connect to 12 volt power. The six short leads on the right can connect to six different 12 volt LED strips or indicators.

The board I used is designed to be able to hold a 20 pin DIP package, but the ULN2803 is only 18 pins. I used the pads for the top two pins to create a common 12 volt positive power pad to solder all of the LED leads together.

This project is not yet functional, and I’m not sure why.

I tested that the LEDS and power were properly connected by using a jumper wire and making content on the ULN2803 to the pins down the right side of the package and the ground pin on the package lower left. I was able to light up the LEDs individually using that method.

It has been suggested that I need to run the ground wire back to the APM ground plane for it to be able to send signals on it’s signalling channel. This makes sense to me, but I’m hesitant to do it because I don’t want to burn out my APM while experimenting with the rest of the electronics.

The first links building this style project were using a ULN2003 while I’m using a ULN2803. I’ve not figured out the difference between the two chips, but it’s possibly related to my problem.

Any suggestions as two what I’ve done wrong are welcome.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s