Skip to content

Motor Setup

mrcory edited this page Sep 20, 2019 · 1 revision

Info

I originally designed this project to use a 28BYJ-48 5v because they are cheap. This motor is completely capable of running the shade, but speed is an issue. As such, I am designing a new version of the hardware to use a NEMA 17 motor. It will require the short body version to clear the shade. The downside to using this motor is that due to a lack of gearing, it is not capable of holding the shade in position with the motor unpowered. To solve this, I am using a micro solenoid to act as a brake. This increases the needed hardware a bit, but I believe it is a fair trade off.

Mini Stepper Setup

In the config you will need to uncomment the line #include "stepperMini.h". Pin and position configuration takes place in "stepperMini.h".

long shade[5] = {0,20500,41000,60000,0};

//Declare motor pins
#define mtrPin1 D5
#define mtrPin2 D7
#define mtrPin3 D6
#define mtrPin4 D8

NEMA Stepper Setup

In the config, you will need to uncomment the line #include "stepperNema.h". Pin and position configuration takes place in "stepperNema.h".

long shade[5] = {0,5,10,20,0};

#define dirPin 1 //Direction control pin
#define stepPin 2 //Step control pin
#define ctrlType 1 //Control type for accelstepper
#define enablePin 11 //Pin to enable/disable motor
#define brakePin 10 //Pin used to control the brake

Shared Config

Both motors use the same speed and acceleration in "config.h".

#define stepperSpeed 1100.0 //Max Speed
#define stepperAccel 175.0 //Acceleration Rate

Clone this wiki locally