Servo Motor
Servo Motor
Servo Motor
Ans: A servomotor is a rotary actuator or linear actuator that allows for precise control of
angular or linear position, velocity and acceleration
Servo Motor consists of four basic components:
1. DC Motor
2. Potentiometer
3. Control board
4. Output Shaft
Ans: A servo consists of a Motor (DC or AC), a potentiometer, gear assembly and a
controlling circuit. First of all we use gear assembly to reduce RPM and to increase
torque of motor. Say at initial position of servo motor shaft, the position of the
potentiometer knob is such that there is no electrical signal generated at the output
port of the potentiometer. Now an electrical signal is given to another input terminal
of the error detector amplifier. Now difference between these two signals, one comes
from potentiometer and another comes from other source, will be processed in
feedback mechanism and output will be provided in term of error signal. This error
signal acts as the input for motor and motor starts rotating. Now motor shaft is
connected with potentiometer and as motor rotates so the potentiometer and it will
generate a signal. So as the potentiometer’s angular position changes, its output
feedback signal changes. After sometime the position of potentiometer reaches at a
position that the output of potentiometer is same as external signal provided. At this
condition, there will be no output signal from the amplifier to the motor input as there
is no difference between external applied signal and the signal generated at
potentiometer, and in this situation motor stops rotating
Ans: A servo motor can be controlled by some program. We can rotate a servo at a particular
direction based on its ability. We can use a microcontroller to configure the operation. If we
want to rotate the servo 90 degree then we have to send a signal of 90 degree to the servo.
Here is a sample program:
4. Describe the pin configuration of servo and write down some library functions of servo with
Explanation.
Ans:
Servos are used in radio-controlled airplanes to position control surfaces like
elevators, rudders, walking a robot, or operating grippers. Servo motors are small,
have built-in control circuitry and have good power for their size.
In food services and pharmaceuticals, the tools are designed to be used in harsher
environments, where the potential for corrosion is high due to being washed at high
pressures and temperatures repeatedly to maintain strict hygiene standards. Servos
are also used in in-line manufacturing, where high repetition yet precise work is
necessary
We can use this also in many ways like:
Radio controlled toy/car.
Mini projects
Radar systems
Robotics
Automation
Industries
DHT Sensor:
1. Difference between DHT11 and DHt22 sensor? Explain with specifications.
Ans: We have two versions of the DHT sensor, they look a bit similar and have
the same pinout, but have different characteristics. Here are the specs:
DHT11
DHT22
Low cost
3 to 5V power and I/O
2.5mA max current use during conversion (while requesting data)
Good for 0-100% humidity readings with 2-5% accuracy
Good for -40 to 80°C temperature readings ±0.5°C accuracy
No more than 0.5 Hz sampling rate (once every 2 seconds)
Body size 15.1mm x 25mm x 7.7mm
4 pins with 0.1" spacing
As you can see, the DHT22 is a little more accurate and good over a slightly
larger range. Both use a single digital pin and are 'sluggish' in that you can't
query them more than once every second or two.
Ans: DHT sensors consist of a humidity sensing component, a NTC temperature sensor
(or thermistor) and an IC on the back side of the sensor.
For measuring humidity they use the humidity sensing component which has two
electrodes with moisture holding substrate between them. So as the humidity changes,
the conductivity of the substrate changes or the resistance between these electrodes
changes. This change in resistance is measured and processed by the IC which makes
it ready to be read by a microcontroller.
On the other hand, for measuring temperature these sensors use a NTC temperature
sensor or a thermistor.
A thermistor is actually a variable resistor that changes its resistance with change of the
temperature. These sensors are made by sintering of semiconductive materials such as
ceramics or polymers in order to provide larger changes in the resistance with just small
changes in temperature. The term “NTC” means “Negative Temperature Coefficient”,
which means that the resistance decreases with increase of the temperature.
3. How communication between DHT sensor and microcontroller works? Explain with details.
Ans: The DHT11 sensors are fairly easy to connect. They have four pins:
*VCC pin supplies power for the sensor. Although supply voltage ranges from 3.3V to 5.5V, 5V
supply is recommended. In case of 5V power supply, you can keep the sensor as long as 20
meters. However, with 3.3V supply voltage, cable length shall not be greater than 1 meter.
Otherwise, the line voltage drop will lead to errors in measurement.
*Data pin is used to communication between the sensor and the microcontroller.
*NC Not connected
*GND should be connected to the ground of Arduino
Connecting with Arduino:
It is trivial to connect DHT11, DHT22/AM2302 sensors to Arduino. They have fairly long 0.1″-
pitch pins so you can easily plug them into any breadboard. Power the sensor with 5V and
connect ground to ground. Finally, connect the Data pin to a digital pin #2.
Remember, as discussed earlier in this tutorial, we need to place a pull-up resistor of 10KΩ
between VCC and data line to keep it HIGH for proper communication between sensor and
MCU. If you happen to have a breakout board of the sensor, you need not add any external pull-
up. It comes with a built-in pull-up resistor.
4. What is DHT sensor? Write a short example code using DHT sensor.
Ans: The DHT sensors are made of two parts, a capacitive humidity sensor and a
thermistor. There is also a very basic chip inside that does some analog to digital
conversion and spits out a digital signal with the temperature and humidity. The
digital signal is fairly easy to read using any microcontroller.
#include <dht.h>
dht DHT;
#define DHT11_PIN 7
void setup(){
Serial.begin(9600);
}
void loop()
{
int chk = DHT.read11(DHT11_PIN);
Serial.print("Temperature = ");
Serial.println(DHT.temperature);
Serial.print("Humidity = ");
Serial.println(DHT.humidity);
delay(1000);
}
Ans: The applications of humidity sensor range far and wide. People with illnesses affected by
humidity, monitoring and preventive measure in homes employ humidity sensors. A humidity
sensor is also found as part of home heating, ventilating and air conditioning systems (HVAC
systems). These are also used in offices, cars, humidors, museums, industrial spaces and
greenhouses and are also used in meteorology stations to report and predict weather.