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

FrSky X4rSB Receiver controlling Eachine Racer 250

I wanted to use S.Bus communication to connect my receiver to my new Eachine 250 
Racer drone. I wanted to be able to remotely control the lights on the drone. I wanted to bring back telemetry from the drone to my transmitter. All of those are possible with the X series receivers from FrSky.

20160513_093703

I’ve used the X8R receivers in the past, but I bought an X4R-SB receiver specifically for this drone.

In it’s default configuration it will output PWM on the pins for Channels 1 through 3 and S.Bus on the 4th connector. It has a separate input connection on the side for S.Port telemetry devices and an analog data line.

By putting a jumper on the signal pins, as shown in the picture above, during the binding process, the output is changed so that CPPM channels 1-8 are on the first port, PWM Channel 9 and 10 on the second and third ports, and S.Bus on the fourth port.

I’ve got the S.Bus connection going to the main port on my CC3D flight controller, a cable to control the lights on the third port (channel 10) and the first two ports remain unused. I have the momentary switch SH on my Taranis configured to control Channel 10. Toggling it cycles the LEDs on my Eachine Racer through the  off and on colored states.

The telemetry cable is connected first to a FrSky SP-GPS – Smart Port GPS Sensor (GPS-V2) and daisy chain connected to a FrSky SP-FLVS – Smart Port Lipo Voltage Sensor.

20160513_10061520160513_10062720160513_10162020160513_101628

The GPS Sensor is a new item in my arsenal. I’ve used GPS chips connected to my flight controllers in the past, which allow the flight controller to direct its flight position using GPS. Since this is not connected into the flight controller, it’s purely a toy, though it may help finding the drone if I get confused and crash it away from myself. The last data received in my transmitter remains on the display, which I could then use to assist my search for the drone.

The voltage sensor connects to the balance plug on the battery, allowing me to monitor the state of the individual battery cells during flight, as well as having low battery alerts reported on the overall voltage.

For installation of this receiver in my drone, I’d come across a 3d model for a holder. I had never used a 3d printer before, though I’ve been fascinated with them for several years. I realized that Windows 10 has a 3d Modeling program installed by default, 3D Builder, and that it can print using an on-line service.  Because the service accepts the file and tells you how much it is going to cost delivered, this was an easy first try. I downloaded files for both a battery protector tray and the previously mentioned receiver tray, merged them into a single model file, and had them delivered for $27.15. Other than the time involved for the delivery I was happy with the result. I submitted the order on 4/26/2016. I received notice that it shipped on 5/10/2016. It finally arrived on 5/13/2016.

20160517_17394420160517_17375520160517_174014

The design here has the receiver extending in the model over the flight controller and under the video transmitter. I’m not positive that I’m going to use the battery tray. If I don’t use it, I just need to get screw extenders to install the receiver directly above the flight controller.

Eachine Racer 250

I decided to get into the FPV Racing Drone scene and found this unit available in an almost ready to fly version for $140.

20160513_101937

Almost ready to fly means that I need to add my own transmitter and receiver. Because it’s FPV, it also means that I need my own video receiver and display.

I have an FrSky Taranis transmitter, several compatible receivers, and a set of Fatshark Attitude V2 goggles,  so when the model arrived, I expected all I would need to do was charge the battery and it was ready to fly.

It turned out it was slightly more complicated, but the past three years of playing with drones meant that it wasn’t too involved.

First I found a useful wiki page dedicated to the racer, with plenty of information. It allowed me to understand that I’d got version 5 of the racer, with the difference from version 4 being that they’d removed a safety tray that kept the battery from crushing the flight controller.

I figured out that to use S.Bus to communicate between my receiver and the flight controller, I’d need to download software to my PC, connect the PC to the flight controller with a USB cable, and configure it’s inputs. The instructions I found all referred to OpenPilot. OpenPilot is an open source project that is now defunct, including the domain name itself not going anywhere. The replacement project that is functionally similar, is LibrePilot. I believe that http://opwiki.readthedocs.io/en/latest/user_manual/index.html is the old documentation from the OpenPilot project, while the LibrePilot home page has links to all of the new project.

