How to Build an Attiny85 Sonic Screwdriver

Introduction: How to Build an Attiny85 Sonic Screwdriver

For this sonic you will need:

Metal tubing (Four sizes, each able to tightly, but smoothly, slide along the other sizes)

-1 in. of 1/2 in. OD

(for this i used copper, but any metal will work)

-1 and1/2 in. of 5/8 in. OD

-3 and 3/4 in. of 5/8 in. OD

-1/4 in. of 5/8 in. OD

5.5 in. total (not counting cuts)

-5/16 in. of 3/4 in.OD

-1 and 1/8 in. of 3/4 in. OD

-2 and 3/8 in. of 3/4 in. OD

-2 and 1/8 in. of 3/4 in. OD

5.9375 in. total (not counting cuts)

-1 and 3/4 in of 1 in. OD





-Small (1/2 in.) speaker


-Springs from a battery case

Assorted Parts

-Plumbing Adapter

-Antenna Tubing


-Electrical Tape

-2x Rubber Washers

-2x Rubber Feet

-Black Paint

Step 1: The Electronics

The circuit consists of an ATtiny85 connected to the speaker and LED. I programmed mine using an Arduino Uno (more info on programming using Arduino can be found at To use the tone function you will have to use the Arduino-tiny core (which can be downloaded at To use this core copy it into the Arduino folder and rename the prospective board file to "Boards". you should have a file like this: C:\Program Files (x86)\Arduino\hardware\tiny\avr\Boards.txt.

Upload the Sonic_Screwdriver file to the ATtiny

int count;
void setup()


pinMode(0, OUTPUT);


void loop()


count = count+1;




















Once the program is uploaded solder the speaker to pin 5 and ground, and two wires to the power input and ground. Solder two wires to the LED for later.

Step 2: The Button Housing and Electronics Housing

Drill a hole large enough to fit the button 3/4 in. from one end of the 2 and 3/8 in. piece of 3/4 in. tubing. Use a tube cutter to add some detail rings on either side of the hole. Use a tube cutter to make a detail ring on the 1 and 1/8 in. piece of 3/4 in tubing.

Paint over the rings with black paint. Once the paint dries use fine grit sandpaper to remove the paint from everywhere but inside the rings. This will darken the rings and make them stand out a bit more.

Step 3: The Battery Case

Cut a notch in the 3 and 3/4 in. piece of 5/8 in. tube wide and long enough to fit a AAA battery. It should be 1/8 in. away from one end of the tube.

Solder a wire onto each of the springs. Using a rubber washer to keep them insulated, epoxy them onto each end of the battery case. you may need to sand down the epoxy so that the max diameter is equal to that of the tube.

Step 4: The Detail Joint

Cut two rings from the plumbing adapter. Epoxy the two rings onto the piece of 1/2 in tube.

Step 5: The End Cap

Drill a hole though the 1 and 3/4 in. of 1 in. OD tube big enough to lightly thread a bolt through. Drill another hole through the 2 and 1/8 in. of 3/4 in. OD tube the same size. Depending on how tight the tubes are, you may need to add a few layers of tape to keep the tubes flush. Secure the tubes using two screws, then epoxy the flange to the bottom. epoxy one of the rubber feet through the flange.

Step 6: The Emitter

Make a hole in the rubber foot and plumbing adapter cap just large enough to squeeze the piece of antenna tubing through. Epoxy them in place; then epoxy the marble to the tube inside the ring.

Step 7: Putting the Pieces Together

Put the LED into the piece of antenna tube and solder the wires to the power input and ground on the ATtiny.

Epoxy the 5/16 in. piece of 3/4 in. tube to the emitter and epoxy the 1 and 1/2 in. piece of 5/8 in. tube inside that. Epoxy the 1 and 1/8 in. pice of 3/4 in. tube (the one with one detail ring) so that the bottom is flush with the bottom of the 5/8 in tube. Epoxy the detail joint into the 5/8 in. tube. Epoxy the 5/16 in. of 5/8 in. tube to the button housing (flush with the end with the hole drilled in it). Epoxy that to the detail joint. epoxy the battery case into the button housing so that the hole for the batteries is still open and the button hole is still clear as well. solder the wires coming from the ATtiny to the corresponding wires coming from the battery springs. on the positive wire use the button as the junction. epoxy the button into place. slide the end cap over the battery hole and tighten the screws to hold it in place.

Step 8: Finished!

Pull the end cap off, slide two AAA batteries into the battery case, put the end cap back on, and your done! If you have any questions or suggestions I'd love to see them in the comments. If you liked this Instructable, please vote for it!

Fandom Contest

Participated in the
Fandom Contest

Metal Contest

Participated in the
Metal Contest

Be the First to Share


    • Pumpkin Challenge

      Pumpkin Challenge
    • Halloween Contest

      Halloween Contest
    • Bikes Challenge

      Bikes Challenge

    3 Discussions


    4 years ago

    Hey, thank you so much for the code! This is the first audio code that actually uploads to my ATTiny85. However, when I try to upload it- no matter what audio clip I use with it- it just produces a clicking noise. Do you know why this is happening? What should I do to fix it?



    Mr Tesla
    Mr Tesla

    Reply 3 years ago

    Glads to hear that the code uploaded; I'm not exactly sure what would cause the clicking though. A couple questions to help troubleshoot:

    -What kind of speaker was it connected to?

    -Is the ATTiny clock set for the standard 1 MHz?

    -Could you clarify what you've tried when you say audio clips?

    This is fantastic! After little success with writing my own, I had been on the lookout for suitable, simple, and accessible arduino code for the sonic light and sound effects to use in the sonic screwdriver that i've been putting together. Your code may just work perfectly!

    Brilliant build- you have my vote ;)