DC motor bidirectional speed regulation drive circuit
Source: InternetPublisher:念慈菴 Keywords: DC Motor PWM Updated: 2024/08/27
For the PWM speed-controlled DC motor drive circuit, the following performance indicators are mainly considered:
1. Output current and voltage range. It determines how much power the circuit can drive the motor;
2. Efficiency. High efficiency not only means saving power, but also reduces the heating of the drive circuit. To improve the efficiency of the circuit, we can start from ensuring the switching working state of the power device and preventing common-mode conduction (a problem that may occur in the H-bridge circuit, that is, two power devices are turned on at the same time to short-circuit the power supply);
3. Impact on the control input. The power circuit should have good signal isolation at its input to prevent high voltage and high current from entering the main control circuit. This can be achieved with high input impedance or optocoupler;
4. Impact on the power supply. Common-mode conduction can cause an instantaneous drop in the power supply voltage, causing high-frequency power supply pollution, and high current may cause the ground potential to float;
5. Reliability. The motor drive circuit should try its best to ensure that the circuit is safe regardless of the control signal or passive load.
After long-term experiments, the author obtained a speed-adjustable bidirectional DC motor drive circuit, as shown in the attached figure.
The input signal line of the input and level conversion part is introduced by the Port. Port1 is the motor direction signal input terminal, Port2 is the PWM signal input terminal, and Port3 is the ground line. Note that a 2kΩ resistor is connected to the ground of Port3. When the driver board and the microcontroller are powered separately, this resistor can provide a path for the signal current to flow back. When the driver board and the microcontroller share a set of power supplies, this resistor can prevent large currents from flowing into the ground line of the microcontroller motherboard along the connection line and causing interference. In other words, it is equivalent to separating the ground line of the driver board from the ground line of the microcontroller to achieve "one-point grounding". Capacitor C1 prevents the sudden start of the motor from causing a sudden drop in voltage.
The NAND gate U1A realizes the modulation of the PWM signal and the motor direction signal, and converts it into a square wave signal with an amplitude close to the power supply voltage.
The transistor drive part consists of a circuit drive composed of a transistor, a resistor, and a diode to achieve a forward and reverse drive of a DC motor with adjustable speed. The four diodes protect the transistors to prevent the negative induced electromotive force generated by the inductive element (motor) from impacting the transistors.
When the output of 74LS00 is at a low level, Q2 and Q4 are turned off, Q1 and Q3 are turned on, and the output is at a high level. When the output of 74LS00 is at a high level, Q2 and Q4 are turned on, Q1 and Q3 are turned off, and the output is at a low level.
Performance indicators: power supply voltage 15-30V, maximum continuous output current 500mA/each motor, short time (10 seconds) can reach 700mA, PWM frequency can be up to 30kHz (generally 1-10kHz).
When routing high current lines, make them as short and thick as possible, and try to avoid passing through vias. If you must pass through vias, make the vias larger (>1mm), and make a circle of small vias on the pads, and fill them with solder during welding, otherwise they may burn out. In addition, if a voltage regulator is used, the wires from the transistor emitter and collector to the power supply and ground should be as short and thick as possible, otherwise when the current is high, the voltage drop on this wire may pass through the diode and the conducting transistor and burn it out.
The generation of PWM signals for PWM speed regulation can be accomplished by a timer, but since only two timers are provided inside 51, if you want to output signals with different duty cycles to three or more DC motors, you have to repeatedly set the timer, which is more complicated. We use a simpler method that can not only provide different duty cycle input signals to more DC motors, but also only occupy one timer resource. This method can be simply described as follows:
The duty cycle information of the input signal required by each DC motor is stored in a certain space of the memory. If the duty cycle is 1, 0FFH (11111111B) is saved; if the duty cycle is 0.5, 0F0H (11110000B) is saved, or any binary number including 4 0s and 4 1s. That is, duty cycle = number of 1s/8.
The specific binary number to be selected depends on the output frequency requirements. If you want to output a PWM signal to this DC motor, just shift once in each time slice and take out a fixed bit (which can be implemented using bit addressing or carry flag C) and send it to the motor port. In addition, the shift algorithm is an algorithm that relies on previous results, so it is best to check or reset the shifted number regularly to prevent the shift from being wrong and causing errors to continue.
The advantage of this algorithm is that it is an independent process and can control multiple motors. The disadvantage is that it occupies more resources and has a lower PWM frequency.
- Tutorial on making your own remote-controlled robotic arm
- How to remotely control devices using ESP8266 and LPC2148
- Build a Smart Garage Door Opener Using a Raspberry Pi
- How to Build a Gesture-Controlled Elevator Prototype Using Arduino Nano
- Replace the GE LOGIQ a200 ultrasound measurement key with a self-made touch switch
- Star-delta step-down starting control circuit for squirrel cage asynchronous motor
- Design and production of radio remote control fan stepless speed regulator
- Light-controlled circuit design and analysis
- Audio interface protection circuit
- Magnetic door and window anti-theft alarm
- How current transformer works
- Flashing wall light control circuit
- fire smoke control circuit
- Photocell trigger control circuit
- Switching regulated power supply circuit
- Stapler control circuit
- PWM DC motor speed regulation circuit diagram composed of LM324
- Precise high current drive circuit
- Digital PWM connection diagram composed of ZPS-101
- Ultra-small PWM, DC-DC booster circuit diagram