Pages: [1]   Go Down
Author Topic: Speed control of a 24V with Arduino  (Read 2454 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

I'm trying to control the speed of a DC motor. If I succeed I will attempt to build a kart. smiley-mr-green
Can someone give me suggestions or advices regarding the driver I will have to buy for a DC motor with these specifications: 24V, 300W and 16A.
What should be the main specifications of the driver that I have to pay more attention, in order to ensure that the driver will be able to control the motor through the PWM code I programmed on my Arduino. The DC motor is similar to this one: LINK

Thanks in advance!
Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 212
Posts: 8954
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

A single logic-level N-Channel MOSFET should work, assuming you don't need to run in reverse.  Connect "Source" pin to 24V Minus and Arduino Ground.  Connect "Drain" pin to the motor's Minus side.  Connect the "Gate" pin through a 1k resistor to an Arduino PWM pin.  Connect the Plus side of the motor to the 24V Plus.

ON Semiconductor 2SK4043LS has a logic-level gate and can handle 20A and 30V. 
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Offline Offline
Jr. Member
**
Karma: 0
Posts: 69
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

ya, use a mosfet. it will allow you to speed control in any ONE direction.
if you want to go in both directions, use a DPDT relay.

http://www.instructables.com/id/Super-Easy-Reversible-Motor-Control-for-Arduino-/?ALLSTEPS
in this , they have used a TIP 122, u can use this or even a mosfet.
Logged

United Kingdom
Offline Offline
Tesla Member
***
Karma: 227
Posts: 6637
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I agree with johnwasser in principle, but with a few changes:

1. Use a 100 ohm gate series resistor, not 1K. When switching 300W, you need to achieve a fast switching time to keep power dissipation in the mosfet low. Using a resistor as high as 1K makes the switching time higher.

2. It is absolutely essential to connect a flyback diode in parallel with the motor. Look for a Schottky diode that can handle 30V and at least 16A.

3. Also connect a 10K resistor between the Arduino output pin and ground. This is to ensure the mosfet is held off when the Arduino is powered up but the pinMode has not yet been set.

4. 2SK4043LS has Rds(on) of 21 milliohms, so when passing 16A the power dissipation will be 2W and the mosfet will run hot unless you heatsink it. There are better mosfets available for this task, such as IRLB8743PbF (4.3 millohms Rds(on)).

5. If the power source is a lead acid battery, then the voltage on charge will be around 27V. In this case, I suggest you look for a mosfet with a Vds rating of at least 40V rather than 30V.
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I really appreciate all your help!
After I saw your suggestions, I started to google the components and while I was searching, I found a driver for Arduino.
By writing this, I don't want you to think I'm against the suggestions you gave me. However, I'm not an expert in electronics.
Don't you think I will have more chances of succeeding if I use this driver that is already assembled?
Specifications:
-Operating voltage: 15 ~ 24V
-Rated / Peak Current: 40A/80A
-Hardware architecture: high-power N-channel MOS transistor, a single full-bridge
-Input PWM signal: Duty Cycle 0 ~ 98% (not more than 98%), the standard 16KHz highest 100KHz.
-Supply voltage signal output: 0 ~ 5V corresponding to 0 ~ 26V
-Supply current signal output: 0 ~ 5V corresponding to 0 ~ 91A
Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 69
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

you say you are not an electronics expert;
but you are going to remain there if you do not experiment . its acuallty pretty easy to understand .
all you need to know is the working of a transistor, and a dpdt relay.
Logged

United Kingdom
Offline Offline
Tesla Member
***
Karma: 227
Posts: 6637
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I really appreciate all your help!
After I saw your suggestions, I started to google the components and while I was searching, I found a driver for Arduino.
By writing this, I don't want you to think I'm against the suggestions you gave me. However, I'm not an expert in electronics.
Don't you think I will have more chances of succeeding if I use this driver that is already assembled?
Specifications:
-Operating voltage: 15 ~ 24V
-Rated / Peak Current: 40A/80A
-Hardware architecture: high-power N-channel MOS transistor, a single full-bridge
-Input PWM signal: Duty Cycle 0 ~ 98% (not more than 98%), the standard 16KHz highest 100KHz.
-Supply voltage signal output: 0 ~ 5V corresponding to 0 ~ 26V
-Supply current signal output: 0 ~ 5V corresponding to 0 ~ 91A

That driver sounds OK except that if your power supply is a 24V lead acid battery, then the 24V maximum operating voltage is right on the limit, and you would have to disconnect the motor driver every time you want to charge the battery.
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I just thought of using an already assembled driver mainly because they're cheap.

Thanks for the tip dc42. Can you explain why I would have to disconnect the motor driver every time I want to charge the battery? Or tell me where/what I have to search to find the explanation for that?

Meanwhile, the enterprise where I want to buy the motor told me that they don't advise me to control the motor using an Arduino and a driver. They said that using my own controller would not be something that they would really recommend for liability reasons, and that those motors are used for scooters..
Logged

United Kingdom
Offline Offline
Tesla Member
***
Karma: 227
Posts: 6637
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for the tip dc42. Can you explain why I would have to disconnect the motor driver every time I want to charge the battery? Or tell me where/what I have to search to find the explanation for that?

The voltage of a 24V lead acid battery when it is on charge is about 27V, maybe even a little higher. The driver you use needs to be able to withstand that voltage, unless it is disconnected during charging.
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thank you very much dc42. smiley
Logged

Mayne Island, BC, Canada
Offline Offline
Jr. Member
**
Karma: 0
Posts: 67
PICs, Arduinos and Pi, Oh My!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Just one more point regarding your motor and the power requirements.

When I was building battlebots, I burned a lot of motor controllers because the instantaneous stall current and the startup currents were huge, compared to the runtime currents. I was using eTek motors (about 16HP at 48v) and their inertia was so great that the controllers could not effectively brake the motor.

What is the "stall current" of the motor you are planning on using?  With that in hand, look for FETs that will handle TWICE that current ! And as another poster mentioned, use a serious diode across the motor to catch the back EMF when it turns off. Why? because the spinning motor becomes a generator and you will be pushing current back into your controller without the diode!

« Last Edit: February 17, 2013, 04:15:51 pm by arbutus » Logged

Don't breath in the magic smoke!

Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The past two weeks I have been very busy. I apologize for only answering now to your question.

I'm not very sure about the definition of "stall current", but the rated current of the motor I will be using is 18.7 A. And the driver I bought has a rated/peak current of 40A/60A, so I imagine I won't be facing the same problems you had with the controllers.

By the way, I'm curious about that last sentence "because the spinning motor becomes a generator and you will be pushing current back into your controller without the diode!". Does that mean it will be possible for my kart to use regenerative breaking? Even though, I'm going to use a driver with the specifications I already mentioned. If I buy a DC motor and he becomes a generator, and I also use a dissipation resistance with a super-capacitor.. Do you think I will be able to do that, or I'm just saying nonsenses?
Logged

Mayne Island, BC, Canada
Offline Offline
Jr. Member
**
Karma: 0
Posts: 67
PICs, Arduinos and Pi, Oh My!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ahh - sorry for the tardy reply,  so consider your kart with a driver aboard rolling along at 20mph. The kart and driver weigh - lets say 300lbs. Thats a LOT of kinetic energy to attempt to handle with an 18A motor. Actually thats a really small motor for that application ! (E=1/2(m*v*v)) or approx 5400 KJ or 1.5KW which you have to dump into the battery in the time you need to brake effectively! I would doubt that the motor would have the torque necessary to be an effective brake, but certainly some recharging is possible.

Regenerative braking requires some sophisticated control systems and an appropriate battery system (very high current), although boost caps might be a good alternative to absorb and supply the surge currents. (I have never used them).

The controllers I used for the eTEK motors were from SEVCON and they allowed for regenerative braking at that power level. I'm sure there are other commercial products available now which would be suitable for your kart, but it might be worth looking at the math before spending a lot of ca$h !

I'd love to hear how you get on!
« Last Edit: April 14, 2013, 07:52:45 pm by arbutus » Logged

Don't breath in the magic smoke!

Pages: [1]   Go Up
Jump to: