Section 0: Background
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.
I have spend over 6 years working with these drivers, including the TMC5130, TMC5160, TMC2160, TMC2226, TMC2208 and TMC2209.
Based on my experience, I have created the VAL-2000 board which makes it very simple to run a stepper motor. It combines:
- 12V to 3.3V Regulator
- Two buttons
- Two limit switch connections
All in one very very small package.
You can purchase one here.
Using this board, I have created a highly advanced smart window opener. This window opener is controlled with Home Assistant. When my Nest thermostat turns the Air Conditioner on, it tells all the windows in my house to close.
And I will teach you how to create all of this!
Using a feature from Trinamic called StallGuard, the window opener automatically stops when it detects something in the way.
In addition, 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.
I've also created an automatic door opener with the TMC5160 that automatically opens and closes the sliding door. This is great for using with Alexa to let me dog out, as well as automatically closing to save air conditioning.
- Section 0: Background
- Section 1: Hardware Setup
- Section 2: Stepper Motor Basics
- Section 3: Arduino Setup
- Section 4: Understanding Trinamic Drivers
- Section 5: Setting Trinamic Drivers
- Section 6: Power Requirements
- Section 7: StallGuard
- Section 8: FastAccelStepper Library
- Section 9: ESP32 Dual Core Setup
- Section 10: Motor Setup
- Section 11: Preferences Library
- Section 12: ESPUI
- Section 13: API