Académique Documents
Professionnel Documents
Culture Documents
Pilani Campus
ACTUATORS
BITS Pilani
Pilani Campus
Actuators
Hardware devices that convert a controller command signal into a change in a physical parameter
• The change is usually mechanical (e.g., position or velocity)
• An actuator is also a transducer because it changes one type of physical quantity into some alternative form
• An actuator is usually activated by a low-level command signal, so an amplifier may be required to provide
sufficient power to drive the actuator
2. Hydraulic actuators
– Use hydraulic fluid to amplify the controller command signal
3. Pneumatic actuators
– Use compressed air as the driving force
• The working of DC motor is based on the principle that when a current-carrying conductor is placed in a
magnetic field, it experiences a mechanical force.
• A DC motor's speed can be controlled over a wide range, using either a variable supply voltage or by
changing the strength of current in its field windings.
• The direction of this force is given by Fleming’s left hand rule and magnitude is given by:
F = BIL Newtons
• Driving a DC Motor
Since DC motors are generally associated with small to medium applications, where the system mainly
consists of a Microcontroller as the main processing unit, controlling and driving a DC motor is very
important. This is because, driving a motor directly using the microcontroller is not advised (sometimes
not possible) as the current from the Microcontroller is very small (usually less than 30mA)
• L298N is an integrated circuit multi watt 15 package and capable of giving high voltage. It is a high current
dual full-bridge driver which is designed as to accept standard TTL logic levels.
• PWM, or pulse width modulation is a technique which allows us to adjust the average value of the voltage
that’s going to the electronic device by turning on and off the power at a fast rate.
• The average voltage depends on the duty cycle, or the amount of time the signal is ON versus the amount of
time the signal is OFF in a single period of time.
• So depending on the size of the motor, we can simply connect an Arduino PWM output to the base of
transistor or the gate of a MOSFET and control the speed of the motor by controlling the PWM output.
Aurdino Interfacing
with DC Motor
using L298
int rotDirection = 0;
int pressed = false;
void setup() {
pinMode(enA, OUTPUT);
pinMode(in1, OUTPUT);
pinMode(in2, OUTPUT);
pinMode(button, INPUT);
// Set initial rotation direction
digitalWrite(in1, LOW);
digitalWrite(in2, HIGH);
}
• Aurdino Uno
• Temprature Sensor(LM35)
• L298 Bridge Motor Driving IC
• DC Motor
• Wires
• Programmer
• Plastic Box(case where we can put our DC Motor)
• Fan
void setup(){
pinMode(pwm,OUTPUT) ; //we have to set PWM pin as output
pinMode(in_1,OUTPUT) ; //Logic pins are also set as output
pinMode(in_2,OUTPUT) ;
}
void loop(){
val = analogRead(tempPin);
float mv = ( val/1024.0)*5000;
float cel = mv/10;
float farh = (cel*9)/5 + 32;
if(cel>=45){ //If temperature goes higher than 45 then start the fan
digitalWrite(in_1,HIGH) ;
digitalWrite(in_2,LOW) ;
}
else{
digitalWrite(in_1,HIGH) ;
digitalWrite(in_2,HIGH) ;
}
}
• 2 DC Motors
• L298 Driver
• Aurdino Board
• Chasis
• Joystick
• Wheels
• We will add a little tolerance and consider the values from 470 to 550 as center.
So if we move the Y axis of joystick backward and the value goes below 470
we will set the two motors rotation direction to backward using the four
input pins. Then, we will convert the declining values from 470 to 0 into
increasing PWM values from 0 to 255 which is actually the speed of the motor.
• Similar, if we move the Y axis of the joystick forward and the value goes above
550 we will set the motors to move forward and convert the readings from 550
to 1023 into PWM values from 0 to 255. If the joystick stays in its center the
motors speed will be zero.
• So again, first we need to convert the X axis readings into speed values from 0
to 255. For moving left, we use this value to decrease the left motor speed and
increase the right motor speed. Here, because of the arithmetic functions we use
two additional “if” statements to confine the range of the motor speed from 0 to
255.
• The same method is used for moving the car to the right.
int motorSpeedA = 0;
int motorSpeedB = 0;
void setup() {
pinMode(enA, OUTPUT);
pinMode(enB, OUTPUT);
pinMode(in1, OUTPUT);
pinMode(in2, OUTPUT);
pinMode(in3, OUTPUT);
pinMode(in4, OUTPUT);
}