Tag Archives: arduino

Flashing SimonK with Arduino through the signal wire (1-wire)

In this article I will show you how to flash the SimonK firmware with your Arduino through the ESC´s signal wire without removing the shrink tube and using an ISP Programmer.

Important: to flash the firmware through the signal wire, the bootloader of the ESC must be enabled. This is the case if you have bought a SimonK preflashed ESC (like the Afro Series ESC) or you have already flashed the ESC with an ISP Programmer and have enabled the bootloader by yourself.

Needed parts:

  • Arduino board
  • ESC with enabled bootloader

Making ArduinoUSBLinker:

First we need to flash the ArduinoUSBLinker code on the Arduino. If you want to upload it through the Arduino Software, download the source code from github. Open the ArduinoUSBLinker.ino file in the Arduino Software, select the right COM port and upload it to the Arduino board.


You can also use the KKmulticopter Flash Tool for making the ArduinoUSBLinker. Go to the “Tools”-menu and click on “Upload Arduino USB Linker” and select your Arduino board. Wait for the message, that you should connect the Arduino to the PC. Then plug it in and click “Ok”. The Arduino should be detected by the system. If the flashing is successful, the Arduino board is ready.


How-To connect:

Connect the orange wire (signal wire) from the ESC to Digital Pin2 on the Arduino and the brown wire (ground) to the GND Pin on the Arduino. Connect the ESC to an external power.

Flashing the firmware:

Flashing the SimonK firmware through the signal wire is almost like flashing the firmware with an ISP Programmer. The only difference is, you choose as an Programmer the ArduinoUSBLinker. Choose the right controller (without bootloader, as it is already enabled), the right firmware and firmware version and click on the green button on the right to flash it.


If you wish to enable the comp_pwm (aka damped light) function, check how to do it in the article mentioned above.

You can also flash the SimonK firmware using the RapidFlash App for Google Chrome. It looks very similar to the Baseflight/Cleanflight Configurator for the Naze32/CC3D boards. Select the Programmer, COM Port, Firmware and the Firmware version and click flash. On the ”Advanced”-Tab you can enable the comp_pwm function much easier than with KKmulticopter Flash Tool.


If you have any problems, feel free to comment.

Change the baud rate of HC-05 Bluetooth module

If you want to change some of the settings of your HC-05 Bluetooth module, like baud rate, password or the name of the Bluetooth module, you can do it easy and fast with your Arduino. I have done this to connect my Pixhawk to DroidPlanner over Bluetooth.

There are different HC-05 modules on the market, but it should work with all of them. On the picture below you can see a bare HC-05 module, 5V tolerant HC-05 module and 6V tolerant HC-05 module with a button. I prefer the last one, as the button makes the changing of the settings even easier.


To change any settings of the module, it should be in the so called “AT Mode”. How to put the Bluetooth module in AT Mode: The “Key Pin” of the module should be set to “High”. This means we should apply voltage to this pin at the same time we power the module. On the last module, the button does this job. It should be pressed when powering the module with 5V. On the module without button, we need to supply 3.3V to the “Key Pin” when powering on.

Here is an example how to connect the module to the Arduino Nano v3. Note that there should be an jumper on GND and RST pin. By doing this, the Arduino will only act as a simple FTDI adapter.


First connect the Arduino to the PC over USB. Then connect the cables in the following way:

  • TX Bluetooth –> TX Arduino
  • RX Bluetooth –> RX Arduino
  • GND Bluetooth –> GND Arduino

… and at last the 5V Bluetooth to 5V Arduino by keeping the button of the Bluetooth pressed. Or on the module without button, connect the Key Pin Bluetooth to 3.3V on Arduino.

If the HC-05 is in AT Mode, the red LED will blink at every 2 seconds.

Then start the PuTTY program (download link), configure the right COM Port (Check it in the Device Manger) and set the Baud Rate to 38400. This is the baud rate for AT Mode. Then click “Open”.


In the newly opened black window type “AT”, press Enter and you should get “OK” as a result. Note that you want see what you type in the windows… Here some of the commands to change the settings you wish:

