Motor Control Projects with Arduino and Raspberry Pi

Page 26

CHAPTER 6 • ARDUINO WI-FI ROBOT CONTROL

CH_PD: TX: RX:

Enable pin. Must be connected to +3.3V for normal operation Serial output pin Serial input pin

Figure 6.3 shows the circuit diagram of the project. It is important to use an external +3.3V power supply for the ESP-01 board since the Arduino +3.3V power supply cannot provide enough current for the ESP8266. In this project the LM1086-3.3 power regulator chip is used to provide power to the ESP-01 board. The regulator receives power from the battery and its output is connected to the VCC pin of the ESP-01. Additionally, the GPIO0, RST, and CHD_PD inputs of the ESP-01 are all connected to +3.3V (you may consider connecting the RST input through a switch so that this pin is connected to GND when the switch is pressed, thus enabling the device to be reset if required). The output voltage of an Arduino pin is +5V and this is too high for the inputs of the ESP01. In this project a resistor potential divider circuit is used to lower the serial output voltage of the Arduino Uno to +3.3V before it is connected to the RX input of ESP-01. The TX output of ESP-01 is connected to an input pin of the Arduino which is configured as a serial input by the software. Pins 9 and 10 of the Arduino Uno are used as the serial RX and TX pins respectively. The front and back (tail) LEDs are connected to Arduino Uno port pins 7 and 6 respectively through 330 Ohm current limiting resistors. The positive input of the active buzzer is connected to pin 8 of the Arduino, and the other pin is connected to GND. 1A, 2A, 3A and 4A pins of the L293 motor controller chip are connected to port pins 2,3,4 and 5 of the Arduino Uno. As in the previous robot control projects, left and right motors of the robot are connected to pins 3,6 and 11,14 of the L293 motor driver chip. Power to the Arduino is supplied using 4 x Ni-Zn batteries, connected to Vin pin of the Arduino Uno. The two wheel motors also receive their power from these batteries through pin 8 of the L293 chip. Notice that you must not power the motors from +5V pin of the Arduino Uno as it may not be able to supply the required current for the two motors. Always use an external power supply for the motors.

â—? 201

Motor Control Projects UK 171004.indd 201

18-10-17 13:17


Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.