Instructables

Buggy - A Crafty Programmable LED Creature

Featured
Picture of Buggy - A Crafty Programmable LED Creature
4458.JPG
large6inset.jpg
Rachel_buggy.jpg
Buggy is a programmable LED craft project using a homemade, single-sided, PCB board, and a programmable AVR Attiny44v microcontroller. Buggy has two bi-colored LED eyes and can sense visible and IR light and emit sounds using a piezo speaker. Not counting the board, there is about $8 USD in parts per bug.

I designed this as a craft project for the younger kids at a family reunion. The kids were given an assembled and tested board, and allowed to decorate it with foam, pipe cleaners, and feathers using hot glue. It was a big hit, and the creations that ensued were fascinating.



The real fun is getting two Buggies together. They emit and detect IR and so can "talk" with each other.

There is plenty of memory left on the chip, and several unused inputs, and given my programming ability, lots of room for improvement. I hope others find this intriguing enough to try and improve on.

Hats off to Alex Weber's programmable LED instructable (http://www.instructables.com/id/Programmable-LED/) which sparked my imagination!

<SHAMELESS PLUG>If you like this idea, give it a rating on the right, and vote for it at the top! I'll give you a free Instructables membership! Thanks</SHAMELESS PLUG>
 
Remove these adsRemove these ads by Signing Up

Step 1: Devil in the details . . .

Picture of Devil in the details . . .
Board.jpg
Just some notes on the design. If it bores you, skip ahead to the next step.

The Atmel Attiny44v AVR is a 14-pin microcontroller with 4K bytes of flash RAM and 256 bytes of SDRAM. The chip has an internal 1 MHz oscillator, 8 and 16 bit counters, and analog to digital converters. It will run with as little as 1.8V. I used the DIP package and a socket so it can be removed for reprogramming. There are several unused ports available for hackery.

The LED eyes are connected to two ports (PA4/PA5) instead of a port and ground. This allows sending juice either way so we can light up bi-colored LEDs (see schematic).

For both sensors, power is supplied via PA1 only when a reading is needed to save juice. ADC readings are taken on PA0 (IR) and PA2 (visible), each with its own voltage divider resistor (R1 & R2).

An IR LED and current limiting resistor are connected on PA3 so it can be lit separate from the eyes.

Sound is generated on PA6 using pulse width modulation from the 16-bit counter and a piezo-electric speaker.

Power is from a CR2032 lithium coin cell which is the cheapest, easiest to find 3V source I could find. From Digikey they are about $0.28. Why they sell them in the store at $4 is beyond me. I included a 0.1uF capacitor to remove noise. It is optional.

A normally open push-button switch is connected to PA7 and used as a pin change interrupt to change modes or power down.

Nothing too terribly tricky or clever. Remember, I’m a beginner. This is my first design. Let’s see if we can build one . . .
krujh24 years ago
I have an idea! What if instead of a photo resistor, you put a color sensor? And instead of changing the eye colors manually, they would change color when they "talk" to each other. That way, you could program them to use morse code! You could probably even make a handheld device that could be used to communicate with the critter! Great start! :)
wee_man6 years ago
what is the dimensions of the buggy and could you make it that one is the key and one is the lock and when the key comes close to the lock and they send ir to each other then the key unlocks or in my case works a relay a lcd and 2 LEDs Thanks can some one answer please
I might be making a IR lock system based on the arduino
MakersBox (author)  wee_man5 years ago
The board is approximately 1" x 2" (25 x 50 mm). An IR lock/key is a novel application. I don't think it would take much to get the Attiny45 to operate a relay.
thanks but i was thinking of combinding a sort of pet idea with the lock key system but the one "key" can unlock like 1+ diffrent locks
wee_man wee_man5 years ago
and like if their was two sets like set 1:key -lock-lock-lock this key can't unlock set 2 set 2:key -lock-lock-lock this key can't unlock set 1
Now all you need to do is make a communication network for them. Network-Buggy.
KrakenFan695 years ago
Can anyone tell me if this will work to program the ATTiny44v I need to make a Buggy? It is listed in the device list but just wanted to hear someone say it was a decent thing to get. LOL
http://cgi.ebay.com/Mini-ATMEL-AVR-ATMEGA-STK500-USB-Programmer-ISP_W0QQitemZ250335943300QQcmdZViewItemQQimsxZ20081203?IMSfp=TL081203111006r15090

