(Some) Progress on the 3D printer
One of my work colleagues has an Arduino kit, that includes amongst other things a stepper motor driver, an ULN2003APG board, and I convinced him to lend it to me.
This weekend I had some time, so I played a bit with it. After reading it’s data sheet, and comparing some examples I found online with other motors; finding those motors data sheets and comparing their coils connections with my motor, I got to this schematic:
And with the tutorial code for stepper motors I got it working. I’ve initially done a revolution test, to make sure I got the number of steps, wiring and direction right. Also I’ve connected 2 multimeters to make sure I have a safe voltage and current. I’ve tested this with several speeds, using the LEDs on the driver board to check the steps order.
Once this was a success, I’ve moved on to connecting this driver to the prototype pillar I’ve made for the 3D printer. I ran the same code with 3 motor revolutions, to have it move the carriage on a longer distance.
After this I’ve noticed a few problems:
- The motor is juddering
- How do I control how much to go up or down?
- The driver board was making it difficult for me to follow the wiring, so I removed the IC and placed it in the breadboard.
I went ahead to solve the second problem first.
I’ve hot glued 2 door switches at the top and bottom of the pillar, so the carriage pushes them when it gets to the top or the bottom. This would trigger a change of direction. I’ve done some tests with a couple of LEDs, to check if this would work. I’ve also added the option to stop the motor (both LEDs on) if both switches are pressed.
Of course I didn’t have the right value resistors (10k) so I used 2 *4 ,7k resistors for each button. Remember I’m building this from what ever scraps I find or can get my hand onto. Eventually, after some tests I got to this schematic:
I forgot to remove the LEDs after the test, so I left them there. No harm in that.
From the first run it was a success. I was thrilled.
Here’s the code I used:
Now onto solving the juddering problem.
Since the motor also seems to judger even if it’s not geared to anything, there must be a problem with either how I’m using the Stepper library, or with the library itself. It might be a problem just with this specific motor. I don’t know. I’ve started reading the inner parts of the library, and do some more research.
’till next time!