[Menu]>[Circuits Gallery]>[DC motor]
![]() ![]() DB1 is used to make not conscious of the polarity of the motor. When never making a mistake in the connection, to use isn't necessary. When the voltage of the motor for the speed detection is small, it is better not to put. D1 is used to protect PIC when the voltage of the detection motor is high. C1 is to make bypass the noise of the detection motor. VR1 is the variable resistor to set the number of rotations of the main motor. The input voltage of PIC becomes low when bringing VR1 close to the side 1 and PIC increases the drive electric current of the motor. That is, the revolution of the motor rises. The input voltage of PIC becomes high when bringing VR1 close to the side 3 and PIC reduces the drive electric current of the motor. That is, the revolution of the motor slows down. For the details of the CCP, refer to "CCP feature of PIC16F873". ![]() ![]() The duty of the pulse of CCP1 is controlled in the voltage (the control voltage) which was taken in with the control voltage input circuit. When the control voltage is higher than the regulation value, the H level time of the CCP1 pulse is made long and the number of rotations of the motor is lowered. When the control voltage is lower than the regulation value, the H level time of the CCP1 pulse is made short and the number of rotations of the motor is raised. I used N-channel MOS FET for the drive of the motor. The P-channel MOS FET can be used, too. In the case, the duty control of the CCP1 pulse becomes opposite. It becomes low-speed when the H level of the pulse is short and when long, it becomes high-speed. The way of connecting between the motor and the FET becomes opposite. In this case, the power of the transistor for the FET drive should be connected with the source terminal of P-FET. ![]() For the details of MOS FET, refer to "MOS FET". For the details of the CCP, refer to "CCP feature of PIC16F873". ![]() ![]() I am using 10-MHz resonator. There is not directly relation but it is related with the taking-in period with control voltage, the period of the motor driving pulse to the number of rotations of the motor. ![]() ![]() LEDs are made to light up to monitor the drive situation of the motor. 3 bits of higher ranks of the control data of PWM are used for the lighting-up of LEDs. In the condition that a motor isn't driven, all LEDs are turned off. The number of the lighting-up is increased in the order from LED1 as the drive electric current increases. When the motor is in the maximum drive condition, all LEDs become a lighting-up condition. At the equipment this time, the LED of the bar type with seven LEDs is used. The circuit can control eight LEDs. However, at the equipment this time, LED1 isn't used and seven LEDs from LED2 to LED8 are used. An LED is lit up when RBx is H level. ![]() ![]() 3 terminal regulator is used to get the operating voltage for PIC. The about 70-mA electric current flows when seven LEDs are lit up at the same time. I used a 1 A-type regulator for the safety. ![]() |