![]() As an obstacle obstructs the sensor, the output analog value will be digital LOW. The output from the motor driver (L293D) is given to the two motors as seen in the diagram.Ĭheck whether the connected IR sensors are working with the Arduino. The readings from the IR sensor will be analog values. The left and right IR sensor outputs are given to the analog pins 3 and 4 on the Arduino respectively. +5V and GND are given to both of the IR sensors from the Arduino. A 9V battery is connected to the L293D IC to drive the motor. Pins 2 and 3 are the control signals for the right motor and 4 and 5 are the control signals for the left motor. Pins 2, 3, 4, and 5 on the Arduino go into the input of the L293D IC. A motor driver is used because an Arduino can't supply enough current to drive the motor. The L293D motor driver IC is used to control the two motors. This sensor outputs a digital LOW (0V) signal when there is an object within its range and outputs a digital HIGH (5V) signal otherwise.Ĭonnecting the Parts for Your Arduino Robot ![]() This Arduino robot uses two IR sensor modules which can detect objects within a range of 5-6cm. When an object gets in front of the IR sensor, the surface of the object reflects a part of the IR light back to the receiver, the receiver then outputs a LOW signal notifying that an object is in front of the sensor. These modules consist of a pair of receiver and transmitter IR LEDs. IR module: IR stands for Infrared, which is a wavelength of light not visible to the human eye (but can be seen with our smartphone cameras!). The 9V battery can be connected to the driver using the power input pins. The input and output power points are indicated on the board. To control the motors, connect the four control points to the Arduino and the 4 output points to the motors. ![]() That is a set of 2 inputs and 2 outputs for each motor. L293 MOTOR DRIVER: The driver has 2 inputs for power, 4 points for motor control inputs, and 4 points for motor control outputs. ![]() Thus, making the robot turn left or right to avoid the obstacle. Depending on the values received from the IR module, the Arduino controls the two motors separately. The Arduino robot reads the input from the IR modules through the analog pins. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |