Dec 17, 2018 Leave a message

Pwm control motor forward and reverse, PWM DC motor speed control program

Pwm control motor forward and reverse, PWM DC motor speed control program

PWM speed switch control mode controls the motor, which is widely used in toys, trolleys, robots, etc. It can preset the forward and reverse speed through the serial port, which can flexibly control the motor's forward and reverse speeds, and control the positive of the motor with two limit switches. Reverse limit, easy to control, safe and reliable, easy to maintain.

The switch control mode is suitable for the PWM speed control mode and the preset forward and reverse speed mode in the potentiometer/analog signal control mode (and the trigger mode is configured as a level). If no speed regulation is required, the forward and reverse speeds are all full speed, which can be configured as potentiometer/analog signal PWM speed control mode; if you need to specify the forward and reverse speed (can be duty cycle, torque or speed), it should be configured as pre- Set the forward and reverse speed mode and the trigger mode to the level mode.

How to configure the speed regulation mode Table 1, how to preset the speed and configure the trigger mode, see MODBUS-RTU (national standard GB/T19582-2008) communication protocol.

The following program functions are 1000HZ output from the I/O port P2^0 and P2^1 of the MCU, the duty ratio is %50, and the P3^7 button can be used to control the positive and negative rotation of the positive motor.


Send Inquiry

whatsapp

teams

E-mail

Inquiry