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

A new angle on flash frequency

In a previous post, Vlaya and I showed how the flash frequency can lead to many nice effects.

A question of angles

After a long reflection, we realized that for many reasons the best way to describe the flashes is not by their frequency, but instead by the absolute angular position of the Phyllo when each flash occurs.

Therefore, each image description will contain the colors frames and a pre-computed absolute angle (which may be procedurally computed or included in a stored animation).

These absolute angular positions are not to be confused with the relative angular rotation of the motor between two consecutive flashes.… Read more