Driving DC Motors w...
 
Notifications
Clear all

Driving DC Motors with Microcontrollers

31 Posts
5 Users
10 Reactions
2,909 Views
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 4 years ago
Posts: 7334
 

@rob7912 Maybe it depends on what the motor wants. Maybe @davee has a sermon that will give you some education.

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
(@davee)
Member
Joined: 3 years ago
Posts: 1765
 

Hi @rob7912,

  Not much of a sermon here I am afraid, but as Ron (@zander) has name dropped me, I offer a short-ish story about how to do a 'back of an envelope' guess-estimates. Of course, reality can be a lot more demanding, but we all have to start somewhere.

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

  Sorry, I don't know anything about golf carts or their batteries, but if you can find the specifications, then you can probably have a guess of your own. I should warn that such guesses have wide uncertainities, so it will still be a 'try it and see' experiment if the guesses look hopeful.

The first difficulty is knowing what the motor will need. You mentioned 24 V and 350 W, which simplistically (if the motor was a resistor) implies 350/24 = 14.6A. You also included '16.5' with no units, perhaps the spec said 16.5A? So maybe you are looking for a battery that can continuously supply 24V at more than 16.5A?

So you will need at least 4 batteries, if each is 6V, and ideally, it should be specified to be able to supply (say) at least 20A continuously, although some relaxation might be feasible if the load is less than the maximum (read on).

A confusion is that batteries are often specified in terms of 'C' rate. I'll borrow a clip that briefly describes what it is, but Google will provide further references as well

https://www.power-sonic.com/blog/what-is-a-battery-c-rating/

The battery C Rating is the measurement of current in which a battery is charged and discharged at. The capacity of a battery is generally rated and labelled at the 1C Rate (1C current), this means a fully charged battery with a capacity of 10Ah should be able to provide 10 Amps for one hour.

Note that you are looking for a maximum discharge rate ... and if, like the example it was 1C for a 10Ah battery, then the maximum continuous current should not exceed 10A. Exceeding the maximum current for a short time may sometimes be acceptable, but it risks the battery overheating, possibly with explosive results.

--------

The other criterion for the first guess, relates to how long it should be able to power the motor, before recharging. Batteries normally quote a capacity, like 10 Ah, and as explained, this implies 10A for 1 hour, and also  5A for 2 hours, and so on.

The next problem is knowing how much current the motor will take .... and this is like asking, How long is a piece of string? It depends not only on the motor, but also on the motor's load. The power rating you mention will be a maximum. If you exceed it by putting on a mechanical load that is greater than it can cope with, it will overheat, and magic smoke will appear, sooner or later.

However, if the mechanical load is light, the current draw will be less than the maximum, which will increase the time your battery will last. I have no idea how your motor will be loaded...

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

Note that battery capacity values like '10 Ah' are based on a 'fairly new' battery. Batteries gradually lose their capacity with use and age. A responsible manufacturer might make a nominal '11 Ah' product, label it as a '10 Ah', so that the user will have a reasonable lifetime in which it is still able to meet the full specification, and will assume it will continue to be used until it falls below 75-80%, say 7.5 Ah.

Less responsible manufacturers ship products that struggle to meet the spec when new, and others make up totally fictional numbers ..  beware.

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

You should also be aware that as the battery approaches the discharged state, its voltage is likely to drop as well, plus many battery types do not appreciate being completely discharged. All of this depends on the battery type, etc. but as a first guess, I would assume the battery is 30% lower capacity than claimed .. so the 10 Ah might perform like a 7 Ah in real life. But as I say, this is just a guess to get started.

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

So to your question, can you use some batteries you already have? I would check the maximum current they are specified to supply on discharge. I would hope your motor will be runnig below its maximum ability most of the time, so some derating from (say) 16.5A might be acceptable, but I would beware of pushing it too far.

If they look a 'reasonable' match, then, if you already have the batteries, why not try them? Make sure there is a suitable fuse, plus 'quick disconnect' provision if things go wrong. Measure the actual current draw with a mechanical load as close as possible to the final load.

When you have a measurement of the current flow, you can then do a quick calculation to estimate the time they will run before needing a recharge.

-------

Sorry this is a bit of a ramble, but please take care as stored energy in batteries and powerful motors can inflict serious 'bites', and I hope you are successful.

Best wishes, Dave


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

@davee @rob792 An excellent sermon as always by Dave. As a former designer of a 7,200 Watt Hour system, I can add a bit more knowledge. The first is a lead acid battery of the deep discharge variety (NEVER use a starter battery) should never drop below 50% SOC, ideally 70% normally.

