This is some help on the level of electronics and arduino programming to bring NAME:’s idea of “policijska ura” (-> curfew) to materialization.
LED lights
Name: had a large number of LED lights taken from a Lidl’s dump. Each of these led strips originally used a separate constant current driver (42V / 300mA), which was useless for this project. In the end we used a simple current limiting resistor per led strip -> 39ohms / 0.5W and one PSU block with 43Vdc (toroidal transformer needed to have some additional turns of wire added – to bring it from 4x12V/5A to 2x24V/5A – and finally to 1x 30V/10A).
Since the number of segments needed for the six digit display was large (42 segments) – we had to add additional 24V LED strips which had current limitiing. Luckily – two of these in series were able to provide enough light even at 43Vdc.
To drive LED segments from microcontroller – each segment got a MOSFET transistor driver – 42 of them. I tried some smarter options first (like reading the differential voltages at the dedicated led driver chips – this would reduce the need for three arduinos to one; the best solution could be this chip and optocouplers – but optocouplers are quite expensive…), but at the end the simplest solution was to use three arduino uno with I2C connections. One is master (seconds), the other two are slaves (minutes, hours). So: each arduino has 2×7 pins to drive directly (without scanning!) the relevant digit segments. The master arduino has some additional options on four analog pins. This includes a simple tick sound – via a dedicated loudpeaker MOSFET driver (linking to 43Vdc PSU). Arduinos are powered with one 9V wall adapter – and paralleled via +5V and GND pins.
The code can be downloaded here:
CountDownEightSegmentI2C_5.ino
(remove the .txt at the end of filename, create CountDownEightSegmentI2C_5 folder and put the .ino file into it.
Below are various stages with the focus here on my work. The 6 x 7 MOSFET driver board + loudspeaker driver (BUZ11). The 42 MOSFETs for LED strips were much cheaper IRFD110. Simple 39 ohm current limiting resistors were fine.
Testing was also done on two dedicated led driver chips:
– TM1638 chip with arduino library TM1638plus.h (green display below)
– MAX7219 chip with LedControl.h MAX7219 library
– at the end no special arduino library was needed
Advanced: LED strips and current limiting
LED is a diode which is used in so-called forward direction. In general diode is used for rectification of alternating current. It has a so-called forward threshold voltage level. This means that the signal voltage over the diode has to go over the threshold – for the current to run. Once this is over the current would run freely – and even in excess (-> burn the diode). Usual Si diodes have threshold voltage around 0.6V.
LED is a diode made of different material than Si – with around 3.0V threshold voltage (<- the white color LED!). 12 LEDs in series is a LED strip that has around 36V threshold voltage. We have to go over this with voltage – and at the same time limit the current to around 200mA – with a series resistor. A resistor of 39 ohms at this current has a voltage drop of about 7.8V. This would mean that our power supply voltage should be around 43.5V.
Last but not least:
– could be solved with Arduino Mega 2560 -> arduino 8-bit board with 54 pins
– and without I2C serial master-slave communiction
https://store.arduino.cc/arduino-mega-2560-rev3