You know I love Open Source Hardware and I really love the Arduino. So I was happy when Trinamic asked what can be done to get more people to know Trinamic (Trinamic is a producer of marvelous stepper motor driver chips, motion controllers and brushless motor driver chips). So off to develop an Arduino Shield for the TMC260 stepper motor driver!
The TMC260 chip is really a nifty little device. All aspects of motor driving from motor current, micro stepping to chopper timing (more or less a step down method to provide the exact motor current) can be controlled in software. Furthermore the chip provides feedback on the physical motor load and can scale the current according to the load, to save energy and produce less heat.
Developing the Shield
What a nice chip, but sesigning an Arduino Shield proved to be a tad harder than thought. If you are just interested in the results check out the TOS-100 Arduino stepper Motor Driver Shield Hardware Description. The shield itself went through 5 or 6 iterations until we were happy enough with it to produce it. We had several failures, improvements and changes. Of course the first prototypes had the normal flaws and a lot of air wires came to fix it.
But after everything worked the work simply did not stop. First of all there were a lot of issues with physical placements of components (e.g. in the first version the motor connector nearly touched the ISP header of the Arduino – nothing you really like to have). Then we put the whole shield under a IR camera to analyze the heat generated by the shield under full load.
Not exactly the performance we wanted to achieve. So we invested a lot of time into improving the heat sinking of the PCB. In the end it was so good that we checked with our fingers that we do not need to inspect it with the IR camera.
Developing the software for the TOS-100
The Trinamic chips are not really from the ‘connect and it runs’ category. You have to configure a lot of parameters in order to get your motor moving. But there was no way to overwhelm Arduino users with the datasheets and analyze how they probably can get the driver up and running. So a driver library for Arduino was needed. First of all to give a very easy access to all motor parameters (e.g. the motor current can be specified in mA insted of fraction of volts measure across the sense resistors). But on the other hand the driver library is also a nice explanation on how to program the TMC260 driver chip – so it had to be documented well so that users can easily understand what is going on under the hood.
And since every parameter of the motor driving is controlled in software we needed a program to test the specific motor in conjunction with the shield to give users an easy way to optimize their settings.
This was easily hacked together in processing and astonishingly enough it evolved as my main tool to test my own motor driver – marvelous.
Putting it all together
Finishing the hardware and software part of this project was just half the way to go. A hard learning for me. I had to prepare the design files for production. Produce an comprehensible Bill Of Materials, create placement files for the pick & place machine and finally design a test device for the produced shields (more on that topic soon). We had to convince distributors to stock the shield (thanks to Watterott for offering the TOS-100 in Europe). So if you are a distributor and want to sell the Trinamic TOS-100 - just drop me a note.
But the most important question was about how to prepare the software and hardware for reuse. The shield itself was a nice and easy way to move stepper motors with the TMC260 driver chip. But we wanted to prepare a package that somebody can use for evaluating the TMC260 driver chip (or just run a stepper motor) and use all aspects of the Arduino shield directly for his project. So the source code was released under the permissive MIT license, that there are no restrictions whatever to reuse the code in your personal or commercial project. The design files are released under a Creative Commons Attribution license so that the design and layout can be directly transplanted on a new PCB. Let’s hope we see more projects with Trinamic stepper motor chips in the near future – and let me know in the coments if you already did some project with it …