Nov 15

Manufacturing PCBs at Home (PWM Stirplate Example)

NOTE: This is a sort-of continuation of the previous blog.

In any home tinkerer’s lab, you’ll probably find a lot of breadboards/protoboards and miscellaneous prototyping circuits. As a hardware hacker, once you’ve proven a design works, it’s generally worth the time to build something a little more reliable and/or presentable. Thus: Homemade PCB manufacturing. I’ve gotten a few under my belt at this point, and I won’t repeat the gobs of information that is already out there. If you need any information about the general procedure of PCB manufacturing, just do a quick google search (This process is generally referred to as the “Toner Transfer Method”).

I’m going to go through the example of manufacturing (and the challenges) the PWM PCB in my homebrewing related blog entry. This entry serves to improve the reliability and consistency (manufacturability) of homemade PCBs, and personal challenges I faced building my latest PCB. This is a relatively low complexity circuit, so take it for what it’s worth.

Materials/Tools Required:

  • Copper-Clad fiberglass board
  • Laminator/(Clothes) Iron
  • Tape
  • Photo paper/Magazine pages
  • Eagle software
  • Schematic/proven circuit
  • BOM/components (measurements)
  • Calipers
  • Small drill (press)
  • Carbide (opt) drill bits
  • Water/Vinegar
  • Steel wool/scrubbing sponge
  • Muriatic/Hydrochloric Acid
  • Hydrogen Peroxide
  • Tupperware container
  • Nitrile/latex gloves
  • Plastic utensil
  • Table Salt
  • Common tools (Soldering iron, drill, etc)

Pictoral Description/Misc Notes:

  1. Step 1: Design a schematic, Lay it out in Eagle (easier said than done).
    MAKE SURE THE ORIENTATION IS CORRECT. I etched a few boards that were useless due to mirroring issues. When you work in Eagle, if you work in SMD, just route it (and flip parts) to the opposite side. Print non-mirrored if this is the case.
  2. Tile (optional) and print out the laid out circuit with a laser printer. A major caution: Not all laser printers are created equal. I own a Brother laser printer and a Dell printer. The Brother is significantly cheaper to operate, but the toner sticks to all types of paper I’ve tried much better than the Dell. In PCB manufacturing, this is a nightmare. I’m not sure if the laminator I used wasn’t getting hot enough, or what, but I will be continuing to use my Dell printer here. Note: At the time of writing, I am using OEM toner in both. If I run out of toner in my Brother printer, I’ll try again with 3rd party toner and update this post if it works well.

Note: Paper choice is a tough call. I’ve used magazine paper in the past with some success. Photo paper (and other options) are also popular. I’ve been using Photo paper with great results, but none of the options I’ve tried worked well with my Brother printer.

  1. Cut out the printout, tape down to the copper clad. It is a good idea to shine the copper clad and ensure the surface is clean before attempting to transfer the toner.

  1. Traditionally, hardware hackers use a clothes iron to get the toner hot enough to melt and transfer to the copper. In recent years, many DIYers have switched to using inexpensive laminators to reduce the effort and consistency in toner transfer success. Clothes irons (especially cheap ones) have generally poor control over heat application and pressure. Laminators have a fixed thickness and roll down on the board with decent pressure. I picked up a GBC brand laminator called the “Inspire.” It looks cosmetically Identical to the H220, which is a highly recommended laminator. Pass the stencil and board through the laminator several times, in multiple orientations.

  1. Post lamination/iron, remove tape. Use care not to peel off the paper too violently.
  2. Dunk the board in some warm water, and let soak for 5-10 minutes. Don’t go short on soak time. Any residual paper fibers will loosen up, and you can rub any excess material off with your thumb.THIS IS IMPORTANT. Any paper residue will slow down your etch (if not outright prevent it!)

(Final “built out” board)

  1. Once you’ve gotten the board cleaned up, it’s time to etch. The traditional approach is to use a Ferric Chloride formula, but Ferric Chloride is very harsh chemically, is difficult to dispose, and is hard to find. A popular new etchant solution is available using common household materials. That, and I didn’t want to get FeCl matter all over my hands. (Engineer/Chemist/Wordplay joke woo!)
    Solution: 2 parts Hydrogen Peroxide, 1 part Muriatic Acid (diluted Hydrochloric Acid). You can find Muriatic acid at pretty much any hardware store, it is commonly used to etch concrete. Table salt (supposedly) helps to refresh the process if it slows down. I saw some activity when adding salt, but I’m not sure it makes a big difference.

