Close

Final ground checks

A project log for Skywriting

Taking LED light painting to new heights

jeremy-weatherfordJeremy Weatherford 07/01/2015 at 13:550 Comments

Assembling everything last night, I discovered an issue that I hadn't encountered before. At high frame rates, the Teensy no longer has time to read the signals from the RC receiver. I'm using interrupts to measure pulse widths, but the Adafruit Neopixel library disables interrupts while bit-banging the WS2811 data. Somewhere around 20ms per frame (50Hz) the Teensy doesn't have time to read both sides of a pulse from the RC receiver between frames, which it really needs to be able to do in order to turn OFF the light pattern.

Thinking about this, I decided I could either rewrite the Adafruit Neopixel library to use timers/interrupts (ack) or add a processor that could turn the servo pulse widths into a simple digital signal. As it happens, I had one of the processors already, purpose-built for the occasion: it's called a receiver switch, and I use them for turning LEDs on and off. By wiring its output to the Teensy (with its switchable pulldown resistor!) I was able to check the status of the NAV switch with a simple digitalRead between frames, and everything started working much better.

From prior testing I was worried about noise in the remote control system caused by the RC transmitter trainer cable, but that seems to have resolved itself, possibly when I switched to using a battery pack instead of my laptop to power the uC.

It all fit back in the plane, so tonight's the night if the weather holds...

Discussions