Monday, November 30, 2015

Cyborging a Cheap Laminator

I decided to take a detour from covering the Ballistic Chronograph and cover some tooling I use for creating my own custom Printed Circuit boards. Having the ability to go from thought, to design, to a working device, gadget or tool is what makes doing hardware these days so fun. In the in the span of a long, lazy Saturday or Sunday, I can build a project that would have taken several weeks or would not be nearly as clean and well packaged.

Compared to how I did this back in the 1980s, the options available for hobbyists and budding hardware entrepreneurs for quick prototyping and one-off designs are vast. From small run, high-quality double-sided, solder masked and silk-screened PC boards from various online companies such as OSH Park and ExpressPCB to the easily available resources for creating one's own PC boards.

I knew I wanted to try my hand at creating projects which use surface-mounted components. The very nature of using surface mounted electronic components means operating at a much smaller scale. Instead of using through-hole integrated circuits in dual-inline packages on .1" centers, surface mounted components are typically 1/2 to 1/4 those sizes. This means that to create printed circuit boards, I'll need to be able to resolve features quite small. Short of going to the multiple step photographic method, I selected the sometimes finicky toner-transfer method.

Toner-transfer uses specially coated paper onto which an image of the circuit board is printed with a laser printer. This is then "transferred" to a cleaned and scrubbed copper-clad board using pressure and heat. I picked up this kit which includes all that is needed except the printer, laminator and chemical etching solution. Yes, they recommended specific off-the-shelf laminators, but why do that when I could modify a cheap laminator for what I need?

After exercising some Google-fu, I found that some folks had successfully converted cheap laminators to work with this process. The problem the cheaper laminators had was that they were not hot enough and ran too fast. They also used cheaper AC synchronous motors and gearing to determine the feed speed. By turning the feed motor on and off at a specific rate, the board would be pulled in, advanced, stop for a moment and then advance again. For the temperature, replacing the thermostat with a much higher value, then a thermistor is used to read the temperature so the heater is then controlled much better.

I picked this one up a the nearest Harbor Freight and used one of their 20% off coupons.

The LCD display is a tiny 16x2 with the normal Hitachi 44780 style interface. It shows the temp, heater/motor status. The knob and switches to the right are the input control. The knob turns a potentiometer that the controller reads to determine the feed rate. The buttons are for programming the set temperature.

I replaced the little button thermostat with one that trips at a much higher temperature. That is just a fail-safe in case the controller stops working.

To control the motor and heater, which are powered by line-voltage (110v here in the States), I used a couple of optically isolated triacs. One of them directly drives the synchronous motor and the other drives a power-triac for the heater. To even further isolate this control circuit from the controller, I placed it on its own board. Here's the schematic for the motor/heater driver board.

This board also includes the interface for the thermistor, R5. It is a 100K NTC, which are very commonly available. In fact these same devices are used with 3D printer extruders. This board is placed under the motor at the power-switch end of the case.

The thermistor is attached to the roller/heater assembly using high-temperature Kapton tape.

The controller uses the Atmega 328p TQFP and is based on the Arduino Uno.

Internal packaging.

There is a little daughter board above the main controller. That is the display interface board. The little displays I found use a thin ribbon cable with an edge connector. This board adapts the dual-row 16 pin header to the surface mount ribbon cable connector.

The control switches are placed on another simple board. They're surface mounted, normally-open, membrane switches. Another little daughter board was made for these. Although it only has 3 switches, I made the board to be able to mount up to 4 switches. I thought I might reuse this design in other projects and adding a forth switch may be useful.
The 5V power supply for the electronics was a small switching "wall-wart" style supply. I broke open the case, gutted the electronics board and then mounted it inside the laminator. It's the board in the photos above immediately to the left of the controller and display.

That's about it for the hardware. The software is rather simple. For the temperature control, I used the Arduino PID (proportional-integral-derivative) library. For the motor control, I coded up a simple slow-speed pulse-width-modulator. The narrower the motor "on" pulse the less it will feed and the longer it will "dwell" on a specific location. Through trial-and-error, I was able to set it to a reasonable setting to fully transfer the toner. It does need some tuning for larger or smaller boards. I've not sent anything larger than a standard post-card size board.

The top-row of the display shows the current temperature and indicators for when the motor is on or the heating element is on. The second row displays the current analog value read from the motor feed potentiometer. Since its not a graphic display, I programmed 5 of the available programmable character-generator characters. By doing that I now had a horizontal resolution of 80 pixels.

The Atmega-328P comes without any bootloader programmed in. The internal fuses are also set to use the internal clock. That is why I always include the ICSP header (SV1 in the controller schematic). Using the AVR Pocket programmer from SparkFun, I can program the controller directly from the Arduino IDE or most other AVR environments. I did, however, have to manually configure the CPU fuses to enable the external crystal and other dividers to match the default Arduino configurations. This is done through the command-line tools included with the Arduino downloads. avrdude is the magic little application which does all the programming and configuration. It supports a variety of programmer interfaces, including the Arduino/AVR serial bootloader, the Pocket programmer, and other more "professional" offerings.

Feel free to ask any specific questions. You can read all about the toner-transfer process of making printed circuit boards over here. Yes, the photographic process is still the best and most precise method of creating printed circuit boards, but there are more chemicals and the need for specific light sources (UV). Pre-sensitized boards are more expensive and come in specific sizes. Making your own by spraying on the light sensitive resist chemical can be tricky to get right, too thick and it's hard to "develop" and too thin and the developer can wash away the resist where you wanted it to be.

With the toner-transfer process. I can precut the copper-clad board to the size I want. Transfer the toner for the etch resist, and etch in a small plastic tub with Ferric-Chloride (FeCL3) or Cupric Chloride. I buy the copper-clad board from the a bin of surplus/reject boards at HSC and pay by the square-inch.

You may be wondering how I made the printed circuit boards for this project since, clearly, the laminator wasn't ready. I used the laminator as it came out of the box. I had to pass the board through about 15-20 times in order to get enough temperature transfer to adhere the toner. Once I finished this project, subsequent boards only take 2-4 passes; even for the larger ones. Since the operating temperature is higher and the motor is modulated, heat is more quickly transferred into the board and remelts the toner adhering it the copper. It also doesn't "spread" the toner as much, which allows for resolving finer details.

The code for this project is available here.