Stir/keep the etchant moving for vest results. Keep flipping the PCB in order to get both sides exposed/etched.

  1. “Final” product. If you want, you can “tin” the board using solder. This is advantageous in that it will minimize oxidation.

  1. Once you’ve finalized your etch, and checked out all connections, made sure there was no under/overetching, it is time to drill. You can try doing this with a hand drill, but at the diameter sizes of common PCB holes, it’s safer to use a drill press. I’ve seen good results with dremel tools, but I’ve also heard that a lot of drill bits will break due to low precision and tolerance of the “chucks” of the dremel. I considered picking up a cheap drill press from Harbor freight, but it would require another chuck, which would double my overall cost. I found a blog that recommended “Proxxon” tools, so I just made the investment, and picked up a rotary tool, power supply, and drill press. I purchased the version with the adjustable chuck, but I have a feeling it is lower precision than the fixed versions. Prior to this, I had to drive home (to my Parent’s place) and use our old/gigantic milling machine. I would recommend the Proxxon tool to anyone looking at similar solutions, but I’m not convinced it is as high precision as some make it out to be. The drill press attachment is passable.

Above is my awesome dad helping me with the Milling machine. If you require high precision drilling, I don’t think you’ll get much better than a solid drill press with a high precision chuck. A milling machine is a bit over kill…

  1. Picture of a “finished” board.

Note: This is one of MANY revisions of my boards. I don’t think this one actually made it to final production…

  1. Populate boards. I laid these boards out with dual configurations, there are a few versions pictured below. The final version allows for mostly all through hole components, as well as surface mount (my preference). I will probably be releasing primarily SMD/SMT layouts in the future unless there’s significant demand to release through hole. Through hole requires drilling, which is a pain in the ass, but it’s more friendly for people who aren’t as good with a soldering iron.

  1. Case work: Depending on your enclosure, your final setup will probably look incredibly different than mine. If you are “lazy,” and/or want a simple final product, get a large enclosure and use a full fan. 120mm is best, 80mm is fine, 60mm rotates pretty quickly by default, so I would avoid anything 60mm or smaller. If you keep the fan casing (and fan blades), you can just drill and mount directly to your fan. I took a small piece of PVC piping from home depot to make up the difference in the height to my case, and glued a few rare earth magnets (taken from a laptop hard drive) to the top. It’s wise to offset the magnets slightly from the fan hub, as there is a magnet directly below the hub of the fan, and it can cause some problems if your magnets are too close. I’d recommend getting a 1” PVC cap end as depicted below to solve this problem. If you have to offset the fan (raise it up), use some standoffs or spacers/washers to adjust the height. Get as close to the top of your (preferably rigid, and preferably flat) case lid as you can. I’ve also read that using metal enclosures can cause problems, and that the stir plate flat out won’t work, but I haven’t confirmed this throughfirst hand experience. Plastic Hammond cases from digikey or your local electronics surplus store work great for this application.

I superglued two magnets to the top of the PVC spacer. Some people will take a larger single magnet and glue it directly to the top. This works as well, just be aware that most high-powered magnets (from hard drives) tend to be curved, so you may have a hard time finding a good “center of gravity” of the magnet. The nut on top of the magnets was to keep them spaced while the glue was drying.

The “legs” of the fan that were attached to the fan housing were chopped off because my enclosure was smaller than 120mm, and the fan was broken to begin with. Perfect repurposing opportunityJ I superglued nuts in these elbows for mounting to the top of the lid.

  1. A few finishing touches: I used a larger drill bit to scoop out some material and “counter sink” the drilled holes that I created for the top mounted spacing bolts.

Test fitting the board:

  1. Final Product: I recommend leaving long fan leads (if you have removed the fan blades). The reason I left my leads so long was that I don’t have an external potentiometer, so having the ability to remove the lid and make micro adjustments to speed while the fan was still on was a bonus. If you want a clean look, just keep the leads short, or don’t use a clear enclosure.

  1. Circuit in action:

Feel free to contact me if you have any questions/concerns/criticisms, etc. If it needs addressing, I’ll update this post 🙂

