Step 5: Connect Control Board to USB/Serial Cable
Once the transmitter chip was desoldered, we wanted to be able to reconnect the original remote control to it and still fly the helicopter as before, or be able to connect the USB-to-Serial cable to it and operate the helicopter using software, or be able to connect the remote control to the USB-to-Serial cable to capture and record data frames directly.
We ended up building a simple switch circuit using a prototype board which would allow us to flip switches as desired into any of these configurations.
We used the information collected in this way to write in Python the "Helicopter_Control.py" module available as part of the Puzzlebox Brainstorms software.
In the attached photos we ran this module from a console, issuing the "read" command in the following way:
python Helicopter_Control.py --command=read --device=/dev/ttyUSB0
Note: In our specific configuration, the serial port created on our Linux system when the USB-to-Serial device was attached was "/dev/ttyUSB0" and this may be different for your specific system. Under Windows a COM port such as "COM1" might need to be indicated.
When executed in this way it becomes quite easy to see the realtime data sent from the micro-controller to the transmitter chip. We incorporated this information into our source code such that we could arbitrarily send specific command strings to our helicopter at will.
Incidentally we noticed that when the helicopter is first powered up, it is necessary for a command string matching a "neutral" throttle position to be repeated sent by either the remote control or computer software, whichever is currently connected to the transmitter chip. Otherwise the helicopter will not see the transmitter chip and will enter sync mode (indicated by a blinking blue light in the cockpit).
Also when the console command is terminated the helicopter will disconnect (the constant blue light in cockpit going out). To re-establish the connection it is necessary to again transmit a neutral signal for approximately two seconds before a directional command can be issued, such as "hover" or "fly forward." These transmission settings are handled automatically by the Puzzlebox Brainstorms software.