“Pedrone” Part #3 – 16 commands using sound protocol

This is the third step. The previous version of the firmware was able to recognize three tones and the demo used a single tone for a unique operation. Now, I used a “protocol” to send multiple tones and create 16 possible commands. I used Audacity, a fantastic sound editor, to create the sound sequences. Here is an example:

The sound file for command 1011

The sound file for command 1011

A “command” is composed by a “start” tone (1200Hz) and four bits starting from the most significative. The “ones” are 1600Hz, while the “zeroes” are 800Hz. In the picture is represented the code 1011. A full “transmission” is always 500mS. Every sound has 50mS duration, followed by 50mS pause. For sound file output, I used the format “ogg” because is compatible with Android and iOS smartphones.

To test the firmware, I wrote a small application on Android smartphone. This is a screenshot of the application running:

Screenshot of Pedrone-Rx2 application

Screenshot of Pedrone-Rx2 application

The three buttons in the middle are just for compatibility with the old version of the firmware, while the cursors at the right and at the left are the controls for the motors. There are five positions for each motor : Fast Forward, Slow Forward, Stop, Slow Backward, Fast Backward. So, at this moment, I used only 10 of the 16 commands available. The App was not published on Play Store because is just for testing purposes, but if you want, you can download it and install from this link: Pedrone-rx2.apk .

The schematic of electronic circuit has not been modified, while the firmware has been improved. If you want to load the C source and the HEX file to burn the micro, both of them are packaged in a zip file that can be downloaded from this link : Pedrone3.zip (use password eficara to unzip) . Here is the full list of the C source file ; the hex comes from compilation with IAR V5.50.0. To burn the micro, use the fuses configuration that is described in the first lines of the C source.