Controlling motor speed digitally

  • Thread starter Thread starter kolleamm
  • Start date Start date
  • Tags Tags
    Motor Speed
Click For Summary

Discussion Overview

The discussion revolves around controlling the speed of a milling machine's motor digitally, specifically through the use of a motor driver and potential interfaces with a PC. Participants explore various methods for achieving this control, including the use of digital potentiometers, current-output DACs, and PWM (Pulse Width Modulation) techniques.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant mentions the challenge of finding a device to regulate resistance across 9.7V at 100KOhms for motor speed control.
  • Another suggests that a current-output DAC might be suitable and inquires about the participant's experience with external interface devices.
  • A question is raised about how to sense the position of the milling machine's axes and the specifications of the PWM controller.
  • One participant proposes using a MOSFET transistor to control speed, noting the need for a diode to prevent voltage spikes.
  • There is a suggestion to consider drivers that are more compatible with Arduino, along with questions about the range and functionality of the existing potentiometer.
  • Several participants discuss the possibility of implementing PWM in software, with varying opinions on whether it should be done with or without the driver board.
  • One participant provides details about using an Arduino's PWM outputs and how to connect a potentiometer for speed control.

Areas of Agreement / Disagreement

Participants express multiple competing views on the best method to control motor speed, with no consensus reached on a single solution. There is ongoing exploration of different approaches, including hardware and software implementations.

Contextual Notes

Participants note limitations regarding the specifications of the motor driver and the potentiometer, as well as the need for additional components like diodes and transistors for effective control.

Who May Find This Useful

This discussion may be useful for individuals interested in CNC machine modifications, motor control, Arduino programming, and digital signal processing in engineering applications.

kolleamm
Messages
476
Reaction score
44
I'm trying to turn my milling machine into a CNC so I bought this motor driver on ebay.

https://www.ebay.com/itm/DC-40A-DC-...e=STRK:MEBIDX:IT&_trksid=p2060353.m1438.l2649

The only problem is I can't seem to find any device that can regulate the resistance across 9.7v at 100KOhms which would allow me to control the motor speed from my program. I was recommended to use digital pots but after a long search most are only capable of handling 5v.

Any ideas on how I can solve this? I just want to be able to control the motor speed from my pc.

The motors I'm using run at 48v (continuous 5.8A, peak 30A)
 
Engineering news on Phys.org
It seems like a current-output DAC would be a good fit for your application. What kind of external interface devices have you used with your PC programs? Would you need a USB dongle that can do this, or can you build your own interface circuit based on a few ICs?
 
kolleamm said:
I'm trying to turn my milling machine into a CNC so I bought this motor driver on ebay.
How do you sense the position of the x, y and z axes ?
Do you have a tacho on the motors ?
What are the input specifications to the PWM controller, is it a fixed range voltage input such as ±5 V ?
 
The program will be run by an Arduino, at least that's what I believe so far.

The milling machine has encoders for each axis so we can read the position through those.

I'm not real sure what the specifications are of the controller, I just know that a pot adjusts the speed.
The voltage across the power and ground slots for the pot seems to be 9.7v.

I had another idea where I could use a mofset transistor to control the speed, instead of this board but it seems I would also need a diode to prevent a voltage spike in the transistor when it turns off, and I have yet to find one that can handle up to 30A at 48v.
 
There are drivers that are more directly compatible with Arduino - considering the libraries for the control I would still steer you that direction.

To continue with this controller what is the Range of the Pot?.

Is the Pot on/off AND the speed control, and then the rocker sw is the directional control?
 
Windadct said:
There are drivers that are more directly compatible with Arduino - considering the libraries for the control I would still steer you that direction.

To continue with this controller what is the Range of the Pot?.

Is the Pot on/off AND the speed control, and then the rocker sw is the directional control?
The pot has a max voltage of about 9.7v and has a 100k resistance.
When turned beyond a certain point it clicks and turns off the motor.
Yes, the rocker switch has three different positions : the two different directions and off.

If you disconnect the cables from the pot you can speed up the motor by touching the positive and signal together, and slow it down by touching the positive and ground wire.
 
Your link sent me directly to the solution - a P(ulse) W(idth) M(odulation) controller.
 
Svein said:
Your link sent me directly to the solution - a P(ulse) W(idth) M(odulation) controller.
Yes but the goal is to control the speed from my software, these controllers all seem to have pots as a way of changing the speed.
 
You can implement a PWM in software though. Turn an output ON at regular intervals, turn it OFF at an interval proportional to the wanted speed.

 
  • #10
Svein said:
You can implement a PWM in software though. Turn an output ON at regular intervals, turn it OFF at an interval proportional to the wanted speed.


With or without the driver board? And PWM on the motor leads or the pot?
 
  • #11
Apologies if you already know this but here's my 2p.

An Arduino has pwm outputs on pins 3, 5, 6, 9, 10 and 11.
You could use a pot connected between 5V and ground from the Arduino with the wiper connected to an analogue input pin (A0 to A5 but stay away from A4 and A5 unless you really have to use them) which can be read using analogRead.
The pot will return a value of 0 to 1023 depending on position of the wiper. Use the map function to convert it to the 0 to 255 which the Arduino needs.
AnalogWrite this value to one of the pwm pins and you have your pwm signal for use with a suitable H-Bridge driver to control your motor speed and direction.
 
  • #12
kolleamm said:
With or without the driver board? And PWM on the motor leads or the pot?
You have already gotten a better answer than I was going to give (I have never used an Arduino and did not know about the PWM outputs).
 

Similar threads

Replies
7
Views
2K
Replies
16
Views
4K
Replies
18
Views
3K
Replies
13
Views
4K
Replies
4
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
Replies
4
Views
2K
  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 4 ·
Replies
4
Views
11K
  • · Replies 4 ·
Replies
4
Views
16K