loading

For my soft-circuit classes, we have been using either a pre-programmed Attiny85 circuit (https://www.instructables.com/id/SnapNsew-An-Educational-Soft-Circuit-Platform/), or the more expensive Arduino-compatible Lilypad USB. I wanted something in between those two extremes that would be:

  • Easy to build by beginners
  • Low cost for large workshops
  • Programmable with the Arduino IDE
  • Modular so it can be installed in a soft-circuit with conductive thread or other projects using jumper wire.
  • No special hardware or programmer cable.
  • Fits in an empty Tic-Tac container. Because, Tic-Tacs!

After finding the Paperduino project, I learned that a bootloader could be placed on the inexpensive Attiny85 chips so that they could be programmed like a regular Arduino. This method was developed and made popular by the Digispark Kickstarter project.

The Tacuino (think Tic-Tac Arduino), is an extension of my SnapNsew project. It now includes the necessary hardware so that they project can be easily re-programmed by a student after the circuit is built.

The Tacuino is self-contained in that it includes:

  • An inexpensive, commonly available CR2032 battery power source.
  • Two inputs (touch and light sensors).
  • Two output (sound and LEDs).

This is a just enough "umph" for a reasonable beginning project while demonstrating some of the amazing abilities of an embedded circuit!

Note: An Arduino is nearly bullet proof. This circuit is not. From the bootloader developer:

"[At]tiny85 does not offer any hardware bootloading support, and does not protect the bootloader from being accidentally overwritten by a misbehaving app."

If you are developing a circuit, it may be advisable to use an IC socket and have an extra Attiny on hand.

Step 1: Gather the Parts, Tools, and Supplies

You can build this circuit with a number of various parts, but these are the ones I've used and found to work well:

PCB:

Digikey Parts:

  • 1 - Baterry holder, BAT-HLD-001-THM-ND1
  • 1 - Attiny microcontroller, ATTINY85-20PU-ND
  • 1 - Optional 8-pin IC socket, AE9986-ND
  • 1 - Photo transistor, 160-1988-ND
  • 1 - Slide switch 401-2000-ND
  • 1 - Piezo speaker 445-5229-1-N
  • 2 - 5MM LED (red for power and one of your choice)
  • 1 - 0.1 uf Capacitor, 399-9776-ND
  • 1 - USB B-type socket, ED2983-ND
  • 1 - 1N4001 diode, 641-1310-1-ND
  • 2 - Zener diodes, 3.6V568-7951-1-ND
  • 1 - 1.5k resistor, CF18JT1K50CT-ND
  • 2 - 22 ohm res, CF18JT22R0CT-ND
  • 1 - 10 uF capacitor, P997-ND
  • 2 - 330 ohm resisotr, CF18JT330RCT-ND
  • 1 - Header right-angle, 929500E-01-36-ND


Other parts you supply:

  • CR2032 coin cell, Digikey P189-ND or local store.
  • USB A/B cable.
  • A Tic-Tac case (optional).


Tools and Supplies:

For my workshops, I use SparkFun's Beginner's ToolKit which has most of what you need:

  • Soldering iron.
  • Solder
  • Wire nippers
  • Desoldering braid (hopefully not needed, but you never know)

A kit for this project is available on Tindie.com. Purchasing the kit will save you the time and expense of ordering from several different vendors and avoid the minimum PCB order premium. You will also be helping me develop and share other projects in my workshops!

Step 2: Ladies and Gentlement, Start Your Irons

We are going to assume you have some kit-building experience. If you need some help soldering, head over to www.sparkfun.com/tutorials/213 to brush up or watch the Geek Girl explain it at http://youtu.be/P5L4Gl6Q4Xo.

The order of assembly is largely a matter of preference. If you don't have a helper or a vice, I generally go from lowest height to tallest so when the board is reversed on the table, the parts stay in place.

  1. Lets start with the black 1N4001 Diode on the Programmer board. The component has polarity, so ensure the marking band matches the silk screen (band to the right). This component also had thicker legs than most, so will take a little more heat when soldering. This diode protects the circuit from reverse voltages.
  2. Next, solder the 1.5K ohm resistor below the diode. Its color code is brown - green- red - gold. It does not have polarity.
  3. Solder the two 22 ohm resistors below the 1.5K ohm resistor. Their color code is red-red-black-gold.
  4. Finally, lets put in the two 3V6 Zener diodes. Like the first diode, they have polarity and a band marking the direction they go. This time, the band goes to the left.

Step 3: Capacitors, Switch, Socket

Moving down to the Tacuino board section:

  1. The 0.1 uF capacitor goes in the upper left corner. Ceramic capacitors do not have polarity. It smooths the voltage levels the microcontroller receives.
  2. The power switch goes below the capacitor, with the actuator pointed to the left. "On" is upward toward the USB jack.
  3. Next is the optional IC-socket, which aligns with the notch pointing toward the battery. This will help you correctly align the IC in a latter step. The IC socket allows you to easily replace a damage chip or to remove a chip for programming.

Step 4: Battery Holder, Speaker

Moving to the right, the battery board is next:

  1. Solder the battery holder with the arched opening toward the bottom. This component requires a little longer heating time when soldering because the metal radiates the heat away quickly.

Above the battery is the speaker board:

  1. Solder the piezo speaker in place. The PS1201 piezo does not have polarity. Other types may.

Step 5: Photo Transistor, Touch, and Main LED.

To the right of the speaker is the photo transistor:

  1. Observe the polarity of the photo transistor. The longer leg is the emitter. A cadmium photo resistor will work as well.

Below the photo board is the touch board. It measure a change in resistance when touched. A 6x6mm tactile switch can be soldered in to place if desired.

Below the touch board is the main LED board. The color and size is up to you:

  1. Solder a 330 ohm resistor in place. Its color code is orange - orange - black - gold. It does not have polarity.
  2. Solder the main LED in, observing polarity. The long leg is positive, and goes in the hole marked "+" on the silk screen.

Step 6:

Almost done! Back to the Programmer board:

  1. The 4-pin right angle header is optional and used only if the boards are separated and you want to reprogram the microcontoller. Solder it with the pins extending over the speaker as shown.
  2. A 330 ohm resistor is mounted vertically between the capacitor and the LED. Its color code is orange-orange-brown-gold. Bend it as shown and solder it in place.
  3. The 10 uF capacitor goes at the bottom toward the left of the zener diodes. It is electrolytic, and has a polarity. The long leg goes in the hole marked "+" on the silk screen.
  4. A red 5mm LED is used for USB power indication. Observe the polarity. The long leg is positive and goes in the hole adjacent to the "+" on the silkscreen.
  5. And last, but certainly not least, is the USB Type B connector. Ensure the 4 smaller pins are in correct position, and then solder the two main mechanical support in place. Solder the 4 smaller pins.

Step 7: Final Checks, Attiny, and Power On!

Before we insert the IC and apply power, take a minute to inspect your work. Use a good light and magnifying glass. You are looking for missing or bridges solder joints. Touch up anything that looks suspect.

If you buy a kit from me, the Attiny85 IC will already have a bootloader program installed on it and you can just insert the chip. A bootloader is a simple program that checks to see if new programs are available to upload, and if not, after 5 seconds, start the current program.

Burning a bootloader onto a chip is not trivial, and requires an Arduino, Raspberry Pi, or a Programmer. Look at http://paperduino.eu/doku.php?id=burning_bootloade... for further details. For programming chips directly, I use my own Open Source AVR Programming Shield.

All that being said, it is time to:

  1. Insert the Attiny85 IC with the alignment dot toward the battery. I usually add a dot of paint to make it more visible. Align the chip with the divot on the socket (or the silkscreen) and carefully press it in to place, ensuring no pins get bent over or tucked under.
  2. Insert the CR2032 battery with the "+" sign facing up.
  3. Place the slide switch in the "On" position (toward the USB port).
  4. The bootloader takes 5 seconds to start. During this time, it is checking to see if a program is waiting to upload, something we will show how to do in the next step.
  5. You should see a brief flash of light from the main LED indicating the program is running.
  6. Press the Touch sensor, and you hard work should be rewarded with some music and light!
  7. As a bonus, when you get tired of hearing the tune, you can place it in silent mode by holding the touch sensor while you turn the power off, on again, and wait for the LED to flash twice (wait the five seconds).

Troubleshooting:

If you are not getting any response from the board, do not panic! Here are some things to check:

  1. Remove the battery.
  2. Check the IC alignment. If the IC is hot to the touch, you have it in backward. Double check the alignment mark.
  3. Inspect the bottom side of the board for soldering problems as discussed earlier. Touch up any questionable joints.
  4. Verify the battery has a good voltage.
  5. Ask for help!

I tell my students you have to be patient, persistent, and have faith you can figure it out!

Step 8: Blink

You have built your own working computer! Even more amazing, you can now write your own programs for it!

We will be using the Arduino IDE to write and upload programs, but to talk to the Attiny, we need a special version of the software developed by Digispark. Follow the instructions at http://digistump.com/wiki/digispark/tutorials/conn... to set up the software.

The primary difference in programming the Attiny verses a regular Arduino is that you start the upload before connecting the board. If you are a regular Arduinoist, this will take some getting use to. There is also a five-second delay between power-on and starting the program.

Launch the IDE and set it up as follows:

  • [Tools]->[Board]->[Digistump (Default 16.5 Mhz)].
  • [Tools]->[Programmer]->[Micronucleus].

Now select a program to upload. Everyone starts with "Blink":

  • [File] ->[Examples]->[Basic]->[Blink].
  • Replace anywhere a "13" is present (Arduino's built-in LED) with "4", which is the Tacuino main LED.
  • Click the Arrow icon, or [File] ->[Upload]
  • You will see the IDE compile the program, and then prompt you to plug you board in:
  • Running Digispark Uploader...<br>Plug in device now... (will timeout in 60 seconds)
  • You should get a message that the sketch was successfully uploaded, and the LED begin to blink.
  • > Starting to upload ...<br>writing: 70% complete
    writing: 75% complete
    writing: 80% complete
    > Starting the user app ...
    running: 100% complete
    >> Micronucleus done. Thank you!
  • If you get an error message, double check the steps and try again. Remember what I said about "patience, persistence, and faith"!

Now that you have your computer doing your bidding, it is time to have fun:

  • How fast can you make it blink and still see it?
    • Remember, you will have to plug your board in each time after you hit "Upload" to trigger the bootloader to look for the new program.
    • Keep the "on" delay and "off" delays equal.
  • Once it is blinking so fast that it looks like it is always on, try moving the board back and forth quickly. Can you see it blink now?
  • There is an interesting article on Wikipedia about the phenomena called "Flicker Fusion Threshold".

Step 9: Touch

The analog and digital pin numbers for the Attiny are a bit confusing. I like to refer to the following diagram which comes from the "pin.h" file for the Attiny core software if you dig deep enough:

ATMEL ATTINY45/85 Pin Assignments
                   +-\/-+
  Ain0 (D 5) PB5  1|    |8  Vcc
  Ain3 (D 3) PB3  2|    |7  PB2 (D 2) Ain1
  Ain2 (D 4) PB4  3|    |6  PB1 (D 1) pwm1
             GND  4|    |5  PB0 (D 0) pwm0

The touch sensor is connected physically to the Attiny's pin 7, which in the Atmel data sheet, is designated "PB2". In Arduino software, we need to engage the pull-up resistor using the digital pin designation ("2"). Then, we need to use the analog pin designation ("1") when we use the analogRead() function. Confusing as heck, but I'm not smart enough to start re-write the Arduino libraries.

To measure touch, we need to do a little Arduino magic. By engaging an internal pull-up resistor, we can detect when the resistance across two traces changes. Without a current path (high resistance), the 10-bit value will be near the 1023 maximum because the pull-up resistor is pulling the voltage high. When skin provides a current path, the analog value will drop below 1000, and we can trigger the LED to indicate detection.

int led = 4;<br>int touchPin = 1;
int touchPullUp = 2;

void setup() {
  pinMode(led, OUTPUT);
  digitalWrite(lightPullUp, HIGH); // engage pull-up resistor
  digitalWrite(touchPullUp, HIGH); // engage pull-up resistor
}

void loop() {
  int touchVal = analogRead(touchPin);
  if (touchVal < 1000){
    digitalWrite(led, HIGH);
  }
  else {
    digitalWrite(led, LOW);
  }
}

If we had a button or switch installed instead, the value would drop to near 0 since the resistance is nearly zero.

Step 10: Light

Like the Touch, we can use the internal pull-up resistor and analogRead() to determine light value being detected by the photo transistor. Looking at the previous pin assignment chart, we can see we need to use the digital designation of "5" and analog "0" to use the light sensor.

int led = 4;
int lightPin = 0; int lightPullUp = 5; void setup() { pinMode(led, OUTPUT); digitalWrite(lightPullUp, HIGH); // engage pull-up resistors digitalWrite(touchPullUp, HIGH); } void loop() { int lightVal = analogRead(lightPin); if (lightVal > 800){ digitalWrite(led, HIGH); } else { digitalWrite(led, LOW); } }

You may need to adjust the threshold value depending on the light in the room.

Step 11: Sound

Coming soon!

hey dude... i am just aa beginner can u pls tell me ... what is the use of this module...
Ah, that is the golden question. A night light? A musical greeting card? Lights &amp; siren for a Pinewood derby card? Your favorite stuffed animal with a blinking heart or glowing eyes. <br><br>Right now I am thinking of the blinking light and sound the TARDIS makes!<br><br>The actual answer is &quot;anything an Arduino can do&quot; and is limited only by your imagination!
I believe it will be the &quot;Digispark 16.5 MHz&quot;. They must have labeled them slightly different between the Linux and Windows version.
<p>Great first project, and thanks for your AWESOME service at Tindie. I'm a teacher, so once I get this figured out, I hope to buy some for my students. Q: &quot;Digistump (Default 16.5 Mhz)&quot; is not a choice and the sketch does not proceed after plugging in the Tac. Any updates to these instructions I should know about?</p>
Do you have any &quot;Digistump options under boards? If not, I suspect you are using a standard Arduino installation and need to head over to http://digistump.com/wiki/digispark/tutorials/connecting to get the Digistump version. Let me know how it goes.
<p>Yes, it's the Digistump version downloaded from that site (Arduino 1.5.8). Under Board, the only one active is Digistump DigiX. There is also a Digispark 16.5 MHz. </p>
<p>newbie questions: which direction on the switch is on, and do I bend the pins to get the right angle in your picture?</p>
<p>The silk screen for &quot;ON&quot; was a little unclear on the first set of PCBs. The switch should go toward the USB port to turn the board on. </p><p>The right-angle header is only needed if you want to program it after you break the board in to separate sections. Just bend it so it is close to the speaker and out of the way for now.</p>
Can't wait to program it. I just finished assembly.
<p>Hi, How long will this run on the coin cell.</p>
<p>That depends directly on what you use it for. If you have an LED on continuously, it will last days. With just the microcontroller running, weeks. If you use sleep routines when it is idle, which the stock firmware has, months or more.</p>
<p>Is this available or currently out of stock? I would like to purchase it.</p>
They went like hotcakes. A little overwhelming actually. I'll have another batch ready on Tindie.com by February 9th (I hope).
<p>If purchased on tindie today, is shipment guaranteed?</p>
<p>Yes, I'm making more. Just can't guarantee when they will be ready. Tindie doesn't bill you until it ships.</p>
<p>I made one last night and it was fun!</p>
<p>This is lovely. Unfortunately, my UAS seems to work at speed of a glacier, so I'll be long graduated, hopefully, when something like this shows up.</p>
<p>Nice build. Looks completely professional and I am partial to every project in a tic-tac box, having made one myself. :)</p>
I thought I was pretty clever when I saw my USB connection would fit through the lid. You had that figured out years ago!
Yeah I felt that giddy satisfaction too when things happen to fit together perfectly.<br>But I'm sure someone must have found this out before me, and someone else before him, and someone else before him, and the Simpsons before everyone else... :)
<p>Tacuino is the best name ever!!! I totally need to do this. Good stuff!!!</p>
This looks cool but my question is those 90 degree headers. It looks like they are essentially unusable because the speaker is in the way. Is that accurate? Do you have a work around.?
Good question. Those are used if the board is separated into pieces. It plugs in next to the Attiny when you are programming it.
I was just thinking. you might be able to switch those 90's for verticals that have the short end up and trim the long sides on the bottom. if they ate only for programming and you don't want to separate the board that should work. not necessarily doable from a production perspective but when someone was assembling them as a kit, very doable. I've done that on a couple of projects where I had a tight fit, like those mini Altoids tins.
Thanks
<p>very good job, thanx!</p>
<p>I'm not a big fan of Arduino, but this one is great! Brilliant design, congrats!</p>
<p>Nice work. Very impressive 'ible.</p>
<p>Hi, i'm author of Paperduino. Super project! Congratulation. Is this project Open Source ? Can be PCB downloaded for modification ??</p><p>Thanks..</p>
<p>Yes, it is open source and open hardware. Send me an email at 648.ken@gmail.com. I'd love to send you kit seeing how you were the inspiration for this.</p>
Hey - this is amazing!!!<br>is it possible to get a board from anywhere?<br>I'd love to habe one of these guus in my pocket in a tic tac box - awesome!!!
I've got a kit together at https://www.tindie.com/products/MakersBox/tacuino-a-low-cost-modular-arduino-compatible-educational-kit/<br><br>Or you can just buy the PCBs from OSH Park (3 board minimum):<br>https://oshpark.com/shared_projects/D67bN8eX
<p>I really like how it looks and it will be great for beginners. I love the quality of your photo's.</p>
Nice idea...<br>Maybe better than Arduino!!!

About This Instructable

59,144views

581favorites

License:

More by MakersBox:Easy Joule Thief Soldering Project Using an Arduino Drawing Robot with Hour of Code Tutorials Arduino Drawing Robot 
Add instructable to: