Adjusting motor current/voltage

Yep,
I went to Jaycar (an electronics supplier) and bough a cheap plastic enclosure & several 5 pin plugs (with screw in locks) and a simple 2 pin plug (like a standard speaker cable plug).

Basically, all I’ve done is wired everything up so it works, then mounted the controller in box, cut & soldered each 5 pin plug & socket into the wiring for each stepper motor (using only 4 of the pins) and then done the same for the limit switches.

The spindle motor is run via the 2 pin plug. The USB cable enters through a hole in side of the box. The hole for the fan is cut using the machine itself.

Cables are clipped to the side of the bench (actually an Ikea Table - black, nice & flat, tall enough that I don’t need to bend over, and at 1200x1200, big enough for my machine. Cost was $199).

This way, I can simply un-plug everything and work on the controller

Jerry,
Yes, I do have a dial indicator and yes, I’ve used it to the the the mechanical side of things to be as accurate as possible.
The error I’m having is related to the machine losing its position during cuts (i.e. when it’s finished and returns to 0,0,0 it’s in a different position.

I’m not sure what you are asking. A solution to which problem?

When you lose position do you hear a rumbling? If so it may not be the pots it may be an intermittent wiring connection. One way to prevent this would be to add ferrules to the ends of the wires.

David, it’s a simple process.

The load can consist of a single resistor. Something like Mouser part # 284-HS100-10F. It is a 10 ohm resistor rated at 100 watts. (about $12).

The NEMA 23 motor that Inventables sells (part # 25311-03) is rated at 3.2 volts and 2.8 amps per phase.

The NEMA 17 motor (part # 25253-01) is rate at 2.8 volts and 1.68 amps per phase.

The gShield is rated at 2.5 amps per phase with proper cooling.

NOTE: The NEMA 23 stepper motor can draw more current than the gShield can supply so if you do this process make sure that the current limit pot is set to it’s lowest current setting and slowly move up to the current limit that you want.

For the standard 24 volt supply: i = v / r = 24v / 10 ohms = 2.4 amps; p = i ^ 2 * r = 2.4 * 2.4 * 10 = 57.6 watts.

I like some headroom on the power dissipation and the 100 watt resistor only costs a few cents more than a 75 watt.

If you plan on running the gShield at the 2.4 amps you should check with the gShield providers to find out what “proper cooling” means for them.

So the test setup would be to disconnect one of the stepper motors from the gShield. Run one wire from one of the coil connections through an ammeter then through the power resistor and then back to the other connection for that coil on the gShield.

You might have to use something like the Universal G-code Sender to activate the stepper motor, but that should be obvious if you don’t get any current through the ammeter. I don’t know if you can do this through Easel.

It 's much harder to describe than to do.

If a drawing is needed then I can do that, just let me know.

Larry

Larry,
Thanks for your patience and well crafted replies - I’m surprising myself by understanding most of what you say.

Each axis of my machine is plugged into the controller’s box via a 5 pin plug so getting access at the controller is simple (although access at each terminal strip next to each motor is pretty simple also).

Just a couple of questions:

  • will it be ok to disconnect all motor control cables when I run the test? Doing this would mean I can then use the GCode sender to issue a command to move something like 100 inches, giving me time to tweak the pots, read the meter and so on.
  • for the axis running the paired motors, is it 2.4 amps for each motor?
  • each motor has two pairs of wires (I kinda understand why). Do I set the load to be 2.4amps for each pair of the four wires, or to I connect them together somehow (in series I’d assume) and set the load for both pairs at once?
  • a simple wiring sketch may be helpful, but I’m pretty sure I can work through it without one

And finally. (For this post anyway), I’d assume it’s the the board with the pots on it that I need to cool rather than the Arduino itself? Having put the controller in a nice neat little box (albeit with the fan cut through) I was already concerned about heat. How concerned do I need to be about turning the volume up 9 on every axis? Without looking, are there items to which I can attach some small heatsinks?

Hopefully following your advice, I’ll be be able to make something that others can copy. I doubt im the only one struggling with this.

Thanks,
David

Known problem is Y axis stepper motors. You’re giving advise how to adjust voltage on it and parallel sharing the same current. I had same problem and other guys help me to increase voltage.
Then I started to think about upgrading steppers with the stronger ones if they are weak.
When I read your explanation, start wondering if same power supply and limited adjust pod, can we use bigger stepper and share same voltage.
Do you think we have enough power for two 3.2 V steppers. I hope clear enough.

Thanks, it’s not something I’d considered.

I might tin the wires going into the controller with solder, I’ll assume this should be reasonably similar and easier. The wires on each terminal strip I’ll crimp or solder with spade connectors.

When I first put the machine together, yes, I was getting a rumbling noise. 99% of which disappeared when I first bumped up the current at each pot. The adjustments I’ve made however, were pretty modest, I was concerned about breaking the pot or overheating the motors.

Each comment and suggestion however, is gradually making the machine better and better. Who knows? I might even be able to make something soon…

@DavidWestley

Hello David,

Glad to hear you have a dial indicator. Could you humor me with a test to rule out something I’ve seen;

Could you put the dial indicator on the machine measuring the Y axis then using the command through UGS to enable the spindle at max rpm (S14000 M3) and just let it sit for a while and watch the dial indicator and see if it moves.

•will it be ok to disconnect all motor control cables when I run the test?

Yes

•for the axis running the paired motors, is it 2.4 amps for each motor?

It’s 2.4 amps per phase. Bipolar steppers have two phases. The black/green is a phase and the red/blue is a phase (changes to red/white in the add on wire). There is only one pot to adjust the current for each motor driver (one driver chip for one motor two phases). So what you are really doing is setting the current limit for the driver chip. It will take care of the two phases.

See if this image clears things up a bit.

This will give you a good starting point and the maximum performance from your motors. If you start getting thermal shutdowns then you may have to add more cooling, or back off the current limit for the driver that’s shutting down.

1 Like

Let’s see if we can work this out.

The voltage is not what we are setting. The controller chip will use PWM (Pulse Width Modulation) to turn the voltage to the motors on and off to obtain a safe current in the stepper motor. When two electronic devices are connected in parallel the voltage that each device sees is the same.

What does change in the parallel configuration is the current through each leg of the circuit depending on the resistance and impedance in each leg of the circuit.

For two stepper motors in parallel it is not possible to set the ideal current limit for both motors because they may have different resistance/impedance characteristics.

So, what you do when you control multiple motors from one driver chip is that you try to obtain a compromise that works for your particular machine.

If you have a bigger or more difficult load to move, larger motors may solve the problem. Larger motors require larger currents and the driver chips on the gShield are limited to 2.5 amps per phase.

If you need larger motors (more current) you would need to get a different motor control board to go with the larger motors.

The NEMA 23 motor that Inventables sells can work with slightly more current than the gShield can deliver. You don’t have to run them at full current so there is some benefit from having the larger motors. I ordered the larger motors for my machine.

I hope this helps, if not ask and I’ll try again.

Larry

2 Likes

Thanks Larry.

Thanks mate, I think you’ve nailed it.

I’m back at work for the next few days so I’ll play again soon. Here’s hoping I don’t do something dumb and let the smoke out of any of the doodads on the circuit thingo.

Will do ASAP.

David, just a quick follow up.

If you use the resistor that I found at Mouser, it requires a heat sink to handle the 100 watts.
To get it to handle 100 watts you need to attach it to an aluminum plate 32 cm x 32 cm x 3 mm thick with thermal transfer compound between the resistor and the plate.

You might be able to use a little less cooling if you just test for very short periods separated by time.

David, turns out there’s a better way to do this.

The pots on the grbl board are setting the Vref (Voltage Reference) level on the TI stepper driver chips. This determines the current limit for the driver.

You can measure this voltage at pin 8 of the driver chip (see photo) and adjust it to obtain a given current limit. Use great care as the pins are close together and it is easy to short the pins together with your meter probe. Really bad things happen.

The gShield (version 5) uses a 0.1 ohm current sense resistor so the formula is Vref = 0.8 * I.

For the maximum current the driver chip can deliver with cooling you would set the Vref voltage at (0.8 * 2.5) = 2 volts. Should derate to 1.9 volts to allow for error tolerance.

For the NEMA 17 (25253-01 motor that Inventables sells it would be (0.8 * 1.68) = 1.34 volts. Should derate to 1.2 volts to allow for error tolerance.

This was determined by looking at the data sheets and schematics. I don’t have my X-carve yet so I haven’t been able to actually test this.

The gshield doesn’t have a nice probe point to read the Vref voltage like pololu stepper drivers do. But I found that it’s safer to measure the voltage from one of the leads of the potentiometer, rather than on the stepper driver IC. I can’t recall which one but it’s pretty obvious from what I remember. (The voltmeter ground should be connected to the gshield ground breakout)

Yes, I agree. That requires a little more electronics knowledge on the part of the user, but is a safer way to do it.

Has anyone tested the stock cooling fan to see if it is enough to have the stepper drivers deliver the full 2.5 amps, or is the practical limit lower than that using the stock fan?
Thanks…

Just an update on where I am with this long running saga…

After all the great suggestions I received (particularly the help LarryM provided), I’ve got to admit I ‘chickened-out’ and simply adjusted the card pots “by ear”.

I still believe that adjusting the current to a pre-determined level would be the ideal way to set up these machines, particularly when a quick look through the “troubleshooting” section of the forum reveals a large number of machines that appear to be losing steps, stalling, making noises etc - all which are symptoms of having the current too high or too low.

To get my machine into a useable state, I set the machine to begin ‘air carving’ a complex design (no bit in the collet and the spindle turned off) and then sat and tweaked each axis until I could identify the points at which the current was “too low” and “too high” and then I’d leave the pot set roughly midway between these two points.

In practice, this means listening to the machine while it’s indexing and adjusting the pots until each axis is running smoothly without any ‘grumbling’, stuttering or noises other than the smooth sound of each axis motor.

This is something that I’ve found is much much easier to do while the machine is running some code rather than just indexing or rapid-travelling - I initially thought the current was fine because I’d set it by indexing it 30" in each direction and things sounded nice & smooth, but I was still having issues while carving. When I reset the current during some air-carving, 99% of the problems are now gone.

Anyway, many thanks again for everyone’s help and suggestions along the way. Now, all I need to do is to get those damned limit switches to work…

Regards David.