Showing posts with label Line Following Robot With Manual Control. Show all posts
Showing posts with label Line Following Robot With Manual Control. Show all posts

Friday, July 8, 2016

Serial Monitoring


Serial Monitoring is done in Arduino (software). So, before you can check whether your sensor is working fine or not, you need to install the arduino software. If you don't have arduino, you can download it from here.

Once you install arduino in your computer, you need to connect the sensor pins to the arduino hardware and the hardware to the computer. The sensor pins give an analog input to the arduino, i.e the output from the sensors are variable as they sense differently in different conditions. For example, if they sense the white color, they may send a small voltage, while on the other hand, if they sense something darker, they may send a comparatively greater voltage depending on the configuration of your sensor.

So, make sure that you connect the sensor pins to the analog pins of arduino (A0 - A5). Since, there are five sensor pins in your sensor board, you can connect them to respective pins A0 - A4. Also, make sure that you give a 5V power supply to your sensor board either by an external battery or through the arduino itself. After you connect all the pins, your sensor board is ready for serial monitoring.

Now, what you need to do is, write a program in arduino to monitor your sensors. If you are familiar with the programming language C, then you will not have difficulties coding in arduino. Both are pretty much the same with slight differences. Here is a screenshot of the code that is going to help you for serial monitoring. I have written down some comments too, so that you understand the code precisely.


Setting Up the modes for the analog pin and Baud Rate for Serial Monitoring






Taking input from the sensors and printing it in the Serial Monitoring Window

If the images are not clear, then you can download them from here.
Image1
Image2 

To summon up the program, basically what we are doing is, we set the analog pins A0 - A4 in INPUT Modes, take the input from the sensors and print them in the serial monitor window of arduino. To open the serial monitor window, press  "Ctrl + Shift + M".


Now, you can see the values given by your respective sensors in the serial monitor window. This is the time when the POT (potentiometer) connected to the sensor board comes to use.
Make sure you have a white paper below all your IR sensors and watch the values in the serial monitor window. Now, try to make all the values to a similar range by rotating the top of each POT in either direction. For example, if the 1st sensor shows 308, then try to adjust the values of all other sensors at around (290 - 320) by rotating the POT for each.

Once you adjust a similar range of values for all the sensors, replace the white paper underneath with a black one and then observe the values again. If the values differ from the previous values by a fine range (about a difference of 400-500), then it confirms that your sensor board is working perfectly fine.
Also, make sure that after you replace the white paper with a black one, the values given by all five sensors are within a range just like the previous time.

NOTE: Here, the range of the values given by the sensors is between 0 to 1023. This is because we are using a microcontroller that is a 10 bit microcontroller. So, the total number of values possible is 2^10 (i.e. 1024).



Thursday, July 7, 2016

Schematic For Infrared Sensor Board

Schematics for Infrared Sensor


For making a sensor board using Infrared sensors, you are going to need the following components.

  • Infrared Transmitters and Receivers ( 5 each )
  • LED for an indicator ( 1 pc )
  • 0.4k Resistors ( 10 pcs )
  • 22k Resistors ( 5 pcs )
  • 5k Potentiometers ( 5 pcs )
  • Male headers ( 7 Headers )
  • PCB Matrix Board
After you get your matrix board, you will need to solder the above items in the board by looking at the given schematics. For better efficiency, you can start soldering the components in the following order.

  1. Solder all the 0.4k resistors as shown by connecting a line for the positive terminal of the source.
  2. Connect the respective Infrared Transmitters (IR1 - IR5 ) with the resistors along with a LED at the end ( used as an indicator for the board ) .
  3. Now, connect the negative ends of the IRT ( Infrared Transmitters ) to a line which connects the negative terminal of the battery.
  4. Similarly, connect the negative ends of all the IRR ( Infrared Receivers ) to a single line which connects them to the negative end of the battery.
  5. After that's done, connect the 22k resistors in a 45 degree angle with the positive end of each of the IRRs as shown in the diagram.
  6. Make sure you buy three terminals POT (Potentiometers) that are compatible to your board. Solder the single end of the POT to the 22k resistor and one of the bottom two legs to a single line, which in the end gets connected to the positive terminal of the battery. Solder everything as shown in the figure by examining the circuit carefully.
  7. Finally, you have to do one more thing that is not illustrated in the figure. Bring out wires from the ports that are named as label(1-5) and connect them to 5 male headers at one side of the board. Similarly, connect two headers at the terminal ports of the battery so that it is easier to connect and disconnect the battery at your own will.
After you get finished with your soldering and the connecting stuffs, your circuit board or the sensor board might look like this in the pictures given below.





Featured Post

Line Following Robot With Manual Control

Line Following Robot With Manual Control: Line Following Robot Components Required: Arduino UNO A Chasis for your BOT ( Yo...