The advertised (backed by independent testing) capacity hand in hand with the cycle count (which is a function mostly of chemistry but can be affected + and - due to use/abuse) tells you how long (indirectly) a specific battery will last (this is normally the point at which the max SOC is now 80% of initial) For the best Lithium batteries this is 3,000 to as much as 5,000 cycles, but for run of the mill lead acid may be only 100 to 200. 

Battery performance specs are extremely reliable and adhere to a testing standard so if two batteries are labelled at 100AH and one is 10% cheaper, get the cheaper battery.

If I recall your specs correctly, you will need 4 batteries in series to achieve 24V. Run time is then load in amps/Battery Capacity in Amp Hours.

I note you said you would be using a 12V battery, but GC batteries are 6V because a 6V battery weighs about 65lbvs, so a 12V would weigh about 135 lbs and OSHA does not allow employees to lift that much weight unaided so employers don';t want to waste money on extra employees to do the lift or purchase special lifting equipment so the battery manufacturers make mostly 6V Golf Cart batteries called GC1.

NOTE: Do not be confused, a T105 6V weighs 62lbs, and has a rating of 225AH, a T1260 12V weighs 78 lbs but only has 140AH or 62% as much power. The 78 lbs is designed to hit the OSHA linit of 75lbs +- 5%. This is why there are waaaaay mare T105's than any other type.

 

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.


   
DaveE reacted
ReplyQuote
(@rob7912)
Member
Joined: 9 months ago
Posts: 9
 

@davee Hi Dave, thanks for the reply. great info. My concern is that many ESCs state use Lipo or NiMH batteries. I wasn't sure if I could use non Lipo or NiMH type batteries. The batteries we have are 8 volt with at least 75AH lead acid. So that should give us about 35 AHs of usage. I was looking for a less bulky alternative that would not damage the ESC. The motor is rated at 16.5 amps. Since the motor is going to be run at 8-12 volts at a very slow speed, would the rule (don't know the name) that the lower the voltage the higher the amperage apply?

I just don't want to burn anything up(magic smoke). Our ESC is arriving Tuesday so I'll be able to test at that point and do some voltage and amperage draw tests.

Thanks again

Rob


   
ReplyQuote
(@rob7912)
Member
Joined: 9 months ago
Posts: 9
 

@zander Hi Ron, We have the cheaper Start/Deep Cycle batteries as we can't afford the good stuff (Trojans), we have 6, 8 and 12 volt batteries as our golf carts are different models. These batteries are about 75 AH each for the continuous rating. We will most likely run the motor at 8-12 volts. The 4 wheel cart weighs about 50 pounds and the battery weighs about 30 pounds. Since we are going to have a skeleton driving, the battery will give the cart some weight for stability as if a child were riding the cart. We're only going to run the cart at about 2-3 mpg.


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

@rob7912 I assume MPG (Miles Per Gallon) should be MPH (Miles Per Hour)

The design parameters of a deep cycle (few thick plates) and start (many thin plates) battery are mutually exclusive, you are buying marketing BS and getting ripped off. Get real deep cycle batteries, T105's are dirt cheap, $180 or less each and clones cheaper, but if you really want to go cheap, go to your local golf course in the fall and see if you can buy their old batteries. They change them annually en mass rather than waiting for them to die. They also buy cheaper than anybody so the used price will be less than $50 I would guess.

BTW, Marine Deep Cycle is more marketing BS. The easy way to tell is that if the battery has the word Cranking or any derivative then it is NOT a deep cycle battery. 

Good luck.

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
(@davee)
Member
Joined: 3 years ago
Posts: 1765
 

Hi @rob7912,

   Not my specialist area, but I don't see why there should be a problem using lead-acid batteries instead .. obviously their size and weight tends to preclude them from many applications, and I guess many ESCs are aimed at the smaller model market, so it might just be a case of listing what is 'normal' for the majority of their customers.

Bear in mind, batteries of the size Ron (@zander) was discussing store a lot of energy, so a short or massive overload can be very serious. Insert an inline fuse and a means of breaking the circuit as close to the battery as possible, thereby minimising the length of wire that is unprotected. They are also heavy, which brings it own risks!!

--------

You said the motor is 24V ... running at 12V sounds a bit hopeful. Have you tried it? Does it still produce enough torque? Generally, I would have expected the voltage to be that specified for the motor (e.g. 24V) and the controller to provide the necessary speed control. (I am not saying it will not work, merely that you are suggesting a voltage that is very different from specified voltage, and I would not like to even guess its performance.)

