Step 3: Connect Control Board to Logic Analyzer

Picture of Connect Control Board to Logic Analyzer
Throttle Full - Cyclic Neutral.jpg
A logic analyzer will allow you to capture the frames of digital PCM data as the signal is sent from the micro-controller to the transmitter and visualize and decode them.

For this Instructable first a Tektronix 1241 Logic Analyzer was used, then a Saleae Logic which allowed us to precisely measure the frequency with which frames of data were sent (22ms) including the format, quantity, and content of characters in each byte of its serial protocol (8 data bits, no parity, 1 stop bit), as well as its rate (133000 baud). Each frame contains 14 bytes which can be conveniently represented in hex notation.

Note: The baud rate quite critical. The closest standard baud to our target supported by most if not all serial devices (including the USB-to-Serial device we require) is 115200. This was too far out from our transmitter and during initial experimentation attempts at communication failed. It became necessary to select a USB-to-Serial device whose chipset permitted the setting of an arbitrary baud rate. For the final version we settled on a model which included a FTDI chipset (specifically the FT232 USB-Serial (UART) IC, see Glossary for details).

Attached to this step are example log files captured with the "Logic" software application freely available from Saleae. In the first file the throttle is completely in the down position, in the second file the throttle is completely in the up position.

More specific directions and discussion regards how to use a logic analyzer are beyond the scope of this document.

Layman's Explanation:

(Note: this explanation is not 100% accurate but may be a helpful way to visualize and understand what is going on)

In our earlier analogy, we stated that the water pressure and level as it flowed through pipes was akin to the voltage level of the electrical current flowing through our circuit, being altered by the "gates" of the joysticks being raised and lowered. As we learned by using the oscilloscope however, the signal sent between the micro-controller and the transmitter chip is digital, not analog. This effectively means that any time we take a measurement the water pipe will either be full, or empty at any given point, never in between. By alternating between these two extremes, binary numbers are being sent.

Another way to think about this is to imagine two people at either end of the pipe, a sender and a receiver. In this case the sender is the micro-controller (because it knows the value of the numbers to be sent) and the receiver is the transmitter chip. Attempting to send information by flooding and draining the pipes would be very slow, so instead they are using a flashlight to communicate in a form of morse code.

Every so often, the receiver will peek into the pipe and at the same moment the sender will either turn on the flashlight to indicate a one, or leave it off to indicate a zero. Each time this happens a single bit is communicated. This will happen rapidly eight times in a row, forming a byte. If every bit was a letter in a word, the work would be the byte. The logic analyzer further tells us that there are fourteen bytes or "words" in each sentence spoken by the micro-controller to the transmitter chip, and each sentence contains all of the joystick settings for each motion direction the remote control is capable of setting. The complete sentence gets constantly repeated approximately 45 times per second (once every 22ms) as long as the remote control is powered on.

The baud rate mentioned above as being critical would be the predetermined timing the sender and received would have agreed upon for sending flashes of light. In other words if the sender is going to send a flash once every five seconds but the receiver was only looking once every ten seconds, the receiver would only be there to witness half of the signals, and after the first view would record each of the subsequent bits in the wrong positions within the words they are recording. When we say the baud rate is 133000 what that actually means is there are up to 133,000 individual flashes happening every single second!