Close
0%
0%

Rotating LED micro beacon

Using six 0402 LEDs to simulate a rotating emergency light

Similar projects worth following
The idea for this project has been waiting in me a long time for realization. Yesterday evening I finally attacked it: Soldering 6 0402-LED's in a 3-wire charlieplexing configuration to form a circular micro beacon.

The circuitry for the blinky looks roughly like this:

The LEDs are standing upwards like the stones of Stonehenge with the face looking outwards. Connecting the three wires is the more complicated part of this project. It was done under a microscope.

After a quick check if everything is connected as it should, i melted this wire mess in a small rosin drop.

Time for hacking a small program into the attiny13
/* (c) 2019-05-01 Jens Hauke <jens.hauke@4k2.de> */
/*
 * ATMEL ATTINY13a
 *
 *       +-\/-+
 * PB5  1|    |8  Vcc
 * PB3  2|    |7  PB2 ++ Charlieplex
 * PB4  3|    |6  PB1 ++ 6
 * GND  4|    |5  PB0 ++ LEDs
 *       +----+
 */
#include <inttypes.h>
#include <avr/eeprom.h>
#include <avr/interrupt.h>
#include <avr/io.h>
#include <avr/sleep.h>
#include <avr/wdt.h>
#include <util/delay.h>

static inline
void init(void) {
    DDRB =  0b0000111; // 0-2 output
    PORTB = 0b0000010;
}

#define STEP 150
static inline
void loop(void) {
    PINB |= 1<<0;        // Toggle Pin PB0
    _delay_ms(STEP);
    PINB |= 1<<1;        // Toggle Pin PB1
    _delay_ms(STEP);
    PINB |= 1<<2;        // Toggle Pin PB2
    _delay_ms(STEP);
}

int main(int argc, char **argv)
{
    init();
    while (1) loop();
}

(Did you know that writing a 1-bit into the PINB register of an AVR toggle the output state of PORTB? Handy for time critical toggles…)

Does it light up? YES!

View project log

Enjoy this project?

Share

Discussions

walthgh wrote 05/31/2020 at 15:50 point

I really  think you should market  this . I'm a small scale model builder I am working on a project and I have been looking for something like this online for my models .There are a lot of modelers out there that would put this application or product to use .. I would like to learn more or if I could obtain a unit from you in the future .. Thank you for your skill level .. Walter Hgh 

  Are you sure? yes | no

walthgh wrote 05/31/2020 at 15:52 point

please feel free to email me any further  information  walthgh@gmail.com 

  Are you sure? yes | no

Dan Maloney wrote 05/02/2019 at 15:41 point

Respect for the soldering skills...

  Are you sure? yes | no

Gerben wrote 05/01/2019 at 13:56 point

Cool.
What do you plan to use this on? Is this for model cars?
PS I thought deathbugging 0805 leds was tricky enough, let along 0402.

  Are you sure? yes | no

Jens Hauke wrote 05/01/2019 at 14:05 point

Thanks Gerben. Yes, i had a model car in mind. But probably it won't be used for anything more than challenging my soldering skills.

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates