This week we will talk about the last construction phase of Vitruvian VR: the IoT research and develop.
We present to you Niccolò Galiazzo, the young Maker who managed to the IoT parts of the project.
In particular Niccolò will explain to us the functioning of an aesthetic side of Vitruvian: the lights.
The colored LEDs mounted on Vitruvian are able to change color during the movements of the machine; this is possible thanks to the brain driving them, a TinyTile module.
Inside the TinyTile board we can find a 6-axis accelerometer and gyroscope, of which we used the last one for detecting changes in Vitruvian position.
Via Arduino IDE it is possible to configure this board importing libraries, in this case “curieIMU” and setting the right commands to access the sensor as we will see in the setup function.
As can be seen in this sketch upside there are a series of declaration respectively of LEDs outputs, gyroscope input with the reference variables for each axis and led PWM values.
After these declarations we configured sensor sensibility an initialize it.
In loop function first of all we read sensor measurement and after we compare them with the last stored value, if there is a difference bigger than the tolerance, LEDs will change color. (See the next sketch)
The power adapter PCB
However when was time to connect led strips to TinyTile, we faced an inconvenience: TinyTile was able to output only 20 mA instead of the more than 200 Watts that all the lights (almost 15 meters of which!) need. It was impossible to connect them directly, we needed an interface board such to tolerate 12V 16A, and this was made possible by using Mosfets (IRL540), one for each channel of R/G/B.
Thanks to PWM modulation we were able to change light intensity of single color channel, in this case we are dimming LEDs not to augment or decrease seen light but to change the final color seen from human eyes.
Here's the video, enjoy it!