Notifications
Clear all

Stepper motor voltage

12 Posts
3 Users
5 Reactions
59 Views
(@andydowns)
Member
Joined: 1 week ago
Posts: 12
Topic starter  

I have some of these stepper motors

SIMAX3D Nema 17 stepper motor 42-34 (5Pcs/pack) 1.5A-3.8V 2 phase 4 wires 1.8 degrees with 39.3 inch cable for Creality CR-10 10S Ender 3 3D printer/CNC extruder and Y-axis

https://www.amazon.co.uk/dp/B0B8D9WK77

and thought I was going to use the A4988 driver as shown in one of the dronebot videos. When I started looking at the specs, though, I noticed a mismatch in voltage.

The motor description shows 3.8V 1.5A and the A4988 driver shows an input voltage from 8V. Having looked at other drivers, they show a lower limit of similar voltages.

I noted from another topic in this forum section that @davee mentioned about driving the motor at a high voltage/lower current, but am unclear how to work this out for the motors I have.

So, the question is, can I run these motors at, say 12V and limit the current to 0.475A. (Have I worked that out correctly?)

or do I need to find another driver for lower voltages.


   
Quote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 4 years ago
Posts: 7384
 

@andydowns There is a bug in the forum, amazon links do not work. I use a URL shortener which does work. I think I found it on amazon.

I am no expert on steppers, but I found an arduino forum thread that covers what you are asking. Read ALL of it and make notes, some members contradict others but it should be easy to follow the people who know what they are talking about. Good luck.

https://forum.arduino.cc/t/is-my-setup-rights-for-a-nema-17/1102514/44

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.


   
ReplyQuote
(@andydowns)
Member
Joined: 1 week ago
Posts: 12
Topic starter  

@zander Thanks Ron,

I'll bear the bug in mind.

I've read through said forum posts and managed to glean a little.

I have found a video by Pololu which explains it further and I think I have enough to move forward.

I've bough some A4988 and will give them a go.

 

 

 


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 4 years ago
Posts: 7384
 

@andydowns You probably already have this info, but I will re-iterate just in case. Look at Bill's article at https://dronebotworkshop.com/stepper-motors-with-arduino/#A4988_Current_Adjustment

paying special attention to the section seen below

Screenshot 2024 07 05 at 10.03.15

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.


   
AndyDowns reacted
ReplyQuote
(@andydowns)
Member
Joined: 1 week ago
Posts: 12
Topic starter  

@zander Thanks Roń,

Yes, I had watched that as well. Very helpful.


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 4 years ago
Posts: 7384
 

@andydowns Remember, watching is for overview, the matching article has the details.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.


   
AndyDowns reacted
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 4 years ago
Posts: 7384
 

EVERYONE This is the Free URL shortener I am currently using, the one I used before disappeared.

This is a chrome version, there should be similar on other browsers 

Screenshot 2024 07 05 at 10.44.33

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.


   
AndyDowns reacted
ReplyQuote
(@davee)
Member
Joined: 3 years ago
Posts: 1791
 

Hi @andydowns,

  Ron (@zander) has already pointed you to some useful information as to how to set up drivers like A4988, so I won't go over that. However, I am not sure if that will answer why you see motor voltage of say 3.8V, and then find the stepper driver wants (say) 12-24V or more. (I previously wrote that you might find this surprising, but as my note was already long, I avoided making it longer.

This is not a 'proper' full explanation ... just a quick 'flavour' of what is going on.

The stepper driver effectively puts a fast switch in series with the power output to each motor coil. Thus if the power supplied to driver chip is (say) 12V, then when the switch is closed, the voltage going to the coil will be (very nearly) 12V, which, if it stayed closed for more than a second or so, would soon result in magic smoke from the motor. Hence, the switch will be opened and closed many times per second, to limit the amount of power sent to the coil to a safe level, so that the motor does not overheat.

You may be interested to know, the motor presents an 'interesting' load, in this situation.

It is possible, but usually not a good idea, to supply the motor with the specified voltage ... say 3.8V. If this voltage is continuously applied to the coils, and not 'switched' or 'stepped', then the current will be determined by a simple Ohm's law situation, where the resistance, is the DC resistance of the coil.

e.g. if coil resistance is 2 Ohm, Applied voltage is 3.8V, then current will be 3.8 / 2 = 1.9 A

------------

However, in a 'more realistic' situation, the voltage applied to the pair of coils will be repeatedly stepped through a sequence, so that the rotor moves, 'following' each step.

Now each coil is also an 'inductor', in that it is a coil of wire, with an iron core, which will have inductance. And you may recall, that when a voltage is first applied to an inductor, then the current flow will not instantly rise to the full value, but instead, it will follow an exponential curve. Similarly, if the current flow is interrupted, then the inductor will try to maintain the current flow, which will similarly fall in an exponential curve fashion.

