BLE-RC firmware

Actually the firmware is mostly feature complete.

I’ve added OTA updates using nRF5 SDK and SoftDevice features, battery monitoring via BLE Battery Service (though it doesn’t work on one of the PCBs, maybe a soldering problem).

Another feature I’ve added is an ability to control one PWM pin with 2 functions. This way I can use rear red LEDs as both brake signal and marker light. When brake signal is on, the LED lights at maximum value, when only marker light function is on, the LEDs light dimly (somewhere at 32/266 PWM duty cycle).

There is also now a steering trim and drive invert commands in the communication protocol.

Software PDM

I also tested bit-banging of PWM values with Pulse-density modulation (also called 1-bit sigma-delta DAC, or sometimes even Bresenham line dithering algorithm applied to PWM). The MCU has 4 PWM channels, of which 2 channels are reserved for motor, which leaves only 2 PWM outputs for LEDs. There is also 1 timer (or 2, depends on what SDK is used) that can control 3 more pins (also depends on number of free PPI lines), but it is used for servos, so its frequency is too low for LEDs.

The software PDM method can bring analog output to any number of pins, but has limitations. In works in principle, and looks good even at low timer frequencies (1 kHz), but at low duty cycles it produces significant flickering. I would advice using it for smooth turn-on or off sequencies, where low duty cycle values last only for a fraction of a second and lowest values are skipped entirely.

RC-converted 1/87 truck

That is also complete. What’s left is making a video for it.