After downloading LibrePilot and installing the software on my PC, I couldn’t change the settings on the firmware that had shipped on my drone without upgrading to new firmware and resetting all of the configuration.  After some hesitation, I allowed it to upgrade, then followed the wizard to configure the new firmware. I was impressed at the ease of setup, and later when I flew the device, it proved that the defaults worked nicely out of the box.

FirmwareMismatch2016-04-20 (1)2016-04-20 (3)2016-04-20 (4)

The original firmware had a rose icon, while the new firmware shows a warning icon. That could mean something important, but I never found any mention and the system seems to be working correctly. You can see that the drone shipped with a firmware dated 2015-03-12 and the new version is dated 2015-10-21.

Connecting the receiver to the flight controller using the S.Bus connection required using the MainPort connection on the flight controller. An appropriate cable shipped with the device that included 4 wires, colored black, red, green, and yellow. For S.Bus operation, the green wire is not used. I removed it from the flight controller side of the cable. When connecting to the receiver S.Bus, Black = (-) Red = (+) Yellow = (Signal).

20160517_173734

My goggles only support 8 channels. The drone video transmitter supports 32. Finding a match required a bit of reading, and then deciding on what was least likely to cause conflicts with other people near the field I regularly fly at. I chose D7 on my transmitter and CH6 on my goggles, which worked out to 5840MHz.  The newer version of my goggles supports 32 channels. (8 channels, on each of 4 bands.)

I found that http://www.rcgroups.com/forums/showthread.php?t=2266883 has a very nice explanation of the frequency bands used for FPV including details of how they overlap and recommendations for which frequencies to chose for the least interference between racers. It includes a google docs spreadsheet that’s been color coded to have the frequencies sorted in ascending order and make the bands more visible.

I got the video transmitter and receiver in sync by selecting the channel on my goggles, then cycling through all of the possible channels on the transmitter until I got the clearest video picture. My goggles auto select NTSC or PAL depending on the signal they receive. A friend using a full sized monitor wasn’t as lucky. That’s how I figured that the Eachine Racer 250 ships with a PAL camera.

The Eachine Racer 250 has a pair of bright white LEDs on the front, one on either side of the camera, and a LED lightbar on the back. The LED light bar on the back can be cycled through a series of colors by sliding a power switch located on the left side of the main board that turns all the LEDs off and on. There is also a two pin cable connector that can be plugged in to a receiver PWM output allowing remote light control.  To use remote light control, the local switch on the drone must be in the OFF position.  I’ll write more about this in a separate post.

After going through the LibrePilot setup wizard and putting the appropriate propellers on each motor, the racer flew completely as expected. It’s very responsive, and also very resilient to the basic crashes I’ve had so far.  The biggest learning experience for me has been to add throttle when I think I’m going to crash on the ground. With my larger drones, I’ve wanted to stop and recover the drone when it hits the ground. With this drone, it is much more likely to bounce and be able to recover itself if I can get it off the ground.  I recommend this drone as a good entry into the FPV racing drone scene. I’m sure that there are plenty of drones that are more resilient or responsive, but there’s also plenty more that can be spent than I did on this.

FrSKY Taranis RC Transmitter

Following several friends recommendations I purchased a FR Sky Taranis radio to control my quad copter. I wanted more channels of communication than what my original transmitter supplied, as well as the ability to choose which switches controlled which activities on my UAV. The Taranis was fairly inexpensive for its feature set, but has been in limited supply. I had myself put on a waiting list from http://www.alofthobbies.com/ to be notified when they had them in stock. I received mine about a month ago, and while I took pictures and have used it in the past month, this is the first time I’ve sat down and consolidated that information. I purchased the Taranis & X8R combination that includes both the transmitter and receiver. It included the protective carrying case, rechargeable battery, AC adapter, neck strap and balancing clip, as well as the transmitter and receiver. A small zip-lock bag contained keys for the carrying case and two pin jumpers for configuring the receiver outputs. There is a green LED visible between the battery compartment and the charger port that blinks when the battery is being charged and goes solid when it is completely charged. I wish that the LED was visible on the front because everything else is on the front, and I don’t really want to lay the device in its front during the charging period but would like to know when it’s done charging.

