loading

Complete Circuit Board Lab & POV Business Card

FeaturedContest WinnerContest Winner
Picture of Complete Circuit Board Lab & POV Business Card
Introduction
_______________________________________________________________________

Though there are many Instructables on some aspect of how to make circuit boards, this one is different. It's an instructable on how to make the things you need to make circuit boards, specifically, a flamboyant business card toy. Over the past six months I have set up fairly complete printed circuit board fabrication lab in my apartment, cheaply and safely, and I intend to cover all aspects of the process, from start to finish. Some of it you may have seen before, but here it is all in one place, with references.


All in all, I had to design and build an airtight etch tank out of laser cut acrylic, an SMD vacuum pickup tool, a reflow oven and temperature controller, refine the toner transfer process with a modified laminator, build a custom programming jig, and of course design, program and build from scratch every aspect of the thing I did all this for in the first place: my business card. In the end it was well worth the time to have the ability to make circuit boards appear in my hands in an evening.
 

The Business Card
_______________________________________________________________________


The POV Business Card uses the classic persistence of vision  optical illusion to flash your name and number in midair as you wave the card. Based on the PIC12F508, an 8-pin 6 I/O ultra-low cost microcontroller, it is entirely surface mount and extremely thin- it uses PCB laminate that is as thin as a standard business card. And at roughly $2 apiece in parts, depending on how good you are at sourcing components, they are cheap enough to hand out (to the right people).

But why go to all this trouble simply to make something to give away to someone I just met? Why not just have them printed up in an afternoon for less than 10 bucks at Kinko's? Why, because I want  a card that would not get thrown out. A card that would embody exactly what I do, instead of clumsily trying to sum it up in an clever job title. A card that would get me places.


The Scenario
______________________________________________________________________
 

Picture the following scenario, if you will: you have just met someone who you need to know. In actual fact, they need to know you. Having exchanged introductions, "The Man," complete with dark suit and power tie, casually hands you his cloned, company-issue business card.

"Here's my card," he grins, knowing that you will impressed by his Ownership Of Card, or at least his Power Over Someone Who Owns An Embossing Machine .

Probably he expects to see you to scribble your number on a torn scrap of paper. But when you reach into your pocket and pull out your card certainly he doesn't expect to see... your name glowing in midair, floating before his very eyes!

"It's called persistence of vision," you say, as you hand him your card. "I make these in my basement. From scratch."

 You didn't even need to say another word; anything more would just be gloating. You can see the look in his eyes; he's already sold.


"Look at that subtle off-white coloring. The tasteful thickness of it. Oh my God, it even has a watermark."
-
Patrick Bateman, American Psycho



Disclaimer: I should note here that this Instructable involves a lot of things that could be dangerous if done without caution and informed planning, including fire hazards, risk of electrocution in various horrible ways, handling of nasty chemicals, and very toxic fumes. This one really has it all, folks. So be safe! 
 
Remove these adsRemove these ads by Signing Up

Step 1: Design an Etch Tank

Picture of Design an Etch Tank
etch-tank---sheet-1---black-rev1.png
etch-tank---sheet-2---black-rev1.png
S7302343.JPG
S7302342.JPG
We'll start with the hard one: Build a leakproof, acid proof, and airtight etch tank, using no metal parts. Others have done this before, but I had to make it difficult for myself. I had built one before out of a plastic ammo can, but it was much too large. This time, I wanted to do it right. I designed it from scratch in illustrator and then had the parts laser cut out of acrylic to my specifications by a friend (laser cutter use number one!).

For those new to this, you need an etch tank to hold the acid you use to eat away the copper on your circuit board that is not covered in some kind of etch resist. It can be pretty nasty stuff, depending on the kind of acid you use, and you need to safely contain it if you plan on doing this both regularly and in the house that you live and breathe in. Or anywhere near your kitchen sink. This is doubly important if you plan on storing it for any amount of time, though to be sure this not a safe permanent storage container.

The Design
_______________________________________________________________________

The tank should be airtight, with a secure lid, have an air inlet for a bubbler, to agitate and oxygenate the solution, and an air outlet to a house that will vent out the window. I also added a check valve to the air intake on the tank so that any exhaust gases stay out of the air pump. It should hold the board upright for the minimum amount of acid, and it should be opaque to light so that the solution does not degrade from exposure to the sun. However, I left one side clear so I can look at the board to see if it is done etching, and also because it looks cooler that way. 

I designed my tank for a total volume of roughly 2 Liters, planning on filling it to only 1.6L to leave room for the air bubbler and hose, the board itself, and a little extra for a safe lip on the top. The 1.6L value was determined with the figure of .016 liters per cm2 of board area as reported here. Assuming a a, 8x10in double sided PCB with 50% coverage of 36 μm ("1oz") copper. 

For reasons I'll elaborate on later, I chose to use Cupric Chloride (CuCl2) as my circuit board etchant. CuCl2 is corrosive to most metals, and a few plastics. 

When researching the materials you plan on using, datasheets abound under the search terms "xyz chemical resistance." Understanding the properties of materials is critical in engineering something like this, so plan ahead. Finding out that a hose melted in your acid bath and contaminated the solution, and then having to fish out each and every little tiny chunk is no fun.

Very few things will survive highly concentrated acids forever. We aren't using anything highly concentrated,as far as these things go, but the effect is the same; it's acid-resistant, not acid proof.
 

The following materials are generally safe to use for the construction of the tank:

  • Polyethylene (PE) and High Density Polyethylene (HDPE)
  • Polypropylene (PP)
  • Viton
  • EPDM
  • Teflon
  • Glass
  • Acrylic
  • Polycarbonate (especially mar-resistant polycarbonate)

The following are definitely NOT safe, and should be avoided anywhere directly exposed to the solution:
  • Any metal (except titanium!)
  • Nylon
  • Silicone

Step 2: Build the Etch Tank

The hardest part of building this thing is just finding the finding the parts. It seems like my entire life is just an endless quest for the parts I need. The most difficult part to find was a pair of bulkhead fittings that were small enough for the tank.

Small fittings are not common locally, as everything is plumbing sized, and online, the lab grade small fittings are only orderable in bulk. Some of these parts are scrounged, most of them I had to order special, and most of them took several rounds of searching and receiving of parts that didn't fit together. US Plastics Corporation is the source of pretty much all of it; they are like the Digi Key of tubes and lab fittings, as far as I'm concerned. Sources listed where available.

Construction
_______________________________________________________________________


As far as the tank is concerned, the first step is getting it together. The standard for watertight acrylic bonding is Methylene Chloride, which is very nasty stuff, and cancerous, so do it outside. Just leaving a window open is definitely not sufficient. Accordingly, it is pretty hard to find given the recent regulation, so you may have to order a methylene chloride based glue online, such as IPS Weld-On 4, which is water thin as well. I got a tiny little bottle from a friend who does acrylic fabrication professionally.


To be sure, you could probably get by with just the right kind of epoxy, but ideally the parts should be chemically bonded to each other, instead of a mysterious foreign agent. If you want to play it safe, just use Weld-on 16 and be done with it. It is a more viscous solvent that can be treated as a glue, and will seal up any gaps. I had to use Methylene chloride for lack of the alternative.

When bonding parts with Methylene Chloride, you are after as tight a fit as possible. Laser cut edges need special attention, as they are melted and rounded off. I spent about an hour with a file and sandpaper cleaning up the parts for a good fit.. Even for parts that fit together perfectly from the start, especially the uncut face of the acrylic, it is important to roughen the abutting faces with sandpaper or there is no grab.

Once the parts fit together well, hold the parts  together and run the needle of a syringe or modified squeeze bottle full of the solvent along the crack; capillary action will draw it in. Within about 60 seconds the part will be secure enough to leave alone. It only takes about 30 minutes, for it to set up, sometimes a lot less. I left it overnight just to be sure, but it's actually waterproof after about an hour.

After that, you need to make a lid. I cut a self adhesive gasket for both the lid and the lip of the tank to fill the gap, and to seal it up I mounted a pair of wings to either side of the tank with magnets to pull it down and hold it in place. What happens is the lid tends to line itself up, and because the two sides are reversed in polarity, it is impossible to put the lid on backwards. I still feel clever about that one. The only caveat being that the magnets need to be sealed in heatshrink tubing to resist corrosion.

The bulkhead fittings I wanted only came in straight, not 90 degree, so I needed to cut down the one side and weld on an angled fitting. It works surprisingly well with polypropylene, which has melting point low enough that you can fuse parts with just a hot air gun.


References
  1. How to Glue Acrylic

Parts
Tools & Supplies
  • Methylene Chloride or IPS Weld-on 16
  • heatshrink tubing
  • Dremel or other rotary tool w/ cut off wheel
  • Hot air gun
  • Rubber gloves
  • Hot glue gun
  • Cyanoacrylate Superglue
  • Clamps
  • Hacksaw
  • Powerdrill
  • Hobby knife
  • Straightedge

Step 3: Modify a Laminator

Be aware that the device you have modified is a now a potential fire and electrical hazard!  As such, you probably shouldn't leave it unattended. And make sure it's unplugged before you do any of this.

The Toner Transfer Process
_______________________________________________________________________


To create positive etch resist mask, the most straight-forward approach, with components readily and cheaply available, is known as the Toner Transfer method. The basic idea is that you print out your design onto a glossy paper and apply the printout to your board with heat and pressure. The paper is removed, leaving only the toner as an etch resist, thereby protecting the copper below from the acid bath.

There are a lot of variables involved, so it is easy to see why a lot of people give up on it. Given enough time, though, it is very possible to get the process dead on. If you have tried and given up on this method before, I'd recommend that you don't give up! The payoff in time and money saved is well worth it.

The process can also be used to add a black component label or text mask to the board, as a final touch after the copper traces are cleaned off. For the POV Card, I used this method to add my name to the back of the card in case the LEDs were too hard to read.


Modifying the Laminator
_______________________________________________________________________

The most important part of the process is a balance between heat and pressure that is consistent over the entire board. Proper pressure is easily achieved with a standard bag laminator. You just need to be sure to find one with heated rollers or you won't get the same results. GBC makes two commonly available models, the GBC Creative and the GBC Personal; they are functionally identical, except that the Personal has an extra switch.  

Now all we need is to get the temperature right. Since both of the laminators I mentioned are controlled by a simple thermal switch, all we have to do is swap it out with a higher temperature rating. It's pretty simple; the switch contacts open when the rollers are too hot, turning off the heaters, and close when it's too cold, turning it back on.  It's a very simple kind of hysteresis, where the heater is never exactly the right temperature as it is almost always slightly above or below the proper temperature, maintaining a +/- of about 7 degrees. It is very unlike the Watlow PID temperature controller I use later on in the reflow oven, which learns about the system and compensates dynamically.

Instead of a fixed value switch, you want try and find a variable thermal switch. Just like a fixed value thermal switch, it uses a bimetallic strip that warps with the changes in temperature. The two metals have two different coefficients of thermal expansion, and the whole piece bends forward at the proper temperature to close the contact.  Unlike a fixed value switch, however, it has a screw that can be adjusted, changing the tension on the bimetallic strip, and thus changing the distance it has to travel to close the contact and turn on the heater. It's all very clever and simple and perfect for our laminator; we can calibrate it to our hearts desire, even to the point of matching it to the melting point of the toner from the specific model of printer we use. Huzzah!

If you can't find an adjustable switch, don't worry; a 160-190º C fixed value switch will work just fine.

For safety's sake, we will have to swap out the low temperature thermal fuse (as opposed to bypassing it entirely. Definitely not recommended!) with one of a higher rating, so the whole unit will lose power if it overheats and hopefully doesn't catch fire. BTW, you do this mod at your own risk, so don't leave it on unsupervised! It's kinda dangerous. At its new temperature it may fume a little bit initially as gets worn in, but anything more means it's melting and you need to turn the temperature down. :)

My laminator is set to around 180º C (356º F). It varies +/- about 10 degrees, tested with a handy thermocouple directly on the rollers, taking care, of course, not to let the probe get pulled into the laminator. The fuse is for 240º C, for a good safe margin.


Parts

Tools & Supplies
  • Wire strippers
  • Crimping tool
  • #2 Phillips Screwdriver
  • Temperature probe

Step 4: Build a Reflow Oven & Controller

You may have noticed a trend here toward automation, and I don't deny it. This whole project was an attempt at small scale mass production. So here we go: instead of hand soldering every board, hey, guess what- I can just stencil on solder paste, glob it on real good sorta, and stuff the whole thing in a toaster for a minute or two? 

Yup, that's the general idea.

Surface Mount Technology
_______________________________________________________________________


The part that makes this possible is choosing Surface Mount components over conventional through-hole components. They are significantly smaller and less expensive, there are no holes to drill, and board size is reduced. Any disadvantages they have are just side effects of their advantages; they can easily be too small to manipulate without the proper tools.

Typical SMT fabrication works like this: solder paste is spread through a stencil unto the solder pads of the board. Then the components are stuck into the paste, and the entire thing is ramped at a set rate to several set temperature points, depending on the solder and heat resistance of the components. In our case, every component except two can be baked; the battery and the switch will need to be hand soldered later.

Regardless, the higher entry cost is outweighed by the long term advantages, so it's time to build a temperature controlled reflow oven so we don't need to get carpal tunnel soldering hundreds of little grains of sand.
 

The Controller
_______________________________________________________________________


 The cheapest commercially available reflow oven is certainly several thousand dollars. On the other end of the spectrum, the cheapest stand alone controllers are in the $100 range. Since the expensive ones are too expensive, and the cheap ones are too crippled, I had to build my own.

All the controller has to do is monitor the temperature of the oven and change it when it need to be changed. The ideal way to do this is with a Ramp/Soak temperature controller, used in factory automation for just such a purpose. I was lucky enough to get a Watlow SD6R-LCJE-AARG ramp./soak controller for less than 50 dollars, and I built the whole thing around it. You should be able to find something similar in the same price range without too much trouble. Just make sure it can ramp the temperature to multiple setpoints, as opposed to simply maintaining one stable temperature.

The Walow is pretty forgiving; it will take 24 AC/DC as power input it can display temperature in Fahrenheit or Celsius, and it accepts almost any type of thermocouple. More importantly, it has low voltage DC as a control output that we will use to drive a solid state relay, which will in turn switch on and off the heaters of a standard toaster oven.
 

The Toaster Oven
_______________________________________________________________________

 

Any toaster oven will work, though the smaller the better, as the smaller volume of air will mean it can heat up much faster. Try and look for a newer oven with quartz heaters, but ceramic heaters would also be suitable. If your oven has a setting for always on operation, such as bake, you'll be fine. Otherwise, you will need to open it up and wire the heaters to always be on - a dangerous affair that I would not recommend.

You'll also need a thermocouple with a heat-resistant insulation, as our oven will reach temperatures of 260º C. This presents yet another fire hazard, so don't leave it unattended, keep it away from the walls, and don't set anything on it (unless it has heat resistant plastic feet!). The last thing to do is simply to drill a hole in the back of the over large enough for the thermocouple to fit through. There is no need to worry too much about heat loss with our oven, but the hole shouldn't be too much larger than the thermocouple. On the other hand, too small a hole and the fiberglass insulation on the wire will begin to fray from repositioning it. The hole should be placed slightly above where the center rack in the oven would be, so that the thermocouple can just touch the surface of the circuit board.


References
  1. Solder Reflow Guide for Surface Mount Devices, Paul N. Houston, et. all
  2. Design and Construction of a Reflow Soldering OvenDept of EE, University of Washington
  3. Conversion of a toaster oven into a SMT reflow oven
  4. Building A Reflow Controller For Griddle/Hotplate/Toaster Oven

Parts
  • Toaster oven, preferably small volume, with four quartz heating elements
  • Metal project enclosure
  • Ramp/Soak Temperature Controller, here's one option, but you should try eBay first
  • 10A or greater Solid State Relay, Crydom d2410f
  • High temp thermocouple K-Type, 270 to +1372º C (-454 to +2501º F)
  • heat resistant rubber or plastic feet & hardware
  • indicator lamp, panel mount 120V
  • electrical socket, panel mount
  • two wire screw down terminals, panel mount