----------

Generally, reducing the supply voltage to a load may be expected to reduce current, but the electrical characteristics of a motor is surprisingly complex. A spinning motor is also acting as a generator, and the generated voltage reduces the effective voltage across the motor, and hence also reduces the current flow.

Perhaps the 'worst case situation' is when the motor is stalled, so there is no generator action, and the current is only limited by the resistance of the wires (plus any resistance in the power source, which can be very low), resulting in a high current flow. If this situation arises, it will often result in the motor rapidly overheating and destroying itself.

If the controller does not have overcurrent protection, it too could succumb to overload failure, if the current exceeds its ratings. I would hope a good quality controller would include overcurrent protection, but I have not checked any specific models.

Sorry, but it is not possible to give a simple answer to your question about current flow with a reduced voltage.

-----------

Best wishes, Dave


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

@rob7912 FYI @davee I agree with Dave. It is entirely likely that without the counter emf force the amperage will rise. HOWEVER I do not think that is your biggest problem. I am guessing this is for Halloween and it will be dark and their will be little kids around. Are you insured enough to deal with a multi million dollar lawsuit when a little kid suffers a life altering brain injury after your device knocks them over?

Good luck.

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
(@rob7912)
Member
Joined: 9 months ago
Posts: 9
 

@zander @davee

Sorry guys my mistake, yes MPH not MPG. And the motor is actually rated at 12 - 24 volts 16.5 amps and 350 Watts.

Ron thanks for the tip on golf courses, we'll have to check that out.


   
ReplyQuote
(@davee)
Member
Joined: 3 years ago
Posts: 1765
 

Hi @rob7912,

   The voltage range for the motor they are quoting is pretty wide ... typically, if you 'gradually increase the voltage' to a motor, from zero you have to get a fair way towards the maximum before it does much, but I don't know of any set rules to predict exactly how it will react.

If you have a spare battery, plus motor, etc., then the best thing is to carefully test it out. As I mentioned before, try to find a way of putting a 'typical' mechanical load on it ... it might spin with no load, but will it start to spin with a load on? You don't want to spend a lot of time making a fancy device, only to find the motor can't move it with the limited battery voltage, and the weight of batteries mentioned is far from negligible.

Note that a lead acid battery (and most batteries) give a higher voltage when freshly charged, that falls fairly quickly as it it discharges. e.g. I would guess a 12 V battery will start at 14 V, (maybe slightly more), but fall to nearer 12 V with a bit of use. 

Sorry, if I am being a little over cautious/pessimistic, but I wouldn't want to recommend something that 'might just work' and you be disappoointed if it doesn't.

So , by all means, do some careful tests, and see how you get on. If you report back, we all learn a little more. Beware of leaving the motor powered, but not turning, as it could get too hot rather quickly.

I wish you to be lucky with your project, in spite of my caution. And, of course, take appropriate precautions to make sure no one can get hurt.

Best wishes, Dave


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

@davee Here is a voltage chart for FLA (Flooded Lead Acid) for sealed AGM or GEL; the voltages are slightly higher. NOTE: The max depth of discharge should be no more than 50%. This will give a useful life of between 500 and 1200 cycles. A max DOD of 30% will give a much longer life.

NOTE: Life in this case means a peak SOC of 80%

SOC is State of Charge, DOD is Depth of Discharge.

Screenshot 2023 09 17 at 20.25.48

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.


   
Inst-Tech reacted
ReplyQuote
(@davee)
Member
Joined: 3 years ago
Posts: 1765
 

Hi Ron @zander,

   Thanks for your more precise information. I am sure your references are impeccable .. and I understand that lead acid batteries, like many rechargeables, wil give a longer life if you do not fully discharge them.

I was merely trying to give a rough idea. I thought I remembering seeing voltages around 14V when playing with the car in the past, but on reflection, maybe I was mistaken, but the voltage can certainly exceed 12V.

The main point was that the voltage will vary as it discharges, so that if the motor, with a nominal 24V rating, might just be able to perform the required task when a "12V" battery is fully charged, but the motor might might be very susceptible to the relatively small voltage changes as it discharges, if it has very little 'headroom' to spare. Apologies if my numbers were a bit inaccurate, I was merely trying to warn against the situation of the user being a mile from base, and the motor not running.

