Skip to content

BLE Receiver

AdamGlass edited this page Jul 18, 2017 · 4 revisions

Hardware

Firmware

The BLE Receiver firmware is derived a sample provided in the the nRF5 SDK from Nordic Semiconductor. It's essentially a drop in replacement for a simple RC receiver -- talking BLE to a host and PWM/GPIO to the car or drone. The firmware is configurable to support a number of GPIOs and PWMs though there may be limitations imposed by the Nordic hardware, specific breakouts used, and software limitations.

The current version supports n GPIOs and 4 independent PWM channels. Support for up to 12 PWM channels is trivially possible. Configuration of the GPIO and PWM channels supported is done at compile time by modifying 'config.c' to specify the pins associated with the resources as well as their failsafe state.

The receiver implements a simplistic heartbeat/failsafe model in which regular heartbeats must be provided by a host or the receiver will go to it's failsafe state. Currently the heartbeat timeout is set to 400 ms. The 'config.c' can be used to set the name of the hardware so that host side software can know how many GPIOs/PWMs are on the device and what they're used for. Making the firmware self-describing of the hardware resources is possible but was not pursued in this implementation.

BLE Services

Battery Level

Compliant with BLE Battery Level Service but currently returns only simulated battery state. It remains a design question whether it should return receiver battery level or car/drone battery level or both.

Clone this wiki locally