Author Options:

How to program LEDs? Answered

I have this little structure with 3 blinking LED. The blinking is triggered by the little spring in the middle - if you shake the structure, the top of the spring touches it's base, than blinking stops after a few seconds.

I'd like to make a similar size and function structure but I want to program the blinking rate for all 3 LEDs. If is possible, than let me know what do I need to do this at home - I am a beginner in electronics, but have some programming knowledge.





5 years ago

If you want to make one I think a Picaxe-08m starter pack would be a great way to do it. The wiring would be simple and the programming would be a breeze for you. I highly recommend this over having someone making it for you, mostly because you would have total control over the blink patterns. Microcontroller chips need special hardware to be programmed, so if someone made you one you won't be able to program it without that hardware.

Do you want more than one of these blinky devices? What kind of blinking pattern are you wanting? How about battery life, how long should they last?

Hello Tom

Thanks for detailed info. These would be the specs:
- not bigger than 0.78 x 0.78 x 0.78 inch (including batteries)
- very simple blinking pattern
- red, green, blue (white would good as well, but not necessary). They don't have to blink in the same time, so one RGB LED would be enough. The brighter the LED the better.
- 6-24 hour battery life.
- It would be good to trigger blinking animation with this spring system (or maybe a small push button), and stop blinking after 1 minute.

These kits are really nice, specially if they are already soldered, so I can concentrate more on the programming. I would make 1-2 prototype first for an instructable, than we'll see... I found something similar, you sent me, but don't know which fits better for my project - http://www.seeedstudio.com/depot/blinkm-i2c-controlled-rgb-led-p-836.html?cPath=156_157

Nice find. I've never tried them myself, but I do think those BlinkMs would do exactly what you want, and all you would need to program it is one of these LinkM thingies. There are even instructions for hooking a button up to it in the datasheet (pg 36.)

I bought a BlinkM with a ThingM. It is very easy to use it, BUT unfortunately it is not possible to program in milliseconds, the smallest time unit is called "tick" and it is 33.33 milliseconds and I need exact milliseconds and less than 33.
Now I have to research your solution and some other...

I will buy one of this to see how it works. Thanks again Tom.

No problem, let us know how it goes. Sounds like you are working on an interesting project.


5 years ago

Thanks for comments. I think I have to move to the next question, how and where to find somebody who can do it for me.

Right next to the lower leg of the lit LED is probably a blob of something that is covering up a custom programmed chip in a very small size. It senses when the switch is closed, spring hitting the circuit board trace, and triggers it to flash the led for a number of cycles.

You might get small with an Attiny45 or 85 chip that you can program to do the same function. You need to also know how to create a very tiny circuit board.

I agree about the chip, only I reckon its the pale pink blob top centre....