What are the benefits of a diy Arduino DC motor controller?
- The project can be made open source.
- The ability to use different size motor controllers, depending on the load requirement.
- The ability to incorporate sensing (current, speed, direction, temperatures, etc) and other controls, with the easily programmable Arduino.
- Gaining knowledge and experience with such systems at a relatively simple level.
Major components:
- Arduino Uno
- Arduino shield for making connections
- 24VDC to 5VDC power supply
- LCD 20x4
- 3 position switch
- 10K potentiometer
- System enclosure
- Terminal blocks
Our Objective
To control a 24VDC motor speed with a display, giving us the ability to run our Bridgeport milling machine from our solar powered electric system.
How did we come about to design our controller?
Ultimately, we designed our controller based on major components we had laying around.
It is controlled with a PWM signal that is sent from the Arduino. The Victor directly controls the amount of power transmitted to the motor, which is taken from the batteries. When the PWN signal value is 0, the motor controller sends full power in one direction, let us call it forward. When the number is 90, the power is turned off and the motor is in a neutral state. When the signal is 180, the controller sends full power in the other direction, called reverse. In this way, the motor can be controlled to go at maximum speed, or slow, in either direction and anything in between.
Arduino Uno
Since the Victor 883 has no human interface built in, the Arduino Uno and some other components have to come into the mix. While the Arduino itself generates and sends the signal to the Victor, we have to be able to control this signal.
To do this, we employ two simple components. One is a switch that has three positions. With it, we can send the signal in the forward direction, reverse direction, or off.
The second component is a 10k potentiometer. Turning the knob all the way one way, makes the resistance go to 0. In the other direction it goes to 10,000 Ohms. The Arduino sends a 5 Volts through it and measures the voltage across it. When the potentiometer is turned fully in one direction, and provides no resistance, the voltage remains at 5 V. When it is turned completely in the other direction, it provides a very large resistance, and the voltage drops essentially to 0V. Any values in between provides an intermediary voltage.
The Arduino has a special function to translates the voltage reading to a simple number. When voltage is 0, the number is 0. When the voltage is the maximum 5 V, the number is 1023.
When the “potentiometer number” is 0, we code the Arduino to send a “PWM number” to the Victor of 90. This is the neutral state, which will not move the motor. When the “potentiometer number” is 1023, and the switch is in reverse, we send a “PWM number” of 0, which is full reverse. When the “potentiometer number” is 1023, and the switch is in forward, we send a “PWM number” of 180, which is full forward. Anything in between is scaled accordingly.
LCD
The 20x4 LCD displays the numbers previously talked about via some Arduino code, converted to a speed (RPM) for human readability purposes. It also shows which direction the motor is made to spin.
Power Supply
The 15W power supply transforms 24VDC from the batteries to 5VDC for the Arduino and LCD.
System Enclosure
It is a watertight PVC box, which houses all the components and can be mounted to the Bridgeport.
Arduino Code
The code is available Bitbucket.
Schematic
Below you can see a rough sketch of the components and their connections.
No comments:
Post a Comment