Stepper power supply - Page 1
Forum section: electronics / beginners

author: chipx
author_rank: Newbie
timestamp: February 01, 2020, 11:11:30 am
content: 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

author: pwlps
author_rank: Frequent Contributor
timestamp: February 01, 2020, 12:52:27 pm
content: Quote from: chipx on February 01, 2020, 11:11:30 amI'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.

author: chipx
author_rank: Newbie
timestamp: February 01, 2020, 01:20:32 pm
content: Okay. Can you lose steps? Is he working badly? Thank you

author: pwlps
author_rank: Frequent Contributor
timestamp: February 01, 2020, 01:38:18 pm
content: Quote from: chipx on February 01, 2020, 01:20:32 pmThe 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.

author: rstofer
author_rank: Super Contributor
timestamp: February 01, 2020, 05:15:32 pm
content: Quote from: chipx on February 01, 2020, 01:20:32 pmWhat is the stepper driving?

author: chipx
author_rank: Newbie
timestamp: February 01, 2020, 05:44:36 pm
content: 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.

author: Nominal Animal
author_rank: Super Contributor
timestamp: February 02, 2020, 01:01:56 pm
content: 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 / s2of 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.

author: chipx
author_rank: Newbie
timestamp: February 03, 2020, 07:27:51 am
content: 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

author: Nominal Animal
author_rank: Super Contributor
timestamp: February 03, 2020, 12:45:56 pm
content: Quote from: chipx on February 03, 2020, 07:27:51 amOh, 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. controljerk, 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 ratej, and accelerationa(t)=jt+a(0), velocityv(t)=0.5jt2+v(0), and positionx(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 jerkj(t)=j0(t1-t)/(t1-t0)+j1(t-t0)/(t1-t0) i.e. a linear ramp fromj0at timet0toj1at timet1, then accelerationa(t)=((j1-j0)t2+2(t1j0-t0j1)t)/(2(t1-t0))+a(0), velocityv(t)=((j1-j0)t3+3(t1j0-t0j1)t2)/(6(t1-t0))+v(0), and positionx(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 tocountthe 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.)