This is just part of the ZMR250 build log, Drone kit -Building a ZMR 250. This section on configuration of the CopterControl (CC3D) flight controller has been moved to a separate post, in order to reduce the size of the original blog.
Featured image from LibrePilot.
Prepping the CC3D
As I had fried my KKMini, decided to use CC3D. I found a good link, Openpilot CC3D Flight Controller Setup Guide, describing how to set up the CC3D and OpenPilot firmware. However, the link provided in that document was dead (as OpenPilot is now defunct and has been superceded by LibrePilot) so you will need to download the OpenPilot Windows application and the firmware from OpenPilot Downloads For CC3D And GCS. OpenPilot has been replaced by LibrePilot, which can be obtained from here: Pages/LibrePilot/Documentation/Downloads. However, I used OpenPilot version 15.02.02
Initally OpenPilot crashed, on my Windows 7, upon starting up at the Loading Core plugins stage, so I then reinstalled, this time including Mesa OpenGL Library. It then loaded correctly.
Running Vehicle Setup wizard, and then next, and then hit “Upgrade”. While attempting to upgrade and the “Erase all settings” checkbox ticked, I then got the message “Timed out while waiting for a board to be fully connected! You will have to manually upgrade the board using the uploader plugin.”
The LEDs were yellow and flashing blue – I think that it should be green and blue
However, in the Firmware dialog, the halt button was disabled. I selected USB/COM3, nothing happened. I hit the Rescue button, that timed out as well. Furthermore, my CC3D wasn’t even showing up in Device manager. I called it a day at that point.
The following day I read a few threads, CC3D wont connect to PC was interesting.
I tried changing the USB cable, even though I knew that it was OK, and not just a charging cable
Then I happened upon this thread, and tried to use LibrePilot on OSX, but version 16.09 would not run on my Mountain Lion OS.
Then I read this thread, CC3D won’t connect and at the bottom is a link to a video, which worked for me, even though the board in the video showed that it was connecting, and being recognised prior to the repair (whereas mine was not being recognised, nor was any movement in the axis being recognised): CC3D Upgrade & Erase Failing Error & Fix
Hit Rescue in the Firmware page, and THEN connect the CC3D. OK, the CC3D showed up in the Firmware page, although its attributes were not recognised, or listed as “n/a”
Then Open… select the firmware (I downloaded “bu_cc3d.opfw” from OpenPilot Downloads For CC3D And GCS). Then hit flash button, progress bar goes to 100%. Disconnect CC3D, close and open OpenPilot. Then I reconnected the FC, still nothing. And still the yellow light. Also, the new firmware wasn’t really recognised -it showed up, listed next to the unrecognised firmware attributes currently on the CC3D, by no meaningful firmware versions showed up – again “n/a”, or not recognised was shown – the Firmware tag was listed as “next” (not a good omen).
I tried new firmware (et200-cc3d.bin) from the video, https://www.dropbox.com/s/nrb4nmfidktz813/et200-cc3d.bin?dl=0 – just upload the .bin file, ignore the this file is not in the correct format warning, there is no need to extract.
After I did that, connected the FC from the USB and then restarted OpenPilot Windows application and reconnected the FC, nothing seemed different in the firmware page, but then I noticed that windows was installing the drivers, the drivers were installed correctly by Windows. See device manager screenshot:
After that the horizontal meter showed movement, hurrah, but was stuck. I would probably have to disconnect the FC from the USB again (probably due t the drivers having been installed with OpenPilot open)
I closed and reopened OpenPilot (actually without disconnecting the FC from the USB, like I thought that I might have to in the paragraph above) and this time the FC was recognised, although there was a message about mismatch of firmware and software. I clicked on Upgrade & Erase. It went through its process, rebooted the FC, but timed out and ended saying that I had to manually update. I disconnected the FC and then reconnected it and then the firmware on the CC3D was recognised (with a red rosette icon displayed) and everything worked as expected.
So the issue seemed to be first to get a recognised, known firmware onto the FC, using the Rescue button, then let Windows update the drivers in the background, and then Upgrade and Erase the firmware to a current version. Along with this, it is important to restart the application each time and disconnect and reconnect the FC to the USB nearly each time.
Note that I still have a yellow LED. Maybe it is my board that has yellow LED instead of a green LED, so the yellow is not actually a warning status LED.
Setting up the multicopter
Then I hit the Vehicle Setup Wizard. That was straight forward enough, the firmware was erased and updated, and the automatic reboot was fine.
The stage where the initial calibration of ESCs is performed (where the three safety checkboxes must be checked, the Start button is clicked and battery is first connected, wait for the ESC beeps, then hit Stop, wait for the ESC beeps again and then disconnect the battery) – The first beep seemed a bit lacklustre, and only seemed to come from one ESC. In addition, my ESCs did not beep for the second time, after hitting Stop. I disregarded this missing second beep and continued regardless, and I was able to spin up each of the motors in turn in the following stages. The missing beeps could be down to an unknown ESC configuration.
I selected normal ESCs (not Fast nor Oneshot).
I selected PPM signalling from the receiver, pin 3 on the receiver port.
I chose the ZMR250 configuration, with the 3S battery, as the other ZMR250 configurations were for 4S batteries.
There was another minor issue, upon a reboot, at the saving the configuration at the end of the first stage, and I had to manually reboot by unplugging and replugging the CC3D. However, once the FC had rebooted, the wizard then moved on to the Transmitter/Receiver setup.
When it came to wiring up the D4R-II receiver to the CC3D, before continuing with the OpenPilot receiver configuration wizard, I noticed that the Receiver port connector, that came with the CC3D, was strangely wired, with one three socket servo connector having GND, Vcc and a signal, and then the remaining seven wires going to separate three socket servo connectors. However, the first three socket servo connector(which had the GND and Vcc), en lieu of using signal 1 (pin 3), instead was signal 3 (pin 5). The same issue is described here, Weird looking CC3D cable.
The simplest solution seemed to be to get a craft knife, or box cutter, and pop up the black plastic tags slightly and pull the errant connectors wired to pins 3 and 5, of the receiver port connector, out of the plastic servo connector housing and put pin 3 into the first connector, which then goes to the D4R-II. See these images below, taken from CopterControl / CC3D / Atom Hardware Setup
The connector going to pin 5 is put into a single servo connector. See the image below, taken from Turnigy 9X Connecting PPM to CC3D:
PPM – Pin 3
- PPM+NoOneShot is used with modern PPM type receivers, that combine the control signal to one wire. The PPM stream should be sent to the first input through the white wire connected to CC ReceiverPort wire/pin 3. For a PPM receiver, only one pin is used for signal – the remaining wires connected to CC ReceiverPort wires 4-8 are left unused.
Note that I am using a Turnigy 9XR Pro transmitter.
Running through the transmitter wizard, on OpenPilot, was, initially, straight forward enough: One thing to note, when identifying the four sticks axes (throttle, yaw, roll, pitch) was just move, in turn, each of the sticks slightly, and in one direction (not up and down), otherwise the downwards movement will be registered as the next stick being identified.
However, I hit a brickwall when it came to the 3 way flight mode switch (although I did make it past once, but I am not sure how as I was randomly flicking switches) – I suffered this issue: OpenPilot won’t recognize my Flight Mode switch
See also Please Help- Programming Openpilot CC3D to Turnig 9x transmitter. The thread help open pilot wont reconise my flight mode switch (sic), predominately, deals with the Spektrum DX6i although there is a reply, which says:
There should be a way to assign your 3 way switch thru your transmitter setting. I know I have to do that with my Turnigy 9X with the help of YouTube videos lol.
Seems to be that channel 5 needs configuring on the 9XR Pro. Hold the four way right button down, and then hit the right button again repeatedly until you get to menu “5/14”. You will see that CH1-4 are assigned to the Rudder, Throttle, Elevation and Aileron, and the rest will be blank.
Then hit the down key five times to select CH5, then hit the Menu button. Then for “Source” hit the right key repeatedly, going past “PPM1-8” and “CH1-24”, until you get to “SWCH IDx”.
Then hit the Exit button.
Now run through the Transmitter wizard again. The Flight Mode switch should then be recognised. You may then find that the three Trim knobs are not recognised. So, the CH6, CH7 and CH8 will require configuring in the same manner as the flight mode switch, but using “P1”, “P2”, and “P3” respectively. P1-2 is what the knob potentiometers are referred to as in the 9XR Pro manual.
Initially, I ended up skipping the last three Trim pots initially (as I couldn’t find P1, P2 and P3 in the source options – I found them after reading How to setup the Pots 9xr pro) and ran through the rest of the wizard without a hitch. Be sure to center the flight mode switch as well as centering the two sticks.
After all of that then the arming was configured and saved.
Then the attitude was set, levelled and saved.
Now, apparently, the ZMR250 is ready for its maiden flight.
An interesting point is made in this thread, Flight mode switch not recognized in openpilot:
The basics are that anything that can be configured in the FC, must be done in the FC even if the radio has similar functions.
On the radio:
– Configure it as a simple default airplane model
– Add remaining needed things to the radio setup as per FC instructions. For example in this case you need nothing else than assigning a free switch to a free channel.