Taranis Travel Case

Taranis Travel Case

Taranis Contents

Taranis and accessories

Taranis Battery Compartment
Taranis Charging

The X8R receiver has 8 standard PWM channel outputs as well as a Futaba compatible SBus output. The standard outputs can be configured as either outputting channels 1-8 or channels 9-16. The X8R is capable of receiving 16 channels and sending controls for those 16 channels over the single SPort connection. I am connecting it to my Pixhawk using the single SBus connection. Arducopter running on my Pixhawk currently only pays attention to the first 8 channels. I may configure the standard outputs on my X8R to output channels 9-16, and connect my camera gymbal controls directly to the X8r, allowing me to utilize all the channels currently.

The Pixhawk is designed with a single input control set of pins, using PPM instead of PWM. PWM stands for Pulse Width Modulation. PPM stands for Pulse Position Modulation. Pulse Position Modulation allows for packing multiple channels into a single signal. There are plenty of good examples describing the technology as it related to RC devices, if you know the right terms to search for. I started learning RC airplanes last summer, and understanding what was going on didn’t seem as easy as it should be. The APM board that I was originally using had 8 PWM inputs, and 8 PWM outputs. The inputs were connected to the receiver and the outputs were connected to the ESCs, Electronic Speed Controls, for the motors. Now I’m using the Pixhawk and it’s got a single three wire cable connecting to the receiver but still 4 three wire cables connecting to the 4 ESCs. http://www.endurance-rc.com/ppmtut.php is one description of PPM vs PWM.

The Taranis itself runs OpenTX operating system which accounts for a large portion of its flexibility compared to its cost. It reports data back from the receiver as well, so technically both the transmitter and receiver are transceivers, sending data as well as receiving data. A simple bit of data that it constantly reported back at the transmitter is RSSI, the receiver signal strength. This is useful simply to recognize before you fly your model out of range of your transmitter. This return data path should also be able to carry all of the telemetry back and display it directly on the transmitter. I’ve not figured out if the pixhawk needs to be connected to two ports on the x8r to accomplish this feature.

What follows is a link dump of many of the items I’ve been saving up in understanding my configuration of the taranis radio, using the 16 channels, using the pixhawk, my Tarot GoPro gymbal, and references to the APM as well.

 

Test Drive of BMW i3

BMW i3 Roundel
A month ago, I had the opportunity to test drive a BMW i3, BMW’s new all electric vehicle.  I’ve never driven an all electric vehicle before, but really wanted to see how the BMW feel would translate. At some point I’d like to drive a Tesla and a Nissan Leaf for comparison.BMW i3 Logo
The vehicle I drove was part of a non-US spec fleet that has been touring the US for demonstration purposes. One of the features it has which will not be available in the US immediately is a sliding glass sunroof. It was explained to me that the US regulations require that the sunroof be directly connected to the metal roof of the vehicle, and the i3 has no metal in the roof of the vehicle. It’s all carbon fiber, and both stronger and lighter than the metal roof in most vehicles, but regulations were written without the future in mind.
BMW i3 Rear QuarterBMW i3 Front QuarterBMW i3 Doors OpenBMW i3 rear without brakesBMW i3 rear with brake lights

