DJI Battery Monitoring

DJI charges a significant amount of money for their batteries and calls them Smart Batteries. I’ve seen the statistics reported of how many times the battery has been power cycled, as well as details of how much flight time is available. This was a new and interesting feature to me.

Screenshot_20160502-075201

I had left the drone in the back of my car overnight. The temperature had probably gotten into the high 30s, and was still in the mid 50s with the sun shining. The warning message “Battery Temperature Too Low. Warm battery to at least 15 degrees Celcius before flying” came up on my screen and would not let me initiate a takeoff.

I have used batteries in cold climates in the past. I know how temperature affects both current output from batteries and future usability. I’m impressed that DJI has built in this feature to their firmware.

Advertisements

Hobbylord Bumblebee-S

I bought a new drone platform this weekend. I was in a hobby shop and there was a Bumblebee that had been left on consignment for sale. I liked the look of it, but hoped to do more flying of my existing drone during the day so left it there. While sitting at the flying field waiting for the rain to clear I did some more research on the unit and decided I wanted to get it. I called back, made and offer, and it was accepted.

I picked up a BumbleBee that included the motors and ESCs but no control board or power distribution board. It’s a nice design that folds to a much smaller space for transport. The power connectors to the ESCs seem to be red shrouded connectors that I’ve heard commonly referred to as JST connectors. A little research points out that JST is the likely manufacturer of  the connector, but that it’s simply one of a range of connectors they sell. http://en.wikipedia.org/wiki/JST_connector.

I’ve got my APM board that I retired from my primary UAV when I decided to buy the Pixhawk, so hopefully with the simple addition of a power distribution cable and my other existing hardware I should be able to have a second flying drone.

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.

Interesting BeagleBoneBlack Power Solution

I’ve been working on a project that I want to make portable that requires powering both the BBB and a USB hub, so that enough power is supplied to the required USB peripherals. While looking for other items in Fry’s recently I came across a USB Barrel Jack Adapter. http://www.frys.com/product/7726838 At only $3 for a part with reasonable strain relief I was quite happy to give it a try.

BBB Powered by USB Hub

Barrel Jack draws power from hub to power the BeagleBone

Items plugged into my USB Hub:

  • Linksys AE1000 802.11n WiFi Adapter connected to my 5.8GHz network
  • Barrel Jack Adapter providing Power to BeagleBoneBlack
  • Logitech C920 WebCam

Because of the orientation of the ports on my hub and the fact that the AE1000 is wider than most USB devices I’m not able to plug four devices into this hub. The BBB starts and runs consistently when I apply power to the USB hub in this situation. This is a good situation for me because it appears that I just need to properly power the 2Amp/5Volts required by the hub, and it can provide enough juice for the BBB to operate.

Lesson About Power

For the past several months I’ve been learning to fly a quad copter UAV and trying to get First Person Video streaming over WiFi. This has meant that I’m spending a lot of time working with batteries and small electronics.

This last weekend I was lucky when a shorted wire was noticed before it caused significant damage.

Melted wire next to it's power supply

Melted wire next to it’s power supply

I was standing around talking when my friend asked what was smoking. I spun around to find the smoke coming from a box of cables and batteries. I flipped the wires out of the tailgate of my vehicle onto the ground. You can see the insulation is completely melted from the wire in the foreground.  I was extremely lucky that no further damage was caused.

The battery pack that caused this is a 4 cell pack producing 4.8 volts with a 2000 mAH capacity.  Each cell appears to be the same size as a AA battery. Nearby were several 3 cell LiPo batteries that produce 11.1 volts and have 2600 mAH capacity.  The LiPo batteries are a different form factor from the NiMH that I’m using.

Because I need to power both my BeagleBoard and the USB hub at close to 5 volts, I had soldered a plug for the hub into a wire I already had for powering the BeagleBoard. I wasn’t able to get the wire and its insulator to fit inside the strain relief, so for this weekend, I just left everything open, deciding that if things worked properly I could produce a better looking solution later.

A short was likely caused by a piece of bare metal from a prong on a wall plug resting against the plug where I’d neglected to use insulated heat shrink tubing. The rapid discharge of the battery obviously supplied more current than the wire was designed for, and the heat. If the heat from the first problem had melted the insulation on the larger and higher discharge LiPo batteries, my entire vehicle could have caught on fire. Perhaps actual fire could have happened with just this battery if I’d simply not noticed it for a longer period of time.

I am taking this as a reminder that even small low voltage batteries can create significant problems and should be handled with care, and for me it was lucky to learn on a small scale when I only lost the ability to run the wireless tests I wanted to run in the field that day, and not losing anything of significantly more value.