The control circuit of the robot (mounted on it) can be represented by the following block diagram –
Arduino Mega – Arduino Mega is one of the microcontroller boards available on the Arduino platform. This controller board has Atmega 1280 as the sitting MCU and has 128 Kb flash memory, 4 Kb EEPROM, 8 Kb SRAM, onboard UART, SPI and I2C interfaces. The board has 56 GPIO pins of which 15 pins can be used for 8-bit PWM output. There are 16 analog input pins available on the board as well. This is a bigger controller board available from the Arduino and is generally used when number of sensors or components required to be interfaced is large. In the remote circuit, 15 pins of the board are utilized where 6 pins are used to interface character LCD, 7 pins are used to interface keypad and Rx and Tx pins are used to connect with the X-bee module.
Arduino UNO – Arduino UNO is one of the most popular prototyping boards. It is used frequently in robotic applications as it is small in size and packed with rich features. The board comes with built-in Arduino boot loader. It is an Atmega 328 based controller board which has 14 GPIO pins, 6 PWM pins, 6 Analog inputs and on board UART, SPI and TWI interfaces. In this control circuit, 8 pins of the board are utilized. There are 4 pins used to connect with the input pins of the motor driver IC. The two pins RX and TX of the board are used to interface the X-bee module and establish serial communication over USART. The analog input pins A0 and A1 are used to interface the MQ-7 and MQ-135 sensors. Learn more about Arduino UNO from here.
From the sensitivity curve of the sensor, it can be seen that the resistance of the sensor decreases as the concentration of the target gas is increased in PPM while for clean air its resistance remains constant. In the graph, the Rs is the resistance in target gas and Ro is the resistance in clean air. The graph is shown for CO, CH4 and H2 gases.
Fig. 13: Table listing pin configuration of L293D Motor Driver IC
For activating the wireless connection between the robot and the remote circuit, it is important to configure the X-Bee modules on both sides. The CoolTerm terminal application is used to configure the X-Bee modules. In order to make PC to communicate directly with the Xbee, even arduino board can be used by removing the controller IC or an simple sketch can be uploaded to the arduino boards, which makes Xbee enabled to directly communicate with computer and not to the Arduino board. First of all the circuit connections between the X-Bee module and the Arduino must be made as mentioned above.
Fig. 21: Table listing ATBD commands for different baud rates
You may also like:
Project Source Code
### //Program to #include#include const byte ROWS = 4; //four rows const byte COLS = 3; //four columns LiquidCrystal lcd(13, 12, 6, 5, 4, 3); char hexaKeys[ROWS][COLS] = { {'1','2','3'}, {'4','5','6'}, {'7','8','9'}, {'*','0','#'} }; byte rowPins[ROWS] = {41, 43, 45, 47}; //connect to the row pinouts of the keypad byte colPins[COLS] = {49, 51, 53}; //connect to the column pinouts of the keypad Keypad customKeypad = Keypad( makeKeymap(hexaKeys), rowPins, colPins, ROWS, COLS); //initialize an instance of class NewKeypad void setup() { Serial.begin(9600); lcd.begin(16, 2); lcd.setCursor(0,0); lcd.print("Engineers Garage"); lcd.setCursor(0,1); lcd.print(" "); delay(3000); lcd.setCursor(0,0); lcd.print("INDSL MONITORING"); lcd.setCursor(0,1); lcd.print(" WIRELESS ROBOT"); delay(3000); } void loop() { char customKey = customKeypad.getKey(); if(customKey == '2') { Serial.println("F"); lcd.clear(); lcd.setCursor(0, 0); lcd.print("<--Direction-->"); lcd.setCursor(0, 1); lcd.print(" FORWARD"); } if(customKey == '8') { Serial.println("B"); lcd.clear(); lcd.setCursor(0, 0); lcd.print("<--Direction-->"); lcd.setCursor(0, 1); lcd.print(" BACKWARD"); } if(customKey == '4') { Serial.print("L"); lcd.clear(); lcd.setCursor(0, 0); lcd.print("<--Direction-->"); lcd.setCursor(0, 1); lcd.print(" LEFT"); } if(customKey == '6') { Serial.println("R"); lcd.clear(); lcd.setCursor(0, 0); lcd.print("<--Direction-->"); lcd.setCursor(0, 1); lcd.print(" RIGHT"); } if(customKey == '5') { Serial.println("S"); lcd.clear(); lcd.setCursor(0, 0); lcd.print("<--Direction-->"); lcd.setCursor(0, 1); lcd.print(" STOP"); } if(customKey == '1') { Serial.println("C"); lcd.clear(); lcd.setCursor(0, 0); lcd.print(" CarbonMonoxide"); lcd.setCursor(0, 1); lcd.print(" Reading"); delay(500); char buffer[] = {' ',' ',' ',' ',' '}; while (!Serial.available()); //when serial is available read the data till newline and store to buffer Serial.readBytesUntil('n', buffer, 10); //converting the charcter to integer int incomingValue = atoi(buffer); // Serial.println(incomingValue); lcd.clear(); lcd.setCursor(0, 0); lcd.print("Measured value"); lcd.setCursor(0, 1); lcd.print(incomingValue); } if(customKey == '3') { Serial.println("A"); lcd.clear(); lcd.setCursor(0, 0); lcd.print(" AirQuality"); lcd.setCursor(0, 1); lcd.print(" Reading"); delay(500); char buffer[] = {' ', ' ', ' '}; while(!Serial.available()); Serial.readBytesUntil('n', buffer, 10); int incomingValue = atoi(buffer); lcd.clear(); lcd.setCursor(0, 0); lcd.print("Measured value"); lcd.setCursor(0, 1); lcd.print(incomingValue); } } ###
Circuit Diagrams
Circuit-Diagram-Remote-Control-Xbee-Gas-Monitoring-Arduino-Robot | |
Circuit-Diagram-Xbee-Gas-Monitoring-Arduino-Robot |
Project Video
Filed Under: Electronic Projects
Filed Under: Electronic Projects
Questions related to this article?
👉Ask and discuss on EDAboard.com and Electro-Tech-Online.com forums.
Tell Us What You Think!!
You must be logged in to post a comment.