Timing the flashes, Act 2

Since our last post on Monday, Vlaya and I have been writing code to trigger flashes when the Phyllo is at precise angular positions.

Flashing via SPI

As mentioned here, to flash the LEDs we need to send a SPI frame “FLASH” from the main board to all the led-driving PCBs signaling them to turn their LEDs on right now and for how long.

Checking the timings

On top of sending a SPI frame, we also set the Timer channel we use to trigger the flashes in output mode “Toggle”. Using a Saleae Logic analyzer to  monitor all these outputs allows us to export the precise timings of both the moment the Timer channel is toggled and the moment the SPI frame is sent.… Read more

Timing the flashes

Today Xavier and I worked on a way to flash the LEDs at given absolute angular positions, as discussed in this article

Over the last few days we’ve refined an idea to naturally flash the LEDs at a given absolute angle thanks to the STM32 Timers.

The Idea

To retain awareness of the angular position of the Phyllo, we have a position sensor (either a hall or an optical sensor, both are on the board) that triggers a rising edge once per rotation. We consider the position at which the sensor fires to be the absolute angular position zero. This gives us an absolute reference that we’ll use to keep the flashes from drifting in time.… Read more

Steady, ready, capture !

I’ve been working on coding a section of a speed feedback system since Thirsday. We need a way to frequently measure the motor speed for two reasons:

  • To adjust the motor speed if it deviates from the target speed
  • To compute the precise time at which we need to flash the LEDs

To accomplish this, we have optical and hall sensors (we will use the sensor that gives the best precision) hooked up to our rotating PCB and our bottom fixed PCB. The rotating PCB is the one sending the commands to flash the LEDs, and the bottom is the one sending Dshot to our ESC.… Read more