I’ve seen pictures of this vehicle in the past and thought it sort of funny looking. The first thing about seeing it in person is that the parts I don’t like don’t stand out so much. I’m not enamored of the look directly from the front, but the side profile and back view I quite like. When the doors are opened they have the comforting and very solid BMW feel. The front doors don’t have upper window frames, so when the door is opened the window slides down a tiny bit, and then raises after the door has been closed, to provide a consistent seal. the back seat doors are suicide doors, meaning that they are hinged at the back. When both doors are open, there’s no center pillar, allowing for easy access to the back seats.
BMW i3 Steering WheelBMW i3 Eucalyptus Dashboard
The dash board has two instrument pods, the smaller one with the speedometer directly visible through the steering wheel, and the larger central display. I did not like that the speedometer display could only display the speed using large digits. The electric motor is very responsive and it was quite easy to be over the speed limit in any situation. I believe that an analog dial in peripheral vision is much easier to recognize compared to a set of digits and with a computer display like this should at least be a user configurable option. The central console could display navigation options or details about how the car was operating. The car uses regenerative breaking. If you raise your foot completely off the accelerator pedal the engine would actively decelerate the car, producing power to put back into the battery pack. One of the modes on the central display would show the power usage of the vehicle. It was a really cool display, but very distracting when I really should have been paying attention to what was on the road.

I was not crazy about the texture of the dashboard and some of the trim panels. They were made of a fibrous board paneling, perhaps a type of carbon fiber. The salesman told me that it was both extremely light and extremely strong. He also indicated that my dislike might be a bit of a generational thing, and that people 15 years younger than me don’t associate the look with the same things. I can accept that, even though it’s not to my taste. I did like the curved eucalyptus wood panels on some of the flat parts of the dashboard.

Part of the driving loop I took had me accelerating onto the interstate. I don’t remember if I floored the accelerator or not, but I do know that it took off quite quickly, and I realized I was approaching 70mph, very soon after I’d signed the agreement that I’d not do anything illegal while drive the car. My first instinct was to take my foot completely off the pedal, which started the regenerating braking, as if I’d stepped on the brakes. Obviously it would take a little getting used to but I think it would probably happen extremely quickly. The example I’ve used when talking to people is driving a sport motorcycle with its huge power to weight ratio. In gear you get a feel for smoothly rolling off the throttle and holding at the speed you want to go. I was told that regenerative breaking encourages one pedal driving, in that you rarely use the brakes at all, and BMW is expecting the brakes to last over 100k miles, with the brake fluid needing service more than the pads. I don’t think I put my foot on the brakes even during the city portion of the drive. There are no gear changes, so both acceleration and deceleration are extremely smooth.
BMW i3 electric motorBMW i3 space for range extender motor
The i3 has an advertised driving range of 80 to 100 miles per charge, with the optional range extender motor version just under doubling the range. (for regulatory reasons the vehicle can’t drive farther using gasoline than it does under pure electric to qualify as an electric vehicle.)

I lifted the panel in the back hatch storage compartment and saw the electric motor offset to the left, and a large empty space to the right side. I was told that was where the range extender motor would fit, if the model was so equipped.

I don’t think I’ll be buying one of these any time soon, but it’s more because I’m happy with the 2002 X5 I am still driving after having ordered new from the factory with the configuration I wanted, than because of anything with the new vehicle. I use public transit or personal exercise for my daily commute, with my X5 being used for trips into the mountains for skiing, or longer distance drives closer to 500 miles each way that simply do not work with current electric vehicles. The fact that my X5 is paid for also makes the expense of a new vehicle a bit of a hurdle.
BMW i3 eDrive

GoPro Battery BacPac

I purchased a GoPro Battery BacPack recently because I realized that I’d rather have extended shooting than have two seperate batteries that needed to be charged. I had already purchased a second standard battery for the GoPro, but I didn’t have a way to charge it when it was not in the camera, so found it less useful than I was hoping.

The fact that I am most often using my GoPro in harsh conditions means that I’d rather not open the case any more frequently than I need to. When I’m skiing, if I go into the lodge to change the battery, the very first thing I notice is that the cold GoPro case is suddenly steamed over by the indoor humidity. 

When I’ve been doing my stop motion photography at a picture every two seconds, generally the standard battery lasts just under two hours. My first test with the BacPac attached started at 8:47am and the last picture was at 12:40, so it looks like It gets me to just under 4 hours total.

