Mini lighthouse LED circuit

UPDATE Aug 7th 09 : You can get the Eagle CAD files here.

UPDATE Oct 2nd 08 : You can grab the source code and circuit diagram for this project from this blog post.

I’ve been working on a variant of the circuit I developed for my Lego beacon. It’s the same basic circuit but this time with 12 rather than 8 LEDs and rebuilt into a circular 40mm dia (1.5 inch) double sided disc.

The idea is to use this as a simple “lighthouse” that when powered up will rotate the beam around the 12 LEDs. I’m not sure why I’m building it, I have no real need of a lighthouse… Maybe it could be useful for a model railway or something similar. But I kind of like the idea of it and had some neat OSRAM SIDELEDs in my parts box that were calling out for some use.

This is the prototype circuit and as such has a couple of features that don’t really need to be there other than for the prototype. The first feature being a full size ICSP connector, the second, a socketed DIP version of the PIC12f683. Actually I used a DIP rather than SOIC pic because I happened to have a bunch of them hanging around and space isn’t so much of an issue here as it was in the Lego thing.

The circuit works fine to a point, but I’ve spotted a couple of problems that I need to resolving. The main problem is that I planned to program the device using ICSP but didn’t allow proper isolation of the DAT/CLK lines which means that my Pickit 2 doesn’t really like talking to it. The 4R7 resistors on pins 5 & 7 aren’t enough to propertly isolate them and the LEDs interfere with data transfer… Doh! I wasn’t thinking clearly there… I’ll hack this prototype with a scalpel and some fine wire to insert a couple of DIP switches to get it working properly.

12 LEDs is the maximum number of you can charlieplex from 4 tri-state pins. The PIC 12f683 is an 8 pin device that has 5 GPIO plus the MCLR pin which can be used as an input. I’ve decided to keep one GPIO spare, GPIO 4 which also happens to be an analog port so I could maybe add a light sensor that turns the lighthouse on when it gets dark (It’s got a button on it at the moment)

I made it using my normal toner transfer technique and it turned out pretty well. The smallest trace is 24mil although there is a tiny bit of 16mil in between the pads of the PIC. Once I’ve debugged this one I might have a go at one about 30% smaller as there’s quite a bit of space especially if I used a SOIC pic and dropped the trace size down to 16 or 12 mil. This version has an LM317 regulator on the back so can be driven from 12V or whatever but I am toying with the idea of making a smaller version that is driven from a 2032 coin cell mounted on the back which wouldn’t need a regulator.

Anyway, here are a few more photos until next time…

Top side of the circuit after etching

Bottom side of the circuit. Alignment was pretty much spot on.
Drilling later on was not quite so good… :o)

Populated top side.

Populated bottom side with LM317 (sot223 package)

22 thoughts on “Mini lighthouse LED circuit

  1. Pingback: Blog » Blog Archive » Mini lighthouse LED circuit

  2. Pingback: Build an LED lighthouse |

  3. I have been retrofitting wooden model light houses with beacons for the last year with a circuit that uses a 12v halogen bulb and a PICAXE, which in turn uses PWM to ramp up and down the lamp.

    I’d be very interested in seeing schematics and source code for the PIC if you’d like to share them.



  4. very nice! My girl is a huge lighthouse fan and I would love to make something like this for her for Christmas. I would be very appreciative if you could send the schematic and a Instructable on how to build this.

  5. Pingback: » Blog Archive » Build an LED lighthouse

  6. I would be interestedin your plans to make the lighthouse circuit along with the parts you . My Wife and I make Garden lighthouses with solar lights. This would be a great addition to our lighting options. Thank you Tony

  7. Hey, its looking really lovely…
    Please send me the schemetics, part list and detail description of making of this beautiful thing…

    • Hi Hisham,
      Glad you like the project. I’ve tried to make sure that everything you need is here on the site. The eagle schematics and PCB layout as well as the C code and a binary if you can’t be bothered to do any programming. But I’m afraid I don’t have much time spare to put a more complete package together, but part of the fun of these this is supposed to be the working-it-out-for-yourself aspect.

  8. Pingback: Eagle CAD files for lighthouse circuit « Catmacey’s stuff

  9. This project is a fond memory for me now…my very first PIC project, 2 years ago. Beats the heck out of the standard ‘hello world’ LED flasher 🙂 Thanks for making it all happen, Matt!

  10. Hello,

    How long do you need to build such beacon? We have a comepetition in my office and we are creating lighthouse and i am stuck on the lighting.

    I would like to buy you one of these so i can directly plug it in my woden model. Is that possible ?

    Kind regards

    • Hi Thomas.
      I’m sorry but I don’t have the time right now to make a circuit board. I’d be happy to send you a pre-programmed PIC though if you wanted to make a board yourself.

  11. Pingback: My first professionally made PCBs « Catmacey’s stuff

  12. Pingback: Charlieplexed lighthouse version 2 PCBs have arrived « Catmacey’s stuff

  13. I did something similar. I tomb-stoned (soldered on edge) 24 SMD LEDS (mounted edge to edge), on a circular PCB and had a PIC processor sequence through them. It uses pulse width modulation to ramp down the brightness of one while it ramps up the brightness of the one to its right, and of course repeats this to show a smooth rotating light The ramp was not linear but took into account the non-linear response of the eye to pulsed light (the eye acts like a peak detector). The model is of the Ponce-Deleon Light house in Florida. You can see the model on my website Go to the light house page.

    • Hi Charlie,
      Those are nice models!
      Soldering SMD LEDS tombstone style can’t of been an easy feat!
      Any chance of a photo of your LED masterwork?

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s