Freakduino v3.x Hardware User Guide

The FreakLabs Freakduino board v3.x is designed for rapid prototyping, evaluation, and deployment of custom wireless Arduino based devices at low cost. It combines the ease-of-use of the Arduino IDE and toolchain, expansive libraries that fill just about any need, compatibility with a rich assortment of peripherals in the Arduino shield form factor, a battery an integrated IEEE 802.15.4 wireless radio for inexpensive prototyping and testing of a wireless sensor node. Version 3.x improves on the previous versions by having battery regulation circuitry standard on all boards, reducing the power consumption in sleep mode, and manufacturing optimizations that reduce the cost of each device.

The Freakduino v3.x also has optional features such as an omni-directional antenna, high power directional antennas, a low cost  bottom-mounted battery case, or a ruggedized enclosure with integrated battery case.

 

This board is designed to introduce people to wireless sensor networking inexpensively and without having to deal with complex toolchains, protocol stacks, and software. It’s fully compatible with the Arduino IDE and toolchain which offers a single click compile and download and a rich ecosystem of open source software and tutorials available on the internet. The electrical specifications and connector form factor are also compatible with the original Arduino hardware so that the board can interface with the large assortment of Arduino peripheral shields. The availability of third party peripheral shields and open source software allows this board to be used for many diverse applications.

Enhancements were also added to this board to increase functionality. The addition of an integrated wireless radio based on the 802.15.4 protocol (same radio protocol as the XBee and Zigbee) allows for wireless control of devices or wireless sensor data collection. Battery circuitry was added so that it could function as a true wireless node without any external power cables. The board is also fitted to a ruggedized enclosure so that the design can be transported safely or deployed in remote settings without worrying about damaging the circuit.

The design has also been optimized for low power. It consumes approximately 200 uA in power down/sleep mode at 3.0V which is the voltage supplied by 2 AA alkaline batteries.With proper power management, it’s possible to have a Freakduino run for months on a single pair of AA batteries.

Radio  

The main addition to this board is the integrated wireless radio. The radio is based on the 802.15.4 wireless protocol and is the same protocol used by XBee modules and Zigbee devices. The radio operates at either 2.4 GHz or 900 MHz depending on which version is purchased. It comes with an external antenna connector (RP-SMA ) which is a standard antenna connector commonly found on Wi-Fi routers. An external antenna was chosen over other options such as a chip antenna or printed antenna because of the improved range and variety of available antennas.

The radio driver software and protocol stack are fully open source and available as an Arduino library. The protocol stack is simplified to three main library functions to make wireless communications as simple as possible. Those functions are: init, send, and receive. This makes it easy to use the radio as a simple extension of a serial port or to set up a peer-to-peer star network here each device can talk with any other device within listening range.

There are also many benefits to using 802.15.4 for communications. At 2.4 GHz, the antennas used are the same as those used for Wi-Fi. At 900 MHz, the signal is able to travel long distances and penetrate thick walls. There are a large variety of antennas in different sizes, shapes, and power for both frequencies. Omnidirectional antennas such as the standard whip antennas on Wi-Fi routers give moderate range and allow transmission from all directions. Directional antennas can also be used for greatly improved range if the direction of communications is fixed.

  

Some other benefits of using IEEE 802.15.4 is robustness such as automatic acknowledge andretries and functionality such as auto-discard of frames that don’t match the particular network address, node address, or have their data corrupted. Auto retry means that if the receiver doesn’t acknowledge that it received a packet, the transmitter will retry sending the packet up to some maximum number specified by the user. The auto checking of addresses and checksum means that the radio does most of the heavy lifting to ensure the packet arrives uncorrupted and the user doesn’t have to do manual filtering.

The chipset used also has a hardware accelerator for AES-128 encryption. AES-128 is a strong encryption standard used by many government agencies to secure communications, especially wireless communications. The system also supports a true random number generator based on ambient RF signal levels. The chibi library includes support for AES-128 encryption using the onboard encryption engine as well as random number generation using the radio hardware.

Since 802.15.4 is also used for many communications protocols including Zigbee and 6LoWPAN, the Freakduino can be configured as a wireless protocol sniffer and used in conjunction with Wireshark to form a wireless protocol analyzer for 802.15.4 based protocols. This application is very useful to debug software for these protocols such as smart meter communications or for security testing of 802.15.4 based communications.

All software and hardware is open source and all registers and features are available to the user. This allows for more flexibility for advanced users and a convenient prototyping and test platform
for users that are considering an 802.15.4 wireless design of their own.

Power