It created 6999 files in that time frame. I’ve not figured out if the GoPro uses any less battery when taking sequential still photos vs when it’s taking movies. 

Saturday’s race on Different Drummer wasn’t fully captured in the time allotted because we went out early and did some practice work flying the spinnaker.

Hopefully I’ll get around to writing more about what comes with the BacPac in the next couple of days. I was mostly interested in sharing the extension of the recording time.

Quad Copter UAV Project

In late June I was finally convinced by a friend to get involved with his RC (Radio Controlled) helicopter hobby. He had been involved on and off since we were kids, while I’d always been much more interested in programming computers. Now the technology of the two hobbies has come together and he’s finally convinced me to get involved.

He recommended I buy four items, to have a good starter system. I bought the first item, and spent a month trying to figure things out, and then bought the rest of the items. I would have been better off to have simply spent all the money he suggested up front, as I didn’t like trying to fly the original UAV at all. If I had more experience flying RC airplanes my experience might have been different, but without the computer controlled stabilization, I really did not like the experience of flying the quadcopter at all.

The first item is described as Ready To Fly (RTF.) It is delivered with everything needed to fly except for 8 AA Batteries for the RC Transmitter.

  • Pre-assembled Four Arm Flight Frame
  • 4 Propellers
  • MWC Flight Control Board
  • ESC: Four 40A Brushless Hobbywing SkyWalker Electronic Speed Controllers
  • Motor: Four 2212 OutRunner Brushless 920KV Motors
  • 2.4ghz 6ch TX and RX
  • Battery 11.1v 2200mah 20C Li-Po
  • 3cell Balance Charger

There are also kits described as ARTF, which means Almost Ready to Fly.  The ARTF kits cost around $40 less and don’t include the RC receiver, transmitter (RX, TX), LiPo battery or battery charger. Since I didn’t already have a RX/TX pair, having the entire package together was certainly worth the $40 price difference. An average price for a similar LiPo battery alone would be $15.

A significant portion of time in researching what I wanted to do was spent in learning the terminology and acronyms. Actually having the device in my hands has helped me to understand what each part is and what it does.

AeroSky Radio Remote Control RC Quadcopter 4 Channel RTF

AeroSky Radio Remote Control RC Quadcopter 4 Channel RTF

The first thing is that the assembly instructions were extremely sparse. An experienced pilot might have no problems, but I certainly didn’t know what I was doing. The second thing is that while it ships with a Balanced Battery Charger, the only way of supplying power to the charger is a cable with a set of alligator clips.

There was no mention of what the extra wires in the bag were for. I later learned that it’s a special wire to be used for calibrating the four Electronic Speed Controllers (ESCs.) When I opened the box I had no idea what an ESC was, or that it might need calibration.

There are two bags of colored propellers. Each one is a set of two, that are designed to provide lift when rotating in opposite directions. The props need to be installed in a specific orientation for the device to have any stability. Forward Right rotates Counter Clockwise, Forward Left Clockwise, Rear Left Counter Clockwise, Rear Right Clockwise.  The propellers come with a set of nylon washers to fit various sized shafts. Using the washers that fit the tightest is important. Tightening the nuts and using so sort of lock tight solution is also recommended, especially because with the counter rotating shafts the nuts naturally want to spin free.

The radio controller transmitter that was shipped to me is branded Aerosky Digital Proportional Radio System 2.4 GHz FHSS Airplane System. The only unique labeling on the back was: Model MC6S and the FCC ID: ZMKMC4DFMCD6DF.

Aerosky Digital Proportional Radio System 2.4 GHz FHSS Airplane System

Aerosky Digital Proportional Radio System 2.4 GHz FHSS Airplane System

Aerosky Digital Proportional Radio System 2.4 GHz FHSS Airplane System

Aerosky Digital Proportional Radio System 2.4 GHz FHSS Airplane System

Aerosky Digital Proportional Radio System 2.4 GHz FHSS Airplane System

Aerosky Digital Proportional Radio System 2.4 GHz FHSS Airplane System

