Yesterday we mostly worked out the detail of how we’ll be detecting neighbouring Phyllos.
Without further ado, here it is :
The first step for the Phyllos is to establish collectively which other Phyllos are present. Each Phyllo must therefore broadcast its presence and be given an identifier.
This step must be repeated regularly in case Phyllos are switched on/off.
As described in this post, we plan to base the protocol on wifi broadcast: a Phyllo regularly broadcasts its IP over wifi to signal that it is still on. The others register this IP address in a local running Phyllos table. After a while (let’s say a minute), if one Phyllo has not heard the broadcast of another, it will remove it from its active Phyllos table.
When this stage is reached, all the Phyllos have a unique identifier and a list of the identifiers of all the other Phyllos present.
The detection protocol is inspired from this paper as follows:
- The Phyllo with the lowest ID annonces its ID over Wifi. The ID is derived from the unique UUID register in the STM32.
- At the same time, this Phyllo emits a 360 ° IR signal with an unmodulated carrier frequency f=56kHz generated by PWM on an IR LED.
- Meanwhile, all the other Phyllos seek to detect the signal with a 56KHz rotary receiver.
- They recognize the moment when the emitting Phyllo enters their field of vision because the receiver begins to receive, and the moment when it leaves the field of vision because the receiver cease receiving. Given the speed of rotation, this gives each Phyllo two angular values. The correct angle is computed as the average of the two. Given the frequency of 56KHz and the durations of the periodic gaps in the transmission, the precision is around 0.1 °.
- They each update an internal list of their neighbours.
- The next Phyllo starts over the same process (in the order of their IDs).
After that, every Phyllo knows who their neighbours are.
You’ll note that collectively, this is enough information to determine the whole graph of neighbouring Phyllos.
We need a common time reference to be able to synchronize neighbouring Phyllos during the animations, for instance so that they can start previously uploaded animations at the same time.
To achieve this we use a breadth-first search algorithm to propagate a time reference from the root to the others over modulated IR:
- The Phyllo with the smallest ID this time emits an IR signal modulated on the carrier frequency, containing the information of the correct time reference.
- All neighboring Phyllos receive it and synchronize their time reference.
- Then, step 1) repeats itself for each neighbour in turn, one at a turn, and the time reference gets updated according to the elapsed time since step 1).
To decide which neighbours go first, we could for instance have the phyllos send the list of neighbours to their neighbours, sorting them by their ID.
If the graph is not connected because the Phyllos are clumped in groups too far apart to detect IR but close enough to speak over Wifi, the algorithm will have to be performed for each connected component, starting from the smallest ID Phyllo of each component.
The transmitter will be located inside the shell, on the rotating PCB. We will “fiddle” to increase its diffusion angle from 120 ° to 180 °. Also, we’ll try to make the IR range short enough that Phyllos too far apart would not be considered neighbours.
We will keep you posted 🙂
- Timing the flashes, the end for now
- Timing the flashes, Act 3
- Timing the flashes, Act 2
- How to play with Kronos
- One ESP32 to rule them all
- UART, UART, UART (and shell)
- Timing the flashes
- A new angle on flash frequency
- Motor control over Wifi
- From ChibiOS to FreeRTOS
- Phyllo effects taxonomy
- New 3D printed support for the petal PCB
- Spring is coming
- PID tuning
- Speed control from every angle
- PID control
- Let's all welcome the new Phyllo
- Solidifying our workflow
- Live wire
- Another success for the Ultimaker
- Time and material
- Pretty Animations
- Quick update on the power transmission
- When the bug lies in your debug print function...
- Successful print of the PCB holding structure
- Flower power
- UART's breakthrough !
- Phyllos Galore
- Improving the 3D PCB supports
- Random GDB behavior
- Tuning up
- UART flow control
- Mechanical issues and motor troubles
- RTFM !
- How to distribute traffic
- Software Architecture Diagrams
- False start
- Out of the shell
- Bulletin boards
- Who am I talking to ?
- SPI protocol to light all the LEDs
- First Phyllo “turntable”
- Shell in the air
- Good vibrations
- Steady, ready, capture !
- Speed Control to Motor Tom
- STM32 : 1, ESP32 : 0
- Timing with ESP32, conclusion
- ESP32 vs STM32
- IRksome AGC
- First test on ESP32
- Going all out on the 3D
- 3D printing tweaking
- Ground control to RoseAce team
- Taking our new ESCs for a spin
- Update on mechanical architecture
- ESP32 Update
- Motor Update
- First outline of a time reference
- IR Update
- A new shell fresh from the oven
- Lots of IRons on the fire
- Figuring out the right WiFi protocol
- A few bits about motors and ESCs
- PCB newcast
- Eat to live or live to eat ?
- 3D printing : behind the scenes
- Final LED tests
- A solid foundation
- IRoning out the Phyllo detection
- New Year, new skin
- Ruling the colony of Phyllos
- Update on Phyllos detection
- LED's do some tests
- Taking full control on our 3D model
- The magnet strikes back
- The PCB puzzle
- A false sense of symmetry
- Communicating between Phyllos : Who’s Who ?
- Working anatomy of a Phyllo
- About LEDs
- Generating 3D Models