There are three options to provide power to the board. The most common is via the USB, however the board can also be powered via an external adapter connected to the DC jack. This is especially useful when more power is needed than can be provided by the USB. Finally, when no external power is available, the board can also be battery powered.

The USB connector provides up to 500 mA of current at 5V and can directly power the board for most applications. It’s convenient when the device is connected to a PC since the USB to serial converter also allows for communications with the PC.

For designs with higher current requirements, such as driving motors or high power LEDs, an external DC adapter can be used. The adapter should be a minimum of 6V and a maximum of 14V.

Note: The power input is determined by the position of the jumper below the DC input jack. The markings on the jumper indicate whether the USB or DC input is being used.

The board also has two separate connectors for batteries. One of the connectors allows an optional battery case to be mounted on the bottom side of the board. This is convenient since the battery case is directly mounted to the board and allows for battery operation in tight spaces.

The other connector is located near the bottom of the board and is a 2-wire connector that features mating and polarization. It’s technically called a JST XH series connector and was chosen to allow easy attachment of external battery cables without worrying about reversing the positive and negative connections. It also makes connecting and disconnecting the battery case of the enclosure to the board much easier.

There is also a battery regulation circuit on the board. The reason this is needed is because the battery voltage varies based on the battery type and amount of charge left. The voltage regulation allows either standard alkaline or rechargeable NiMH batteries to be connected to the board and will generate a stable 5V output with up to 200 mA of current. This is fine for most sensors, however power-hungry devices like motors and power LEDs may exceed the maximum current output. For these devices, its best to use the DC input jack with a battery of 6V or higher.

It’s also possible to monitor the battery voltage through one of the analog input pins on the MCU. When combined with wireless communications, its possible to get early warning when the battery starts to get low.

There is a power switch on the board that selects between external line power or battery power. The switch can also be used as an OFF switch if either line power or battery power is not present. There is also a 2-pin DIP switch on the board that enables or disables the LED indicators. If the board is externally powered, then it’s fine to enable both LEDs, but when the board is battery
powered, the LEDs will cause the battery to drain faster and should be disabled. The DIP switch allows the user to easily disable the LEDs during battery operation.

Connectors, Jumpers, and Switches

The board contains a number of connectors, jumpers, and switches:

1. Power Input Jumper. The power input jumper is used to select between using the external DC jack or the USB to power the board.

2. Main Power Switch. The main power switch toggles between using line power or battery power. When no battery is connected, this would also serve as the OFF position. The opposite is true when no line power is attached.

3. LED Enable Switch. The LED enable DIP switch is used to enable or disable the main power LEDs for 5V and 3.3V supplies. LEDs may consume unecessary power during battery operation so the DIP switch allows the user to enable/disable them when needed.

4. External Antenna Connector. The external antenna connector is an RP-SMA connector that attaches to a compatible antenna.

5. Battery Connector. The battery connector is optionally installed and comes with the battery boost kit.

6. Voltage Converter Output Disable. This is only used when programming the bootloader on the board to prevent collisions on the SPI bus. This jumper should rarely be used and only when flashing the bootloader or using an in-system programmer (ISP).

Due to having three ways to power the board, the power switch and power jumper settings need to be configured for your desired input. The switch and jumper is labeled to make things easy, but here’s a quick reference chart on how to configure the power input. The positions in the table correspond to the labels on the board.

 Main Power SwitchPower Input Jumper
External DC Power
USB/DCUSB PWR
USB/DC
USB/DCDC PWR
BATTBATTIgnored
Installing the Hardware Board Files

  • Download and install the correct USB/Serial driver for the version of board you’re using
Freakduino VersionUSB Serial ChipUSB Serial Driver
1.xFTDI
FT232RL
FTDI USB Serial Drivers
2.xFTDI FT231XSFTDI USB Serial Drivers
3.xSilicon Labs CP2102Silicon Labs USB Serial Drivers

  • Open the Arduino IDE, go to File/Preferences, and copy the sketchbook location folder.

  • Go to that folder and copy the board support files into the /hardware directory. If that directory doesn’t exist, create it.
  • This is what it looks like on Windows:

  • This is what it looks like on Linux:

  • This is what it looks like on Mac OSX (On OSX in English, that would be the Documents folder):

  • Once you copy the files into the /hardware directory, restart the Arduino IDE and go to the Tools/Board menu. You should find the Freakduino boards in there.
  • Select the Freakduino series boards from the menu list

  • Then re-open the Tools menu and go down to the Tools/Version menu. Select the Freakduino Standard version.

  • The hardware board files should now be installed.
Installing the chibiArduino Library

The final step is to install the chibiArduino library. You can find instructions to do this here:

Installing the chibiArduino Library