Making a flickering candle with an RGB LED and an ATTiny85 chip

Normally you don’t use an ATTiny85 to drive an RGB LED, because an RGB LED needs three pulse width modulation pins and the ATTiny85 only has two.  However, for the application of a flickering candle, you need only two PWM pins, the red and the green, and for that the ATTiny85 does the job just fine.

Unfortunately, my smartphone camera doesn’t do the color and intensity changes justice, but here’s the video:

Here’s a photo of the setup in the video:

0824171341a_Burst01

As you can see, the through-hole chip is puny compared to the LED.

And here is an Arduino Nano pressed into service as an ATTiny85 programmer:

0824171341_Burst01

In case you’re familiar with using Arduino but unfamiliar with how to use an ATTiny85, Matt Richardson made a great video on the topic here:

To avoid the hassle of shuttling the ATTiny85 chip back and forth between the programmer and application breadboards, I recommend first testing your program (aka sketch) on your Arduino until it’s debugged, then moving the program from the Arduino to the ATTiny85 .

When converting a program from the Arduino to an ATTiny85, remember that you have to translate pin numbers.   I made a conversion chart here for doing just that.

_________________________________________________________________________________

If you like reading science fiction and fantasy, you might enjoy my ebook trilogy beginning with The Wizard from Earth.

Advertisements

About engineerzero

Once and future engineer.
This entry was posted in Uncategorized and tagged , , , , . Bookmark the permalink.

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s