FlexFox

FlexFox is an 80m radio orienteering transmitter designed to fulfill all 80m transmitter duties for any radio orienteering competition format. As its name implies, it is very flexible. It can operate at any frequency across the Amateur Radio 80m band and can be configured to transmit using any duty cycle and to send any Morse code pattern. It includes a WiFi module that supports wireless synchronization of all configuration settings to an unlimited number of FlexFox transmitters. Here is a list of some of its other specifications:

  • Frequency range: 3.5 MHz – 4.0 MHz
  • Output power into 50Ω load: 10mW to 5W
  • Supply Voltage: 5V – 13.4VDC (current depends on voltage and RF power setting)
  • Real-time clock drift: less than 1 second per week

FlexFox can be programmed with up to five different events, each with its own individual start time, finish time, power level, station callsign, and frequencies. Each event is then shared wirelessly over WiFi to any number of additional FlexFoxes. The real-time clocks are also synced during cloning.

FlexFox Design

FlexFox is 100% open source. Documentation for its firmware and hardware is available for download from GitHub: https://github.com/OpenARDF/FlexFox80. The first FlexFox prototypes were designed to utilize the ATMEGA328P (Arduino) processor, but over time, it became apparent that many user-friendly features would require a more capable processor. The latest FlexFox design uses the AVR128DA48 processor. Note that GitHub includes two separate branches: one for the ATMEGA328P and one for the AVR128DA48. WiFi capability is provided by the Adafruit HUZZAH ESP8266 Breakout board. The ESP8266 firmware is identical for both the prototype and updated FlexFoxes.

Using FlexFox

Connectors

FlexFox has only two external connectors, power and antenna, with the following specifications:

  • Power: 5.5mm x 2.1mm Male Barrel Connector
  • Antenna: 5-Pin DIN Female Jack

The antenna should provide a nominal 50Ω load at the transmit frequency, but FlexFox is very tolerant of antenna mismatch. If the antenna is disconnected during transmissions, FlexFox immediately shuts down its final RF output amplifier but continues transmissions using its driver stage, allowing a nearby receiver to monitor the weak signal coming from its circuit board.

FlexFox requires between 5V-13.4VDC and includes a boost voltage regulator to ensure that, internally, it always has sufficient voltage to operate at any transmit power setting. Power supply current requirements depend on FlexFox’s transmit power setting and on the voltage being supplied. For example: FlexFox can provide full 5W RF output power when connected to a 5V 3A power supply, or a 12V 1.5A supply.

Power Up

When power is first applied to FlexFox, its board-level processor begins operation. After running a series of self-checks, the board-level processor will turn on the WiFi module. The WiFi module can be configured to function as either a master or slave. Its master/slave configuration determines how the WiFi module behaves at power-on.

WiFi Slave Operation

All FlexFoxes begin their lives configured as slaves. When configured to function as a slave, a FlexFox WiFi module will broadcast a unique SSID with the format Tx_########, where ######## is a unique number sequence generated from the WiFi module’s hardware MAC address.

Immediately after power-up, a slave’s WiFi module will search for the presence of a station within range with the SSID Tx_Master. If it finds a Tx_Master SSID, a slave will attempt to connect with it and enter into a cloning session.

If a slave WiFi module fails to find a Tx_Master after searching for 15 seconds, it will continue broadcasting its SSID and waiting for connection requests. If no connections occur, the FlexFox board-level processor will shut down the WiFi module after 2 minutes. During the two minutes it is powered up, the WiFi module can be connected to by a desktop or laptop computer (Chrome browser recommended). The IP address of a FlexFox is always 73.73.73.73. A FlexFox’s WiFi module will remain powered up while there is an active connection and will be powered down two minutes after the connection is closed.

WiFi Master Operation

When configured to function as a master, a FlexFox WiFi module will identify with the SSID Tx_Master. Immediately after power-up, a master’s WiFi module will begin accepting connection requests from slave FlexFoxes or from any WiFi-enabled computer (Chrome browser recommended). The IP address of a FlexFox, whether master or slave, is always 73.73.73.73. A FlexFox’s WiFi module will remain powered up while there is an active connection and will be powered down two minutes after the connection is closed.