Change baud rate to 57600, 1 stop bit, 0 parity AT+UART=57600,1,0
Change module name AT+NAME=YOURNAME
Change pairing code AT+PSWD=0000

Is “OpenPilot CC3D vs. Naze32” the right question?

Many people who a starting with the multicopters or just want to try another flight controller ask this question: should I buy OpenPilot CC3D or Naze32?

I bought myself a Naze32 Acro from HobbyKing back in September last year and I was impressed by the tiny flight controller. The firmware (Baseflight) and settings were easy to set up through Google Chrome browser. Flying my SG Adventure Mini was just great.

I mentioned that HobbyKing started to sell the OpenPilot CC3D board in late September. I also wanted to try this flight controller, especially since Nick (the developer of the AUAV-X2 flight controller) recommended it. Well, the price of almost 32 $ plus 4 $ shipping cost from HobbyKing was too much for me, considering the Naze32 with the same processor and MPU6050 sensor is about 24$. So I went to Aliexpress and bought one with case for 18,99$ including shipping. In about 2 to 3 weeks the flight controller arrived here in Germany. The quality is good in my opinion, all SMD parts are soldered as it should be. Update: well it is much cheaper now and keeps going down.

CC3D FrontCC3D Back

The Naze32 and CC3D are very similar to each other. Both use a 32bit STM processor, has the same MPU6000 sensor and are 36x36mm boards. The Naze32 has a Micro-USB and the CC3D a Mini-USB port. Personally I find the Micro-USB better, as I always have such cable on my desk for charging my phone. I also prefer the pins on the Naze32 for connecting GPS or receiver. On the OpenPilot CC3D there are JST 1mm ports used. There is something more on the CC3D compared to the Acro Naze32: 16MBit Flash Chip 25P16VP. If using the newest Cleanflight firmware there is benefit from the flash: the Blackbox feature saves flight data on it and you can check it later on your PC.

CC3D and Naze32 frontsideCC3D close lookup on the CPU

I tested the original software OpenPilot GCS and it looks very good, but I still like the Baseflight solution using Google Chrome and its minimalistic design. There are simply too much options in GSC, which is good, but it is a bit complicated for a beginner (this is my personal opinion).

So I decided to look if it is possible to use the Baseflight firmware on the CC3D board, as both flight controllers are so identical. I found this forum page on the OpenPilot website. It is possible to do this by installing the Cleanflight firmware. This is another 32bit version of the MultiWii firmware, exactly as Baseflight is. You can find more information about Cleanflight on its website. Even more: you can have both firmwares OpenPilot and Cleanflight installed on the board. I decided to erase the old one and use just the Cleanflight.

What do you need to flash the Cleanflight firmware on the CC3D board: basically an FTDI adapter or an Arduino with FDTI chip on it, such my Arduino Nano v3. Connecting the CC3D flight controller with the FTDI as usual, 5V, GND, TX and RX to the MainPort on the CC3D.

CC3D connected to Arduino Nano 

I also installed the STM Flash Demonstrator. You can download the latest version from the STM website. Then downloaded the Cleanflight firmware for the OpenPilot CC3D board from here. To flash the firmware, the flight controller must be in bootloader mode. This can be done by connecting the SBL pad with the 3.3V while powering on the board. Once the board is in bootloader mode, you can start with the flashing. Run the STM Demonstrator and do every step exactly as shown! on the pictures below. I should mention, that I have connected and disconnected the board (with the pins connected when powering on) several times before the STM Demonstrator accepted it.

After some steps you should click “Back” to the next step in the process:


Click “close” and the CC3D board is now as the Naze32. All the settings can be done through the Cleanflight configurator in Google Chrome by installing the App from the Web store. I haven’t tested CC3D in flight, but everything seems to work very well.

Note that you should connect the CC3D to the Cleanflight configurator through the FTDI, as connecting through USB-Port is not working yet. Update 10.02.2015: Since 1.7.0 version of the Cleanflight firmware, you can connect the OpenPilot CC3D directly through the USB port of the board. Only configuration is now possible. Flashing firmware is still done through FTDI.

