It was probably 45 years ago when my dad and I figured out that a mixture of white light and blue-violet (UV) light really made the aquarium plants and decorations "pop". It was not easy to create that effect back then. When I recently purchased a bag of 100 blue-violet (UV) LEDs, my eyes immediately turned toward the aquarium light (white LED light). I imagined how happy my little fish would be with beautiful new lighting, including twilight and sunrise/sunset effects. I immediately knew what must be done! The aquarium light must be hacked! (Unfortunately, it is not possible to fully capture the UV light effect fully in a photograph. I have done my best to reproduce the aquarium as it actually looks under the different settings.)
First, I looked at the wall wart power adapter for the aquarium light. I saw that it was 12 volt, 200 mA. Then I examined the light, and found 2 screws which I removed. I then used a spudger to release the snap clips around the edges, and separated the 2 halves. I found exactly what I expected. A black and a red wire coming from the power jack, going to a power switch, then to the LED board. I cut the plastic rivets holding the board in the fixture, and lifted the board. I determined where I could drill holes for 12 more (the UV) LEDS, installed them, held each in place with a dot of hot glue, and wired them together in a series-parallel configuration, 2 series lines of 6 LEDs each. The anode ends were kept separate, the cathode ends wired together. I reinstalled the LED board, and then I grabbed an Arduino NANO (my development board of choice), a pushbutton switch, a few resistors, a Photoresistor and 2 general purpose NPN transistors, and wired them up on a proto-board. The transistors are used as drivers to the LEDs from the PWM pins 3 and 5 of the NANO. The pushbutton is used to switch modes for the controller, and a photoresistor is used to adjust the LEDs based on the ambient light level.
Next, I took the +12 volt (red) wire coming from the power switch, (switch is not visible, in the photo below due to USB cable.) and connected it to the V-in pin of the NANO, and then extended on it to it's original connection on the LED board. I disconnected the ground (black) wire from the LED board, and connected it to the ground of my control board. I then ran a wire from the collector of the PWM driver transistor for the main LED channel to the point on the LED board where the ground wire had been previously. Next, I calculated and installed current limiting resistors for the UV LEDs I had installed, and wired them to the other PWM transistor. After testing, and installing the sketch I had written, I drilled holes in the lamp housing for the button, photoresistor, circuit board screws, and an access hole for connecting a USB cable during development. I then assembled everything, and installed it on the aquarium.
The software has several modes: Full white light, White light/UV mixed, UV only, and Active Ambient Sensing mode, that constantly adjusts the brightness/mixture for optimum lighting under all light levels. In the evening, once it gets fairly dark, the controller enters twilight mode, which leaves only the UV LEDs on, giving a beautiful evening display. After a time in twilight mode, the UV LEDs fade out completely over a period of about 1/2 hour, simulating sundown. The converse occurs in the AM, and the cycle repeats.