Category Archives: Auto Pilot

Installing a Zener Diode and Capacitor for HKPilot32 (PixHawk)

Installing a Zener Diode and Capacitor to help bullet-proof your Pixhawk is easy. Both components may just help save your plane or multicopter someday.

The Pixhawk design allows for the servo power rail to be used as a secondary or backup power supply for the AP.  However, the design has very low tolerances such that if power is to come from servo rail (via the ESC or an independent 5V UBEC – the latter is recommended) the servos must not pull more than 5.7v.  Note that most micro servos operate in the 4-6v range (with digital servos going > 10v) and when the voltage pull goes beyond 5.7v, the Pixhawk will reboot, resulting in disaster!

To mitigate voltage spikes beyond 5.7v on this servo rail, the recommended mod is to add a Zener diode.  When a zener diode is  installed in reverse (ie the anode coupled to the ground and the cathode to the current) it acts as some kind of breaker,  activating and capping the voltage spikes once its rated voltage is reached.. this means if the correct zener diode is attached in reverse polarity in the servo rail, it will prevent over voltage and therefore not result in the AP resetting midflight. Installing a capacitor in parallel* to the zener is also recommended as it helps smooth the voltage “ripples” further.

To make a Zener Diode and Capacitor for Pixhawk or HKPilot you need the following:

1)  Two (2) servo leads
2)  One 1N5339 Zener Diode
3)  One 6.3v 220uF capacitor

Zener Diode and Capacitor
Capacitor (L) and Zener Diode (R)

1)  For the Zener – make sure that the polarity is reversed, ie the side with the silver band must be soldered to the current (ie middle) servo lead and the other to the ground.
2)  For the Capacitor – install as normal.. ie the positive to the current servo lead and the negative to the ground lead.

Here’s how it looks like installed:

Capacitor and Zener Diode Completed
Capacitor and Zener Diode Completed

and installed in the HKPilot32:

Zender Diode and Capacitor installed in HKPilot32
Zender Diode and Capacitor installed in HKPilot32

* Coming from an non-electronics background, understanding what parallel connections should be, is confusing.  Thanks to “turdsurfer” over in for pointing out what this meant! =)

Updated Version (2014-11-21): 

It turns out my original intent of just combining both into a single component is possible (, here’s the Diode and Capacitor before being soldered together:

zener and capacitor v2
zener and capacitor v2

and the finished component:

zener and capacitor v2 complete
zener and capacitor v2 complete


Spektrum DX6i + EzUHF Receiver + HKPilot32 (aka PixHawk) Channel Mixup

The HKPilot32 (and other PixHawk variants) use a single “muxed” connection from the receiver to the AP.   What I was not ready for was that the channel assignments were all totally mixed up.  The throttle channel is now registering as roll (ie aileron), the roll as pitch (elevator), and the pitch as the throttle!  only the yaw channel remained.

Here’s the stock channels using the latest ArduPilot:Plane firmware (3.1.1):

Roll (Aileron) – Channel 1
Yaw (Rudder) – Channel 4
Pitch (Elevator) – Channel 2
Throttle  – Channel 3

The main issue here is that the channels are fixed on my transmitter (a Spektrum DX6i).  A quick check online shows that the consensus seems to be to change the assignment on the transmitter (oh boy) and not on the AP.  At any rate, this is not viable for me right now.. so I have to implement it on the plane.

The correct parameters to change in either AP Planner or Mission Planner are:  RCMAP_YAW, RCMAP_ROLL, RCMAP_THROTTLE and RCMAP_PITCH.

While these parameters are visible in both applications, for some reason I cant save it with AP Planner and the channels refuse to be reassigned.  The following worked with Mission Planner (v1.3.11):

Roll (Aileron) RCMAP_ROLL – Channel 2
Yaw (Rudder) RCMAP_YAW – Channel 4
Pitch (Elevator) RCMAP_PITCH – Channel 3
Throttle  RCMAP_THROTTLE – Channel 1

Note that this is only for the hardware combination above and may be different in other systems so a little trial and error may be required. Also, while available, changing these settings are not recommended for APM2.5/2.6.

The HobbyKing HKPilot32 Stripdown

I decided to bite the bullet and go with the HobbyKing HKPilot32 instead of the Pixhawk for the reincarnation of my Skywalker FPV rig.  By most accounts the HKPilot32 works as advertised and why shouldnt it? it has the same design and uses the same chips as the open source Pixhawk.  Thank you open source and market forces!

Here’s the content of the packet (L to R: USB cord, Servo wire, Power Module, the HKPilo32, cables for the gps, buzzer, arming button, stickers and vibration pads, free memory card/usb adapter and extension board) and a 4MB sd card pre-installed in the device. The only major downside is it does not come with the 6-pin cable needed to connect the HKPilot to the  Quanum Lea-6H GPS.

HobbyKing HKPilot32
HobbyKing HKPilot32

What surprised me is the size of the HKPilot. it has the same dimensions as the APM 2.6 which is great.

HobbyKing HKPilot32
HobbyKing HKPilot32

I’ve heard about the poor quality of the soldering and board layout of the HKPilot.. personally, for the price, I couldnt care less  as long as it works reliably.  Anyway, out of curiosity I checked the board.

HobbyKing HKPilot32 board
HobbyKing HKPilot32 board (back)

and front:

HobbyKing HKPilot32 board
HobbyKing HKPilot32 board (memory card on the left)

In my opinion, the board design and layout is not bad, a bit dirty to be honest but not bad. The soldering while not topnotch seems to look solid  enough at any rate.. of course I’m comparing this to the usual hardware I see (computing and networking appliance’s boards).  You can judge for yourself above.

So does it work?  so far yes, I was able to load the latest ArduPlane firmware and didn’t really have an issue connecting MissionPlanner (except I had to set the connection speed to 38400)

HKPilot32 with MissionPlanner
HKPilot32 with MissionPlanner

Looking forward to setting this up for flight!