T O P

  • By -

MissTortoise

Hi, good work getting inspired! My 15yo kid just wants to game all day. Motors are inductors. You can think of them as having some inertia to current, they don't like the current to change and will spike the voltage up when the motor is switched off and down when turned on. The capacitor goes across the input terminals and stores the voltage when stopped so it doesn't kill the rest of the circuit. It also provides a bit more current when the motor is starting. The 5v pin for the dev board goes into an LDO voltage regulator that supplies 3v3 to the esp. If the 5v is a bit high or low, it smooths it enough to run the esp. Just supply 5v to it. If you're truly using a battery for this, which I don't really recommend, you'll be better off regulating that to 5v for the motors for the same reasons as above. I'd probably recommend a mains powered 5v supply rated to like 3A or whatever you're going to draw for the motors, with a margin. You will probably find a discarded phone charger that you can just chop the plug off, just check the output rating. I don't know that much about stepper drivers, so I will leave that one. Feel free to ask more questions, happy to help, but I'm going to be busy now for about 8hrs so will get back to it later.


BooQwerty

Hi, thanks for your reply! I understand the part about the different 3.3/5V pins now, thanks! I don't completely understand the part about the battery/power supply. I was going to be use a cheap power supply from china because I thought I needed 24V and 15A to power the motors. But someone else told me I'd only need a power supply of about 24V and 4A because the motors chop down the voltage to their effective voltage. Is that true? Although as you said if this isn't your domain I'll find it out myself!


Guapa1979

What stepper motors are you planning on using? This is key to know what power supply to use and how to set the current limit.


BooQwerty

I'm going to be using NEMA 17 stepper motors rated at 1.2A, 5.5 ohms, and 6.6V. I've read up a bunch and I think a 120W 5A power supply should suffice. The recommended current limit, if I'm not wrong, for drv8825s is 1.2A. So to set Vref, I just have to divide the current by 2 (formula I found online). I'm probably going to keep the current slightly lower, maybe 1A or 1.1A. So Vref = 1.1A/2 = 0.55V. The power supply really confuses me. There are so many rule of thumb methods and formulas. I've chosen a 24V, 5A power supply because it was enough according to a bunch of calculations I found online and provided sufficient headroom. One of the formulas i remember using is P = I²R = 1.2² * 5.5 = 7.92W per motor, which is 47.52W for 6 motors. Another one was the 2/3's rule, where you multiply the current per phase for all motors by 2/3. So 6 * 1.2 * 2/3 ≈ 4.75 A. There was so much variation in what to choose so i just went for 5A to play it safe (I think).


Guapa1979

Assuming your data for the NEMA17 you will be using is correct (i.e. 1.2 amps max current), then your Vref calculation is correct. You are right to try it at a lower current that the stated maximun first and then if necessary adjust it upwards if the motor doesn't run properly. You have quoted a figure of 6.6V - where does that come from and why would you use a 24V power supply in that case? The max current consumption is 6x whatever the individual maximum is, which in your case is 6x1.2=7.2 amps. Are all 6 motors ever going to run at the same time and are they ever going to run at full duty cycle? If the answer to either of those is no, then the max current will also drop. You would be wise to use a power supply rated higher than your calculated maximum, to be on the safe side. By the way, I think you are overthinking the power supply question - if in doubt go bigger (max current), don't go smaller. And to address your question of how to get the power to each driver board, this will partly depend on whether all the motors are going to be running at the same time. Best thing to do would be to run 6 pairs of positive and negative wires from the power supply to each board, with 6x capacitors connected at the board. You can also daisy chain the boards, ie the first board is connected to the power supply, then connect the next board to the first board and so on (again with a capacitor at each board). Be aware you might suffer from voltage drop with the last board getting less power as a result than the first.


BooQwerty

Hi, thanks for your reply! A maximum of 2 motors can run at a given moment (since the opposite sides of a Rubik's cube can turn without interfering with each other) and the motors would (in a very perfect ideal condition) each run 1/6th of the time. As for splitting the power, I bought a cheap 6 way power splitter from where I could hook the drivers up directly. Someone else told me I could just run the power through one side of the breadboard and the other side could be for the power from the MCU. I read through a webpage from geckodrive and they explicitly stated not to daisy chain the motors in case you were using more than one. I think if everything else fails I'll try daisy chaining them but I think I won't reach a point where that'll be necessary. Thanks once again for your answer!


Guapa1979

In which case your power supply only needs to be 2x the max amps of one motor. You could then add on another 50% as a margin. I don't think daisy chaining will cause any issues, provided you don't use really thin cable, as you are only running two motors at a time. However, this is a development project and you can try things out and change them if they don't work - it's really the only way to learn and solve problems. Good luck!


BooQwerty

Thanks!


SignificantManner197

Wow


BooQwerty

Wow