PROJECT 9 - LM35 CONTROL DC MOTOR SPEED

PROJECT 9 - LM35 CONTROL DC MOTOR SPEED

PROJECT 9

LM35 CONTROL DC MOTOR SPEED

Back to Project 8                                                                                                     Go to Project 10

In this project, we are going to experience on how to control the DC motor speed in PWM mode according to the changes of the LM35 temperature sensor like air-conditional. The DC motor speed will increase according to the temperature change to higher and decrease on opposite.

———————————————————————————————————————————————————-

COMPONENT NEEDED

———————————————————————————————————————————————————-

BREADBOARD
MICRO METAL GEAR MOTOR
ARDUINO 2-AMP MOTOR DRIVER SHIELD
JUMPER WIRE
LM35 TEMPERATURE SENSOR

———————————————————————————————————————————————————-

CONNECTION

———————————————————————————————————————————————————-
MOTOR SHIELD CONNECT TO DC MOTOR
Connect the 2 terminal of motor to the M+ and M- terminal of motor. Please refer this website for detail connection.


LM35 TO ARDUINO PROTOTYPING SHIELD (OPTIONAL)
Connect the LM35 sensor on the prototyping shield while the motor shield are at below. Connect the LM35 Vout to the analog pin A0.

———————————————————————————————————————————————————-

ADDITIONAL INFORMATION

———————————————————————————————————————————————————-
The Shield can switch between PWM speed control mode and PLL phase-locked loop mode through setting the appropriate jumpers. The power supply can be achieved either via Arduino VIN input or PWRIN input on the shield through setting the appropriate jumpers. The speed control is achieved through conventional PWM which can be obtained from Arduino’s PWM output Pins 5 and 6. The enable/disable function of the motor control is signaled by Arduino Digital Pins 4 and 7.
The Motor shield can be powered directly from Arduino or from external power source. It is strongly recommended to use external power supply to power the motor shield.

  • Logic Control Voltage:5V (From Arduino)
  • Motor Driven Voltage:4.8~35V (From Arduino or External Power Source)
  • Logic supply current Iss:≤36mA
  • Motor Driven current Io:≤2A
  • Maximum power consumption:25W(T=75℃
  • PWM、PLL Speed control mode
  • Control signal level:

High:2.3V ≤ Vin ≤ 5V
Low:-0.3V ≤ Vin ≤ 1.5V

———————————————————————————————————————————————————-

CODE OVERVIEW

———————————————————————————————————————————————————-

Define the connection of the motor shield PWM mode pin.


value = (analogRead(analogPin))*5;
Read the ADC value from LM35 temperature sensor. In this case, the value is time with 5 due to the ADC output value from temperature are too low to move the DC motor. The PWM value are between 0 to 255.

Back to Project 8                                                                                                     Go to Project 10

———————————————————————————————————————————————————-

ATTACHMENT

1. P9 User Manual.pdf
2. Project_9_code.zip

BUY