≡ Menu

LED Bat

Making your own bat with glowing eyes.

 

Setup instructions for ATtiny85 programmer

This is the brains of the bat – the ATtiny85 chip…. (notice the dot on the corner of the chip!!! more later)

ATtiny85nice

 

Pins on ATtiny85 chip

Pins on ATtiny85 chip

The pins you will use are the ones marked in black,  GND (which is negative power), 5V (which is positive) and marked in BLUE 1.

 

 

Parts:

You will need:

  • paper cutout of a bat
  • some card board ( a small piece for support)
  • 2 red leds
  • copper tape
  • conductive tape
  • an ATtiny85 chip
  • a USB programmer for ATtiny 85 (not necessay if you purchased chip)
  • a 2032 battery
  • a battery holder for 2032 battery
  • some regular clear tape

You can choose your own bat design. This one works well. Bat Template . Print it out.

Cut out your paper bat. You should measure and mark how much space is between the eyes (LEDs).

Paper template

Paper template

Trace outline onto cardboard and cut it out. Make it smaller than your outline.

cardboard support

cardboard support

Mark the position of the eyes on the cardboard. Make a small slit in the cardboard for each led eye.

You can use a small screwdriver to poke a hole.

cutting slots for leds

cutting slots for leds

Note the longer leg of the led (this is the positive leg). Make sure both long legs are on or towards the bottom (the bat’s feet).

leds longer legs

leds longer legs

Place your battery holder on the bottom and put a piece of copper tape down the middle to the negative side of battery holder.

positioning battery holder

positioning battery holder

Put a short piece of copper tape from the positive side to half way up. (this is where we will put the chip controlling the LED).

Leave a gap about the width of the copper tape (1/4 inch) and place another short piece going up to the leds. Make sure there is enough tape to lay under the leg or wire from the LED.

Copper tape wiring

Copper tape wiring

Run another piece of copper tape across from one LED to the other across the FRONT side of the cardboard. Making sure you go under the LEDs.

IMG_4798

Front of bat with copper tape positive (+)

 

Bend the short legs of the LEDs towards the middle and the longer legs towards the outside egde of the bat. Connect the LEDs with conductive tape.

 

Tape down the battery pack with conductive tape.

ready to attach chip on wiring

ready to attach chip on wiring

You can skip the programming steps if you bought the kit. The chip is programmed already.

Plug in the ATtiny85 chip into the programmer board with the dot on the chip closest to the notch shown on the programmer board.

Now plug in the usb port and open the arduino software.

ATtiny85 chip on programmer

ATtiny85 chip on programmer

Make sure under menu  Tools > Board > ATtiny85 ( 8mhz) is selected or you CAN DESTROY YOUR CHIP!!!!

Copy the code (at bottom of page) and paste into the Arduino software.

Click the LEFT ARROW at the top of the window and upload the program to the chip.

Upload

 

Test the chip to make sure the led is working.

IMG_4826

testing the program

testing the program

 

In the first pic the chip is upside down and you can see how the pins are bent out of the way. Make sure they don’t touch!

The leg on the top right in the photo is Pin 1. The lower right leg is the Positive (+) power pin. The left leg is the negative (-) power.

Chip is on its back in picture.

Legs bent out of the way

Legs bent out of the way

Position the chip on the cardboard with the legs touching the copper tape and tape it down with the conductive tape.

You may need to add some copper tape under the legs.

Place conductive tape over the legs to make a good contact.

positioning the chip

positioning the chip

Leds should fade up and down after the battery is plugged in.

It works!

It works!

If one or more don’t light up, check the connections between the copper tape. Check your battery holder and make sure you have it the right way around. Same thing goes for the LEDs. They won’t light up if they are the wrong way round.

If you have a lot of problems with your connections you can solder the copper tape, chip and LED connections.

Soldered connections

Soldered connections

 

ATtiny85 Program

====================================================

( Copy from here down.)

//Fading LED on pin 1 for the ATtiny85 chip. Note the delays are different
//to a regular Arduino because of the different clock speed.

int ledPin = 1; // LED connected to digital pin 1
// pin 0 does NOT work for fading an LED

void setup()
{ // nothing happens in setup
}

void loop()
{
// fade in from min to max in increments of 15 points:
for(int fadeValue = 0 ; fadeValue <= 255; fadeValue +=15)
{
// sets the value (range from 0 to 255):
analogWrite(ledPin, fadeValue);
delay (15); //delay how slow the LED fades up or on
}

delay (100); // delay how long LED is on

// fade out from max to min in increments of 5 points:
for(int fadeValue = 255 ; fadeValue >= 0; fadeValue -=15)
{
// sets the value (range from 0 to 255):
analogWrite(ledPin, fadeValue);
delay (15); //delay how slow the LED fades down or off
}

delay (250); //delay how long LED is off
}