You configure a FlexFox to be a master by connecting to it via WiFi using a computer, then from the 73.73.73.73 home page, navigate to test.html. On the test.html page, click the master/slave button. Changing the master/slave setting will cause the SSID to change, resulting the WiFi connection being dropped. You must then re-establish a WiFi connection using the FlexFox’s new SSID.

If a slave requests a connection with a master FlexFox, the connection request will be granted immediately by the master. The master and slave will then engage in the transfer of event files from the master to the slave, and the slave’s real-time clock will be synchronized to the master’s clock. At the end of the cloning session, the slave will disconnect from the master. At that point, another slave FlexFox may connect to the master.

If a computer connection to a master FlexFox is kept open during a slave cloning session, messages regarding the cloning session will be displayed on the Events web page, announcing the success or failure of the cloning session.

Connecting to a FlexFox Over WiFi

A FlexFox has no buttons or switches; setting its configurations is accomplished over WiFi and all settings are stored in EEPROM or the flash file system. Each FlexFox has its own WiFi module (https://www.adafruit.com/product/2471) programmed to perform all the necessary functions to implement FlexFox. In addition, the WiFi module has enough onboard memory to support its own 1MB file system, which stores event files that control how and when FlexFox operates. At power-up, the WiFi module examines each event file in its file system. If it identifies any current or future events, it will communicate with FlexFox’s onboard processor and configure it to run that event.

You make a FlexFox perform how you want it to by configuring its event files. Event files can be uploaded, downloaded, and deleted using menu options under the 73.73.73.73 home page displayed when a browser connects with a FlexFox. FlexFox provides an easy way to modify an existing event file: the event.html web page. Simply navigate to the event web page, and a table will be displayed, populated with all the events stored in FlexFox’s file system. Select the event you would like to modify, then make any desired changes and apply them. It is a simple process that avoids most configuration errors.

An event file describes all aspects of how all the transmitters should operate for an event. A FlexFox is able to function as any transmitter used in any event file held in its file system. An event file is written in Event Script Language. By sharing event files using the FlexFox cloning process, all cloned FlexFoxes will receive all the information they need in order to function correctly, regardless of which fox they are designated to be.

Setting a FlexFox’s Role

The role that a FlexFox performs in a particular event does not get set or copied during a cloning session. After an event file has been installed on a FlexFox (either by uploading, or copied during cloning) the FlexFox will create an “identity” file (file suffix “.me”) the first time that the event file is executed. An identity file will contain a default role setting (Fox 1, Fox 2, Fox 3, Beacon, Spectator, etc.). The default setting may be changed by connecting to the FlexFox over WiFi, navigating to the event.html web page, and setting the desired role. Once saved, a FlexFox’s role for that event will not change unless the identity file is deleted or the role is reconfigured manually over WiFi using the procedure just described.

File System

The FlexFox file system resides on the WiFi module. It can hold up to 1MB of text files, which is more than enough to hold all the event, user interface, and configuration files FlexFox is likely ever to need.

The WiFi module functions as a web server, serving up HTML files to a WiFi-connected user. The primary user interface files include the following:

Home – URL: 73.73.73.73
This is the main menu from which all the other user interface files are accessed. This page is hardcoded into the WiFi firmware. Since it does not reside in the file system, it is always available and is unaffected by any file system problems that might crop up.

events.html – URL: 73.73.73.73/events.html
This web page lets users view and configure event files stored in the file system. It also supports synchronizing the FlexFox’s real-time clock to the computer’s clock. Note that events must be selected individually before its settings can be configured. The role setting is applied only to the FlexFox that served the events.html page. All of the other event settings get saved to the .event file. If those event settings are configured in a master FlexFox, they will be copied to slave FlexFoxes during a cloning session.

upload.html – URL:73.73.73.73/upload.html
This web page allows a user to upload a file (like a new event file or a new user interface HTML file) to the FlexFox file system.

download.html – URL:73.73.73.73/download.html
This web page displays the full contents of the FlexFox file system and allows a user to print any file’s contents to a browser window, where it can be viewed, selected, and copied if desired.

test.html – URL:73.73.73.73/test.html
This web page contains various functions that can be useful for testing and debugging FlexFox. It is also where a FlexFox’s master/slave setting is configured.

radio.html – URL:73.73.73.73/radio.html (Not available in prototypes)
This web page is experimental at this time. It provides an interface that lets FlexFox function as a CW QRP 80m transmitter.

All the user interface web pages (except Home) reside in the file system and can be updated using the upload.html interface page. New interface pages can be added simply by uploading them. Giving a new web page a unique name will avoid overwriting existing interface pages. Uniquely named pages will not appear on the Home menu page unless the WiFi firmware is modified to include them, but they can still be accessed by navigating to them by specifying their full URL (e.g., 73.73.73.73/unique.html).

In the future, the FlexFox user manual can be stored in the FlexFox file system, allowing users to have ready access to the manual on any smart phone or tablet browser.

LEDs

FlexFox has two board-level LEDs: red and green (prototype boards only have a single red LED). The green LED illuminates to indicate that a connected antenna has been detected. The red LED blinks quickly to indicate that no events are scheduled to run. Slow blinking of the red LED indicates that an event is scheduled to run sometime in the future but is not currently running. The red LED may be dark if an event is currently running but the FlexFox is not currently transmitting but will blink in Morse code characters if FlexFox is currently transmitting.

The WiFi module has two LEDs: red and blue. Only the red LED blinks if the module is ready to accept an external connection, but no external WiFi connection has been established yet. Only the blue LED will blink if an external WiFi connection has been established but no data channel has been opened. The LEDs will blink alternately red, then blue, if a data channel is open. The red and blue LEDs will blink together while event files are being transferred during a cloning session. The fast blinking of the red or blue LED after a cloning session indicates that the cloning session failed.

Cloning

The cloning process copies all the event files from a master FlexFox to a slave FlexFox. It also synchronizes a slave’s real-time clock to the master’s. Cloning overwrites any slave event files having the same name as a file contained in the master. Aside from overwritten files, cloning does not delete event files in a slave FlexFox.

Be sure that the master FlexFox has its event files configured as desired. All the event files on the master will be copied to the slave during cloning, so make all desired changes to the master’s events, and they will all be applied to a slave in a single cloning session. Also, make sure that the master’s real-time clock has been synchronized to the computer’s clock, if desired.

A single cloning session takes about 40 seconds to complete, but could take longer if there are many event files to copy. The cloning process is as follows:

  • Power up the master FlexFox and wait for its WiFi module’s red or blue LED to blink slowly, indicating that it is ready to accept connections.
  • (Optional) Connect to the master FlexFox from a computer and navigate to its event.html page. Leave the event.html page displayed in the browser to receive informational messages regarding the cloning session.
  • Power up one slave FlexFox to be cloned. Note the changes to the LED blinking patterns indicating cloning progress. Once just one of the slave’s WiFi LEDs (red or blue) is blinking slowly, the cloning session has completed successfully. Or look for a success message displayed on the master’s event.html page.
  • Power up any additional slave FlexFoxes to be cloned, one at a time, waiting for each cloning session to complete before powering up the next slave.

Under The Hood

FlexFox’s board-level processor is responsible for running an active event. At power up, in addition to powering up the WiFi module, the board-level processor checks its EEPROM to determine if it has been configured with an active event. If an event is found that is scheduled to run in the future, FlexFox will configure itself to wake up just prior to the event and will proceed to put itself to sleep. If an event is found to be currently underway, FlexFox will set up the transmitter hardware and timers to begin executing its role in the event. Its real-time clock will time its transmissions precisely in sync with other transmitters. FlexFox will sleep between transmissions to reduce battery consumption, waking up just in time to transmit on schedule.

At the completion of an event, the board-level processor will power up the WiFi module. If the WiFi module finds another scheduled event in its file system, it will send it to the board-level processor, which will load it into its EEPROM. The board-level processor then powers off the WiFi module. If no more active events are found in the WiFi file system, the board-level processor will configure FlexFox for minimum battery drain and put itself to sleep indefinitely. The only way to re-awaken FlexFox after all events have been completed is to cycle power.