ICStation Research and Development Team has made the projects about the PWM Speed Control of DC Motor System which can change the speed of DC motor and monitor the real-time rotating speed of motor by upper computer.The part of motor communicates with PC by NRF24L01 wireless module.The advantages of the data transmission are stable, fast and between far distance. This system is suitable for the occasion where the distance between motor and PC is far and can not connect with wires. It can stably and efficiently to monitor and control the motor condition.
1.When the system is power on, open the upper computer. And choose the corresponding interface. The upper computer will display the rotating speed of motor.
2.Click the controlled button of upper computer, and you can change the conditions and rotating speed of motor. The upper computer will display the rotating speed of motor.
Code for your reference
Step 1: Components List
Step 2: The Schematic Diagram of Data Transmission Part (Connected With PC)
Step 3: The Schematic Diagram of the Main Control Part( Connected With Motor)
Step 4: The Effect Picture
Step 5: The Connection of Main Control Part
VCC—7.2V The anode of battery GND- the cathode of battery INA—Digital pin 5； INB—Digital pin 6 OUTA-The anode of motor OUTB-the cathode of motor
DOUT—Digital pin 3
Step 6: The Connection of Data Acquisition Transmission Part
1.Connect 10uf electrolytic capacitor between ICStation Mega2560 and ground. It can reduce the shake of power supply and make the system work more stably.