I came across this neat trick while building my first quad. Basically instead of going to all the effort of swapping two motor leads you can simply change one bit in the SimonK firmware on your ESC to reverse the motor direction. This is especially useful if you are like me and don't want the extra weight of bullet connectors and have simply soldered and heat shrunk your motor connections.
Tools Needed (if you've programmed your ESCs before you'll already have this stuff):
NOTE: For anyone who is using Windows and only wants to use tgy.hex without all the hassle of compiling, skip straight to downloading kkMulticopterFlashTool and use my precompiled versions attached to this post.
Now for the software part, I downloaded the latest SimonK firmware (tgy-master.zip, see Download as Zip button on right had side), and extracted it.
I'm using Ubuntu (Linux) and just typed the following in a terminal (from the tgy-master folder that is). If you don't have Linux, just download virtual box and create a virtual machine and install Linux/Ubuntu, or you can even boot straight into Linux from a Linux Install CD without installing anything. Seriously, Linux makes the whole build process child's play.
If you want to reverse the motor direction simply change this line in tgy.hex and recompile using 'make all' then flash again, then PRESTO!! Motor direction reversed:
'.equ MOTOR_REVERSE = 1 ; Reverse normal commutation direction'
If anyone has trouble compling the SimonK firmware, here are some compiled versions (you really only need the .hex file for your board, check here, here and here to find out what ESC you have and what .hex file you need)
tgy-master AM Compiled.zip (There should be tgy.hex for normal direction, and tgyReversed.hex for reverse direction, if you need one of the other .hex files please compile them yourselves, of course ask questions if you get stuck!)
Remember, always make you have the correct .hex file for your ESC otherwise there could be chaos!! and you'll need to re-calibrate your ESCs to your flight controller after flashing your ESCs.
Tools Needed (if you've programmed your ESCs before you'll already have this stuff):
- USBasp ($3 or so from ebay)
- In-circuit chip programmer (about $30 from HobbyKing, definitely worth the money if you don't have programming pins on your ESC!!)
- Stanley Knife
NOTE: For anyone who is using Windows and only wants to use tgy.hex without all the hassle of compiling, skip straight to downloading kkMulticopterFlashTool and use my precompiled versions attached to this post.
Now for the software part, I downloaded the latest SimonK firmware (tgy-master.zip, see Download as Zip button on right had side), and extracted it.
I'm using Ubuntu (Linux) and just typed the following in a terminal (from the tgy-master folder that is). If you don't have Linux, just download virtual box and create a virtual machine and install Linux/Ubuntu, or you can even boot straight into Linux from a Linux Install CD without installing anything. Seriously, Linux makes the whole build process child's play.
- sudo apt-get install avrdude
- make all (or maybe it was just make, can't remember)
- avrdude -c usbasp -p m8 -U flash:w:tgy.hex (or which ever .hex file you need to use)
If you want to reverse the motor direction simply change this line in tgy.hex and recompile using 'make all' then flash again, then PRESTO!! Motor direction reversed:
'.equ MOTOR_REVERSE = 1 ; Reverse normal commutation direction'
If anyone has trouble compling the SimonK firmware, here are some compiled versions (you really only need the .hex file for your board, check here, here and here to find out what ESC you have and what .hex file you need)
tgy-master AM Compiled.zip (There should be tgy.hex for normal direction, and tgyReversed.hex for reverse direction, if you need one of the other .hex files please compile them yourselves, of course ask questions if you get stuck!)
Remember, always make you have the correct .hex file for your ESC otherwise there could be chaos!! and you'll need to re-calibrate your ESCs to your flight controller after flashing your ESCs.