1. Background
I had planned on driving the NEMA-17 stepper motors from my Sealed Lead Acid (SLA) 12v battery via a pair of L298 modules; these seemed to be idea from the specifications but fellow Element14 members commented and that got me looking around the internet to soon find they were inadequate (eg threads like this). I did do a short test run having remade my drivebelts and I'll detail a bit about those below.
2. Circuit Requirements
At this point I think I need to make my own driver circuits so had a look around the internet at what schematics were available. I found this one particularly useful:
and this one:
[Source: https://www.researchgate.net/figure/H-bridge-Stepper-motor-driver-circuit_fig5_308859906 ]
Both schematics show I need four active 'switch' components per phase; eight in total. The switching of these should not be a problem as I will likely offload that from the STM32Nucelo board to a PIC microcontroller. I can see I will need four inputs for each motor. I could use bipolar transistors like the heavy duty TIP142 (10A collector current) or a suitably rated MOSFET. What is not so clear from the diagrams above is the current limiting circuitry, I will need to limit my current to 2A per coil and will accomplish that by working a simple BJT and limiting resistor into the circuit to ground.
In the design stages I was unsure what voltage drops would be across each component, if the constant current circuit works correctly there should be 2A flowing. AT the very worst case, with no voltage drop on the stepper coil, that means almost half of my 12v supply would be dropped across each of the two MOSFET devices...that would amount to 12W each, so those MOSFETs could get quite warm.
My NEMA-17 stepper is rated at 2A and 2.8v (from the spec sheet) and therefore including the 0.6v drop across the current generator, then 8.6v (12 - 3.4v) is shared between the MOSFET devices....4.3v each at 2A = 8.6W
This is the bit I am unsure about - does the motor coils drop 2.8v at 2A or does the MOSFET voltage drop come into play due to the gate-source voltage applied? I need to do some tests !
3. An Easier Solution?
Realising that I'm deviating way off the course of this challenge I recalled the small A4988 module that I used for My First Stepper Motor - a quick check of the specifications seems to show it can provide up to 2A per coil with cooling and will run from a 12v supply. Anyone with a Reprap style 3D printer will be familiar with these and that is why I have some as well (as for the last 2-3 years my attempt at making my own 3D printer has sat on the worktop under construction).
Therefore for now the A4988 module is what I am going to try using, I already have some of the modules and I won't have to spend valuable programming time making a new driver circuit. An article on the A4988 can be found here. Testing them out I get the following results by using an Arduino Uno to control each stepper's direction and speed:
As you can see, it moves....but only just. The driving program also includes some turns where one side is driven in the opposite direction to the other. R2B4 doesn't seem to like turning like this which maybe is a function of the carpet friction and the double drive wheels.
{gallery} Driving R2B4 |
---|
R2B4 - A test run of motor torque |
The drive and temporary tensioning (aka 4mm croc clip) |
4. Drivebelts
My first two homemade GT2 drivebelts fell apart. One was made by using rubber glue and a 50mm overlap whilst the other was a clean butt slice with superglue. To make them stronger I decided to stitch them together using a needle and some strong thread. These seem to be holding up much better. To align the belt I used a small offcut as a temporary guide.
5. Conclusions of #5
I found that a bit disappointing and had hoped R2B4 would have more torque than it did - being able to turn would have been great. However this is also the first contraption I have ever made that moves along and therefore I kind of think of it as a success as well....eg I've learned quite a lot. There are a few things I need to try like measuring the current to ensure the A4988 modules are running at maximum current. I need to add proper belt tensioning (rather than the screwdriver and 4mm croc clip) and I need to secure the driver boards.
6. What Next
I think from the start I was stating I needed to do some actual code dev on the STM32 boards (Nucleo and SensorTile) and with this chassis "almost usable" that is what I will concentrate on in blog #6.
Top Comments
Rod,
I wondered what the screwdriver was for!..
I did find that getting these kind of step motors to work was a real dog, as you seem to be experiencing and really take some work to get going properly. I…
Hi Rod,
I really like that you have fabricated so much of the structure yourself. It reminded me of a time when I was a child and a neighbor kid and I decided to build a go-kart. We had everything we needed…
Thanks for your encouragement John.
Your go-kart sounds great, like all great things that come from childrens' imagination and determined ingenuity - and probably echoes many engineers' early days …