I finally got around to completing my musical colours project:
- Make the prototype permanent by building a perfboard arduino.
I wanted to keep the standard 5050 controller for general van lighting, controllable by the IR remote. I did this by using another transistor as a switch for the 12v line into the controller. One of the routines in the code then pushes the gate high to turn the controller on.
- Put everything in a project box, with usb, audio passthrough, IR input and push button to cycle routines.
- I added a temperature diode – because I had one lying around – for a ‘temperature colours’ function.The function works by:
- Detecting the temperature as a voltage.
- Translating this into a temperature in degC.
- Converting this to a 5 bit binary word (max temperature of 32deg).
- Displaying the binary word using the LED strip (MSB first): red 1, blue 0, 1s duty cycle
- Displaying a constant analogue colour depending on the temperature.
Here it is in action (the reading is 11000 [24deg]):