Author Topic: Stepper power supply  (Read 1461 times)

0 Members and 1 Guest are viewing this topic.

Offline chipxTopic starter

  • Newbie
  • Posts: 4
  • Country: it
Stepper power supply
« on: February 01, 2020, 11:11:30 am »
Hi everyone, what happens if I feed a 12V - 0.14A  stepper with an 11.1V - 2A power supply?
Arduino is ok but not if I burn the steppers with 11.1V.
Thanks
 

Offline pwlps

  • Frequent Contributor
  • **
  • Posts: 372
  • Country: fr
Re: Stepper power supply
« Reply #1 on: February 01, 2020, 12:52:27 pm »
Hi everyone, what happens if I feed a 12V - 0.14A  stepper with an 11.1V - 2A power supply?
Arduino is ok but not if I burn the steppers with 11.1V.
Thanks

I'm not sure I understand well your problem (don't know if Arduino is ok with 12V) but if the stepper is rated for 12V I don't see how you can burn it with 11.1V.

Edit:
12V - 0.14A means that if you apply a 12V voltage the current will be 0.14A.  With 11.1V the current will be roughly 0.13A.
« Last Edit: February 01, 2020, 12:59:47 pm by pwlps »
 

Offline chipxTopic starter

  • Newbie
  • Posts: 4
  • Country: it
Re: Stepper power supply
« Reply #2 on: February 01, 2020, 01:20:32 pm »
Okay. Can you lose steps? Is he working badly? Thank you
 

Offline pwlps

  • Frequent Contributor
  • **
  • Posts: 372
  • Country: fr
Re: Stepper power supply
« Reply #3 on: February 01, 2020, 01:38:18 pm »
Okay. Can you lose steps? Is he working badly? Thank you

The torque will decrease proportionally to the voltage decrease, the maximum speed will also decrease slightly, but if you have enough margin (on the torque you need) you won't  lose steps. I sometimes used a 12V stepper with 10V, I was just driving it a little slower than the datasheet rating to make sure I don't lose  steps.
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9964
  • Country: us
Re: Stepper power supply
« Reply #4 on: February 01, 2020, 05:15:32 pm »
Okay. Can you lose steps? Is he working badly? Thank you

What is the stepper driving?
 

Offline chipxTopic starter

  • Newbie
  • Posts: 4
  • Country: it
Re: Stepper power supply
« Reply #5 on: February 01, 2020, 05:44:36 pm »
They are 4 stepper,Longruner Stepper Motor Nema 17 Bipolar 42mm 37oz.in(26Ncm) 12V 0.4A Lead 3D Printer Hobby CNC 17HS13-0404S LQD06, with 4 rubber wheels 85mm diameter, on a PLA molded frame for a robot rover.
The drivers are DRV8825.
 

Offline Nominal Animal

  • Super Contributor
  • ***
  • Posts: 7198
  • Country: fi
    • My home page and email address
Re: Stepper power supply
« Reply #6 on: February 02, 2020, 01:01:56 pm »
DRV8825, like other hobbyist stepper driver controllers (A4988, TMC2208, etc.), control the current to the stepper motor.  The small surface-mount potentiometer is used to adjust this.  The motor supply voltage can be anything the controller can handle; in your case, anything from 8.5 V to 40 V.  As long as the motor supply voltage is higher than the motor nominal voltage (adding a couple of fudge factors for chopping behaviour and inductance and such), you'll get the full rated torque from your stepper motor.  With motor supply voltage less than the nominal stepper motor voltage, but within the controller voltage range, it'll work, but you'll get less torque, as the controller cannot reach the rated current for that voltage.

(This is also why the specs list the rated voltage: so that users can pick the best motor given their supply voltage and controller.  It is not a "recommended operating voltage".)

With 85mm diameter wheels (267mm perimeter), each full step advances 267 mm/200 [steps per revolution] ≃ 1.33 mm.  Depending on the inertia (basically weight) of the robot, you will be limited to relatively low accelerations, or you will lose steps.  Using microstepping will reduce that, but microstepping also reduces the output torque somewhat.

Let's assume your steppers have 0.1 Nm (10 Ncm) of torque in practice -- this includes losses due to microstepping, possible bearings, wheel friction and deformation, and so on.  (I just pulled that number out of my backside, though; it is purely a guesstimate.)

You have four of them, so 0.4 Nm total.  The wheel radius is about 0.043 m (42.5 mm), so the force exerted by all four wheels is 0.4 Nm / 0.043 m ≃ 9.3 N.  So, the wheels can exert about 9 N = 9 kg m / s2 of thrust.