Tools & Supplies
  • Power Drill
  • Dremel or other rotary tool, with cutoff wheel
  • Crimping tool
  • Soldering iron, solder
  •  mounting hardware
  • various crimp on connectors sized for your parts
  • several feet of 14-16 gauge wire, various colors
  • Thermal heatsink paste

Step 5: Build an SMD Vacuum Pick and Place Tool

Now we need some way of getting the parts onto our PCB quickly an efficiently, and when a tweezers won't cut it, it just has to be a vacuum pen. Not satisfied with the old spring-in-a-syringe trick? A modified aquarium pump will do the job nicely.

The Pump
_______________________________________________________________________

I found that the best aquarium pump for our purposes is a Tetra Whisper. With a few exceptions, only diaphragm pumps from five or ten years ago are easily reversible, and they all require some kind of permanent modification of the valve system. Most modern pumps (like the Marina 100) are single-piece designs that have been refined to the point where they can't be modified in the same way - except for the Whisper series!

The way it is designed, it can be reversed simply by pulling out the one-way valve assembly, turning it around, and putting it back in. It is a tool-free modification that can be returned to normal operation by doing the mod in reverse. Unplug it first!

If you would prefer to go the cheap route, it is still a safe bet on the older pumps. Any thrift store (Goodwill, Savers, etc.) is liable to have one for under $5.


The Pen
_______________________________________________________________________

We also need to make a vacuum pen. Any cheap pen with a plastic tube body will do just fine. Keep a lookout for Luer lock connectors, the standard for syringe needles. They come in handy for a lot of things. In this case, it will make swapping tips much easier. They can be hard to find; my local surplus store had them in quantity and they turned out to be just what the doctor ordered (groan). I even found a Luer lock valve for adjusting the airflow, though it turned out to be totally unnecessary, since we want as much vacuum as we can get.

I also managed to piece together a miniature lazy susan with some odd parts. I found this to be an indispensable tool, given the ability to turn the circuit board to the orientation of the part you picked up. There is no comparison to even the nicest clamp-style PCB holder.


Parts

Vacuum Pump
Turntable
  • bearing assembly
  • flat board or piece of plastic
  • self-adhesive rubber sheet
  • self-adhesive rubber feet
  • 4 short sheet metal screws

Tools & Supplies
  • Power drill
  • #2 Phillips screwdriver
  • Hobby knife
  • Hot air gun
  • metal fil

Step 6: Design the Board

This really was the most time consuming step; that is, designing and planning the entire device. The goal is to make a 5 LED microcontroller-based circuit with a small enough part count to fit on a 2" by 3.5" standard business card. It has to be a single sided board to reduce complexity, and it has to be built entirely with surface mount components to save on time drilling holes, keep the profile as thin as possible, and keep the end user from getting poked by leads sticking out of the bottom. Most importantly, it needs to be cheap and quick to make. Again, that means a reduced parts count and surface mount components.

The Microcontroller
_______________________________________________________________________


I ended up designing the whole thing around the Microchip PIC12F508 , the smallest, cheapest microcontroller I could find with the right number of pin outs. With no interrupts or PWM, the PIC12F508 is nothing fancy, but it definitely gets the job done. At the time of writing, they run around 46 cents apiece. Similar chips are available from ATMEL, under the AVR banner, and are more full featured, but cost about twice as much. And in the quantities I want, that matters.

The PICF508 runs nominally at 4MHz on its internal oscillator. It has only 750 bytes of program memory, and 25 bytes of RAM, but we don't need that much, anyway. It also does not have interrupts or PWM, but, again, we can get by without those. As far as I/O goes, it has exactly enough. There are 8 pins, two for power, and 6 I/O pins, one of which is input only. We already know what that means: It will have five LEDs and one sensor, and that's it. The most important feature is that it is programmable in-circuit (ICSP), meaning you  don't have to take it off the board to reprogram it; an important point when you are dealing with a soldered on SMD part.

When running a program, pins 2, 3, 5, 6, 7 of the PIC are configured as 3V LED ouputs, pin 4 as an input, and 1 and 8 are 3V dc power inputs.

In ICSP mode, the PIC is programmed over five pins:

Pin           Function

1              Vdd
2              (unused)
3              (unused)
4               Vpp
5              (unused)
6              ICSP CLOCK
7              ICSP DATA
8              Vss

The Circuit
_______________________________________________________________________


That decision made, the rest comes easy, up to a point. Aside from the five LEDs and their current limiting resistors, a tilt switch that pulls Pin 4 (GP3) low when the the board is tilted, a bypass capacitor across pin 1 and 8 (.1 uF C1) to prevent erratic CPU behavior, and a momentary power switch to prevent battery drain, there isn't much to it. It's simple, as promised. And with the right program, it can do anything! Anything at all. The only limit is yourself!

I spent a bit of time obsessing about the other components; I ordered about 20 different tactile switches from DigiKey to find the thinnest, nicest looking, softest feeling tactile switch possible. SInce the battery will overheat (and potentiall explode) if soldered to, I played around with conductive epoxy and conductive tape, with no luck. In the end I bit the bullet and paid the 26 cents apiece of nice, solid, SMD battery retaining clips. They ended up fitting into the design fairly well, too.

Now all there is to do is obsess about the artistry of the PCB layout, and we're done. Ironically, I put more time into proportion and layout than anything else on this project, and it gets three sentences of description.

Well, the thing does have be pretty, after all.


Improvements
_______________________________________________________________________


The final design does leave room for improvement. For one thing, it needs much brighter LEDs so it can be seen better in bright light. Also the tilt switch makes it seem kind of cheap, e.g. "What is that thing rattling around? Is it broken?" Other flaws, such as having to wave it to see anything, are intrinsic to the design and were accepted before I even began. Incidentally, it ends up being something of an intelligence test if you don't explain how it works, but there is a definite advantage of that; only the people who can figure it out will be giving me a call. :)

In order for ICSP to work there cannot be any interfering components on the pins it uses I had quite a bit of trouble with this. After modifying the original copper trace design, and rearranging the ICSP pads (but still matching the schematic exactly!), I found that I could not program boards anymore. The easy solution is to remove the capacitor connecting pin 1 and 8, and it works properly now. The component isn't integral to the design, anyway.


References
  1. PIC12F508/509/16F505 Datasheet
Parts

Step 7: The Toner Transfer Process

Laminator in hand, now we need to use it. This is the first step of actual PCB fabrication; everything else was just foreplay.

Finding Suitable Transfer Paper
_______________________________________________________________________


The first step is to print a transfer onto suitable paper. If you are sufficiently bankrolled, you could use the commercial product made by Pulsar Pro , at about 10 cents a sheet, or if you're feeling thrifty you can go the DIY Route, which is free. I don't know why I would even question that, though. Sorry.

Finding the right free paper can be tricky. The two key characteristics are its ability to hold on to the toner when printed on and its ability to release it when heated. One predictor of this is how glossy the paper is; more glossy, better release, less glossy, means better hold. We need a happy medium.

People on the internet will recommend all kinds of weird store brand glossy photo papers that are long discontinued, or have to be imported from overseas. Some people have had success using the waxy backing on shipping labels, suggesting you buy them and then peel off all the labels(or use all the labels and then save up the backing). Moreover, most papers are associated with the need to rub and peel and soak the boards just to get the paper off.

Forget that. If I am going to compromise it has to be actually free, not just less expensive than the real thing. I have tried many, many things. As it turns out, it was a piece of junk mail that did the trick; a Menard's coupon mailer gave me the best results out of everything. Eventually I stopped getting the junk mailings, and they only had a few strangely sized pages each, so I had to find a more consistently available paper. But I knew where to start. The best analogue so far are those glossy Apartments For Rent listings they have at the grocery store. Check out the free literature rack for something similar. It works remarkably well; it prints without toner loss, and when you run it under hot water, it releases instantly. Presto!

The paper is too thin to run through the Laser printer by itself, so you need to make a carrier out of regular white paper by folding over and creasing the top of one side.


The Laser Printer
_______________________________________________________________________


At this point I should mention the printer itself. For the most part, your final resolution, board quality, and minimum feature size is limited by the resolution of your printer. In all other respects, any black and white laser printer will work as well as any other. Toner density should be set to the maximum level, and hopefully you have a printer that has a single-page slot in it so you can just feed the page in by hand.

You could even use a photocopy using a regular inkjet as the source if you can figure out how to load your special paper; any toner based method will work.

One caveat, that I discovered too late: the standard Brother brand toner reputedly melts at a higher temperature than other kinds of printers, so I had to get an off brand refilled cartridge that uses a more common toner to get consistent results. So far so good, though. It was a cheap fix, given that I specifically had to buy the off-brand stuff.


Transferring the Pattern to the PCB
_______________________________________________________________________


To prepare the PCB, you will find that you need to have it very clean for the toner to stick to the copper. Even fingerprints will pose a problem in the final adhesion, so wear cotton gloves. Acetone or isopropyl alcoholor even just soapy water and a scouring pad work well,. When it's clean, wipe it down with a lint free cloth and let it dry.

The PCB i have available is thin as far as FR4 goes, at around .020 in (20 mil), and that is exactly what I want. Thinner PCB not only goes through the laminator, but can be translucent Standard PCB

Once the transfer is printed, you need to line up your precut PCB to your alignment marks on the transfer paper, toner side to the copper. Here it really helps to have a light table so you can see though the transfer paper. Fold over one edge of the transfer, crease it, make sure that it doesn't move, and feed the creased end into the preheated laminator. I have not noticed any differences in adhesion based on transfer paper on the bottom roller or the top roller, though I use very thin PCB. You may notice a difference for thicker PCBs.

The technique for double-side PCB is similar, but the alignment is tricky. Instead of leaving a margin on your design to be folded over, you print the patterns for both layers side by side, with a gap that is the thickness of the PCB. The two sides should then line up exactly opposite each other when folder over the PCB.

The board is pulled through about 1/4 " per second. I usually run it though about three times, with no time for the board to cool between passes. Of course, the number of passes will vary quite a bit depending on board thickness, the kind of toner, type of paper, and laminator settings. Cotton gloves also help to remove the hot board from the laminator.

Now to the sink where a stream of hot water is ready and waiting. The paper should peel right off after about 10 seconds, though the finer details will need a quick rubdown to clean off the remaining pulp.

And it's ready to etch!

Tools & Supplies

Step 8: Etch your PCB

Ah, the most immediately hazardous step. This one involves a bit of chemistry, and if done without the proper precautions could be very dangerous. Be careful! You do this one at your own risk, so wear proper protective equipment (goggles, face shield, rubber gloves) and definitely don't do this anywhere near your kitchen. 

It's time to make the magic happen! This is the part where we get to break out that badass etch tank we made earlier and pump out hundreds of circuit boards.

The key ingredient for this to work is some kind of etchant. As I mentioned before, I decided on CuCl2 (Cupric Chloride). It is reusable, very cheap, and can be made from readily available chemicals. It is a very good alternative to Ferric Chloride, a common hobby etchant that is not easily regenerated and is quite expensive for a one time use product. Surprisingly, it is fairly commonly used in the PCB industry, as much or possibly even more so than Ferric Chloride.

The Chemistry
_______________________________________________________________________


Regrettably, There is just not enough space here to go into any major detail on the chemistry, and this is covered in far greater detail in the those two links so I will breeze over most of  it. Suffice it to say that the articles referenced at the bottom of this step should be your primary resources.

Simply put, given the right amounts of oxygen, HCl (Hydrochloric acid), copper, and water, we will have a perfect amount of etchant.

The reaction we want to happen is:
Cu + 2 HCl + H2O2  -->  CuCl2 + 2H2O

The copper comes, initially, from the circuit board itself. Hydrochloric acid is commonly available as a pool cleaner, sold as Muriatic Acid. Mine can as 31.45% (20 degree Baume, or 10.01 Molar). Hydrogen Peroxide can be found in higher concentrations at health food stores. You want 35% Food grade (11.6 Molar); the 3% kind you get in the first aid section just won't cut it. You also need a jug of distilled water, as tap water is just too impure.

For my 2 L tank, I only need 1.6 Liters of etchant. The ratios in the above formula, and assuming my etchant should be 3 Molar HCl at its final volume, I came up with .48L HCl, .92L H2O, and .20L H2O2 as my reagents. Add the water, then the Peroxide, then the HCl. Always add acid to water, and never the reverse (As the mnemonic goes, "Do as you oughta, add acid to watah [water]"). And do it outside, in a pyrex dish. It will produce heat and fume fairly violently at first, but as you begin to use the solution to etch boards, the fuming will decrease as it turns to Cupric Chloride.

 Note: Do not make the mistake of mixing your etchant in your homemade etch tank. Absolutely do not etch too many boards (side by side) or mix raw copper into your etchant, as i did, especially in an enclosed sealed tank. The reaction will be violently exothermic and fume viscously. It will melt, crack, or break open your etch tank from pressure and heat that is far beyond what is normally produced with a controlled stable etchant. With a sufficient air bubbler, you won't need to mix in the copper initially, anyway. The solution will effectively make itself. 


Etching
_______________________________________________________________________


After mixing the etchant, it is time to etch! If you have built your etchtank carefully, all you need to do is slide the pcb into the clip on the lid and place it in the tank. The etch progress can be observed through the window in the side. The hanger I currently use needs some improvement as the boards need to be turned and replaced off halfway through to etch the part covered up by the clip.
-a
The boards will etch rapidly at first, in under a minute, and as the solution begins to become saturated, the etch times will increase to five minutes or more. Once it becomes unreasonably long, you simply need to add the right amount of acid and/ or run the bubbler for a period to regenerate the solution and decrease etch times. Again, consult the above paper for how to do this properly; it is a very good reference.

When you can see the board is fully etched, remove the lid and pull out the board with plastic tongs. Let the excess etchant drip into the tank, and place the board in a plastic tub to rinse it off. Then it's on to the Scotch Brite pad and some acetone to take off the layer of toner, and the copper traces should polish up to a bright shine.

When the tank is not in use, the etchant should be stored in an airtight glass vessel that will not be used for food, out of the light, and properly labeled. Under no circumstances should the etchant be poured down the drain, as it is both toxic (the high copper content) and corrosive to metals. If you do happen to spill any, or need to dispose of it, the solution can be neutralized with lime, and mixed with concrete for disposal. Be sure to dispose of it properly, according to your local hazardous waste policy! Where I live they have a facility will take in waste like this for free. 

It is O.K. if some of the rinse water ends up in the sink, assuming you do not have copper pipes and that you leave the water running afterwards long enough to flush it all out of the system. I cover and resuse even my rinse water, treating everything that comes in contact with the acid as hazardous waste. So don't go pouring anything down the sink, seriously. 


References
  1. Etching with Air Regenerated Acid Cupric Chloride, Adam Seychell
  2. Stop using Ferric Chloride etchant! (A better etching solution.)

Tools & Supplies
  • Safety gear: (Goggles, long rubber gloves, apron, splash shield, etc.)
  • Etch Tank
  • Plastic spill tray
  • Plastic tub (for rinsing)
  • Non-metallic measuring cup or graduated cylinder
  • Acetone
  • Plastic tweezers or forceps

Step 9: Tin Plate the PCB

If you so desire, it is a simple affair to chemically plate a thin layer of tin on the surface of the copper traces. Most commercial PCBs at least have tin plated solder pads in a addition to a soldermask to prevent short circuits over the traces (usually the distinctive green color, though sometimes other colors are used). In our case, however, to prevent corrosion and improve the solderability of joints a tin plating will do nicely.

The Chemical Plating Solution
_______________________________________________________________________


I have gotten very nice results using Tinnit, a powdered "just-add-water" plating solution. It is quite inexpensive at around $10 including shipping, has a 6+ month shelf life, and can plate many boards before needing to replaced (475 mL or 1 pint will plate up to 600 sq. inches of copper). It works by chemically depositing a very thin layer of tin on to the exposed copper of the circuit board. This produces the same result as an electroplating method, and is quite a bit simpler and cheaper.

The copper traces must be clean of oxidation or tarnish as well as etchant before you can plate it. If you just etched it, it should be clean from removing the toner. If not, first you will need to polish it up with a scotch brite pad and give it a quick rinse.

You will also need some way of heating the solution to 50º C and a container to do it in. I was able to come up with a stirring hotplate, which definitely gives me a head start. It's the kind that has both a heater and a magnet mounted to a motor underneath so the solution can be stirred by special glass coated-magnet simultaneously. If you can't find a good hotplate, a kitchen stove will work just as well.


The Plating Vessel
_______________________________________________________________________


The tricky part is finding a non-metallic container to do the plating in. A real lab would some kind of thermal-shock resistant borosilicate glass tray, also known as Pyrex. You'd think you could just use your casserole dish, but that is a very bad idea. What most people don't know is that kitchen "Pyrex" is not the same thing; the Pyrex name is actually licensed by Corning Glass to a company called World Kitchen. They use an entirely different kind of glass, called soda lime glass. It is known to shatter catastrophically when exposed to a temperature differential such as that on an uneven stovetop. So don't do that.

There is a cheap alternative, though. In my research I came across an early Corning product called pyroceram,  marketed as "Corningware." It is not glass, but actually a glass-ceramic, and incredibly reistant to thermal-shock. Real hi-tech stuff, and Corning actually made casserole dishes out of it! You can get them at Savers or Goodwill for under $5.00, complete with lid. Look for the distinctive white color and the "Corningware - Safe For Rangetop Use" label on the bottom.

I also needed a little wire harness to suspend the board over the spinner stir magnet at the bottom of my dish.


Plating the Board
_______________________________________________________________________

Safety Note: Tinnit contains Acidic tin salts, so wear gloves and goggles and don't reuse anything for eating. Follow the warnings on the package. Please!

Tinnit comes as a powder that first needs to be dissolved in hot water. Following the instructions on the back, heat 475mL (1 pint) of distilled water to 55º C (120º F). Once it's fully dissolved, it will be a milky white-yellow color with a few solids floating around. Immerse the board face-up in the solution and give it 10-30 minutes, stirring at 5 minute intervals. If everything has gone to plan, you should see the copper almost immediately start to turn a dull gray. The longer you leave it in, the thicker the plate. Just don't heat it over 150º C (302º F) or it will start to put off weird ammonia and sulfur dioxide fumes.

Once you're satisfied, pull the board out and rinse it off thoroughly. The instructions say to clean it off with ammonia to remove corrosive residues that would dull the board. Window cleaner with ammonia will do in a pinch. Then just shine it up with a scratch free Scotch Brite pad and it's ready to solder!



Tools & Supplies

Step 10: Screen the Solder and Populate the PCB

At this point we have the hard part done; we have a circuit board. We just need to solder on the parts. With a properly made stencil, it is a simple matter of wiping a thin layer of solder paste over board over the stencil and placing the components.

The Stencil
_______________________________________________________________________


Commercial PCB manufacturers use a metal solder stencil, etched out of stainless steel or aluminum for large runs of boards, but you can order them custom cut online out of thick mylar. If you have access to a laser cutter (laser cutter use number two) or vinyl cutter, you can cut your own out of acetate or transparency film. In a pinch, you can even print out your pattern onto a sheet of transparency  film and use an X-Acto knife to cut out the solder pads. Whatever works.

In my case, I had a friend  cut me a stencil out of thick acetate with his vinyl cutter. It took a bit of tweaking to get the settings right, as it is an unusually thick and brittle material to cut; thicker than most vinyls. Eventually we determined that the cutter needed to make at least four passes to cut all the way though.


Applying the Solder Paste
_______________________________________________________________________


For the actual screening, I made a jig out of a piece of thick silicone rubber. I cut out a piece the exact size of the PCB, then I stacked extra PCBs underneath the frame, thereby creating a cutout sunk exactly to the depth of the board. This gives a surface for the stencil to lay flay all the way across and also holds the board in place while the squeegee is dragged across.

Line up your stencil, then tape it down at the top with packing tape.Be sure to be wearing rubber gloves as the solder contains a lot of scary things, in my case, Lead. Scoop out a blob of solder paste and put it either on the squeegee, or at the top of the stencil, above the cutouts. The solder paste should be viscous, but not so viscous that it can't be spread. It's a non-newtonian material, meaning that it holds it flows more easily under pressure, and solidifies somewhat when the pressure is released.

Cheap decent-quality solderpaste and flux can be had from DealExtreme, though you should be prepared for slow (but free) shipping. If the solder paste is old, or simply too viscous, you may need to thin it with flux.

Hold the stencil tight at the bottom and run the squeegee across the stencil, taking care not to lift it off the surface. Repeat until all areas are filled and then carefully peel up the stencil.This part definitely takes practice and you will probably have to make several attempts before you get it right.

Now just place the board on a lazy susan and pick and place the appropriate parts with a tweezers or a vacuum pen. Then it's off to the reflow oven, where you hopefully don't bump the board and spill the parts you just meticulously placed all over the floor and have to pick hairs and dirt off the parts because it stuck into the paste still on them.


Tools & Supplies
  • Solder paste stencil
  • metal or rubber squeegee
  • X-Acto Knife
  • Vacuum pickup tool
  • toothpick or other disposable mixing stick
  • rubber gloves
  • solder paste $3.37, DealExtreme
  • Flux $3.61, Deal Extreme
  • SIlicone rubber sheet
  • packing tape

Step 11: Bake your PCB

Picture of Bake your PCB
Reflow rates.png
IMG_3371.JPG
IMG_3375.JPG
IMG_3370.JPG
completed card05.jpg
Now it is time to bake the PCB! I promise it will be fun.

Programming the Reflow Controller
_______________________________________________________________________


First things first: it is important that the reflow oven is properly configured, or this won't go well. It's all about the set point parameters here. The maximum temperature and time maintained should not be any longer than the most sensitive component can handle, and it is recommended that it actually be 5 degrees lower than that value. In this case, the most sensitive component is, surprisingly the LEDs. The microcontroller can take, based on it's volume, up to 260º C, and the resistors and capacitors have tolerances above that. The LEDs have a recommended max temperature of no more than 225º. The manufacturers were kind enough to provide a reflow slope, so I just used that one.

If your oven is slow to heat up, you may encounter problems near the peak of your reflow ramp. The idea is to bring the temperature up slowly, spike it to "re-flow" the solder, and then drop it off rapidly, but not instantly, to room temperature. So if getting that peak is a problem, you may have to step in and open the door of your oven to  speed of the rate of cooling from that peak temperature. 


Baking the PCB
_______________________________________________________________________


Once you have the oven programmed, place the board in the center of the rack, making sure the thermocouple is near the surface of the PCB so it can get a reading that close to the actual conditions of the solder joints.  Close the door, and start the program. Fire extinguisher nearby, of course.

Wait until the temperature drops to room temp. to take the board out , as it will embrittle the solder joints if they are denied their cooling cycle. 

I should note here that if you do not need to make many, many identical PCBs, you don't really need to go to the trouble of building a reflow oven or screening the solder; it is very possible to solder the parts by hand. You will need a soldering iron with a relatively fine point, however. The trick is to tin on pad on each component, hold it in place with a tweezers (or the vacuum tool) and flow the solder on that joint with the iron. Then it's secure and perfectly aligned to do the other side.
 

Tools & Supplies
  • Reflow oven & controller
  • solder-screened and populated PCB

Step 12: Build a ICSP Jig

In-Circuit Serial Programming (ICSP)
_______________________________________________________________________

Microcontrollers can be programmed a number of different ways. The traditional way of doing this is a Zero Insertion Force (ZIF) socket, where the chip must be removed from its it's circuit board in order to program it. Some chips are capable of In-Circuit Serial Programming, and, as you might gather from the name, the chip can actually be programmed while it is still on its board. This is very important for our little business card, considering it will be a tiny surface mount chip that can't be placed in any normal socket. Further, we will have the ability to reprogram it at will without  the need to desolder it every time.

With the PIC, the programmer puts the chip in a high voltage programming mode and it works surprisingly well assuming the rest of the circuit is relatively isolated from the programming pins.

For ICSP to work there needs to be some way of connecting the programmer to the right pins on the PIC. Most through hole PCB designs use a connector soldered to the board, but in our case we need a cheap, flat solution that doesn't need a connector. That's where the programming jig comes in.


The Programming Jig
_______________________________________________________________________

I had to make several programming jigs over the course of the project, depending on what stage the prototype was in.The first one simply used a scrap prototype board with SMD pads for the IC and wires to the traces coming out of the appropriate pins. Then I just positioned the chip and hold it down with my finger while it is being programmed, taking care not to short out the leads. I also tried placing a magnet underneath the board to hold the chip in place.

The final solution relies on a clever little mechanical connector called a "pogo pin." It is essentially just a spring-loaded pin that makes a good temporary contact against the circuit board. They are a little fragile, but they work very well. It helps if the circuit board was planned with this in mind, as you need contact pads connected to the proper pins. With ICSP it is important to have the programming pins isolated from the rest of the circuit and connected directly to the PIC, since it could disrupt the programming signals.


Building the Improved Jig
_______________________________________________________________________

There are simpler ways of doing this, and certainly lazier ways, but nothing beats a dedicated jig. The one I built uses a hinged transparent lid with pogo pins mounted in the acrylic. The lid locks down with two rows of neodymium magnets and presses the pogo pins firmly down against the programming pads. It also presses the momentary power button, since the PCB layout was changed after the programmer was built; the switch needs to be pressed to connect pin 1 to the programming pad.

The base of the unit uses a scrap chunk of black acrylic and the cover is a a clear piece that helps in lining up the connections when a board is inserted. over the place it needs to bend. The PCB is held firmly in a predictable place with two PCB rails cut to the proper length, and there is a spacer insert that both raises the board up to the right height and stops the PCB in the proper position when it is pushed in. Using a hole saw, I cut a semicircle out of both the pacer and the black frame so that the card can be easily grasped for removal.

For the lid to line up parallel to the rest of the unit it needs to be bent at a slight angle. This is easy to do with a blowtorch. With the lid attached to the black frame on its hinge, run the torch back and forth from about 2 inches away. Take care not to heat it too long or get too close as it will scorch, so practice on a piece of scrap first. When it becomes malleable bend it down over the card guides and until it sits flush against the top of them. Hold it in place until it does not move back, then leave it to cool. Be sure to do this outside or near a window as the plexi will fume as it is heated.

The holes for mounting the pogo pins were drilled into the lid of the unit using a drill press. I made a template for the holes and printed it on transparency film. Slide them in one by one and make sure it lines up with the right pad on the board.  With the lid shut,  press the the pin down to a depth that will push the spring-loaded poker in a little more than halfway in. Then mark the depth with a sharpie and add a blob of solder to either side of the pin. It should not move up and down, add a dab of glue to keep it from wiggling in any direction.

Connect the ICSP wires to the pogo pins with the pogo holders counting from the marked red wire, to these pins on the PIC:

ICSP         PIC Pin

1 .............. 4
2 .............. 1
3 .............. 8
4 .............. 7
5 .............. 6

Once it's complete, connect the programmer, slide in a populated board, and snap the lid down. It's ready to program! Be sure to remove the coin cell battery from it's holder or the programmer is toast; there is no protection on its output pins so any external current will likely destroy it. A simple fix is to put a bumper in the lid of the programmer that would stop the lid from closing if it ran into a battery.


Parts
Tools & Supplies
  • Soldering Iron & solder
  • Power drill or drill press
  • 1 1/4" holesaw
  • Blowtorch
  • #2 Screwdriver
  • Hacksaw
  • Superglue
  • Printable transparency paper
  • Tape

Step 13: Program the PIC

Picture of Program the PIC
POV GEN - waveform.png
code.png
IMG_3728.JPG
PICkit.png
The board now complete, we have only to give it a program to run, and we will be ready to set our creation free into the wild!

The PIC can be programmed either in C++ or assembly language. I chose C++, to mostly to save time, but also because I didn't necessarily want to commit to this architecture, and admittedly, assembly languages are no fun! For simplicity, I developed the board using the DIP PIC12F509, which is pin compatible with the 508. It is also larger and easier to manipulate for testing purposes, and I found that it had more memory than I needed, so I was able to downgrade the chip for the final product.

How the POV Card works
_______________________________________________________________________

The card is off until the momentary on switch is held down. On power up, the program simulates a little rolling ball with a binary counter that rolls in and out with the tilt of the card. After roughly four tilts back and forth, it then switches to Persistence Of Vision mode and cycles through a series of programmed patterns. Currently, it says my name, followed by a neat square wave pattern that acts as a separator, and then my phone number. When the tilt switch closes, the program recognizes that as the start of a wave, and plays the current pattern one time through, then waits until another wave starts. As long as the wave does not double back too soon, and the pattern is not too long, there will be no overlap as the pattern will be blank until it resets.


The Patterns
_______________________________________________________________________


Each pattern is an array of bytes, each byte a column in the sequence. The time that each column (frame) in the pattern is left on and the time between frames determines the speed of the display, and how close the frames are spaced when the card is waved. Basically, it changes the width of the characters and the pattern as a whole. Furthermore, the speed at which you wave the card also plays a part in the spacing, but not enough to make it illegible; since it changes frames at a constant rate, the variation is not enough to matter, but is enough to make it look dynamic. Neat, huh?

To create the patterns, I modified a script I found  written by Andrew Mason. My version is customized to allow for alternate byte formatting and number of LEDS, but the LED placement is fixed, for the time being. You can make any pattern you want, provided it is small enough to fit in the PICs memory. The rate that the pattern plays back at can be changed in the code, as well.
 

The Program
_______________________________________________________________________


The code is very simple. Without PWM or interrupts, there were not very many tricky things I could do, even if I wanted to. Conserving space and optimizing made it a little more interesting, though, given the tweaking necessary to make the code fit in the PICs tiny memory.

To play a pattern, the PIC simply checks for the tilt switch to be activated, then loops through a pattern. It sets the GPIO outputs to the current byte in the array, which represents a frame, waits a set period, then increments the array. Once the pattern has played all the way through, it blanks the display and waits until the tilt switch has been activated. This indicates another wave has started, and it goes through the pattern once more. 

The frame code looks like this, without quotes : "0b00000000,". The 0b delineates a byte and the comma separates each byte from the next. This is all placed inside an array of constants, since it won't be changing during the playback and that will save RAM. Five of the bits in the array indicate an LED output, while one is unused and one is a read-only bit used for the input pin. The bits used are: 0bXX12X543, where the number indicates the pin.
 

The Code
_______________________________________________________________________

#include <htc.h>
#include <stdlib.h>

	__CONFIG(MCLRE_OFF & WDT_OFF & CP_OFF & OSC_IntRC);
const char waveform[] = { /* 0bXX12X543 - sets pin at number, to output high, e.g.: 
0b00100111, complete array code omitted for space; see attached .c file for complete code */ };
const char binary[] = { /* code omitted */ };
const char name[] = {/* code omitted */};
void init(void) {
	OPTION = 0b01000111;
	//sets pin 2,3,5,6,7 output, pin 4 input
	TRIS = 0b00001000;
}
void display_roll (const char p[], const char pattern_length) {
	char i = 0;
	for (unsigned int j = 0; j < 350; j++) {
		//plays pattern forwards or backwards depending on tilt
		if (GP3 == 0 && i < pattern_length) { i++; } else if (GP3 == 1 && i > 0) { i--; } 
		GPIO = p[i]; //sets LED outputs to current frame in current pattern
		_delay(16000); //frame delay in number of cpu cycles
	}
}
void display_pattern (const char p[], const char pattern_length, const char loops, const char speed) { 
	for (char i = 0; i < loops; i++) {
		//exits display either at swing restart
		for (char j = 0; j < pattern_length && GP3 == 1; j++) {
			GPIO = p[j];
			//frame delay in multiples of 10 microseconds :)
			for (char k = 0; k < speed; k++) { _delay(40); }
		}
		GPIO = 0b00000000; //blank output so pattern doesn't overlap while swinging back to start
		while (GP3 == 1); //if still waving, wait until swing restarts and switch contacts 
		_delay(5000); //lazy debounce
	}
}
void main(void) {
	init();
	display_roll(binary, 31);
	while (1) {
	/* function variables are: pattern name, length of pattern (in bytes/frames), 
	number of loops, speed of display/framerate */
		display_pattern(name, 69, 110, 25); 
		display_pattern(waveform, 71, 100, 25);
		display_pattern(number, 61, 110, 25);
	}
}
Programming the Board
_______________________________________________________________________


All code was written in Notepad++, an excellent free multi-language editor. You will also need the MPLAB IDE with a copy of the HI-TECH C Compiler. Both are available in free versions.

You will need a copy of Microchip's PICKit 2 programming software. With the chip connected and the iCP01 plugged in, set the device family to "Baseline" and select PIC12F508 from the device dropdown. Then load the hex file and press the write button.
 

References
  1. PIC12F508/509/16F505 Datasheet
  2. Hi-Tech C 9.81 Compiler User Guide
  3. POVgen online LED Pattern Generator
  4. Hi-Tech C Compliler
  5. MPLAB Integrated Development Environment

Tools & Supplies
1-40 of 111Next »
jermncoco made it!3 months ago
Here's mine
temp_937473868.jpg
jermncoco3 months ago
I have a typo in the code, the second command in Iter2 should be movwf 13h
jermncoco3 months ago
One more thing, if you add or subtract values from the Tables for your own version, don't forget to modify the jump values accordingly
jermncoco3 months ago

I rewrote the code from scratch in Assembly. I don't know how to properly share it, so if this is incorrect, I sincerely apologize. It didn't keep the format for the comments

If you keep the schematic in the same order, the hex values for output are as follows:

GP2 [ ] (Top LED) 04h

GP1 [ ] (Second Down) 02h

GP0 [ ] (Middle) 01h

GP4 [ ] (Fourth Down) 10h

GP5 [ ] (Bottom LED) 20h

Simply add them together to get your pattern :-)

; Code for POV Business Card
; Set up for the PIC12F508
; ASM source line config statements
; This SetUp works for both the '508 and 16F84A

__config 3FFAh ;_CP_OFF & _PWRTE_OFF & _WDT_OFF & _RC_OSC

org 0
movlw 08h ; Put 0000 1000 into W
movwf 06 ; Load Tris file. Make GP3 input. Others output

Table1 addwf 02,1 ; Create jump for Table1
retlw 08h ; End of Table in Reverse, Doesn't output anything
retlw 30h ; going Forward
retlw 20h
retlw 37h ; J
retlw 00h ; Space
retlw 37h
retlw 25h
retlw 25h ; E
retlw 00h ; Space
retlw 37h
retlw 05h
retlw 27h ; R
retlw 00h ; Space
retlw 37h
retlw 25h
retlw 25h ; E
retlw 00h ; Space
retlw 37h
retlw 01h
retlw 37h ; M
retlw 00h ; Space
retlw 06h
retlw 01h
retlw 37h ; Y
retlw 00h ; Space
retlw 00h ; Space
retlw __h
retlw __h
retlw __h ; Omitted
retlw 00h ; Space
retlw __h
retlw __h
retlw __h ; Omitted
retlw 00h ; Space
retlw __h
retlw __h
retlw __h ; Omitted
retlw 00h ; Space
retlw __h
retlw __h
retlw __h ; Omitted
retlw 00h ; Space
retlw __h
retlw __h
retlw __h ; Omitted
retlw 00h ; Space
retlw __h
retlw __h
retlw __h ; Omitted
retlw 00h ; Space
retlw 0FFh ; End of Table

Table2 addwf 02,1 ; Create jump for Table
retlw 08h ; End of Table in Reverse, doesn't output anything
retlw __h ; going Forward
retlw __h
retlw __h ; Omitted
retlw 00h ; Space
retlw 24h
retlw 37h
retlw 20h ; 1
retlw 00h ; Space
retlw 37h
retlw 21h
retlw 31h ; 6
retlw 00h ; Space
retlw 25h
retlw 25h
retlw 37h ; 3
retlw 00h ; Space
retlw __h
retlw __h
retlw __h ; Omitted
retlw 00h ; Space
retlw __h
retlw __h
retlw __h ; Omitted
retlw 00h ; Space
retlw __h
retlw __h
retlw __h ; Omitted
retlw 00h ; Space
retlw 37h
retlw 24h
retlw 37h ; 0
retlw 00h ; Space
retlw __h
retlw __h
retlw __h ; Omitted
retlw 00h ; Space
retlw __h
retlw __h
retlw __h ; Omitted
retlw 00h ; Space
retlw 0FFh ; End of Table

Delay movlw 2Ah
movwf 0Dh
DelA decfsz 0Ch,1 ; Delay of 40,000 cycles
goto DelA ; Allows the entire name or phone number to be
decfsz 0Dh,1 ; displayed over a 2 sec wave. Play around with
goto DelA ; it for different timing
retlw 00h ; Adjusted in main part for different timing

Iter1 incf 10h,1 ; Increment table entry
movf 10h,0 ; Then put jump value into W
call Table1
xorlw 0FFh ; If end of table
btfss 03,2 ; Bit 2 of file 3 will be Set, won't output value
movwf 06h ; Output Table value to LEDs
btfsc 03,2 ; If bit 2 of file 3 set, with automatically return
retlw 00h
call Delay ; Pauses long enough to see it
decfsz 11h,1 ; Iteration, decrement file 11h
goto Iter1
decfsz 12h,1 ; Second part of iteration, decrement file 12h
goto Iter1 ; Not totally necessary but didn't want to mess
retlw 00h ; up file order lol

Iter2 movlw 32h ; Put last space jump value into W
movlw 13h
Sub2 movf 13h,0 ; Load value of file 13 into W for Table jump
call Table1
xorlw 08h ; If end of table
btfss 03,2 ; Bit 2 of file 3 will be Set, won't output value
movwf 06h ; Output Table value to LEDs
btfsc 03,2 ; Bit 2 of file 3 will be Set, will return
retlw 00h
decf 13h,1 ; Decrement down Table
call Delay ; Pauses long enough to see it
decfsz 14h,1 ; Iteration, decrement file 14h
goto Sub2
decfsz 15h,1 ; Second part of iteration, decrement file 15h
goto Sub2 ; Once again not totally necessary
retlw 00h

Iter3 incf 16h,1 ; Increment table entry
movf 16h,0 ; Put jump value into W
call Table2
xorlw 0FFh ; If end of table
btfss 03,2 ; Bit 2 of file 3 will be Set, won't output value
movwf 06h ; Output Table value to LEDs
btfsc 03,2 ; Bit 2 of file 3 will be Set, will return
retlw 00h
call Delay
decfsz 17h,1 ; Iteration, decrement file 17h
goto Iter3
decfsz 18h,1 ; Second part of iteration, decrement file 18h
goto Iter3
retlw 00h

Iter4 movlw 29h ; Put last space jump value into W
movwf 19h
Sub4 movf 19h,0 ; Load value of file 19h for Table jump
call Table2
xorlw 08h ; If end of table
btfss 03,2 ; Bit 2 of file 3 will be Set, won't output value
movwf 06h ; Output Table value to LEDs
btfsc 03,2 ; Bit 2 of file 3 will be Set, will return
retlw 00h
decf 19h,1 ; then decrement table entry
call Delay
decfsz 1Ah,1 ; Iteration, decrement file 1Ah
goto Sub4
decfsz 1Bh,1 ; Second part of iteration, decrement file 1Bh
goto Sub4
retlw 00h

Start bcf 03,2 ; Clear Bit 2 of file 3
btfss 06,4 ; If GP3 = 0
call Iter1 ; then call Iter1 for forward name
btfsc 06,4 ; If GP3 = 1
call Iter2 ; then call Iter2 for backward name
movlw 7Dh ; Load new timing value for delay
movwf 0Ch
call DelA
bcf 03,2 ; Clear Bit 2 of file 3
btfss 06,4 ; If GP3 = 0
call Iter3 ; then call Iter3 for forward number
btfsc 06,4 ; If GP3 = 1
call Iter4 ; then call Iter4 for backward number
movlw 7Dh ; Load new timing value for delay
movwf 0Ch
call DelA
goto Start
End

