Picaxe Blending Nightlight using pic12f683

I had a few multicolor LEDs laying around and wanted to whip up a color-blending nightlight. I built 2 devices, each in its own 20 pin DIP socket without soldering. A 3-pin header is included so I can reprogram the light on-the-fly if desired. On my first build, I used wire-wrap. The next one used multiple wires pushed into the socket. A bit more difficult, but no wire-wrapping or soldering necessary.

picaxe blendlight led

Parts count:

  • 1 Picaxe-08M microcontroller
  • 4 resistors
  • 1 bi-color LED
  • 1 3-pin programming header
  • misc wire, DIP socket, a battery holder

schematic picaxe blendlight led

My schematic is above. Take a look at the code and you will see that the light blends between 4 random colors somewhere in the available red-green range. The light uses pwm to fade in and fade out. It does its show about once each 30 seconds, but you can reprogram it if you want it to stay on all the time. On a quick check, the current drain is negligible when the light is off, and < 10ma when blending. The batteries should last close to their shelf life.

And this code turns the light on only when it is dark. It uses the LED to *sense* light level and compare it with the level sensed at initial power-on. It also adds 2 flickering modes, kind of like a candle. Even with a very simple circuit like this one, you can do some interesting things.

For more detail: Picaxe Blending Nightlight using pic12f683

About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.