Skip to content

Hardware Platforms

Peter Price edited this page Oct 1, 2023 · 7 revisions

Hardware Platforms

A hardware platform capable of capturing the radio messages has two key components. An MCU and a RADIO.

Currently all the MC chips that have been used so far are ATMega 8 bit microprocesors and the radio has been a CC1101.

The key requirements for the MCU are:

  • it has an interface available to configure and control the radio
  • it has two digital input/output pins as the data interface to the radio

There are a number of methods for acquiring the RX data from the radio.

Software UART

This samples the RX data signal at 38400 Hz to extract the data bits.

This approach has a fundamental problem that the sampling clock, however accurate it is, is local to the receiver and totally independent of the clock used by the transmitter.

Any attempts to tune the receiver clock are pointless since each message can come from any one of a significant number of transmitters.

If the clocks are significantly different the stop/start bits will drift at the receiver compared to the transmitter and byte synchronisation will be lost. To avoid this would require over-sampling of the data signal by at least 4 times and preferably 8 times the bit rate i.e. 152000 Hz to 304000 Hz.

To achieve this sampling rate would require interrupts at the corresponding frequency. At the higher rate this is only about 50 cycles/sample for a 16MHZ avr MCU to collect, analyse the samples to determine a bit value, deal with the clock slip and generate the byte values. Overall a very challenging problem.

Examples of platforms that require a SW UART approach include the Atmega328p based NanoCUL

Hardware UART

This uses hardware to sample the RX data signal to extract the data bytes.

The HW UART automatically strips the START/STOP bits from the bitstream.

The approach also shares the problem of the sampling rate being derived from the local clock but can oversample in hardware.

A HW UART solution does not require per bit processing and will run on an 8MHz avr processor.

Examples of a platform that support a HW UART approach include the Atmega32u4 based CULV3.

At the time I originally wrote this wiki entry the CULV3 was the only 32u4 device I knew about. It is unfortunately not ideal for use with evofw3 because it uses a different bootloader (DFU) - see flashing to nanocul not working which explains how to overcome this.

I have also seen problems related to the performance of the cc1101 module used in at least one batch of these devices (Setting controller mode or set point not working from Domoticz and No response on specific command

The recommended 32u4 device is this one SSM-D2 (designed & built by me)