Well, my enthusiasm for the TMC2130 driver was premature. Faith was not kind and I discovered several design flaws after I ordered a bunch of assembled boards.
First I somehow completely missed the 5V power pin to the driver. So initially it was as dead as a door nail. I also discovered one of the config pins was not properly grounded – but that was not a big deal.
After a few bodge wires the driver sill would not respond to SPI commands. This was a rather frustrating thing and I remember having similar experience with the first PrntrBoard with 2130 drivers. Back then I had to wire a separate clock signal to each driver to get them to work.
When reading the datasheet of the 2130 chip it describes that if one connects the clock pin to the ground the chip would use an internal clock generator, but something is amiss and it does not seem to be working correctly in my version.
So back to the drawing board. I updated the PrntrBoard V2 to have a driver clock signal and now have to order new sets of PCBs.
Quite annoying. If you have a clue why the build-in clock is not working on these I would appreciate the hint.
The good old TMC2130 chip has fallen out of favor thanks to newcomers like the TMC2208/9. It is still top-shelf stuff and the preferred driver by Prusa for the Einsy Rambo as well as their MMU control board.
New chips are cheaper and cad drive more current, but the 2130 sill has one thing you can’t beat – it can handle voltages up to 46V.
Here is an example of a motor driver in the same PCIe form factor with external 3.5mm power terminal block. This allows the driver to use high voltage for example 36V or 42V to drive beefier motor.
The solder jumper on the bottom can be shorted and then the driver would take power from the carrier board.
I managed to put together the chassis of the soldering machine. The bulk of it is made from parts for a Prusa MK3 3D printer. It provides a good start point so I can experiment further.
This is what is looked like in the beginning
I also put this mounting plate to hold the connectors that I need to solder for my test board. With this plate I can insert the connectors, place the board over and get it soldered quickly, then move to the next one.
Here is a video how the head would move along the Y axis
And another one along the X axis. This one needs to hop over the pins.
I used my PrntrBoard controller to drive the motors. This is a picture of the machine in it’s current variation. I added the Prusa LCD display, but have not connected it yet.
After a few unsuccessful attempts, I got Smoothie to move my stepper motors on the PrntrBoard controller.
At first the smoothie had a bug in the SPI dirver and was unable to talk to the TMC2130 chips. Fixed that, then the steppers still would not move.
I can see the drivers were sending current, because my power supply would start the fans up, but zero steps. I spend the day trying to diff the configuration between Marlin and Smoothie, but nothing was wrong. Finally caught a bug in the Stepper timers and lo and behold movement.
I’ll make a video of my Rigidbot running Smoothie on STM32 next week.
Thanks to the huge work by Matt Baker, I now have Smoothieware V1 booting on the Prntrboard. Matt did an excellent job with the initial port of Smoothie to the STM32 series of CPUs. I did some tweaks and added a target for the NUCLEO-64 board I’m using. After a few weeks of work it does boot and I can verify the temperature controller works.
It does not have all features of the original Smoothie board (no SD-card and no Network) but I do have better drivers – TMC2130.
Here is a picture of me testing the hot end heater control:
The heater was set to a “safe” 55 degree Celsius. I would say the PWM control for the heater is much “smoother” on the Smoothieware.
My port of Smoothieware V1 is on github. My working branch is stm32f4. I also have stm32f4-tmc2130 with the TMC patches.
In my experiments with the rev1 version of the TMC2130 board I found that the motor drivers get quite warm with increased current. If I point a fan just right it would cool the driver enough, but if the air flow was not sufficient the drivers overheat quite easily.
I wanted to improve the cooling on the PrntrBoard motor drivers. The board layout is challenging with the NUCLEO board on the bottom and a bunch of connectors on the top. Achieving good airflow for the Trinamic drivers would not be simple unless I add many many fans.
I tried to design a custom airflow conduit that would direct the air over the drivers without taking too much extra space. To start I did an export of a 3D model of the board and all components from KiCAD – it proved to be an excellent feature. I exported a STEP file, which I then tried to import in onshape. It kind of worked, but the generated assembly was full of small parts which would move all over the place and there was no easy way to tell onshape that this was one solid block of parts (at least I didn’t find an easy way to do that). Not to worry I fired off a copy of Autodesk Fusion 360. Imported the file there and added models for the heatsinks I was using on the board. I also added the IDC connectors to the NUCLEO board (they were not in the KiCAD export). I tried to figure out the assembly feature in Fusion 360, but gave up and exported STEP file again and imported it back to onshape. This time it appeared as one giant part, so I proceeded with my favorite feature – “design part in place”. This lets you design a new part in the context of an assembly and you can use geometry from the assembly as reference.
This is what the current design looks like:
And here is how it actually fits on the board, when I created the parts on a 3D printer:
A co-worker shared this story yesterday with me. He upgraded his printer to TMC2130 drivers and while he was testing how the new toys performed he got a message that one of the drivers overheated and then the driver exploded in a non trivial ball of fire.
I asked if I can have the driver for some pictures. The driver boards were clones from the usual Asian markets. He now has ordered some “legit” boards from DigiKey. Crossing fingers these would not burn his house down. Said unfortunate driver was on his Z axis and he was running it at 1.1 amps.
This is what it looks like, next to a working board from the same supplier:
(click on the image for better resolution)
As you can see the top of the board kind of exploded, with some of the copper traces melted away. I suspect when the driver overheated either a solder joint shorted or the board shorted internally and that caused the severe failure.
This is the bottom of the board, where the driver chip is mounted:
The damage looks less severe from the bottom. There are charred components, but no melted copper.
Here is the top part – where the copper melted under my microscope:
Another angle – close to the edge of the board:
This is the bottom side – you can see the chip is a bit burned and some capacitors have been barbecued.
Another view of the barbecue area:
The rest of the chip looks intact:
I removed the chip an this is a view of the PCB underneath:
All but 3 pads look in very good condition. Unfortunately the 3 pads have evaporated completely from the board as well as the chip itself:
I was wondering if the chip can be salvaged, but it does not appear to be within my abilities.
One more reason to keep a fire extinguisher handy and not let your 3D printer unattended.
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:
I did a quick check and there are no shorts on any power supply lanes. On to testing the firmware.
Trinamic drivers are a marvel of engineering. However they combined many things in a single chip that it is hard to make it all work right. Well, it is hard for me at least, if you have mastered these drivers please let me know.
It started when I tried to test if the Marlin firmware for my board would agree to move the stepper motors around. To test the motor driver signals on the board I modified one of the tmc2130 arduino library samples like this, and it was spinning the motor. Alas my enthusiasm was short lived, when I tried to move the motor with Marlin, it would stutter and vibrate, but no motion.
Hmm, I checked and re-checked all the tmc2130 driver settings back and forth. Read the datasheet 3 times – nothing. I was going back and forth between the marlin firmware and my little test program to figure out what was wrong. Finally I was able to isolate the issue to the number of microsteps the driver was configured to take.
Now to be fair the microstepping configuration was not the issue per se, it was a setting I can change to introduce the same problem in my test program as well.
Let’s take a step back and explain what this all means. Stepper motors come in many different configurations. We’ll focus on bipolar 2 phase motors – these are the most common stepper type used for 3D printers. By far the majority of these motors are manufactured to make 200 steps per full rotation. Each step being 1.8°. There also high resolution motors which make 400 steps per rotation or 0.9° for each step. For the purpose of this description the difference is irrelevant.
In the 1.8° motors, it is common to say the 200 steps are “full steps”. In other words the rotor rotates from one stable position to another. In electrical terms, each motor coil is energized fully in one direction or the other.
Clever folk however discovered that they could achieve better precision if they don’t fully energize the motor coils – hence micro-stepping. The most obvious downside of the microstepping is reduced motor holding torque. There are different microstepping options offered by different stepper motor driver chips. Most common are 2, 4, 8 or 16 microsteps. This means that the driver would use 400, 800, 1600, 3200 microsteps to make a full rotation of the motor shaft. Some drivers offer 32 microsteps as option. The tmc2130 and other drivers from Trinamic also offer 64, 128 as well as whooping 256 microsteps. That is astounding 51, 200 microsteps per rotation or about 0.007° per microstep.
Before you get too excited, keep in mind each increase of the microstepping level comes at the expense of decrease in torque.
All these wanders aside, what was my issue with microstepping? I made a simple observation: my test program was driving the motor stepping pin at about 48kHz; with the default settings (256 microsteps) the motor would move, but when I switch to 16 microsteps the motor would make a high pitch sound, but not move. Why? I was puzzled.
Another week of experiments and I discovered the most benign of reasons – I was driving the step pin too fast. In the 256 microsteps configuration the motor speed would be a little under 56 rpm. In the 16 microsteps configuration it would be about 900 rpm. This was above the physical capabilities of the motor with that setup. I found this calculator and it seems with 0.6A current at 12V this motor could theoretically do about 850 rpm max. Practical measurements showed that even at 32 microsteps the motor has trouble moving. At 64 microsteps it was working.
But why does this matter? Well I found that marlin’s default speed is a 300mm/s. I did not change the default axis per mm configuration it was set to 78.74 for 16 microsteps. This would translate to 23,622 microsteps/s or 443 rpm for the motor. Practical test showed this motor was able to achieve about 230rpm max.
Now what? Very simple – I lowered the motor default speed in marlin and was able to issue commands to move the axis 😉
While I was investigating the issue. I got myself a current probe for my oscilloscope. I was able to shoot a few pretty pictures of the driver current of the motor coil trough some different driver settings.
The current probe I got was Hantek C-65:
Picture of the motor driven with full steps an no load. This graph represents the current that goes trough one of the motor coils. There are two coils that drive the motor, the current trough the other coil is identical, but shifted one quarter pulse (90°). The current swings from positive to negative each 2 full steps.
Current waveform with the driver configured for 2 microsteps and 600mA RMS current:
Waveform for 4 microsteps configuration:
Waveform with 16 microsteps:
The waveform with 256 microsteps looks like a smooth sine wave. Sorry I dodn’t manage to get a picture.
This driver has an interesting feature – microstep interpolation. When you enable it, the driver uses 256 microsteps internally and whatever you had configured externally. For example here is the waveform with 2 microsteps and interpolation enabled:
The following is the waveform for full step (no microstepping) and interpolation enabled:
The last image I thought was cool was a capture of the driver waveform changing when the motor is stalled. The configuration is 256 microsteps, with 300mA current. I was trying to stop the motor by holding the shaft with my hand.