[ This effect is also the basis of a switched mode power supply, and there are many similarities in operation.]

The driver chip makes use of this 'slow' current rise and fall, by switching on and off at a sufficiently high rate, to prevent the current ever reaching the '100%' value you would expect from the simple Ohm's law calculation, based on the resistance of the wire.

By supplying a much higher voltage than (say) 3.8V, the current will rise quickly when the switch is first closed, but still be safely limited by the driver chip opening the switch, when the current approaches the specified limit, which means the motor will respond as quickly as possible, when 'stepped' to the next position.

Furthermore, because a very fast switch is used, then the switch is either 'open', with no current flow, (and no power loss) or 'closed'  with minimal resistance in the path, to waste energy.

This is similar to the situation with voltage regulators ... simple linear ones, like the 7805 series, limit the current with a 'resistor-like' action, and tend to dissipate a lot of heat, whilst the switched mode ones can have efficiencies of 95% and better.

-----------

Also, when the motor is spinning at an appreciable speed, it also acts as a generator, with the generated voltage opposing the applied voltage, and tending to reduce the current, and hence the torque. The driver chip is tasked with maintaining the preset current, and to do this, it must have more 'extra' volts from the supply

Thus, stepper motors in small 3D printers are typically powered from a 24V supply, so that they can be stepped fairly quickly, whilst maintaining sufficient torque.

------------

I hope this gives a general flavour of why the driver voltage is normally much higher than the nominal 3.8V (say) that you will see in the motor spec, and why it is necessary to preset the motor current, typically by adjusting a small potentiometer, before connecting the motor, as explained in the videos.

Best wishes, Dave

 


   
AndyDowns reacted
ReplyQuote
(@andydowns)
Member
Joined: 1 week ago
Posts: 12
Topic starter  

@davee Thanks for explaining that Dave. That is exactly the right level for my limited electronics knowledge. I actually understood it. Any deeper would probably have lost me.

I was trying to understand it just using ohms law and now understand it is much more complicated than that. Inductance is something that has always baffled me. 

Your explanation also ties in very nicely with the instruction given in the Pololu video.

I turned up a coupling to interface the stepper motor to a T8 leadscrew yesterday. The stepper drivers are coming today so things are moving along nicely.

I’m off to find some YouTube videos on inductance now. 🙂

 

This post was modified 2 days ago by AndyDowns

   
DaveE reacted
ReplyQuote
(@davee)
Member
Joined: 3 years ago
Posts: 1791
 

Hi @andydowns,

   Thanks for the kind words. You may find some of the explanations on the effect of inductance, a bit tough going, if you haven't been involved with them before. Apologies if the following is second nature to you, but just in case, I offer a quick glimpse into the information you might find helpful:

Some articles will talk about the effects when a sine (voltage) wave is applied, using expressions like phase shift, which is more applicable to applications, like signals used in radio and audio. (Good stuff, but leave for another day!)

For stepper motors, look for the case, when the voltage change is a step. Sorry, I have only spent a few seconds Googling, but have a glance at:

https://www.electronics-tutorials.ws/inductor/lr-circuits.html

Depending on your background, the exponential in the equations may look a little scary, but if it does, please don't take fright. Simple visualisation of the curves, such as the one below, from the same reference, tells you most of the story:

image

This article is a little more 'formal and rigorous' than you need at present, but hopefully gives you an idea of what I was trying to explain previously. I suggest you try to find some other explanations that also show these shaped curves.

Note, that for explanations, and also for simulations, it common to show a circuit with a resistor and an inductor in series, such as this sketch (a), from the same reference:

image

In the case of a 'real' inductor, such as coil of copper wire, the resistance is an intrinsic property of the copper. (i.e. it is not a superconductor). So that the inductance and resistance are just one physical component which cannot be split into 'pure' resistance and 'pure' inductance.

Splitting them into two components, connected in series, is a 'fiction', which enables relatively simple maths formulas to be used to predict how it will behave.

Also note that the article talks of a time constant, (often given the Greek symbol Tau

image

), which is measured in seconds. If the inductance of a coil is L Henrys, and the resistance is R Ohms, then:

Time Constant  = L / R

--------------------------

As I said above, this is only a rough guide as to what to look for. Hopefully the wonders of YouTube, etc., will be successful in explaining everything. Don't be surprised if it seems a little strange at first ... some of us have been puzzling over such matters for a long time.

Best wishes, Dave


   
ReplyQuote
(@andydowns)
Member
Joined: 1 week ago
Posts: 12
Topic starter  

@davee I’ve watched a few videos and have a very rough idea of how it works now. It certainly is a difficult subject when you scratch below the surface.


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 4 years ago
Posts: 7384
 

@andydowns Here is a link to all the details re the A4988.

https://www.pololu.com/product/1182

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.


   
ReplyQuote