Nov 14

Building a DIY PWM Driven Stir Plate for Homebrewing (geek edition)

Disclaimer: Since the tone of this blog is still ill-defined, this isn’t a technical discussion of PWM circuits, nor PCB manufacturing, nor is it strictly a homebrew entry… it’s sort of an awkward in-between.

Introduction/Purpose/Background/Problem Statement (skip this if you don’t care)
This is a two-part blog post. The first blog talks about the concept and theory, and releases DIY build plans for the PWM circuit. The second post talks about the (home) manufacturing of the released files.

As I said before, there’s going to be a lot of nerdy interests that cross-pollinate in my blog, and today, an example of this manifests itself in a DIY (overkill, perhaps) stir plate for homebrewing.

One of the many challenges of homebrewing is having the ability to pitch a healthy yeast culture into your pre-fermented solution (called must [wines] or wort [beer]). An extremely simple summary of the fermentation/brewing process is: Create a solution with sugar in it, and add yeast. The yeast consumes the sugars and releases alcohol as a byproduct. The reality of this simple formula is that if you don’t have a good population of yeast that is added (“pitched”) into your solution, the yeast can become over-worked/stressed, and you may find some “off-flavors” in your final product. The other obvious benefit is that when you have more yeast, your fermentation takes off faster! Thus, many homebrewers [especially those that are brewing high gravity/high-alcohol brews] will make a “yeast-starter.” All a yeast starter does is promote a healthy yeast colony prior to pitching into your solution. This is accomplished by providing an easily fermentable solution in a good environment for yeast. This implies an oxygen/sugar rich environment.

Solution (no pun intended)
Thus enters the “stir plate.” If any of you have taken basic chemistry, you’ve probably worked with one before. You set a beaker or container of liquid on a magnetic platform, and drop a magnetic (generally teflon coated) “stir bar” into the beaker, and the “stir plate” will spin the bar around using magnetic coupling. In a homebrew setting, the stir plate allows for higher oxygen permeation in the solution, which will help “jump start” your yeast starter. Mead, or honey-wine is notorious for slow starts in brewing, largely due to the lack of natural yeast nutrient in the must. I had a mead brewing last year for roughly 9 months, and I still had to stabilize before bottling. I told myself I wouldn’t start another without going through the process with a hearty yeast starter. I’ve got two gallons of honey on my counter, so I figured it’s time to get going…

Design considerations
In a DIY/homebrew setting, it makes little sense to buy a commercial stir plate. A quick Amazon search shows a price range of ~$80-250. The first goal of this project is to beat the commercial price. Many DIY solutions use a computer case fan with a strong magnet glued to it instead of electromagnets, which cuts costs significantly. With this major consideration out of the way, the only real problem left to solve is speed control. There are three (in my opinion) solutions to the problem, all with their respective Pro/Con lists.

  • Solution 1: Simple Potentiometer circuit
    The Potentiometer (sometimes referred to as a “Rheostat”) is simply an adjustable resistor. We abuse this property and essentially create a variable “voltage-divider” circuit <LINK>. At the output of the circuit, this just provides an adjustable voltage output.
  • Solution 2: LM317 (or other variable voltage regulator) circuit.
    The LM317 is designed to be used as a voltage regulator. You can tune the output with a few passive components. Since you can change the output on the fly with a potentiometer, we use the pot to create a variable/controllable voltage regulator to use instead of the potentiometer.
  • Solution 3: Pulse-Width-Modulation (PWM) circuits.
    A PWM circuit basically operates by pulsing full power to the output in varying widths per time period. This is most easily explained with a graphic <LINK>. As you vary the output, the full power is applied to the circuit in varying pulses. At 100% on, the circuit remains powered all the time, at 50%, the circuit remains powered about half the time, and so forth. This is used commonly in controlling LED brightness, and of course, to control the speed of fans.

For a hardware “hack,” any of these solutions is sufficient, depending on your needs. They will all provide some sort of speed control to a fan, and thus, your stir plate. One major consideration in a DIY stir plate design is that lower speed control is generally considered to be pretty desirable. This is to prevent violent torque on the stir bar, which can cause the stir bar to be “thrown” out of its rotation origin. One problem in the inherent design of a case fan is that there is a hard “cutoff” voltage where the fan ceases spinning. The potential applied to the fan motor cannot overcome the resistance/friction to torquing the fan, thus, extremely low speed control is not possible ONLY by lowering the voltage. The first two circuits (potentiometer/LM317) are capable of regulating/outputting low voltages, but if a case fan can’t use them… well, you’re SOL.