If your rover weighs say 10 kg, this means the maximum acceleration (based on F = ma) 0.9 m/s².  Because in constant acceleration point moves x = 0.5 a t2, starting from standstill the rover should be able to move 0.45m in the first second.  In ten seconds, it has reached 9 m/s velocity (32 km/h, wheels turning at about 2000 RPM), and has travelled 45 meters.  That is, it would, if the steppers actually had that torque from standstill to 2000 RPM; they don't.  In real life, the torque curve is a hump, and the peak value is what is reported.  So, at standstill, the torque is much lower, and in practice your rover will initially accelerate slower, then increase acceleration towards its peak performance.

If you find your stepper motors are not powerful enough, look into higher-torque stepper motors with current between 1.2 A and 2 A, and rated voltage in the 2 - 4 V range; the DRV8825 can drive those very well from your 11 V supply.
 

Offline chipxTopic starter

  • Newbie
  • Posts: 4
  • Country: it
Re: Stepper power supply
« Reply #7 on: February 03, 2020, 07:27:51 am »
Hi, what an excellent explanation, too much!
Anyway, my robot weighs 2.2Kg with battery included.
At most I will add sensors for various measurements, but they weigh very little and are all connected to arduino 2.
Stepper's data is this:

Electrical specifications:
* Manufacturer Code: 17HS13-0404S.
* Motor type: bipolar stepper.
* Pitch angle: 1.8 degree.
* Tightening torque: 26 Ncm.
* Rated current/phase: 0.4 A.
* Resistance phase: 30ohms.
* Inductance: 37 mH +/-20% (1KHz).


Physical specification:
* Frame size: 42 x 42 cm.
* Body length: 34mm.
* Pipe diameter: 5mm.
* Front tube length: 20 mm.
* Length of the D-cut: 15 mm.
* Number of cables: 4.
* Length of cable: 300mm.
* Weight: 230g.

Thanks for answering and solving the problem!!!! :-+  :)
Have a good day.
Ric

 

Offline Nominal Animal

  • Super Contributor
  • ***
  • Posts: 7198
  • Country: fi
    • My home page and email address
Re: Stepper power supply
« Reply #8 on: February 03, 2020, 12:45:56 pm »
Anyway, my robot weighs 2.2Kg with battery included.
Oh, in that case, I don't think you'll have any issues with those particular stepper motors.

You will want to implement velocity and acceleration control to not jerk too much; basically the same idea as modern elevators: they increase acceleration from zero to maximum and then to zero when reaching maximum velocity, i.e. control jerk, the third derivative of position.  (The four quantities used are position, velocity, acceleration, and jerk; jerk is to acceleration like acceleration is to velocity, and like velocity is to position.)

Just ramping velocity linearly will work, but you may notice a "wobble".  This is because then acceleration spikes momentarily, but otherwise is zero, which is the same as giving it a sharp kick.

If you use a constant jerk, acceleration increases/decreases at a constant rate j, and acceleration a(t)=jt+a(0), velocity v(t)=0.5jt2+v(0), and position x(t)=jt3/6+x(0).  This also causes the rover movement to become "less robotic" and "more carefulling"; it's hard to describe the two, but if you've seen the difference in real life, you'll know what I mean.

Ramping jerk linearly between zero and its extrema gives even better results, almost "sneaky", but the math becomes even harder to implement.  If jerk j(t)=j0(t1-t)/(t1-t0)+j1(t-t0)/(t1-t0) i.e. a linear ramp from j0 at time t0 to j1 at time t1, then acceleration a(t)=((j1-j0)t2+2(t1j0-t0j1)t)/(2(t1-t0))+a(0), velocity v(t)=((j1-j0)t3+3(t1j0-t0j1)t2)/(6(t1-t0))+v(0), and position x(t)=((j1-j0)t4+4(t1j0-t0j1)t3)/(24(t1-t0))+x(0).

As you can see, the math formulae is simple, but writing the "engine" to generate the pulses at appropriate times becomes a bit hairy, especially when you want to count the exact number of pulses generated per stepper (so not using PWM), to know how much and in which direction the robot has (ostensibly) moved.

If you obtain four 6mm diametrically magnetized magnets, and superglue them on top of suitable isolating washers at the rear end of your stepper motors, you can use a cheap AS5600 sensor modules (4€ at fleabay) to detect the actual angular position of each stepper axle.  Some of the modules do come with a suitable magnet, but don't assume they all do.  Also, that won't tell you if the wheel slips on the surface, but it will tell you if you lose steps/microsteps (at something like 1/8 microstepping resolution).

(The AS5600 boards are truly trivial, just two pullup resistors for the I2 (typically 10kOhm), and a 0.1µF/100nF decoupling capacitor for the supply voltage to the chip.  You could easily make your own boards at e.g. EasyEda, so you could just screw them to the steppers with suitable bolts and extra nuts.  If LCSC had any of these in stock -- they're more expensive than the fleabay boards at Mouser and Digikey; about 3€ apiece in small batches --, I would have done this myself already; they'd allow a closed-loop control for a 3D printer: no more lost steps at all.)
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf