This post concerns the Open ARDF Equipment Project, which is utilizing the Receiver Development Platform, both of which are being developed together.
There has been a good deal of progress on the Dual-Band Receiver project this week, mostly on the software front.
This week I received an order from AdaFruit that included an FTDI Serial TTL-232 USB cable. That cable is, essentially, a USB-to-UART converter. Drivers for that cable are available for all the popular computer operating systems: Linux, OS X, Windows. Installation was a snap. I just plugged it into a USB port on and my computer, and it found and installed the appropriate drivers with no issues. My computer then showed a new serial port available: COM3 on Windows.
Only three wires from the FTDI cable needed to be connected to the Digital Interface Board: RX, TX, and ground. After wiring it up, installing a terminal emulator (PuTTY), and setting the baud rate to 9600 baud, the PC was able to “talk” to the Dual-Band Receiver’s Digital Interface Board. This opens a new universe of possibilities for the project.
PC Control
Using the serial interface provided by the FTDI cable, it is now possible to control the Dual-Band Receiver using the same Linkbus messages used for communication between the Digital Interface Board and the Control Head. So, from the PC, one can set the band, frequency, volume, monitor signal strength and battery level, etc. just like one does using a Control Head. The only difference being that you need to type in the correct Linkbus messages and then interpret the response messages from the receiver.
PC control could be made much more convenient by writing a PC application to provide a nice GUI interface for the user. One might have a graphical image of a receiver on the PC display, and by interacting with the image (turning dials, flipping switches, etc.) the PC application would apply those settings to the receiver over the Linkbus FTDI-cable interface. But just having some icons, buttons, or text boxes would make setting the receiver intuitive and effortless, with no need to memorize the Linkbus message protocol.
PC control, even without a GUI receiver application, means that it is no longer necessary to build a Control Head in order to test and experiment with the Dual-Band Receiver. This should make it much easier, and less costly, for anyone wanting to experiment with the receiver. The same capability will be added to the transmitter too.
Bootloader
The serial interface also provides the communication support required for bootloading. A bootloader is a small software program that resides in a special memory location in the microcontroller: a segment separate from the main program memory. The bootloader gets called immediately after the ATmega328P resets (or powers up), and before control is passed to the main program. The bootloader automatically checks the processor’s UART to see if a PC (running a special programming tool) is connected, and if one is present the bootloader supports writing new software into the ATmega328P, updating the main program.
A bootloader simplifies the process for updating the receiver software because updating can be done without the need for an “In-System Programmer” (ISP) device. Instead, all you need is the FTDI cable. Better yet, once the FTDI chip is added to the receiver design, you will only need a standard USB cable, such as the one that comes with most commercial electronic devices (cell phones, cameras, etc.) that connect to computers. We should also be able to utilize the DTR signal line coming out of the FTDI FT232RL chip, allowing the programmer to automatically trigger a reset just prior to programming the device.
Open source bootloader software is available on GitHub. Using the Optiboot source code, it was possible to create an Atmel Studio project that builds, installs, and debugs a simple bootloader for the Receiver Development Platform. A simple bootloader is working as of now, and has been used to successfully update the software on a Digital Interface board. This was accomplished running AVRDude on the PC: the same free software updater program many Arduino experimenters use.
Since we can now build and modify our own bootloader, we have total freedom in making it work the way we want. So we should be able to make it work conveniently for the user. Perhaps even making it possible for a future version of the Control Head to apply software updates to an attached receiver or transmitter.