Preparing image strips
Archives
Metamekanix II
Motor directions and controlling speed
I had to contact the manufacturer of the motor to fully understand something about increasing the speed by increments of the two motors driven by the MD25 Driver board.
There are different modes you can use which determine the values the motors are looking for.
In Mode 0 the the speed values passed to each motor needs to be as follows:
0 is Full Reverse
127 is Stop
255 if Full Forward
Unlike on a robot/vehicle chassis, my motors are both aligned in the same way driving the timing belt. So in order to get them to both turn together at full speed, Motor 1 needs to be Full Forward and Motor 2 needs to be Full Reverse.
At other speeds, Motor 1 will be somewhere between 127 and 255 while Motor 2 will be in the same relative position but moving on a scale from 127 to 0
I will now be programming the motors so that they both turn in the same direction at the same speed. My aim is to have them at full speed in the middle and slow down as they reach each end of the frame
Time for some programming!
Finally getting nearer to understanding the EMG30 stepper motors and MD25 motor driver unit. Yesterday I used two Arduino serial ports for the first time. The MD25 was using the standard 0 and 1 pins (RX and TX) so I used 10 and 11 as an additional RX and TX. This enabled me to see information coming back from the motors.
I needed to be able to do that so that I can change the speed when a certain position is reached. I want a fast speed in the middle and then an easing down at each end