Drawing time series with a laser on a phosphorescent plane. Funny project with a RaspberryPi, Warp 10 inside!

(a totally useless indispensable project)
Bill of Material:
- a GRBL controlled laser engraving machine
- a cheap blue laser pointer
- a phosphorescent sheet
- two MP1584 DC-DC Adjustable Buck module
- a Raspberry Pi 3
- a MHS 3.5 inch screen kit.
Read more about Warp 10 Raspberry Pi 4 benchmark for industrial IoT |
Replace the laser
First, remove the dangerous 2.5watt laser. Keep it away from children witty colleagues. Then, take apart the laser pointer, sold two wires to power it directly, and bypass the push button.
Then, you need to mechanically adapt the pointer to the machine, with a piece of wood or with a 3D printed part if you have more time to spend.
The 2.5watt laser is powered with +12V and an "enable" wire: electrical adaptation is trivial because MP1584 has an enable pin. You just need to remove the pull-up resistor on this pin and sold it to the enable wire.
Do not forget to set the output voltage to 3V before connecting the laser pointer.
Raspberry Pi power
The machine 12V power supply is powerful enough to power the Raspberry Pi. Again, a little MP1584 will do the job. It fits into the raspberry case, behind the screen. To simplify wiring, it is better to power the raspberry via the screen.
Set it to 5.1 V to be sure to avoid power problem on the Raspberry Pi.
Drawing time series with a laser on a phosphorescent plane, a Raspberry Pi and Warp 10. Share on XSoftware
Again, this project is proof of Warp 10 extensibility. There are three extensions: one to draw on the framebuffer (already used on the beer'o'meter), another one to write GRBL on the USB tty, and another one to add the SLEEP function, useful to slow down the display. processingToFramebuffer is available for everyone on WarpFleet. GRBL extension is not public yet (if you're interested, contact us).
Under the hood, there is only one WarpScript, stored in a 50-second runner warp10/warpscripts/grbl/50000/random.mc2
The video player

Warp 10 can handle binary values in time series since version 2.1. So, I will encode the video in several PNG images, then store the PNG as a GTS. FFmpeg is really helpful for that. The following bash script allows processing several video inputs stored in an "input" subdirectory.
The output is an optimized GTS format with binary value:
The video player is a loop on GTS values to decode each image and display them:
The random GTS generation
It is not a simple random GTS. You start at zero, the increment is random. Then you normalize the result between 0.0 and 1.0 with the NORMALIZE function, then you only keep 30 points with LTTB function.
The GRBL generation
You need to build a string with each GTS value. One way to do this is a custom mapper that returns nothing, but build the string you want:
The output is:
The result:
Conclusion
Well, Warp 10 is a database. A GEO TIME SERIES DATABASE. But you can implement whatever function you need in a Warp 10 extension!
If you have some funny ideas, tell us on Twitter!
Discover how to create a Grafana BeerTender Dashboard connected with Warp 10 |
Read more
Industry 4.0: Data on the critical pathway (2/3)
Industrie du futur : les données sur le chemin critique - Partie 2
Grafana BeerTender Dashboard connected with Warp 10

Electronics engineer, fond of computer science, embedded solution developer.