Fading LEDs – Circuit & Arduino Way

Posted by Erin, the RobotGrrl on Monday, September 7th, 2009

Someone recently commented on one of the posts and asked:

Hey Erin, I was just checking around looking for help with a project Im doing. Im not an expert by any means ,I could really use the help and expertise of somone like you. I like your robot too.
Im building a Terniator endo Bust. Its Recast vinyl kit. My …dilemma is ,…The kit came with 2 Red LEDs for the eyes,a bouble A battery pack and a switch. I want to mod this guy so the lights come on slowly,and when switched off they dim out.(3-5 sec.)
The second effect I want is to install a pulsing or vibrating motor inside the scull that comes on momentarily with the lights?
I have other Ideas too. If I can interest you ,Id be will to pay for your help.
I hope this sounds interesting to you, Thanks ,Daniel Shaffer

Sounds like a great weekend project!

There are two ways to solve this problem: with a circuit, or with a microcontroller.

I can’t exactly help out with the mathematical part of the circuit, but in order to obtain the dimming effects, you would need to first charge a capacitor up when you switch it on, that would be connected to the LEDs. As more and more voltage fills up into the capacitor, the LEDs will make a fade-in effect! When you switch off, the capacitor will have to de-charge (perhaps into a different capacitor). When it is emptying, the voltage will be going lower and lower, making a fade-out effect.

The second part of your question, how to make a vibrating motor come on with the lights… you would have to use a 555 timer IC. These also use capacitors and resistors in order to create a timed circuit. They are a really interesting concept, and I would encourage you to check out these sites about them! :D

Now… if you wanted to use a more extendable option with a microcontroller, that is more easier! I made a post about how to fade many LEDs here, with an Arduino. You could have the LEDs fading in and out while having the motor turning on/off. AND, you could use sensors to create specific behaviours and triggers for the Terniator.

I hope this answers your question, and I hope you will keep us posted on the status of your project! Woohoo for blinking LEDs!

Post to Twitter Post to Delicious Post to Digg Post to Facebook Post to Reddit Post to StumbleUpon

Posted in: Other, Programming, Projects.
Tags: , , , ,

Leave a Reply