Update 05.06.2015: Just a quick thought and a quick answer if you should buy the Naze32 or OpenPilot CC3D: A pro for the Naze32: there is a possibility to add magnetometer and barometer on it. I have already done this on my Naze32 boards. But in most of the time I haven’t used these sensors and flew only in Acro and Horizon Mode. On the other hand, the CC3D has already the 16Mbit flash chip. This one is very useful in addition to the Blackbox feature in Cleanflight firmware. You can save a log of the flight and then download it to your computer and analyze it. On the CC3D you can also connect your SBUS receiver (like the FrSky X4R-SB) directly to the Main Port. For the Naze32 rev5 you will need an SBUS inverter.

There are still small problems with Cleanflight and CC3D (when changing some settings I must click disconnect and then reconnect again) and still the need of an FTDI adapter for flashing the firmware. At the moment I will take the CC3D over the Naze32 because of the better price, integrated flash memory, SBUS compatibility and same flight experience.

Update 10.10.2015: Even there is a newer version of the Naze32, I still haven’t changed my mind about the CC3D 🙂

FrSky CPPM firmware update with Arduino

I have an FrSky D8R-II Plus receiver on my “SG Adventure” quad. I read on the DIY Drones site, that it is possible to update this receiver with the firmware for the FrSky D8R-XP, so I could use with CPPM signal. With CPPM you only use one wire for all the channels and not separate wires for every channel.

You can easily buy this FrSky Update Cable or you can save a bit money and time by updating/flashing the receiver with Arduino, which has an FTDI chip on board. I have an Arduino Uno, but my revision of the board doesn’t have an FTDI chip. So I decided to simply use my actual flight controller – the Multiwii Megapirate AIO board. You can use any Arduino based board with FTDI chip.


First you need to download the 27ms CPPM firmware from the FrSky website. This firmware is actually for the D8R-XP receiver as mentioned, but it works with the D8R-II Plus too. Please keep in mind, that is officially not supported for the D8R-II Plus and I am not responsible for any damages on your hardware by doing this too. If you agree keep reading 🙂

Download the official FTDI Prog.  – EEPROM Programming Utility and install it on your computer.

There is a jumper on the side of your receiver. Take it out and place the jumper on the signal pins for channel 7 and 8, so these are bridged. This will then take the receiver into update mode.

Then connect the TX, RX and GND pins from your Arduino board to the TX, RX and GND pins on the side of your D8R-II Plus receiver. Important: Do not reverse the TX and RX as usual by Arduino. Connect TX to TX and RX to RX. To power your receiver: you can use a 5V battery or connect it as usual to the flight controller.


To use the Arduino board for this we only need the FTDI chip, so we will suppress the Atmega chip by a constant press on the reset button. After the reset button is pressed, connect your board to the USB port of your computer. It could possibly install some drivers, so give it some time. Keep pressing the reset button 🙂

Open the FTDI Prog. Scan for FTDI Devices. Then invert the TX and RX as shown on the screenshots below and click on the flash icon. In the new opened window click “Program”. (Tipp: Remember to undone this procedure after flashing your receiver.)


Keep pressing the reset button 🙂 Now go to the folder, where you downloaded the firmware file from the FrSky website, extract it and start the .exe file.


Chose the right COM port in the dropdown menu, chose the firmware file from the same folder by clicking on “File”. If everything is fine, you should see the UID number in the bottom of window. If so, just click “Download” to upload the firmware. (For more info about these last steps, there is a pdf-manual in the folder, where the .exe file is. At the end you should have a working CPPM FrSky D8R-II Plus receiver. Now you can release the reset button of your Arduino or Multiwii Megapirate AIO board. I hope I have helped you, save some time and money with this method.

p.s. To use your receiver in CPPM mode after flashing, place the jumper on signal pins CH3 and CH4, so these are bridged. The CPPM signal will be on CH1 pin.

Update 12.08.2014: I updated the same way my new FrSky D4R-II receiver. It is smaller than the D8R-II Plus, weights only 5 gram and with the CPPM 27ms firmware has 8 Channels and the exact same functionality as the D8R-II Plus. Check how my SG Adventure carbon frame look now with the Pixhawk and the D4R-II receiver here.