Introduction: I Can Surface Mount Solder
Surface mount soldering can be a daunting to a hobbiest, but it can be done, and is actually much easier than it looks. I've designed this project to be a gentle introduction.
This project used "1206" size components which are pretty easy to hand solder, and that is where we'll start. The Attiny microcontroller is an "SOIC" package, which is a bit more of a challenge, but still quite within the abilities of hand soldering with hobby equipment.
If you scoff at adversity, and want to do things the hard way, you can punish yourself with my alter-project at https://hackaday.io/project/25265-an-unfortunate-smd-project. Be fore-warned, it is impossible for mere humans.
Step 1: Gather the Parts, Tools, and Supplies
It is always frustrating to get half-way through a build and find you are missing something. Here is what you'll need:
- from OSH Park (3 copies for $5.65 with free shipping? What a bargain!)
You can build this circuit with a number of various parts, but these are the ones I've used and found to work well:
- 1 ea. ATTINY85, Atmel ATTINY85V-10SUR, Digikey ATTINY85V-10SURCT-ND
- 1 ea. SMD SPST switch, C&K JS102011SAQN, Digikey 401-1999-1-ND
- 1 ea. SMD Battery holder, Linx BAT-HLD-001, Digikey BAT-HLD-001-ND
- 1 ea. 54 mcd Red 1206 LED, Lite-On LTST-C150KRKT, Digikey 160-1405-1-ND
- 1 ea. 330 ohm 1206 SMD Resistor, Yageo RC1206JR-07330RL, Digikey 311-330ERCT-ND
- 1 ea. 0.1 uF cap 1206, KEMET C1206C104K5RAC7867, Digikey 399-1249-1-ND
- 1 ea. CR2032 Battery, Panasonic CR2032, Digikey P189-ND (requires ground shipping, or buy locally).
Buy a couple extra of each in case you need them.
Tools and Supplies:
For my workshops, I use SparkFun's Beginner's ToolKit which has everything you need except the tweezers:
- Soldering iron.
- Wire nippers
- Desoldering braid
Programming the Attiny (Step 8, not required if you buy this as a kit):
- Arduino (please avoid the cheap Chinese clones and support your US Open Source Manufactures).
- Arduino AVR Programming Shield
- Pogo Adapter
A kit for this project may be available on Tindie.com (minus the battery). Purchasing the kit will save you the time and expense of ordering from several different vendors and avoid the minimum PCB order premium. Also, programming an Attiny is not trivial, and if you buy the kit, it will already be programmed and ready. You will also be helping me develop and share other projects in my workshops!
Step 2: Resistance Is Futile!
I always like to start with resistors because they have no polarity (you can put them in either direction), they are relatively heat insensitive (you can keep the iron on them longer), and they are also cheap (so you can smoke 'em and not cry).
A picture is worth a thousand words, so a video is worth a bit more. Colin from Adafruit has made the best introduction to SMD soldering I found, so check that out first.
With that in mind here are the basic steps that will work each of the parts:
- With your clean, hot iron tip, heat the pad and apply a small amount of solder.
- Holding the resistor over the solder blob, heat both the blob and the end of the resistor, and as the solder melts, position the resistor on the pad and remove the iron.
- After the solder solidifies, heat the other side, adding a bit of solder, until a good connection is made.
- Sit back and rejoice in the glory of your first SMD part!
Now, I'm sure the snarky Hack-a-day folks will give me some grief for an ugly joint with too much solder, but I am a beginner too, and at this point, if it work, it is beautiful! Luckily the Instructable crowd is more positive.
Step 3: Capacitor
The ceramic 0.1 uF capacitor, like the resistor, does not have a polarity and can go in either direction. Follow the same steps as the resistor.
Step 4: Let There Be Light!
Time to up the ante a bit. The LED has a polarity and must go in the right direction or you will have no light, which will make this project basically worthless. It is also a bit more heat sensitive, so hopefully you've got your confidence with your iron so it will be quick and painless.
Through hold LEDs are easy to figure the polarity out because one leg is longer than the other. With SMD parts, it seems like each manufacture has a different way of identifying the cathode (negative) side, so you may need to look hard at the data sheet. For the Lite-On part, there is a green strip on the cathode side, but it is hard to see unless you hold it at an angle.
It might be easier to determine the polarity by looking at the LED before removing it from the packaging. The cathode is always toward the side with the holes.
If all else fails, get your coin cell and some jumper wires and light it up.
Once you figure out the polarity, solder it in place like the resistor and capacitor.
Step 5: Switch It Up
We want to be able to turn this project on and off to save the battery. The switch has two alignment pins, but other than that, it goes in the same way as the others. Tin one pad, place the component, and solder it in place. Then solder the remaining pins.
Step 6: Brains!
Time for the hardest part. You are ready. The Attiny has a polarity and will require a sharp eye and a close look at the datasheet. The SOIC package, which stands for "Small Outline Integrated Circuit", has a small circle to indicate Pin 1. If you put it in backwards, it will heat up quickly and release the magic smoke (trust me on this). Also, it is extremely hard to remove and reorient an SMD part once it is place (also trust me on this). On a small project like this, it may be easy to start over (or use a re-flow oven).
- Solder one pad.
- Place component in place, apply heat and solder pin in place.
- Make sure the alignment and positioning is correct. It is quite easy to fix or adjust at this point. Not so much latter.
- Solder a second pad in place.
- Solder the remaining pad. Solder bridging may occur (solder connects more than one pin) as shown in the pictures. Do fret just yet.
- Use solder wick to remove excess solder.
Again, it doesn't need to be pretty. It just needs to work. Take a close look and fix any bridges or pins that are not connected.
Step 7: Power!
Take a deep breath. The hard part is over. Time to solder the battery holder in place.
- Place a solder blog on one pad.
- Place the holder, carefully to note the opening points in the correct orientation.
- Heat the holder and the solder blob until the solder flows.
- This takes significantly more heat than normal components so be patient and watch your fingers!
- Once you have one side in place and aligned, solder the second side in place.
Step 8: Code?
Yes, this project needs some code. And, if you were paying attention, in Step 1 I told you that programming an Attiny was not trivial. I use the Arduino, it's programming environment, my AVR programmer, and a Pogo Adapter.
- Download the Arduino Programming Environment.
- Install support for the Attiny 85 from either:
- Upload the "Arduino as ISP sketch":
- [File] -> [Examples] -> [Arduino as ISP].
- Attached the AVR Programming Shield.
- Attach the Pogo Adapater.
- Position the pogo adapter on the ISP header on the board. The positive and negative pads are marked so you can orient the header correctly.
- Select the correct chip (depends on your Attiny core from step 2, i.e. "Attiny 84 @ 8 Mhz"
- Select the Programmer, [Tools] -> [Programmer] -> [Arduino as ISP]
- Set the programming fuses, [Tools] -> [Burn Bootloader]
- Upload the attached sketch, ]File] -> [Upload using programmer]
The biggest source of errors I get involve not having the pins aligned correctly.
Step 9: Troubleshooting
If it doesn't work at first, don't loose heart! Here are some things to check:
- Look at your solder joints. Any missing or bridged connections should be fixed.
- Try a fresh battery, ensuring that the positive side goes away from the PCB
- Use a multi-meter and check the voltage at IC pin 8 (opposite and across from pin 1). It should be 3V.If you are getting sound, but not flashing,
- Check the orientation of the LED. Remove the coin cell and use two wires to connect it directly to the LED terminals. This will tell you if the LED is in the correct position. If it is not, unsolder it and put it in correctly. Here is a good video on how to do it: http://youtu.be/Z38WsZFmq8E
- If all else fails, ask for help. Instructables is a great, positive community and will try and help.
I've tried to make this as easy and fool-proof as possible, but if you are a true beginner, you may need the help of someone more experienced. We create Instructables because we like to share the joy of our hobbies. If you are not successful in building this, you can help me by letting me help you figure out why! We are all learning in one way or another. I'm trying to learn how to make my Instructables better!