Building a CNC router with absolutely no idea what I am doing (or design plans) from scrap continues to be a crap idea. But I persist. The incy-wincy NEMA17 stepper motors and Pololu a4988 drivers I had (and were familiar with from my 3D printer) are of NO use on my CNC machine.
I had a nagging feeling from day 1 that the little NEMA17s were not going to be up to the job.
The crux of the issue is that:
- A CNC mill pushes a tool through solid material. A 3D printer does not
- The mass of the moving elements of a CNC far exceeds that of a little 3D printer. Mass and getting it moving (acceleration) means force.
- If you build something out of scrap nothing lines up, so things just turn quite as freely as they could.
So I upgraded, I bought three NEMA24 motors (3.1Nm, 3.5A) and four M542T drivers (one extra for the z-carriage I bought, which has an NEMA23 integrated into it) from steppersonline.com
I also bought a 36V 10A power supply.
Amazing turnaround from steppersonline.com – my order arrived in 3-4 days! And the way it was packed into the delivery box was a work of art, and/or the work of an autistic chinaman. I wish I had taken a photo. The photos below show the before and after motor and driver-wise.
As you can (kind of) see in the photo above everything is a little…er…bigger. I have it all wired up. The new drivers did not fit in my wine control box that I had so carefully crafted, so I mount them on top, like those cars where the engine sticks through the bonnet.
The Protoneer Arduino shield accepts the Pololu drivers, they mount neatly on the shield. I feel perhaps this is what led me astray on the idea that I could use these drivers. Anyway. The M542Ts obviously don’t plug in – they are a little too grown up – so I had to work out how to get one talking to the other. I found a couple of images on Instructables (here and here) which gave me enough clues to work it out:
- Despite the 16 pins on the a4288 drivers, you only need four of them to connect to an M542T: Enable, Step (Pul on the M542Ts), Dir and Ground.
- You put the motor power straight (in my case 36V) into the M542T drivers (so you don’t put any power into the CNC shield terminals), the CNC Shield gets the power it needs to do microcontroller stuff from the Arduino.
DIP settings for the M542T driver
There are 8 little DIP (dual in-line package) switches on the M542T drivers.
I found this table for the current output for the driver. I erred on the side of caution to start and equated the peak current with the rated current for my motors. I then threw that caution to the wind and matched the RMS current to the motor rated current. This decision was based entirely on me skimming the pictures on this website and thinking their logo looked legit and they (i) knew what they were on about, and (ii) it applied to my setup. Hum? So I am OFF-OFF-OFF for all my motors except the z-axis.
|Peak Current||RMS Current||SW1||SW2||SW3|
I found this table too, for the micro stepping. I have mine at ‘8’.
I read a blog post once about how many bugs there are in computer code. To requote:
a) Industry Average: "about 15 - 50 errors per 1000 lines of delivered code." (b) Microsoft Applications: "about 10 - 20 defects per 1000 lines of code during in-house testing, and 0.5 defects per KLOC (KLOC IS CALLED AS 1000 lines of code) in released product
Getting to my point – does not matter how careful one is, Murphy’s Law presides. I was SUPER careful with my wiring for my new drivers. I spend a whole day on it, checking and rechecking. A day wasted because I had made one ‘little error’…
…I had connected (+) to (-) and vice-versa…
WTF? How is that possible?
I noticed after powering up the first time. Nothing. There were no green lights on my driver, just a little wisp of smoke from one – perhaps a little smoke signal saying “you F!*ked up”.
In the morning, grumpily having accepted that I was pretty sure I was going to have to order four new drivers I ignored reason, switched my (+) and (-). It worked. I am going to ignore the smoke.