Intelligent Solar Garden Light using an Arduino

18,784

Circuit Image

A solar-powered garden light has been purchased, featuring a solar panel that charges batteries. When darkness falls, three LEDs illuminate until either light returns or the batteries deplete. The control box contains three Ni-MH AA batteries with a capacity of 600mAh, which have been replaced with three 1500mAh Ni-MH cells. Plans include adding sensors and transducers, starting with a microcontroller, specifically the Arduino Wee from SparkFun Electronics. The solar cell activates transistor Q1 when illuminated, grounding the base of transistor Q2, which keeps the LED spotlights off. In darkness, Q1 turns off, allowing the emitter to float. If switch SW1 is on, R2 raises the base of Q2, turning it on and grounding the emitter, thus powering the LED spotlights. The Arduino Wee operates at 3.3V, while the battery configuration provides 3.6V, which is acceptable for the microcontroller. The Wee is connected to the positive power rail after the switch and the negative rail in the battery compartment. R1 is unsoldered, and digital pin 3 is linked to the base of transistor Q1, while analog input A0 connects to the positive rail of the solar panel. The Arduino can now control the LED spotlights and detect light conditions. Instead of simply turning on the lights at dusk, a gradual increase in brightness is implemented, enhancing the visual experience. The system achieves a 50:50 mark-space ratio, resulting in 50% brightness, with a transition time of approximately two seconds from off to fully on.

The solar-powered garden light circuit utilizes a solar panel to harness energy during the day, charging the Ni-MH batteries. The power management is critical, as it ensures that the system operates efficiently and reliably. The choice of the Arduino Wee microcontroller is significant, as it provides the necessary processing power in a compact form factor while being compatible with the voltage levels provided by the battery configuration.

Transistor Q1 functions as a light sensor switch, controlling the operation of Q2, which drives the LED spotlights. The circuit is designed such that when sufficient ambient light is detected, Q1 is activated, grounding the base of Q2 and preventing the LEDs from illuminating. This design prevents unnecessary power consumption during daylight hours.

When darkness is detected, Q1 turns off, allowing the base of Q2 to receive a high signal through resistor R2, effectively turning on Q2. This action connects the emitter of Q2 to ground, completing the circuit for the LEDs. The gradual dimming feature is achieved through pulse-width modulation (PWM) controlled by the Arduino Wee. By varying the duty cycle, the brightness of the LEDs can be smoothly transitioned from off to fully on, enhancing the aesthetic appeal of the garden light.

The integration of sensor technology and microcontroller capabilities opens avenues for further enhancements, such as motion detection or ambient light adjustment, which could improve energy efficiency and user experience. The implementation of these features would require additional circuitry and programming but could significantly elevate the functionality of the solar garden light system.I bought a solar powered garden light. The solar panel charges the batteries and when it gets dark the lights (3x LEDs) turn on until it either gets lights again or the batteries run out. First, the batteries. The control box houses the batteries, which are three Ni-MH AA cells. They are 600mAh. (That`s not a typo six hundred). I swapped them out for three 1500mAh Ni-MH cells that I don`t use anymore (because they are only 1500mAh). I have a few ideas for sensors and transducers I want to add to the light, but I`ll start by adding a microcontroller. Step forward the Arduino Wee made by SparkFun Electronics. When light is falling on the solar cell, transistor Q1 is turned on and connects the base of transistor Q2 to ground.

This isolates the output of Q2 keeping the LED spotlights turned off. When it gets dark, Q1 is turned off, leaving the emitter isolated (floating). Assuming SW1 is turned on, the base of Q2 will be high due to R2. This will turn Q2 on and connect the emitter to ground. This completes the circuit for the LED spotlights and they turn on. So, the Arduino Wee is a 3. 3V device (the normal Arduino is 5V TTL). The battery is made of 3x 1. 2V cells giving 3. 6V total. The Wee can cope with the extra 0. 3V. I connected the Wee to the positive power rail after the switch and to the negative rail on the battery compartment. Then I unsoldered R1 and connected digital pin 3 to the base of transistor Q1, and the analogue input A0 to the positive rail of the solar panel.

The Wee can now control the LED spotlights and knows if it`s light or dark. As there`s intelligence in the solar garden light now, why just turn the lights on immediately when it gets dark That`s not very sophisticated is it Slowly turning the light on and getting brighter until it`s fully on, looks sooooo much better. You can see on the scope the pulses. It`s showing about a 50:50 mark space ratio, so the light is at 50% brightness. It takes about two seconds to go from fully off to fully on. I think it looks cool. 🔗 External reference