Skip to main content

Automatic Rechargeable LED Beacon Light

A flashing beacon is a simple thing that is useful in many places: beside a broken-down vehicle, at the edge of a farm plot to keep animals away, or at a hazard that needs marking overnight. This one charges from a 5V supply, runs from a single 18650 cell, stays off in daylight and starts flashing by itself when it gets dark.

It has no microcontroller and no firmware. One CMOS logic IC senses the light and generates the flash, two small transistors and a MOSFET drive the LED at a limited current, and three further ICs look after the battery. The complete design is open source and available at https://github.com/dilshan/auto-led-beacon.

Finished prototype build.

The beacon operates automatically from dusk to dawn, with a trimmer to set how dark it must be before flashing starts. The LED driver limits the current to about 0.6A to 0.7A, which protects both the LEDs and the battery from excessive current.

Power management is built in. An on-board charger tops up the cell at 1A, with a red LED to show charging and a green LED to show completion. The cell is protected against over-charge, over-discharge and over-current, while the DC input has a 2A resettable fuse and a reverse-polarity clamp diode. The 18650 holder mounts directly on the two-layer PCB, which measures about 81mm × 57mm.

The circuit is easiest to understand as a short chain. A light sensor decides whether it is dark, an oscillator produces the flash when allowed to, and a driver switches the LED at a controlled current. Alongside this chain, a charger and a protection circuit manage the battery.

The heart of the design is the HEF4093B, which contains four 2-input NAND gates with Schmitt-trigger inputs. With both inputs of a gate tied together, it behaves as an inverter with hysteresis. The first gate, U101C, monitors a voltage divider formed by the LDR (GL4516) R102, the trimmer RV101 and two fixed resistors. The output of this gate is high in daylight and low in the dark. The Schmitt-trigger input is useful in this stage because an ordinary logic input sitting near its switching point could chatter at dusk. Hysteresis separates the "turn on" and "turn off" levels. Since both the divider and the gate thresholds scale with the supply voltage, the switching point also moves relatively little as the battery discharges.

Top view of the finished prototype build.

To provide the blinking, a second gate, U101B, is arranged as a relaxation oscillator with the resistor R104 and the capacitor C101. The light sensor controls this oscillator through two series diodes, D101 and D102. In daylight, the output of U101C is high and feeds current through the diodes into C101. This holds the capacitor high, so the oscillator cannot cycle. In the dark, the output goes low, the diodes become reverse biased, and the oscillator is left to run on its own. The remaining two gates buffer the oscillator signal before it reaches the LED driver. The time constant of the oscillator is approximately 4 seconds with the values given in the schematic, and the flash rate can be modified by changing R104 or C101.

The LED is switched by the MOSFET Q103, and the current limit is built around Q102 (J3Y) and the resistor R108 (1Ω, 2W). All the LED current flows through R108. When the voltage across it reaches about 0.65V, Q102 starts to conduct and pulls down the gate of the MOSFET, which holds the current at the set limit. R108 dissipates about 0.4W while the LED is lit.

A TP4056 (U102) linear charger charges the cell from 5V using the usual constant-current, constant-voltage profile up to 4.2V. The red LED (D104) lights while charging and the green LED (D103) lights when charging is complete. At 1A a linear charger gets warm, so the board has a heatsink pad under the IC. For battery protection, a DW01A is used together with an FS8205A dual MOSFET. On the input side, F101 is a 2A resettable fuse. If the supply is connected backwards, D105 conducts and the fuse trips.

3W LED used for the testing.

Note that the board does not monitor the battery temperature, so do not charge it unattended, in direct sunlight or below 0°C. For reliable charge termination, charge the unit while the beacon is not flashing.

This board has a mix of through-hole and surface-mount components. Most of the surface-mount resistors and capacitors are in the 0805 package. All the components are listed in the BOM.md file in the project repository. For this design, we selected components which are commonly available in electronic component markets.

Besides the on-board components, you will need a 5V DC power source to charge the battery, with a recommended current rating of 1.5A to 2A. For the battery, use a 3.7V 18650 Li-ion cell rated at 3200mAh or higher. For the output, use 3 × 1W red LEDs in parallel or 1 × 3W low-voltage red LED. Since the LEDs dissipate heat, mount them on a proper heatsink or a star (aluminium-core) board.

Side view and LDR placement.

A single cell gives only 3.0V to 4.2V, so red LEDs cannot be wired in series here. If you use three 1W LEDs, connect them in parallel and pick the same type and batch so that they share the current reasonably evenly. If you prefer a single 3W LED, it must be a low-voltage red type with a forward voltage of about 2.8V or less, and multi-die series modules will not work. A lower forward voltage also keeps the current regulated for more of the battery discharge.

When installing the board in an enclosure, make sure the LDR can see ambient light but not the light from the beacon's own LEDs. If light from the beacon reaches the sensor, the circuit reads it as daylight and cuts the flash short. A small baffle, or mounting the beacon LEDs facing away from the sensor, solves this. The on-board status LEDs also sit close to the LDR, but they light only while the 5V supply is connected.

18650 - 4800mAh is the recommended battery for this setup.

During our test with a fully charged battery rated at 4800mAh, the system drove the 3W red LED load through the entire night.

You can also adapt the design to your needs. Changing R104 or C101 alters the flash rate, and changing R108 alters the LED current, which is approximately 0.65V divided by the value of R108. If you raise the current, recheck the ratings of R108, Q103, the LED, the fuse and the battery.

All the project design files are available in the project repository at https://github.com/dilshan/auto-led-beacon. The project is released under CC0 1.0 Universal (Creative Commons Zero), so you are free to build, modify and share it.

Comments

Popular posts from this blog

Building the TD4 4-Bit CPU

The TD4 is a famous 4-bit CPU featured in the book How to Build a CPU by Kaoru Tonami . The book focuses on constructing a functional processor entirely from basic 74-series TTL logic ICs. While the book is unfortunately only available in Japanese, a friend from Japan sent me a copy along with a TD4 PCB. I believe the PCB is based on the open-source design files available on BG5DIW's GitHub repository . "How to Build CPU" book and the PCB. Recently, I finally found the time to build and experiment with it. The project took a few months, as I had to translate the book myself to grasp the core concepts. The overall design is simple and elegant, offering a set of 12 instructions and a 16-byte ROM (implemented via DIP switches) for programming. The board operates on 5V and can be powered via USB. Most components were sourced from local shops, though I had to order a few 74HC-series ICs online. Later, I tested the circuit by replacing some 74HC components with 74LS series...

CD2003 - yet another simple FM radio receiver

In the last few days, we are looking for some simple FM radio receiver to integrate into one of our ongoing projects. For that, we try several FM radio receiver ICs including TDA7000, CD2003/TA2003/TA8164, CXA1019, and KA22429. Out of all those chips we select CD2003 (or TA2003/TA8164) based receiver for our project because of its simplicity and outstanding performance. Except to CD2003, Sony CXA1019 also perform well but we drop it because of its higher component count. We design our receiver based on Toshiba TA2003 datasheet and later we try TA8164 and CD2003 with the same circuit. Either CD2003 or TA8164 can directly replace TA2003 IC, and as per our observations, TA8164 gives excellent results out of those 3 chips. A prototype version of CD2003 FM radio receiver The PCB design and schematic which we used in our prototype project are available to download at google drive (including pin-outs of crystal filters and inductors ). Except for CD2003 IC, this receiver consist...

AVR-HV: High voltage programmer for AVR microcontrollers

When it comes to AVR microcontrollers the most common programming option is In-System Programming ( ISP ). ISP interface is easy to use but in some scenarios it is totally unusable. The most common scenario is with some wrong fuse bit values. For example if we program SPIEN or RSTDISBL fuse bits, AVR microcontrollers may not respond to any in-system programmer(s). To overcome these problems the next available option is high voltage programming mode. In High voltage programming mode, 12V programming voltage is applied to RESET pin of target AVR microcontroller and user can change configuration fuses of AVR MCU with minimum amount of risk. The only drawback in this mode is that target microcontroller must need to be removed from the board to reprogram. Most of the AVR high voltage programmers are expensive and difficult to find in ordinary electronic shops. As a solution we implement USB base high voltage parallel programmer for AVR microcontrollers and it allows programming, readi...