PrntrBoard V1 updated with thermocouple interface

After a few idle weeks, I finally decided to order the current rev1 of the TMC2130 board design. I found this web site ( which compares the price of various PCB manufacturers and matches them with your board specifications.

As luck would have it, a day after I sent the files to the board manufacturer (jlcpcb for the rev1), I had an idea of adding thermocouple interface.

Here is the rev2 of the board with dual thermocouple connectors. It should work with MAX31856, MAX31855 as well as the good old MAX6675 chips. All of these are based on some form of SPI interface, and I just added them to the bus.

Because I used all I/O pins, if you decide you need thermocouples, you’ll have to sacrifice the two controllable extruder cooling fans. Most 3d printers come with “always on” cooling fans anyway.

The thermocouple connectors use generic SPI(MISO, MOSI, SCK, CS) + 5V power and GND pins. In theory one could connect other things, with appropriate software patch.

PrntrBoard – bringing it to live May 13th.

In my previous tests my PrntrBoard prototype was having some issues talking to the TMC2130 motor driver chip. It took a while, but I figured out the issue – the SPI library was not initializing correctly, so the chip was using the SPI0, hardware block, while on my board the drivers are hooked to SPI1 pins.

A few configuration settings later and Marlin was booting up, without complaining. In the process of debugging I also created a small test program to control the motor driver. You can see it here.

From that work I found that the motor driver chip was getting quite hot if I set the motor current at 900mA. The default was 600mA – it was getting warm but not as bad. Anyhow I decided I want to further stress the thermal design of the board and ordered this 4 channel thermometer.

The thermometer arrived today and I set to use it for a few tests. Keep in mind the accuracy of the thermometer is questionable at this point. I did a very simple test:

  • at ambient room temperature all 4 channels showed values within 0.3 degree Celsius.
  • I held all 4 probes in my hand and all 4 showed 35.1C – again within 0.2C of each other.

First I tried to test the extruder heater control logic. From previous attempts I know it was working, but I wanted to see how accurate the temperature is. I set the printer to heat the E1 to 180C:

M104 T1 S180

This is a video from that test. My thermometer shower 163.5C or thereabouts – so there is a significant offset between the firmware and the thermometer. I also verified with an infrared thermometer and it was showing ~160C. So it seems the thermistor setting is not quite correct. The bad thing is that this heater came from China and I have no clue what thermistor they used, so I’ll have to measure it a few times to determine the correct parameters that should go in the firmware. That would be a post on its own.

Disappointed from my temperature control test, I set to test the thermal design of the board. I added a thermocouple to the bottom of the board – where the motor driver ship is mounted.

as well as a second thermocouple on top of the chip

This was to test a theory, which suggested that the chip dissipates more heat on the bottom side.

Attempt one was not very conclusive. This was using Marlin, I enabled the extruder motor and with the default settings it had 600mA of drive current and 300mA standby current, but this was not enough. The driver chip was barely at 30C and both top and bottom were at similar temperature.

Attempt two almost ended in a disaster. I used the above test program to make the motor running with 900mA drive current, but the program had an unfortunate side effect of leaving the extruder heater on. I smelled smoke and turned the power off. The smoke smell was from the extruder heater melting the temperature probe cable.

Crisis averted and on to attempt number three. My test program was spinning the motor, the power consumption was about 0.5A at 12V. The chip was heating with steady rate, even with my big fan blowing over the board. It was clear the board would not sustain such current. However the top and bottom of the chip were within 1-2C of each other. I decided that maybe the fan was interfering with the measurements and thus ensued attempt number five.

The chip was heating rapidly, but finally you can see the top was 5C hotter than the bottom. Another observation was how quickly things cooled down after the power was turned off.

After all this what is the conclusion:

  • the motor driver does get hot on the top, so putting a radiator on the top has some merit
  • my thermal design sucks, and I decided to re-route the bottom of the board, so there is a large copper area with no traces which can dissipate the heat from the chip.
  • the thermistor coefficient needs to be calibrated in the firmware
  • on the bright side almost all controls are working and Marlin is operational to a degree.

Well, ’till next time


Prntr Board V1

Prntr Board V1

PrntrBoard is a 3D printer controller board designed to work with STM32 NUCLEO dev kits. The current version (V1) supports NUCLEO-64 series kits. The design is being developed on F446-RE kit, but other models could work as well. IMO the STM32F446 NUCLEO-64 kit offers very good performance (180MHz CPU) for the price ($15).

Some features of the board:

  • 5x Trinamic super quiet drivers (TMC2130 or TMC2660)
  • Marlin firmware
  • 4x controllable fans and 2x “always on” fan connectors
  • selectable fan voltage (5V or Vin)

Because the NUCLEO-64 has limited number of IO pins, some compromises had to be made:

  • No sd-card
  • No display support

Generic shortcuts I don’t plan to improve:

  • 5V power supply is external. These are available from various resellers and fairly cheap – less than $1. No need to waste board layout space and component count.
  • Heated bed MOSFET – large heated beds consume a lot of power, and it is challenging to provision the design for > 10A current. External heated bed MOSFETs are very affordable < $10 and claim to support 20A minimum. If you have large bet use one.


I use the daily build of KiCad (soon to be released V5) – let me know if you have trouble opening the files.

Once the design is validated I would add support for NUCLEO-144 kits, these have many more available I/O pins, which would enable more extruders, SD-card and LCD screen utilities to be added. The downside is that they are quite big and I’m trying to limit the design to 10x10cm to reduce the cost of the PCB fabrication.

The current design is using 4 layer board, 6/6 mil clearance, 12 mil via hole size and 20 mil via diameter.

There are two active branches:

  • tmc2130 – the board design for TMC2130 series drivers
  • master – the board design for TMC2660 drivers

Both PCB designs use the QFP version of the driver ICs because they can handle a bit more power.


I have made prototypes of the TMC2130 board design (rev0) – the board has a few bugs, that are corrected in the rev1 version. I have validated the heaters, and fan controls are operational. Working the kinks out of the motor driver wiring.

The TMC2660 branch status is: the rev0 board is fully routed and passes DRC checks. I have not made any prototypes of the board, because 2660 drivers are hard to find due to low stock levels at suppliers.


The software for the board is a clone of Marlin at bugfix-2.0.x branch of my repository. I keep it relatively in sync with the Marlin branch. Note: there are other branches of Marlin as well only the bugfix-2.0.x supports the STM32 microcontroller.

Marlin is using Arduino IDE or Platform IO. I personally had issues with Platform IO not supporting the STM32F4 board, so I use Arduino version 1.8.5. To compile the firmware code, you would need to install the STM32 Arduino port.

Leave a comment if you have any questions.

How to mount Cut Tape parts on CHMT48VB and other desktop Pick and Place machines

I had to load some more components on my trusty Pick and Place machine and decided to document the process for all the Internet to see.

If you are not made from money, chances are you have encountered this problem. Sometimes it is too expensive to order a whole reel of parts. So what to do with a cut tape of 100 or so components?

Most distributors offer a “reel” service – that is they would make your cut-tape onto a reel – this would save you all this trouble. I personally found this solution to drastically increase your price per component though. For example, a cut tape of 100 capacitors, would cost you $1-$3, the tape reel service is $7, which is more than twice the price for the components.

On some machines, you can cut a small strip, just long enough for the job and use the “IC tray” mode. But what if we can do better?

First, you need a reel where to put the components. You can 3D print one – I made a model here. It is two pieces (left and right) you can print separately. It is standard 178mm reel. I have printed both 8mm and 12mm wide versions, by adjusting the hub width. Initially, I tried 130mm diameter reel because it is suitable for smaller 3D printers, but it was a pain to work with on the machine. It was too small to stay on its own, and I had to put it on the the reel shaft. This, in turn, was a major issue every time you have to replace a component you have to remove all reels. So please use 178mm it would save you lots of pain.

Anyhow the reel is easy to put together, just print the left and right part, align them together and press. There is a little hole on the hub to feed the cut tape make sure the left and right part line together. It should look something like this:

You can see the cut tape of 0402 capacitors I’m going to use underneath. Make sure when you put the tape on the reel, you wind it in the correct direction – the tape sprocket holes should be on the correct side.

For example, this, turns out, was the wrong way for my machine:

Anyhow here is it wound up the right way.

This is all and good, but to properly install the reel in the pick and place machine you would need about one foot of plastic tape from the reel. The normal reels have about 30-40cm of empty space so that you can thread the tape through the mechanism. With the cut tape this means losing quite a bit of components.

Not to worry I have just the trick for you. For 8mm wide cut tape use this wonderful 3M product I found on Amazon –  0.188″ tape. The one I use looks like this:

For 12mm wide cut tape use 1/4″ 3M tape, for example, this one.

You would need to cut two pieces of sticky tape one about a foot – enough to get from your pick and place pickup to the tape collection wheel and wind on the wheel about once. The second piece about one to one and a half inch.

First you snake the longer piece of tape on the pick and place machine – follow the normal path for tape collection and make sure the tape is not twisted. I stick it a little on the collection wheel as well as on the pick and place pickup wheel.

It helps if you put the tape on the next position, where you insert the cut tape.

Now, peel off the plastic tape from the component tape for about an inch. You would lose 10-15 components – it is a worthy sacrifice. Why an inch? As you can see in the picture, I have to guide the tape about that distance to make sure it is not stuck anywhere. If your machine uses different setup adjust the length as needed. You cannot go smaller than 1/3 (one stapler size) inch though you’ll see why in a few paragraphs.

Insert the cut tape in the machine as if it was a regular tape, then tape the short piece of 3M tape over the peeled plastic tape. I use this to increase the plastic tape strength, because my machine pulls like there is no tomorrow.

Now turn the tape over and stick the long piece of tape on the opposite side.

Just like this:

Finally put a stapler on the small segment. The sticky tape alone would not hold to the pull force of the machine. The stapler would ensure the “mechanism” stays together.

Make sure you lock all 3 pieces with the stapler – the two tricky tape pieces as well as the plastic tape between them. I found that micro staples work for me. For example this Amazon item.

Here is how it should look like:

Finally, place the other end of the 3M tape over the collection wheel and pick up the slack:


“mass” production

The demand for my CD-changer emulator is picking up, so I’m making several boards at the same time. Placing of the components on the board by hand and re-flow with hot air.

These 6 board take about 4 hours in this stage plus another 4 hours or so to solder the optical connector and other connectors. My hands feel tired after a while. I’ve heard that good scotch helps with this condition.

SMD stencil printer is so cool

If you can’t recognize what this is, here is an explanation.

When creating PCBs, one can order a stencil – usually from a thin sheet of stainless steel. On this stencil, there are cut small holes (with a laser cutter) where one is supposed to apply solder paste on the PCB.

So the operation is: you align the stencil on top of the PCB; then squirt some solder paste on top of the stencil; then use a flat “applicator” to smudge the solder paste over the stencil holes. In the end, you lift the stencil up, and you end up with the solder paste applied in a thin layer over the solder pads on the PCB.

To aid in this whole process is this contraption – a stencil printer. You align the stencil on the device and put come L shaped holders on the bottom to hold the PCB in place. The bolts on the bottom are to help to align the stencil and the PCB. When the alignment is achieved you put the PCB in the holder on the bottom; lower the stencil; apply solder paste; lift the stencil; remove the PCB. The whole solder paste application takes about 1 minute.

I should have gotten it sooner. My only regret is not getting a larger size printer, as you can see the stencil frame is a bit larger than the printer base – it still works though.

Fun with colors

I’m very pleased with the new box design. It allows me to play with multiple color plastic, so just in time I created a “4th of July” (red, white and blue) device edition.

The new Pi Zero version is ready

I had to re-design the new box. Before I was trying to make it from 2 parts – top and bottom. This process had issues because the bottom part would not 3D Print correctly – it would keep curling up due to stress in the ABS material.

So finally I made the box bottom from several pieces. The bottom has 4 curved corners and 4 side panels, which slide down – you can see one of the side “panels” in this picture.

Also, you can see the size of the old device version compared to the new version.