Extruder thermal control board

For a while now I had this idea – create a small board which controls the extruder heaters and fans.

Why – you ask? Well hear my theory. I have this old printer – the RigidBot. It has dual extruder – all direct drive. However I noticed that when it starts to work my temperature readings become very noisy.

Initially I was puzzled, why the noise. After some investigation I noticed that the noise is present only after the printer motors are on. If I switch the motors off (via G-code command) the temperature line in OctoPrint becomes smooth again. It turns out the motor current is creating EMF interference with the thermisor wire.

So I was thinking instead of routing all these wires back and forth, I can build a small board with a cheap CPU that controls the temperature. I can also outsource the control of the cooling fans and even add local display etc.

All the wires needed would be power and some way to communicate between the main board and the extruder daughter board. Audio cables are relatively cheap and well shielded – I can use one for I2C or Serial communication.

In a dual extruder setup one can save quite a bit of wires: two pairs of power wires for the heaters, two pairs for the thermistors, another two pairs for the extruder fans and one or two pairs for parts cooling fans. All these could be replaced with one pair for power and an audio cable for communication – the rest of the wires are all local to the board. Well one has to mount the board somewhere close to the hotends.

Long story short, the first version of the board was not a grand success. The power supply was very noisy and the temperature readings from the ADC were so unreliable, that it was throwing the PID into a weird loop.

Here is the second installment of the board. The power is now dual stage – a buck converter to 5V and then LDO to 3.3V for the micro controller. The LDO filters the noise from the buck converter.

The brain is STM32F030 micro controller. There are 3 fan connectors with tachometer inputs, so in theory the board can alarm if the fan stops working, just like the Prusa MK3. There are 2 thermistor inputs, 2 heater MOSFETS as well as 2 thermocouple controller inputs – for MAX31855 or MAX31865 or similar.

In the next version the voltage the fans would be select-able to whatever the input is (12V or 24V) or 5V. There is a bunch of unpopulated extension pins and an LCD connector for extra fanciness.

I was testing the PID in Arduino code and it works quite well this time.

Just for fun I decided to try my thermal camera to see if there are any hot spots. The picture is with the heater 1 working.

No surprises, the heater MOSFET is a bit warm. The hottest spot is on the buck converter – 37C. Don’t be alarmed by the bright colors 37C is barely warm to the touch.

I’m still trying to figure out what should I use as software platform. Arduino is simple, but somewhat limiting. The STM32 CumeMX is another option. There is MBed and FreeRTOS options if I want to try multi tasking. Oh decisions, decisions.

~V

The TMC2660 board was a bust

I dusted off my trusty pick and place and made one of the newly received TMC2660 driver boards.

Since it’s the first time I test this setup I populated only one of the driver chips – the X axis.

Alas it was all in vain. After fighting with it for several days, the motor would not spin properly. Either my stepper driver configuration so completely busted (although I double and triple checked) or the driver chip is fried. One of the phases works, but the other sends no current to the stepper motor.

Also I was trying to fit some automotive fuses on the board – you know for protection. Alas the fuse holders I ordered are very flimsy and don’t fit the fuses at all. Ordered a different set, but have to wait.

Bummer 🙁

PrntrBoard TMC2130 redesign is complete

When I was working on the new layout for the TMC2660 branch of the board, I used a dedicated ground plane and turned out this was awesome. It simplified lots of the routing as well as added good heat dissipation capabilities to the board.

I wanted to try and redo the layout of the TMC2130 branch with this technique. In addition I wanted to swap the location of the E1 motor driver and the 5V input connector, before the E1 driver was crammed in the corner and it was challenging to get good routing of the power pins. By swapping the position with the 5V power connector there is a bit more space.

The third thing I wanted to try was to reverse the position of the STM32 NUCLEO board – in the previous design it was sticking out in an unsightly manner.

So here it is new layout all complete. DRC checks pass.

In a slightly different perspective:

You can see the NUCLEO does not block the mounting hole on the lower left corner anymore (MK4).

Here is a look from the bottom:

The motor driver have large area on the bottom for heat dissipation. You can also see the large rectangle area on the bed heater control MOSFET on the top.

I also added a few extra power connectors – two for Vin and two to the 5V rail, to hook cooling fans for the case. You can see two of them on the low left corner in the last picture.

Note: while the last picture shows the STM32F411 CPU, the board actually required the STM32F446 version. The only 3D model I found for the NUCLEO STM32 dev kit was with the STM32F441 part, so that is why it is on the images.

Making PrntrBoard TMC2130 rev1

New revision (rev1) of my 3D printer controller board arrived a few weeks ago from the board manufacturer (http://jlcpcb.com). I did assemble a prototype with one driver for “smoke test”. Well it did “smoke” only a bit, because I accidentally put one chip in reverse. Lucky for me it was not the Trinamic driver – that one survived.

Anyhow today I made another board – this time with all components populated. Here is how it went up.

Mounted the PCB in an improvised jig to keep it secure on my table. The “jig” is made from 4 small PCBs from a different project. I secured them with blue tape, so they hold the main PCB in place.

Next was aligning the kapton stencil on top of the PCB. The stencil is made by http://oshstencil.com It is not aligned yet.

Here it is aligned on top of the board and secured with another piece of blue tape:

Getting ready to apply solder paste. I use “credit card” squeegee from OshStencil.

Paste away. I usually put too much, but it is easier to have some left over, than scraping the last bit of paste over and over again.

Here it is – paste applied. You can see that my footprint for TR3 needs to be fixed – the paste opening is way too big. Oh well – rev2 I guess.

By the way because my stencil application jig is not particularly sturdy you can see the solder paste is smudged over the fine point IC pads. It is not the end of the world. It makes a few solder bridges, but easily fixable. It is better, when I use solder paste printer, but I don’t have a framed stencil for this board they are $$$.

And it goes in the CHMT48VB pick-and-placer.

And the machine goes – here is a short video clip of the beginning of the job. Note that the board is split in two jobs. The second job is with different set of nozzles. I don’t have the nozzle change in the video – sorry.

The board after all components are placed by the machine. I use the machine only for tedious parts. I place other components by hand.

After manually placing the rest of the SMD parts, the board is ready for solder re-flow. I use hot air gun. I have a T962 oven, but it always seems like too much effort to use it. Here is the result of my hot air application. You can see quite a few bridges on the drivers. Click on the picture for full resolution image.

All cleaned up

Now to solder all true-hole connectors. This is the most tedious and time consuming part. Here it is all done. Front:

And back

I did a quick check and there are no shorts on any power supply lanes. On to testing the firmware.

Gerber Viewer updated UI

Some time ago I wrote an online Gerber file viewer. I’ve been using it to validate the KiCad Gerber output files, before I sent them to the PCB manufacturer. One feature that was missing was the ability to set transparency on the layers, when more than one layer is selected for display.

As I started working on that, I realized that I also need to be able to select the color for the layer as well. Here are a few screenshots of the viewer in action.

Two layer PCB, top layer is red, the bottom is green:

Six layer PCB (Beagle Bone XM) with top and two internal signal layers selected:

The same Beagle Bone XM board with 6 layers selected:

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 (pcbshopper.com) 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.

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.