I am on a journey to a larger goal; but along the way I am learning some new things towards that goal. As I play with devices I haven't before, here is some of what has been learned.
Two of the requirements are: 1) control of two stepper motors and 2) control of a DC motor to spin a platter. For all of the other projects I have tinkered with I haven't had the need for a motor or stepper motor. Well the time has come.
I pulled out an Elegoo 28BYJ-48 5v Stepper motor with a UL2003 control board from my Elegoo Super Starter Kit Uno R3 Project and duckduckgo'ed for some help in getting started. It was one of the easier devices to get setup. The stepper connects to the UL2003 board, which in turn is connected to the Uno. Since there was just one stepper motor, power from the board was used to test the setup. The example script was uploaded and it moved!!
I like to make pictures to keep myself in line while setting up my wiring. Plus, in this case with so many wires, I wanted to make sure I didn't run out of pins.
One was easy using the stock Aurdino library, but using two seems to come with issues. After some reading on the net on how best to control two stepper motors, a move to the AccelStepper library was in order. Another 28BYJ-48 was pulled from my bins and added to the mix.
Lastly, was a DC motor for which to turn a drawing surface. This is accomplished using a LM293 chip and a PWM pin to control the speed. One pin, ENA on the 293, is used to control the speed of the motor. The other two pins IN1 and IN2 are used to control the direction of the motor.
Well, this is just the first part of a larger project. It will be posted when completed. Here is a teaser in the meantime. Time to break out the ErectorSet.
Comments