The rear view shows an audio style plug labeled D.S.C. and the side view has an unlabeled power plug. There is a small wire wrapped around the top handle of the transmitter. I have learned that this wire is a Bind Plug that can be used if my transmitter and receiver are not correctly talking with each other.  The receiver has a seventh set of pins that I’m supposed to plug this into and then I can bind the receiver to this transmitter. I’ve not found instructions for this radio anywhere on the web that confirm exactly what I’m supposed to do, but I’ve at least learned what binding is from other pages on the web.

The battery charger is labeled BC-3S10 2S/3S Balance Charger. It lists DC 9V-16V with center pin positive on the input side, and has two outputs, labeled 3S(11.1V) and 2S(7.4V). I had a AC Adapter from an old computer with a compatible plug and an output description 12-14V 5-4.28A that I was able to use to power the charger. When plugged in, the charger has two LEDs labeled Power and Charge. The Charge LED appears to blink until the battery is fully charged, and then goes solid.

When a battery is plugged into the UAV there are a series of beeps that happen. Three ascending tones, a pause, and then a pair of tones. The LEDs that are installed completely wrapping each of the arms also light up immediately when the power is supplied. I’ve learned that the tones are generated by the ESCs, so when you hear the tones, you are hearing four separate devices chirping at the same time, not related to signals from the central controller board. In this ready to fly package, the ESCs are presoldered to a control board, so there is no way to power them separately. If the boards need to be re calibrated for some reason, the beep tones may be different, and recognizing which arm is doing the beeping can be incredibly difficult.

My first day flying the unit in the RTF configuration I never felt comfortable flying, and I ran it into a stone retaining wall. When I ran it into the wall and crashed, I only chipped the end of a propeller blade slightly and broke the continuity on one of the LED strips, making one of the arms have an intermittent set of LED lights. The unit itself seems to be extremely durable.

After a couple weeks of not feeling happy with the stability and my flying ability I ordered the other items in the parts list. The flight control system I am using is produced in China by RCTimer and is a third party imitation of the ArduPilot Mega 2.5 Auto Pilot. The RCTimer package includes the GPS and Ground Control Telemetry Set that bring the 3DRobotics price up to $250. By buying the RCTimer package I had to buy the APM Power module and Case separately, and solder a huge number of header pins onto a circut board. I save $75 but I spent a huge amount of effort getting the soldering done. I’m not certain which way I’d go if I was doing it again.

I will generally refer to the flight control board as APM because that’s the term it is easiest to refer to it as when searching support forums. The original control board was referred to as MWC, which I’ve learned stands for Multi-Wii-Controller. It’s original heritage came from hobbyists reverse engineering the Nintendo Wii game console controller to learn how to use its accelerators.

The MWC that was the heart of the original RTF package was completely removed and the APM replaced it. The control wires from the RC RX unit connect to the APM inputs and the control wires to the ESCs connect to the outputs.  The APM has three other sets of external connections, Power, GPS, and Telemetry.

The two largest features of the APM that I currently use over the MWC are LOITER and RTL. I have switch 5 on my transmitter set to switch between Stabilized Flight Mode, and Loiter Mode. In Loiter mode, the UAV will will hold position in the air solidly.  I have switch 6 set to RTL, Return To Launch. RTL will rise to a set altitude, move to the GPS location the UAV took off, and then descend to the ground. Having these two features available has allowed me to learn how to manually fly the unit without constantly crashing.

I did not know anything about arming or disarming the ESCs when I started this process. Now it seems intuitive, but it was just one more thing I had to learn when I started. The motors will not turn under power until the ESCs have been armed. This is a protective feature because the blades will easily harm you if you are in their path. To arm the motors, you hold the throttle down to zero, and the stick to the right for a period of time. To disarm hold down and to the left for a period.  With my APM controller I need to hold it for ten seconds to arm, and 3 seconds to disarm, I don’t know if the APM is managing that detail or if it’s simply passing the signals directly to the individual ESCs.

Successful Evening Flying
Successful Evening Flying