Most detailed instructable on POV. Thanks!

muscleflex1 year ago

still no video?

Fayezslim2 years ago
Plz upload the hex file for downloading it plz
AMB_22 years ago
There are controllers specially designed to transform domestic ovens into reflow ovens, you can find them in n_electronics (www.nelectronics.org), adafruit (www.adafruit.com) or drotek (www.drotek.fr).
sponges (author)  AMB_22 years ago
Saw those! Mine was an order of magnitude cheaper, though.
danm_daniel2 years ago
definitely the most comprehensive instructable ever
Really Cool! Complete end to end home based production! Well impressed. I think everyone have some that they can take away, even if they do not do home production. Well done!
cstewart0002 years ago
Wow man, great instructable!!!
Hey,

First of all, amazing -ible!

Just curious as to where you sourced the bubbler wand; whether a standard pet shop aquarium wand will do or if you need something a bit more robust! Also, would there be anything stopping you from drilling a row of holes in a standard acrylic tube and chemically welding that in directly instead?

again, great instructable!

thanks!

C.
sponges (author)  Young91Francis2 years ago
Hey thanks!

I got that online, but I wouldn't recommend it. The acid embrittled the bubble wand I had pretty rapidly. Acrylic rod would would work great, certainly better. We just need aeration, so lots of fine holes drilled in a tube would be perfect. Good idea actually, I hadn't thought of that.
Hmm, I guess concentrated acid isn't a very popular substrate for aquarium fish ; -)

I wonder if there is a non insidiously tedious way of drilling lots of tiny holes in acrylic round rod. Could it be done on a laser cuter with a small enough kerf somehow (I don't have much experience with them) ?
sponges (author)  Young91Francis2 years ago
A drill press and a vice would do it better and faster.
maeth3 years ago
May I suggest to use Liquid Tin instead of Tinnit.

I have found it much much easier to use, no mixing or heating needed.
Works faster too.
It is more expensive though, but has lasted me a while.

Great work, I am actually making a similar POV to teach others to make PCBs on their own.
sponges (author)  maeth3 years ago
That's a good tip. Tinnit has problems with oxidation, though it may be my neutralization procedure that is the problem, and not the plating composition itself.

Thanks and good luck!
I have been using an electric skillet set to 350-375 and just moving the boards off to a bit of wood as soon as the solder paste all melts. I think as long as your components sink heat at about the same rate that is an easier approach. I did have problems with some boards with large-ish surface mount caps. The LEDs might have melted before the caps were soldered. I solve that problem by using the hot plate in two passes.

Do you think there is a danger with my method of cooling too fast and having some ill effect? It sure is easier.
sponges (author)  dustinandrews3 years ago
The ideal reflow lasts peaks only for a few seconds. Take a look at the reflow curve in step 11. Of course there's a danger; theoretically and practically, the lifetime of the components will be compromised. The question is, by how much, and is it worth your time?

If you are making a thousand of something to tight tolerances, then the failure rate and inconsistency are unacceptable, and it's worth the time. If you are making 10 of a thing, and have the time to QA every one, then the skillet is probably easier. If it works, it works.

My setup is probably overkill for most home SMD projects. I'd even say it was overkill for my projects. :) As it's been said before, overkill is a way of life.
That is just plain cool.
I find a zip top bag with a needle hole in the corner works great for applying solder paste. If you do big runs, a stencil probably saves time. For a few boards at a time I think I spent less total time and effort with the "icing" method. A suitably sized needle on a syringe is also said to work well.
Dkauf02084 years ago
Hey vey nice project... just a question, why you set the Option Register to "0b01000111" ?
I took a look at the 12F508 Datasheet, but didn't get it.

Thanks & Congrats !
sponges (author)  Dkauf02084 years ago
in the Pic12F508/509/16f505, you want page 24, section 4.5. The option register sets up the internal timer and "wake up on pin change" functions. They are useful functions, but not used in this application. In this case, these settings are mostly there just to disable those features.
all right then... thanks for your quick response !!

Cheers,
sponges (author)  Dkauf02084 years ago
p.s. thank you :)
Taoiseach4 years ago
I live in Ireland, and, for the most part, we don't have Toaster Ovens (Actually, when I saw the picture, I thought it was a Microwave, which could have ended badly). Could you recommend an equivalent appliance I could use? Cheers.
Hey, Argos do actually sell toaster ovens (search on their website), although they only go up to 230C (allegedly - the picture actually shows 400F as the max, so may not even be 230C). I am quite interested in picking up a cheap toaster oven for some SMT work, if you have found anything workable in Ireland please let me know!
sponges (author)  Taoiseach4 years ago
That's a weird question! I have no idea what the equivalent is over there. Lots of things would work; it just needs a metal enclosure and some kind of heating element. The risk is always how safe you could make something that heats to up to 300 C. What we call a toaster oven is capable of that just as a matter of course, and so is very safe.

You might be able to take a regular vertical toaster with side heating elements and place it on it's side. I don't know how hot those can get, but it may be close. It would need to be sealed with a door somehow. And you'd need to find out what the regular operating temperature and wattage was so you didn't exceed that and start a fire.

Also, if you don't need your design in massive quantities, you can just go over the board with a hot air soldering gun and get similar results. Even a regular pen type soldering iron works, with practice.

Just don't do anything I wouldn't do!
that sounds like a "oops - i kinda set the kitchen on fire making a business card," incident waiting to happen.

:)
sponges (author)  rthrockmorton4 years ago
I agree! This is kind of dangerous. :D
Thanks, you've been very helpful. I'll see what I can do with a regular toaster, and if not, like you said, just solder manually. Thanks!
Question:

How come you guys bake potatoes? make pizza, toast bread cheese and tomatoes, bake frozen chiken, pre-heat hotdog buns, broil a bunch of half garlic and olive oil, bake tomatoes, hot sandwich, etc?
You mean how do we? The magic of the oven grill. Same principle as the above, only attached to an oven and a hob, which would make the whole thing terribly awkward and expensive to use as a reflow solder oven. Basically, the Toaster Oven above is to the Double Oven, what the Hotplate is to the hob.
Interesting. Here in USA we can buy one oven toaster like that in hundreds of department stores, like WalMart, Target, etc. They ALL are manufactured in China and you can buy then from 10 to 40 US Dollars. If you have electric stove, probably you may have available to sell the heating elements. Here we use a coiled resistance, electrically isolated, that heat to a point (if you want) to get really red and heat the pan over it. The pan really sits over the element. There 3 or 4 sizes of those heating elements, the second size, the most common around, is for 900W, if I remember well. They feed on 220Vac. In the past I build a SMD reflow solder oven using a toaster, but I was thinking to build another from scratch, stainless steel box, thermal insulation another box inside, fans, a sliding tray for the SMD boards, may be even a metalic belt for automation. Using those stove elements is easy, just one on top, another on bottom, the PCB in middle, 20 to 30mm distant from the heaters. The oven I build 3 to 4 years ago, you may find it at http://www.ustr.net/smt/oven.htm and http://www.ustr.net/smt/ . My process is much simpler than the posted here, since I use a microcontroller already programmed with the temperature profiles and the temperature is captures from a real small circuit board inside the oven, so it is not "air temperature", is an electronic circuit board temperature. Cost much less, since all the electronic control is made with less than $10. One day I need to publish that circuit and software.
Skulldog4 years ago
cool cool now make mine to fit in my body so i wont lose it - but then again it the way it looks it would be a crime to set down.
beckettman4 years ago
I am working on my own card and encountered a problem with Hi-Tech C version 9.81. For some reason they do not have a declaration for "TRIS" in the header files. They will probably fix soon but in the meantime you just add this declaration before the main body of the code:

"volatile control unsigned char TRIS @ 0x006;"

Thanks for the instructable. Great Idea!!
sponges (author)  beckettman4 years ago
There's always something... Yes, I forgot to mention that the default device specific header files are sometimes lacking. I also had some problems when they changed their formatting on legacy devices for the PIC12F508/509 in the latest version of MPLAB. Thanks for catching that!
Supernewby4 years ago
This is very cool. You've got some serious creative skills thinking of and making a such a uniquely awesome business card.
1-40 of 111Next »