Similarly for the kind of usage envisaged, I imagine the user might be prepared to run the battery to lower levels of discharge than normally recommended, given that it will be a 'one off' type of occasion. I have the impression, but I may be mistaken, that lead acid batteries are particularly susceptible to premature 'ageing' if left in a discharged state for a period of time due to crystallisation of lead sulphate, but this problem can be reduced by promptly recharging, whilst the lead sulphate is still in the amorphous state.

I found one reference

https://web.archive.org/web/20100722144045/http://www.windsun.com/Batteries/Battery_FAQ.htm#Battery%20Voltages

that suggested :

Occasional dips into the yellow are not harmful, but continual discharges to those levels will shorten battery life considerably.

image

 where Yellow is 20-30% State of Charge, but I don't know how reliable this source of information is, so treat with caution. (The risks are all yours!!)

I confess to knowing nothing about golf carts, but are the batteries really only normally only discharged by 30%, and NEVER get discharged below 50% in practical use? Perhaps that is the case, but to me, it sounds a bit wishful.

-----------

I hope I haven't seriously misled anyone, or that any of the above is misleading .. apologies for all of my mistakes.

I hope this is a helpful discussion to raise the compromise issues, some of which depend on the application in mind.

Best wishes, Dave


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

@davee WHOA, deep discharge batteries should never be discharged below 50% and if you want a really long life 30%. Whoever produced that chart is flat-out wrong!

Returning to voltages, the Absorption charge goes up to 14.x where X has been as high as 8 and as low as 4. There is much debate around this, and I have not kept up since I switched to Lithium. I do know at one time, one of the most outspoken advocates of a higher absorb at 14.8 had to eventually eat his words as he destroyed a few batteries. If my memory is correct, the current thinking may be 14.5, but certainly between 14.4 and 14.6.

The crystallization you speak of is called sulphation, which is what the 4th stage of charging is designed to manage. Only the top of the top-of-the-line chargers will have that.

People who rely on batteries will have a good 4-stage charger and a proper battery monitor using a shunt.

If you want to learn about batteries, I suggest the following resource LINK

There is a fair bit of misinformation floating about the net these days; charging a battery up to 100% is not in itself bad as long as it is going to go into service and be discharged. FLA will self discharge at 3% - 4% per month. If you have a FLA (flooded lead acid) battery that is seasonal like a trolling motor, use a proper maintainer NOT a trickle charger.

Since Lithium batteries only self discharge at 0.5% to 1% if you know the battery will be to of service for a few months or longer, store it at about 70% or even a little less but keep an eye on it so it doesn't go below 10%. Really good chargers will have a storage program to do that automatically.

Yes, the golf cart batteries are planned to be only discharged between 30% and 50%, but the plan does not always work out. For a golf course the batteries are a consumable. The battery companies give them a huge discount in order to get their name in front of the public. Even if they burnt through a battery a month, they easily recoup that in cart rentals.

Getting back to the OP's issues. Make sure you have genuine deep cycle batteries, a starter or hybrid will not last at all and has much less power. Using a 12V battery on a 24V motor will likely not be a good experience. If you have 24V only motors (sometimes a small wiring change can turn them into 12V) then you need 4 6V batteries in series.

If it's just for Halloween and your insurance is paid up, see if a golf course will let you have some batteries for their core cost which is usually $20 per battery.

Good luck.

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
(@davee)
Member
Joined: 3 years ago
Posts: 1765
 

Hi Ron @zander,

   I don't see much in the message above say to disagree with.

  I did say, I didn't know the veracity of the reference, as to whether an occasional deep discharge does massive damage, but from what I gathered, the 'donor battery' was not likely to be a new battery, with an extended lifetime expectancy, but rather an 'available' resource, possibly approaching the retirement phase of its life, so as you also imply, a little premature ageing, or even worse case premature failure, might well be acceptable.

Of course, had the use been something like a long term solar storage system, the position would have been very different. I hope that is clear.

BTW, I was also trying to keep it moderately short, so although I  have looked at the "Battery University" in the past, and  I am aware of jargon words like "sulphation", I was trying to limit the amount of jargon used. Similarly, I avoided discussion of all batteries based on lithium chemistry, as the questioner @rob7912 stated they had access to a convenient source of lead-acid batteries.

Best wishes, Dave


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

@davee Quite a few years ago, I learned the hard way about batteries. I was replacing my trolling motor batteries every year and learned why when I embarked on my solar power journey. As an electrician, I thought I knew batteries, but boy, was I wrong. Always glad to pass it on.

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
Page 2 / 3