Arduino: Session 4 (Week 2)
Arduino: Session 4 (Week 2)
Robotics
About Me
Mohamed Hamed :
►Computers and control systems
department.
► Arduino subteam.
Hackathon
7.0 ►
Arduino
Session 4
Mansoura Robotics
► agenda
① DC motor
⇛ LAB
② Motor Driver 1
③ DHT11 ⇛ LAB
2
④ Intro to serial communication
◐ DC Motor
⇛ What Is a DC Motor?
◐ DC Motor
A DC motor (Direct Current motor) is an electric
motor that converts direct electrical energy into
mechanical energy. It operates using the
interaction of magnetic fields generated by the
current passing through its coils.
◐ DC Motor
2WD 4WD
Car Car
◐DC Motor
⇛Operating Data :
◉ Operating Voltage:
◉ Recommended Voltage :
◉ No-load Speed:
◉ Stall Torque:
◉ Current Consumption:
◉ Torque:
◉ Speed :
⇛Examples:
Robo Tank ⇛
◔ Motor driver
L298N module ⇛
5V regulator
Enable
jumper
5V
regulator
Motor(A) output Motor(B) output
Enable
Pin(B)
Power Input
pins pins
Enable
Pin(A)
◔ Motor driver
◉ Control Inputs: The driver has control pins (IN1, IN2, IN3, IN4) that are
used to set the direction of the motors. By toggling these inputs, you can
reverse the motor's direction.
◉ Enable Pins: (ENA and ENB) for each motor, allowing you to turn them
on or off and control speed using pulse width modulation (PWM).
◔ Motor driver
◔ CODE :
▶ LAB 1
◔ LAB 1
⇛ Communication protocol :
⇛ Sending
text:
⇛ Serial communication
between computer and
Arduino:
▶ LAB 2
◔ LAB 2
◉ Using DHT11 sensor if the
temperature is more than 30 and humidity more than 70% turn on the
turn on fan and pump in one direction
and if the temperature is less than 30 and humidity less than 70% turn
on the fan and pump on the other direction.
▶ Search
⇛ Reading :