Section 0: Background

 The advanced features such as StallGuard can be purchased in our PDF guide here.

 

In this course I will teach you to program and run a stepper motor in Arduino using a Trinamic stepper motor driver. 

My goal is to make this as easy and simple as possible so that someone completely new will be able to learn. That is why we will use Arduino. 

While we will use the TMC2209, most Trinamic drivers work the same way so you can apply this knowledge to other drivers as well.

To access the Arduino code, go to my GitHub page.

If you would like a PDF copy of this book, including the advanced section on StallGuard, you can get it here.

 

Prior Knowledge

It’s best to read this book if you already have some knowledge about basic electronics and basic Arduino programming. If you don’t, that’s ok, just spend more time with Google and YouTube when you encounter something that you don’t understand. If you’d like help with your project, I am always happy to help consult you on it. It’s always best to do things right early on in the project, so please don’t ever hesitate to reach out to me at daniel@valarsystems.com.

My Background

I have spend over 7 years working with these drivers, including the TMC5130, TMC5160, TMC2160, TMC2226, TMC2208 and TMC2209.

I started my own electronics journey in 2017 with Arduino when I decided to build a motorized device that would open my sliding glass door remotely. I wanted a way to let my dogs out of the house by using Alexa to open and close the door. I also wanted the door to automatically close because my wife kept leaving the door open and there’s nothing more painful than watching that cool air-conditioned air leave the home in the summer.

 

In early 2020, I posted this project online and was contacted by Tyler Schrenk who wanted me to retrofit this device onto his sliding window. In his early 20s, Tyler dove head-first into a lake he had assumed to be shallow and ended up damaging his spinal cord and became quadriplegic as a result. He was always looking for ways to automate his home and make his life a bit easier. He was also very involved in helping different organizations create new assistive technologies, such as working with the University of Washington’s Personal Robotics Lab, and on Microsoft’s adaptive gaming controllers.

I decided to help Tyler and got to building a window opener.

 

Using a feature from Trinamic called StallGuard, the window opener automatically stops when it detects something in the way.

 

With this prototype, I had a device that worked well and managed to sell a handful of them as kits. However, it had many problems that needed to be addressed. The biggest problem was creating a design that could be attached to all types of windows. Some windows require very little force to move, and others require a massive amount. Some windows have windowsills, others don’t. The biggest hurdle has been creating a device that universally fits all windows.

To help fix these problems, I spent two full months writing an SBIR grant through the United States Department of Health and Human Services, and I got the grant! Tragically, due to a lung infection, Tyler died just one month after receiving the grant. But my work on the window opener continues as of this writing because I know Tyler would have wanted others to have it.


Unfortunately, I cannot post any photos or many details of the device because it uses a lot of proprietary technology that’s taken me years to figure out. But it’s a very advanced piece of hardware and many of the problems have been addressed. I’m in the process of applying for Phase 2 of the grant which will give us the resources to finally release the final product.

Additionally, I've created a smart curtain opener that opens my blackout curtains in the morning to help me wake up naturally. This is made with the VAL-2000 as well.

 

 

 Thank you for allowing me to share the knowledge that I’ve obtained over the many years of working with Trinamic stepper motors.

NEXT SECTION: 1

Course Sections:

Advanced Sections:

Back to blog

Leave a comment