Thx

KrakenFan
MakersBox (author)  KrakenFan695 years ago
I haven't used it myself, but yes, that is the "gold standard" for programming AVR chips and will do an Atttiny44.

If you are building Buggy to learn and have fun, why not do the same with the programmer? I built my programmer using a kit from Lady Ada, and it was only $22 (plus shipping):
http://www.adafruit.com/index.php?main_page=product_info&cPath=16&products_id=46 Check out some of her other cool kits while you are there. We did the "Game of Life" one at the same reunion we did "Buggy" at.
Glad to hear it about that programmer being the "Gold Standard" for programming the AVRs. I had already ordered this before I saw the kits. Can you say impatient? I knew you could. I am also under a considerable amount of pressure to get some Buggy's into production from my quality control / product testing department. ( read: The kids ) Hope my PCb creating works out! I have ordered a Mini POV kit from Lady Ada and am considering a game of life kit as well. We have been making BlinkyBugs while we are waiting for parts to come. Those are super easy and super fun. Thanks for haveing that on your site as well! You realize my kids think you are an Electronics Superhero for creating Buggy right? They can't seem to realize the difference in the fact that I am an Electrician and not an Electronics Tech. lol
KrakenFan695 years ago
Excellent Instructable with killer explanations and parts list too!? Nicely done. This will be my first programming (does loading your program count as programming? lol ) of a chip for a project. I just ordered the programmer. Exactly what I was looking for. I can't wait to get started. KrakenFan
Kaiven5 years ago
NICE! I know you didn't want to fuss about how to make the board, but is there a place I can find for how you did yours? thanks.
MakersBox (author)  Kaiven5 years ago
Here is a good example of the toner transfer method:

http://www.riccibitti.com/pcb/pcb.htm
ego waffle5 years ago
cool i love how they can "talk" but it would be so much cooler if they could walk or roll like soileau segusted
LinkVanyali5 years ago
Nice! Made me think of a nursery rhyme my parents always told me: "Good night sleep tight, don't let the bed-bugs bite!" New version: "Good night sleep tight, don't let the LED-bugs bite!"
Soileau6 years ago
This would be a wonderful bot to join with a vibrobot or even better a beetlebot.
or even a muosebot.
mousebot
Your images are amazingly incredible, keep up the great work! I hope to see more from you!
wee_man6 years ago
sorry about posting 3 times but what currency is this in?
MakersBox (author)  wee_man6 years ago
Sorry, I forgot what an wide audience this reaches. The parts, not including the board, are about $8 USD.
neardood6 years ago
You know what. That is one of the best instructables ive ever seen. It has a decent and non-violent purpose (see my other instructables and you will find out why i said this), and has a good application of technology to suit your (((*ahem*))) needs. It is a very clean instructable, and i would like to thank you for shareing it with myself and the world.
KANahas6 years ago
That would be soo sick if you turned them into walkers or vibrobot things they would walk around and interact!
good idea if i do end up doin this project since it is a really cool craft i may try to make it movve
wee_man6 years ago
you could program it that when it gets a ir singnal from another buggy they start chirping making it sound like their talking
wee_man6 years ago
wow you got my vote im going to try and make one
Thornburg6 years ago
Very well planned out. Also nicely put together. Great work, with good pics.
turtleshane6 years ago
wait....where did you get the stuff to make the pcb?? cool project thinking of maybe doing it with my camp
nvm i looked at the tutorial for the pcb and i get it now sweet project but the cost grows quite quick though
MakersBox (author)  turtleshane6 years ago
Yes, the cost grew. I was hoping to keep it under $5, but not counting the circuit board, there is about $8 in parts.

If you want to go cheap, use an Attiny11 and leave out everything but the button and CdS cell.

Tom Weber took simplicity to an art. Check out his instructable, which inspired mine:
http://www.instructables.com/id/Programmable-LED/
mutface6 years ago
Dude, awesome job!!! This is one of the coolest things that i have seen that have to do with led's! ;)
bumpus6 years ago
Very well done! This you make a great kit!
simharry6 years ago
awesome instructable, it was well put togethen and it made me want to go and salvage materials for a whole army of them. Rating:5/5 Vote: +1
comodore6 years ago
Great project, I really love it!! I love anything whit LEDs!
I made an Instructables yesterday,LED Snake, lots and lots of LED!!!

rate:*****
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!