The other disadvantage to both the LM317 and potentiometer circuit(s) is that there is considerable power “wasted” due to the design of these two circuits. Much of the power used is translated to heat via resistance and/or powering the regulator. Finally, the biggest disadvantage to the simple potentiometer design is that it has a very weak load driving capability (with a standard Pot). The LM317 will be able to power a much larger load (read as: daisy chained fans/stirplates/etc).

The power and drive capabilities in this context aren’t really that important, but are worth mentioning. To me, the major differentiator of the PWM circuit is that it is capable of driving the fan at a very low rotational speed. This is generally desired in the stir plate setting. While it’s pretty “cool” to get a very tall vortex going in a solution, this isn’t required (nor do you benefit from it very much) when making a yeast starter. A slow swirl is all you really need (and possibly want).

Problems with the PWM circuit
The obvious downsides of the PWM circuit is: complexity/cost(/noise). There are more parts required, and this often means the hack-oriented DIYer shies away from building one. I’ll be providing free schematics, board files, and a straightforward Bill-of-Materials (BOM) at the end of this blog entry. This drives up the cost of the PWM by a few cents (dollars?). The other problem with PWM that people experience is that you might hear a low humming, or “knocking” noise while the circuit is in operation. This is due to the (relatively) sharp waveform edges. You are actually hearing the fan “knock” as it is turned on and off rapidly. The simple solution for this is to put a capacitor in parallel with the output transistor. This smooths out the characteristic of the square-ish waveform.

Summary: If you are looking for cheap and dirty, skip the PWM, the potentiometer will probably work in an “acceptable” fashion for you. I run my stir plate at a fixed speed for the most part anyways, if you can get it down to running in the ~5-7V range, good on ya. You can always gut a larger diameter fan for lower rotational speeds, too.

Since this IS an “overkill” PWM circuit, I will be making a separate blog post about the build process and PCB manufacturing. (Next)

Design consideration note: While I’ll be releasing the PCB, I should note that I personally don’t actually care about on the fly speed control. The Potentiometer on my board (which controls duty cycle) is mounted internal to the case. This implies that I am making a fixed-speed board for myself. You can wire a case mounted Pot if you desire.

DISCLAIMER NOTE: As this isn’t strictly an engineering/homebrew/geeky manufacturing blog, there’s a lot of details missing in the overall theory of operation and/or brewing. Please visit the links in the references section if you are curious about filling in the gaps.

The continuation of this blog post will be talking about the manufacturing of the circuit.

Release notes:

Attached .BRD/.SCH/Extremely sloppy BOM. Note that these files are more for self-reference than anything else. If you are actually looking to build this, feel free to drop me a line, I can clean these files up if they’re of any interest to anyone.


Rough Bill Of Materials:

  1. C1,2,3: .22uF – ~$0.08 ea – QTY 3
  2. B3F Switch: $0.35 – QTY 1 (OPTIONAL –> DEBUG)
  3. DC Power Jack: $1.11 (Choose your favorite, foot print is of common board mount)
  4. 555 timer (SO-8 OR DIP-8) – $0.40-0.55
  5. Potentiometer/Trimmer: 100K OHM –  $1.63
  6. Rectifier Diode(s): 1N5819 – $0.53 ea – QTY 2
  7. Resistor: 10K Ohm – $0.10
  8. Power Mosfet: FD 3055 (or compatible. I just had this lying around) – $0.78
  9. Smoothing Capacitor: 100-470uF – Tantalum SMD or any small pitch cap. – $0.50
  10. Fan header: PC Fan Compatible (salvage or buy) – $0.25
  11. Copper Clad PCB OR Protoboard: ~$3.00
  12. PC Fan: Free – $5.00
  13. Enclosure:Free – $10TOTAL

    : ~25 + shipping (worst case). Mine cost me roughly … $0.00, but I’ve got a lot of spare parts lying around…

Yeast Starter Links:

Pulse Width Modulation – PWM