Laser Cut Kapton Soldermask Stencil

As part of my ongoing development of the TB6612FNG motor control board, I have created a laser cut Kapton soldermask stencil. In this post, I will first discuss the method of producing a stencil vector drawing from KiCAD. Next, I will discuss the issues that come up with improper settings when cutting Kapton. Finally, I will discuss the laser CNC settings required for cutting it properly.

KiCAD Settings

It is quite easy to generate the soldermask layer from KiCAD as a vector image. To do so, go to File->Plot and select the settings circled in the picture. The file needs to be saved as a DXF (a commonly accepted vector format). Don’t bother plotting anything besides the soldermask you need, the extras will just junk up your folder. Before you plot the file, make sure that the soldermask settings are appropriate. The 0.02mm offset I use is great for this application. If you need to change your settings, you should do so in the design rules of your document.

From there, you need to touch up the vector image. Open the DXF file you created in your favorite vector graphics tool. I prefer using LibreCAD, but the laser CNC I am using requires the use of Adobe Illustrator. The vectors must be colored pure red (#FF0000), and the line width set at 0.001 pt. Then, the file is sent by printer drivers to the CNC machine.

Material Prep

Kapton is a fun little polymer to use. It starts out with a handsome orange color, and can be purchased on convenient rolls. Sadly, the very thin Kapton sheets required for making screens tends to curl after being on these rolls. Therefore, we need to flatten it. Additionally, placing the thin polymer on the metal bed of the laser CNC is unwise, as the heat from the laser ablating the metal could cause portions of the film to melt. To remedy this, I taped my Kapton to some scrap plywood.

Kapton should be taped to a rigid material

This changes how we use our material in the CNC. In an ideal world, we would just tell the machine how thick our material is, and it would adjust the settings appropriately. In reality, we need to work with the optics of the laser. The “material thickness” the machine asks us to enter is not true thickness. Rather, it wants to know the correct focal length for the laser to reduce kerf as much as possible. So even though I am using 0.1 mm thick Kapton, my Z-axis adjustment for thickness is ~4 mm. We would not want a laser cut Kapton soldermask that thick, it would apply too much solder.

First Cut – Using Defaults

The laser CNC I use is a ULS 60W CO2 machine. These machines come with a library of common materials and the required settings for each. Unfortunately, Kapton (or any polyimide for that matter) is not available in this library. Therefore, we need to get a starting place. I chose to start with the settings for another material and see how that performed. These settings were:

  • Power – 90%
  • Speed – 30%
  • PPI – 500

The result was ugly. The laser cut through the material vigorously. Edges of the Kapton are charred and curled. But is this good enough?

A gross laser cut Kapton soldermask

Taking a look through my 10x loupe, we can measure the size of the holes. The width of the rectangles in the following picture are exactly 1.778 mm in the vector file. Our measurement shows that the width of the cut holes are 2 mm. This is unacceptable.

This soldermask stencil melts the features too large

Second Cut

To combat the over-melted cuts in the first attempt, this time I am changing the speed setting. Now it will cut twice as fast, and the laser will linger less on each spot. For those keeping track at home, the updated settings are:

  • Power – 90%
  • Speed – 75%
  • PPI – 500

A slightly less gross laser cut Kapton soldermask

The initial result shows slightly less charring. In the picture, you can see the first cut to the left of the current one for comparison. But will it be enough?

This mask shows better size adherence

Looking through the loupe again, we inspect the feature size. Looking at the same feature as last time, we can see that the width of this rectangle is ~1.8 mm. This is close enough to the proper 1.778 mm that I cannot distinguish differences at this level of magnification. So we are good right? Wrong.

This stencil has issues with close parts merging

Checking another feature, a problem becomes apparent. Two pads of a header have melted unacceptably close together. If we were to solder this part on, the traces might contact each other. Clearly, the localized melting is still an issue, if only for very closely spaced pads.

The Third and Final Cut

For this cut, I lowered the intensity of the laser. Now, it will be cutting at 36 W instead of 60 W. I am also still using the faster cut speed from the second attempt. This puts our final score at:

  • Power – 60%
  • Speed – 75%
  • PPI – 500

A wonderful laser cut Kapton soldermask

I was very happy with this result. The Kapton was still obviously cut, but this time, few of the pieces fell away when I moved the sheet. I had to take a razor to individually pop out each pad. This might seem tedious for complicated boards, but I assure you that this is what we want. If the Kapton is just barely cut, the edges should be less deformed.

With the correct settings, our laser cut stencil allows tightly packed features

When we look at the pads which had issues last time, things seem to have turned out better. There is a clear distinction between the traces. This means that we are more likely to have successful solder paste application. If you intend to make a laser cut Kapton soldermask, I strongly recommend to start with the low settings I have used on this trial.

SMD Strip Dispenser

I was recently inspired to design a 3D printed SMD strip dispenser for small rolls. I designed the part to be compatible with a little roll I found on Thingiverse and fell in love with. The little roll is called the Mx SMD Component Strip Holder. I decided the cute little Mx needed a better way to dispense the annoyingly small parts contained on the roll while keeping the strip material in check, like that how it is done in the Manual SMD Soldering Tray. So I made my own SMD Strip Dispenser Tray for Mx SMD Roll.

SMD Strip Dispenser

I designed the part in OpenSCAD using the original files from Mx as a reference, matching holes and corners. The Manual Tray design was mostly used as inspiration. The original OpenSCAD of that part was not easy to transition without making significant changes. My design uses similar features though.

The strip exits the roll holder and is split by one ‘blade’ of plastic. While the parts in the cardboard strip move through the tray, the clear plastic that covers the parts on the strip is pulled away. The clear plastic is held back by another slit, so it doesn’t get in the way of your tweezers or soldering iron. The parts can be staged on the tray portion of my design for hand soldering. Additionally, the part can be used for (very small) pick-and-place machines.

My future goal for this part is to implement parametric design. One of the advantages of using the scripting style of design found in OpenSCAD is that it lends very well to variables and simple mathematical operations. This means I can, when finished, tell the code to produce a part for any size roll. By making the SMD strip dispenser scale-able, this part could be used to make very inexpensive part trays for full size pick-and-place machines. Why pay hundreds of dollars for a single motorized dispenser if you are only going to do small production runs?

Printing the SMD strip dispenser is easy

And it slips right over the Mx SMD Component Strip Holder

Be sure to check out my design on Thingiverse!

Sugar and Metal

It’s a snow day here, and I’ve been busy on a project.  So this week is a quick, simple post about sugar and metal.  If you ever study metal contents in sugary solutions (in this case, a juice mimic), you should not evaporate your contents.

In our lab, we never processed our waste.  However, we did evaporate the solvents.  One of our experiments was an aqueous mixture of sugar and metal (mostly lead and arsenic).  That solution was left to evaporate overnight with some heat applied.  This was, apparently, a poor decision

Sugar and metal mixture evaporated over heat and caramelized.

As seen in the picture above, our mix of sugar and metal caramelized after evaporating all of the solvent.  As tasty as it looks, eating it might kill you.  So I wouldn’t recommend that.  Instead, the sugar and metal mix just made for an exciting mess to clean up.

So remember kids, if you want to evaporate your solvents, beware of heat. Heating the material too long leads to caramelization of the sugars, and a big sticky mess. In the end, the cleanup produces more waste than the original solution.

TB6612FNG Motor Control Board – Update

A few weeks ago, I posted about a circuit board I designed to use the TB6612FNG motor controller, seen here, and went through the steps of producing the board for prototyping in subsequent posts. Now that I have had enough time to work with the prototype board, I have made some changes to the design which should improve performance.

Diode Protection

The first major change in this design is the addition of flyback diodes to the motor out lines of the TB6612FNG. Schottky diodes were added which protect the circuit from sudden overvoltages going either direction, as seen in the schematic image below. As motors can act as inductors, especially when quickly switching direction, I found diode protection to be necessary. The TB6612FNG chip claims to have protection from overvoltages, but it does not specify the kind of protection it provides. The motors I will be using at times will be running at 12V with some hefty current. Since I want to avoid frying my little controllers, it seems natural to exert control over the situation by adding some diodes.

TB6612FNG Schematics

The diodes I picked for this design are NSR0530HT1G Schottky rectifiers. I chose to use Schottky diodes over traditional diodes as these have a low forward voltage to keep the motor running at speed. Additionally, I chose to use rectifier diodes over signal diodes since I am running motors at 12V. Overvoltage spikes which may occur are expected to exceed this, making the high voltage tolerance of a rectifier worthwhile.

As far as I am aware, most commercial TB6612FNG breakout boards do not include diodes. There is some debate about the necessity of diodes for all motor cases, especially when the controller claims to have built-in protection. If a user chooses to add diodes, it will have to be in circuitry in addition to the breakout board. In my opinion, it is easier to leave off diodes from a board if you don’t think you need them than it is to add them on later when you realize how much you do need them.

Extra Thick Traces

While running the prototype board through its paces, I found that the traces on my original design were too thin. I had one board pop a trace while giving myself a reminder of basic electronics and accidental shorts. So, on this updated version of the board, I have significantly increased the trace width using filled zones. As seen in the picture below, Any traces that will be carrying a load above simple signalling have been given filled zones.

TB6612FNG Circuit Layout

The above image omits the back side copper layer so you can see what’s on the front side. This image also shows off a little artistic flair I added in the top corner. On the front copper layer, there will be a tiny Open Source Hardware gear symbol. I had some extra room, so I could not resist doing something fun.

Electrolytic is now MLCC

The last design change is a bit more minor. I changed the 10μF capacitor from electrolytic to multi-layered ceramic. This change saves some board space. I was taught that for capacitors 1μF and above, I should use electrolytic, and I had never questioned this statement.  I discovered the reason I was told this while doing some light reading on capacitor materials.

Apparently, the idea that the electrolytic caps are better for large charges is a holdover from the dark ages of through-holes and Radio Shacks. The old disk ceramic capacitors could not be reliably produced above this capacitance threshold without great expense. As a result, the less expensive electrolytic capacitors became the standard for these applications. However, there have been lots of advances since then, including the ability to produce small, inexpensive, and reliable capacitors with various materials. Electrolytics are not necessarily better, they just remain in the electronics zeitgeist.

The Files

I hope you haven’t been squinting too hard at those pictures. If you intend to actually make use of my designs, use the real thing. I published this on Github. Grab a copy for yourself here.

Linux PDF Annotation

Lately, I’ve been editing papers with comments from people who only use Adobe on their Windows or Mac. But for us nerds who use Linux, PDF annotations become an annoyance. Sure, we could download the closed-source poorly implemented security nightmare that is Adobe Reader for Linux, but there has to be a better way. While some claim success with Evince and Mendeley, I never had luck with either. Instead, I’ve found 3 different programs that solve the Linux PDF annotation problem for different niches.

Simple Viewing and Editing of Comments

The majority of my Linux PDF annotation requirements are met by Okular. This program has, in addition to other important features such as outline viewing and bookmarks, has the ability to add and read annotations. All of the big ones are there, including insert-able comments, highlighting, and some very rudimentary drawing functions. I made a simple “lorem ipsum” page to show what these look like.

Okular is a generalist for Linux PDF annotation

Everything you need to get started with Okular is available on your apt repository (for Ubuntu users).

Advanced Manipulation of PDF Bitmap

What if you need better quality editing? For this I recommend Xournal. While it is a powerful editor and easily available in apt, Xournal is a tool designed for note taking, not pdf annotation. It just happens that it is quite good at taking notes on PDFs. The PDF files are loaded as a page layer in Xournal and you can use various paintbrushes to add markups to the document. The inclusion of layers makes this program especially suited for making multiple drafts. Below is a simple addition to my previous set of annotations on Okular with some extra colors.

Xournal is excellent for writing on Linux PDF annotations

Exporting Annotations for Printing

While both of those programs are very nice to use, sometimes I don’t want to deal with them. Sometimes I want to just print out a list of the annotations without having my computer opened to the Okular window. Until recently, I had not discovered a way to do this. I was aware that all of that information had to be stored in the PDF format somewhere, but I did not have the experience or time to create anything on my own. Then I discovered Leela.

Leela is an implementation of Poppler (get the Futurama reference?) which scours PDF files for annotations. I found this program when another victim experienced the woes of Linux PDF annotation in an old Arch Linux forum post. The creator (Trilby) wrote a short program to get what he needed from a PDF. He made his code available on Aur, but that doesn’t help us plebs that use user friendly distros. He also posted his code on Github. Sadly, the link to this repository no longer works, since github changed how their old links behave. But I did a little digging, and I found it!

Here is how you can get it. If you just want to download the program as a zip, it might be best to go to the repository page, which can be found through this link. Alternatively, you can do everything through your command line:

git clone
cd Leela/
sudo apt install libpoppler-glib-dev

There may be other dependencies for Leela, but the only one I needed to add to my system was libpoppler-glib-dev, as listed above. After making sure Leela is executable with chmod +x, you can run your first file. I went ahead and added a symlink to the program in my terminal to make my life easier. Here is an example of what is output from Leela when we input the original Okular Linux PDF annotations I made as an example:

Leela is a little known program to view Linux PDF annotations as text

You can see that the output has the output hierarchy of a standard XML file, albeit without the necessary headers to make it a true XML document.  Each annotation includes information for which page it can be found on, where (in terms of pixels) it can be found on that page, the color, and so on.  What we really want to see are the <text></text> tags.  This contains the information from the annotation.  The highlighted area, naturally, contains no text.  It does tell us who made the annotation.  The “ink” annotation does not say who made the note.  Also, this small program does not have the ability to ‘read’ the inked notes.  Who knows, maybe in a few years someone else will get frustrated with Linux PDF annotations and decide to toss OpenCV on Leela to get an OCR variant.  Until then, I will just enjoy what I have.

PCB Prep: cut, drill, and liquid tin

In last week’s post, I discussed a method for DIY PCB etching. This week, I will be continuing in that manner by showing you the final preparation steps I used to get this board ready for soldering including cutting, drilling holes, and protecting the copper with liquid tin.

Cutting and Drilling

Once the boards were completely etched, the holes for through hole parts had to be drilled. These holes were drilled out on a drill press with carbide CNC bits. This part was a challenge, as I did not have a way to punch marks on the copper. Thus, each hole was centered by sight.
Cut and drilled. Good enough for some.
It is much easier to transfer and etch multiple boards onto a single piece of copper-clad FR4 than to do each individually. This is exactly what I did. So once the through-holes were drilled, the individual boards were separated from each other. The FR4 was cut on the shop table saw. As I did not leave much room between the individual boards, I took care to keep the kerf of the blade from touching any copper during the cut.

Protecting the Copper

Copper is a metal which readily undergoes redox reactions in the atmosphere. The copper of a circuit board is no different. If it is left unprotected, the copper will corrode and damage the functionality of the device. Therefore, we must protect it from the atmosphere.

Most PCB fabrication shops apply a mask to the board, covering up all of the leads which do not need to be directly exposed for soldering. The masking materials I have seen are often UV reactive polymers. The etched board is given a thin film of the polymer precursor (often dyed pretty colors, like green), which is then polymerized by exposing the board to intense UV radiation. Unfortunately, we do not currently have any of this material in our shop, so I omitted this step during my fabrication.

Next, in commercially available boards, the contacts are tinned, while the traces are protected by the polymer. Instead of worrying about the pretty polymer covering, the entirety of the copper on my board was tinned as I did not have the luxury of the polymer coat. Tin plating works well to cover the copper, as the tin protects the copper from water vapor while being very solderable (the solders have roughly a ~50% tin content.)While this method is fine for prototyping a DIY board, it is not suitable for end-products. This is chiefly because tin has some odd properties that cause issues with time.

Linguistic and History Aside

The name of the process, tinning, is a throwback to the original method used to protect board contacts, application of a tin solution which coats the copper. These days, there are many possible tinning agents to protect your board from the inexpensive bronze amalgam to the costly solid gold plating.

Back in the good old days (ca. 1650 C.E.) when you wanted tin plate, the tinsmith would dip the entire metal part in molten tin. With the advent of electricity, electroplating was (re-)discovered. This is still a preferred method for many applications. But we want the quick and easy shortcut. So we will use liquid tin.
Liquid tin, nasty stuff.


According to the MSDS, liquid tin is a solution of:

  • Stannous fluoroborate – Sn(BF4)2
  • Fluoroboric acid – HBF4
  • Thiourea – SC(NH2)2

The actual chemical composition is, naturally, not reported by MG Chemicals. There are a few patents available out there for tin immersion solutions such as Liquid Tin, but I make a point of not reading patent literature beyond the title to prevent accidental infringement at a later date. If you wanted to get really DIY, you could probably recreate this solution. Plating solutions follow the same generic formula1. You need a:

  • Metal ion source
  • Reducing agent
  • Complexant
  • Buffer
  • Exaltant
  • Stabilizer

Obviously our metal ion source is Sn(BF4)2 as well as being the buffer source. The acid takes care of the reduction. The thiourea acts as the complexing agent in this case as well as a stabilizer2. All that remains is the exaltant. According to Mellor, an exaltant is a field specific term (I’m guessing based on German) for a reaction accelerator3. While there are several non-toxic organic acids that the makers of liquid tin might use for this purpose, I wonder if the aqueous fluoroborate satisfies this niche.

Back to the Boards

The boards are submerged in the liquid tin solution for a few minutes. As the solution works, rather quickly thanks to our mystery exaltant, you can enjoy the pretty color change from copper to silver. Since the exchange in a liquid tin immersion is surface limited, theoretically you could leave the board in the solution while you work on other things. I was too excited though, so I popped them out right away.
The completed boards.
The boards I made had a white substrate from the copper clad material, so the tin plating doesn’t show up very well in my picture. That’s why I included the picture below of another circuit I tinned that day on flexible Kapton film. The orange really makes that tin pop.
These flex circuits look prettier.


With the board tinned, it is time to solder on the components. Since I’m a crazy person, I solder the SMD parts on by hand instead of using the oven. The result looks a bit ugly, but it is what’s inside that counts. My completed TB6612FNG board is finally complete.
My hand soldered SMD parts may look ugly, but they work like a dream.

Works Cited

[1] B.D. Barker, Electroless deposition of metals, Surface Technology, Volume 12, Issue 1, 1981, Pages 77-88, ISSN 0376-4583,

[2] Cassidy, J. E. and Moser, W. and Donaldson, J. D. and Jelen, A. and Nicholson, D. G., Thiourea complexes of tin(II) compounds, Journal of the Chemical Society A: Inorganic, Physical, Theoretical, 1970, Issue 0, pages 173-175, 

[3] Mellor, B.G., Surface Coatings for Protection Against Wear, 2006, Woodhead Publishing Series in Metals and Surface Engineering, ISBN 9781845691561.

DIY PCB Etching


Today, I will be showing you the DIY PCB etching workflow used in the lab where I am working. In the post last week, I discussed the design considerations for a TB6621FNG motor control board. This post will document how the physical PCB was created.

Previously, when I have wanted to produce a PCB, I used a fabrication service. For low-budget projects or personal projects, I used OSH Park. While this service is very cost effective for small prototypes, it takes several weeks for the board to arrive. In projects with a heftier budget where timeliness was an issue, I have used Advanced Circuits’ barebones PCB fabrication service. But what if the project is low-budget and in need of a quick turnaround? Easy: take fate into your own hands with a little DIY PCB etching!


For this project, you will need:

  • Inkjet Transferring Supplies
    • Inkjet Printer
    • Glossy photo paper
    • Lamination Machine
    • Scissors and tape
  • Etching Solution Bath
    • 1 parts (by volume) Muriatic Acid (12M HCl)
    • 3 part (by volume) 3% Hydrogen peroxide
    • Disposable container made of PE or PP
    • Hot water bath
    • Plastic tongs
  • Acetone
  • Personal protective equipment

Making an Inkjet Transfer

First, you need we prepare our PCB layout for a transfer process. If you are using KiCAD, this is very simple. Go to “plot” your PCB. When the small screen pops up (see image below), the option “mirrored plot” will be grayed out. So first, you must set the plot type to PDF. Then, the “mirrored plot” option will become available.

Note that I have selected to only plot the front layer of copper. Since we can only put a transfer on one side of the board, we can only select one layer at a time. Thankfully, the board I designed is single sided. Note that if you are also etching a back copper layer, you will not need to mirror that plot.

Now, we print four copies of my PCB onto a single sheet of glossy paper. It is important to make more than one copy when you produce a board, as sometimes not everything goes perfectly and you have to throw one of them out.

I wish I had information on the paper I used for this project. Unfortunately, my post-doctoral advisor just found some old stuff that was being removed from the department. The packaging of the ream of paper has no identifying information aside from the 90’s era IBM logo. So, I can’t help you pick the right paper to use. What is important to note about this paper is its glossy photo finish. When the ink is printed onto this kind of paper, the ink remains in a top layer of plastic instead of penetrating fully into the paper. This is thin polymer film is what we will use as the transfer.

Transfer of the transfer

Copper Clad source for DIY PCB etching.

Next, we cut out our prints and tape them upside-down to the copper side of an FR4 board. This material is called “copper clad board”. The material I used in this instance is pictured above. The part number is not available from that supplier at this time, but there are some other versions instead. See here. The type of tape you use does not matter much. I used brown packing tape, but most will be fine. Personally, I would avoid duct tape, because I suspect that would generate gross fumes and make a mess in the next step, but I have no experience to back this suspicion up.

The cheapo laminating machine.

Now, we take the prepared copper clad board and run it through a desktop lamination machine. While other methods for DIY PCB etching might call for a heat gun or hairdryer to affix the transfer to the board, we found that the laminator works best. The board is rotated and passed through the machine multiple times. For our particular materials and equipment, my advisor stated that the transfer must be passed through exactly 7 times, as this is the correct number to affix the transfer to the copper without melting anything.

The printed reverse screen is taped to the copper of the board.

With the transfer on the copper, we give it time to cool down. Once cooled to room-temperature, the board and paper are submerged into warm water. After a moment of soaking, the paper peels off cleanly from the copper clad board, leaving a nice clean transfer.

After washing the transfer paper off.

DIY PCB Etching

Now that our ink has been transferred to the copper clad board, we can begin etching. The etching solution is prepared by a volumetric mixture of 1:3 muriatic acid and hydrogen peroxide in consumer concentrations. Note that these chemicals can be substituted with ~12M HCl and 3% HOOH, should you be in a setting without the consumer versions I mentioned. As always, remember your safety rules. Add acid. This means that you should add acid to the hydrogen peroxide, not the other way around.

One way to accelerate a reaction is to increase the temperature of the solution. Since we are doing this in an inexpensive disposable PE or PP container, directly heating the solution with an electric heater or burner is impractical. Thus, the solution is floated in a hot water bath during the reaction. We used an ice chest which was on hand when we performed this reaction. This high tech etching bath is full of dangerous chemicals, so I recommend putting a lid on the reaction vessel.

High-tech DIY PCB etching bath.

Once you give the solution a few minutes to equalize in temperature with the water bath, you can place the board in the solution. The exposed copper will begin to bubble, and the solution will begin to turn green. After few minutes, the reaction should be complete. Keep an eye on it though. Once the copper is completely etched from the exposed board, remove it from the solution with your plastic tongs and stop the reaction by submerging the board in the water bath. If you leave it too long, the solution will begin to etch the copper you want to keep for the board.

A look inside the high-tech DIY PCB etching bath.


Now that the board is etched and the reaction has been stopped, we can clean up our product. In the image below, we can see that the copper has been completely removed from the exposed areas, but the ink from the transfer remains. This can be cleaned with acetone.

With the copper removed, and the transfer still on.

Use a minimal amount of acetone and a cloth to wipe the board. You may have to do some scrubbing, but the acetone does a good job removing the ink. This process should not be very difficult. Once you are done, you are left with a copper board that is complete.

Acetone washes the transfer ink right off.

Next week, I will be discussing steps I took to make the board from my DIY PCB etching ready for components.

TB6612FNG Motor Control Board


As part of a to-be-announced project I am working on, I ended up designing a new Toshiba TB6621FNG motor control board which is designed to be compatible with the Raspberry Pi. Before I began this design, the lab I am working in had been using controllers based on the Rohm BD6222HFP chip. This is a chip which is well suited to hefty 12V designs. However, we now need something more efficient and less expensive. The TB6612FNG chip is:

    • Less expensive (by ~$1 at single unit scale)
    • Requires more hobbyist friendly supply voltages ( 3-5.5V instead of 6-18V)
    • Provides similar output amperage compared to the Rohm chip.
    • Input current in standby (IIH) averages 35μA less.

    All this lead me to design around the new chip. Of course, breakouts from the usual suspects such as Sparkfun (seen here) and Adafruit (seen here) are available. Adafruit even provides an advanced version which is (in my opinion) over-specialized (see it here). So why did I reinvent the wheel in this case? Because the basic breakout boards are too limited and the advanced version is too limiting.

    Pi Woes

    The GPIO pins on the Raspberry Pi are a wonderful thing. They provide so much room for innovation. However, when you only need one or two specific pins, and those pins are scattered all over the GPIO, it is inconvenient and slightly expensive to design a board with the full 26 pin socket. Instead, selective use of 3-pin servo headers can be used at lower cost. The TB6612FNG motor control board I designed uses this type of design.

    Additionally, there is a problem unique to certain pins of our good ol’ GPIO friend. During boot, pins are not consistently pulled up or down. This can mean that a motor run by these pins may do strange things during boot. If one of those motors is controlling some sort expensive optics as in my case, this is to be avoided. There are a few work around options for this. It is possible to set up a cron job at boot which will set all of the pins to pull up or down, but this may be a challenge to a user with less bash experience. For my project, I need something that allows a user to run the device without worrying about the details. So I implemented a hardware solution. The GPIO pins are pulled down by 100k resistors on my TB6612FNG motor control board.

    An advanced setting was made available to divorce the chip ground from the motor power ground by way of a solder jumper.


    Pictured below is the schematic for my TB6612FNG motor control board. The project was designed with KiCAD.

    TB6612FNG motor control board schematics

    The picture below shows the layout of the board, omitting the back copper plane. I was able to fit all of the traces on one side of the board, so the B.Cu layer is mostly ground plane thermal relief.

    TB6612FNG motor control board copper layout

    Next week, I will show how I made the board.

Okstate LaTeX Dissertation Template

Dissertation Publication

Since my dissertation was recently published (see last weeks post), I thought I would post the template I used to create it. Oklahoma State University does not currently offer a default LaTeX template for a dissertation. Instead, they only offer a Word template (gross!). I took it upon myself to make an Okstate LaTeX dissertation template.

Okstate LaTeX Dissertation Template

Lofty Goals

If you were putting off learning LaTeX, but have a big upcoming task such as a dissertation to write, I strongly encourage you to try it. I hope that by making my Okstate LaTeX dissertation template available to everyone, life could get a bit easier.

Please note that this template is unofficial, so I make no claims that this 100% meets the standards of the graduate college. However, the Okstate LaTeX dissertation template I created was accepted for publication with no issues. I have attempted to make this available through official channels. Sadly, the graduate college matriculation department has not replied to my contact attempts.

Github Link and Invitation

Find the link to the template below. If you have any changes or comments, please feel free to contact me. Additionally, forks of this work are encouraged to improve the material for future students. Outreach and publication are at the core of a doctoral degree!


Dissertation: Development and Applications of Chemical Sensors for the Detection of Atmospheric Carbon Dioxide and Methane

It is a new year, and my dissertation has finally made it past embargoes to publication. Allow me to present: Development and Applications of Chemical Sensors for the Detection of Atmospheric Carbon Dioxide and Methane. You can view the ProQuest entry here. There is a download link to the full text at the bottom of this entry.


Development and Applications of Chemical Sensors for the Detection of Atmospheric Carbon Dioxide and Methane


This is a description of the design of a low-power, low-cost networked array of sensors for the remote monitoring of carbon dioxide and methane. The goal was to create a scalable self-powered two-dimensional array for the detection of these gases in a large area. The sensor selection, electronic design, and data communication was studied and optimized to allow for multiple units to form a self-assembling network for acre-scale coverage with minimal human intervention. The final electronic design of the solar-powered units is flexible, providing a foundation for future field deployable remote monitoring devices. Sensors were selected for this application from commercially available models based on low-power, low-cost, market availability, detection range, and accuracy around the global baseline criteria. For environmental monitoring, carbon dioxide sensors are characterized near 400 ppm and methane from 2 to 200 ppm. For both gases, exertions up to several 1000 pm were examined to mimic large releases. An Xbee mesh network of radios was utilized to coordinate the individual units in the array, and the data was transferred in real-time over the cellular network to a dedicated server. The system was tested at a site north of the Oklahoma State campus, an unmanned airfield east of Stillwater, OK, and an injection well near Farnsworth, TX. Data collected from the Stillwater test sites show that the system is reliable for baseline gas levels. The gas injection well site was monitored as a potential source of carbon dioxide and methane leaks due to the carbon dioxide injection process undertaken there for carbon sequestration and enhanced oil recovery efforts. The sensors are shown to be effective at detecting gas concentration at the sites and few possible leak events are detected.

Reference Information

Subject Classification 0485: Chemistry
0486: Analytical chemistry
0494: Physical chemistry
Identifier / keyword Pure sciences
Carbon dioxide
Enhanced oil recovery
Remote monitoring
Author Honeycutt, Wesley T.
Number of pages 196
Publication year 2017
Degree date 2017
ISBN 9780355396188
Dissertation/thesis number 10276467
ProQuest document ID 1965485293
Advisor Materer, Nicholas F.
Committee members Apblett, Allen W.
Fennell, Christopher J.
Ley, M. Tyler
White, Jeffrey L.
University/institution Oklahoma State University
Department Chemistry
University location United States — Oklahoma
Degree Ph.D.


Here is a download link to the complete dissertation file: Dissertation.pdf

NOTE: This file is a 166.7MB PDF document. Since I am not a rich man, my website is hosted on a slow, inexpensive server. This download may take some time. It may be quicker to download from a library site, but I want to make sure the document is available to everyone.