Difference between revisions of "S15: Swarm Robots"
Proj user5 (talk | contribs) (→Issue 1 : Interfacing Ultrasonic sensor) |
Proj user5 (talk | contribs) (→Hardware Design) |
||
Line 157: | Line 157: | ||
[[File:S15_244_grp12_robot_assembly.jpg|left|thumb|Fig 2. Robot chassis]] | [[File:S15_244_grp12_robot_assembly.jpg|left|thumb|Fig 2. Robot chassis]] | ||
[[File:S15_244_grp12_ServoMotor.jpg|right|thumb|Fig 5. Servo Motor]] | [[File:S15_244_grp12_ServoMotor.jpg|right|thumb|Fig 5. Servo Motor]] | ||
+ | [[File:S15_244_grp12_ultrasonic_sensor.jpg|left|thumb|Fig 6. Ultrasonic Sensor]] | ||
* All parts of the robot was assembled by the team. Robot assembly started with connecting chassis with dc motor and later on putting the wheels together for the robot. The movement of the motors is controlled by the L293D IC. An ultrasonic sensor is mounted on stepper motor to detect obstacles in the way of robot. The stepper motor helps to rotate the ultrasonic sensor from initial position through 180 degrees. | * All parts of the robot was assembled by the team. Robot assembly started with connecting chassis with dc motor and later on putting the wheels together for the robot. The movement of the motors is controlled by the L293D IC. An ultrasonic sensor is mounted on stepper motor to detect obstacles in the way of robot. The stepper motor helps to rotate the ultrasonic sensor from initial position through 180 degrees. |
Revision as of 20:41, 24 May 2015
Contents
Grading Criteria
- How well is Software & Hardware Design described?
- How well can this report be used to reproduce this project?
- Code Quality
- Overall Report Quality:
- Software Block Diagrams
- Hardware Block Diagrams
- Schematic Quality
- Quality of technical challenges and solutions adopted.
Swarm Robots
Abstract
Swarm robots deals with coordination of multiple robots. The collective behavior of the robot swarm emerges from interaction with each other and surroundings. All the Robots can communicate with each other. The position of each robot is determined and monitored by an overlooking camera. Large number of simple robots can perform complex tasks in a more efficient way than a single robot, giving robustness and flexibility to the group.
Objectives & Introduction
- Initially all robots will go in search of the target, as and when the target is located, the bot which is near the target sends out a message about its present location to all other bots.
- Overhead camera serves the purpose of determining the location of individual bots.
- Once the message regarding the target position is received by other bots, each of them will move towards the target.
Team Members & Responsibilities
- Team Member 1
- Abhishek Gurudutt - IR sensor circuit and interface, OpenCV (Image detection and co-ordinate mapping).
- Team Member 2
- Bhargava Sreekantappa Gayithri - PID controller & PWM
- Team Member 3
- Chinmayi Divakara - Wireless communication and synchronization
- Team Member 4
- Praveen Prabhakaran - OpenCV co-ordinate mapping. OpenCV and SJone board communication.
- Team Member 5
- Tejeshwar Chandra Kamaal - PID controller & PWM
Schedule
Week# | Date | Task | Actual | Status |
---|---|---|---|---|
1 | 4/14/2015 |
1) Hardware - Design of Motor Controller, Robot assembly 2) Software - OpenCV environment setup, Basic video processing |
1) Hardware, OpenCV setup - Completed Problems Encountered - Hardware Bug discovered in version 0.1 of motor controller circuit after testing. 2) Software - Problems during filtering video for certain colors. |
Completed |
2 | 4/21/2015 |
1) Communication between OpenCV to SJone board using DB9 connector and UART3 2) PWM and Ultrasonic sensor drivers 3) Object detection and mapping 4) Wireless communication between two nodes |
1) Modification of RS232 header file to support windows 7 file API. Was not able to communicate between OpenCV and SJone board using UART0 2) Unable to receive the echo signal and was not able to use ultrasonic sensor without interrupt. 3) HSV values had to be detected to recognize particular color. Had difficulties to find the HSV values for a color. This was solved by writing a program to print the HSV value of the color that is pointed in the video. 4) Packet sending and recieving failure. System crash while transmitting and recieving packets |
Completed |
3 | 4/28/2015 |
1) PID Controller Design 2) Co-ordinates communication between nodes and boundary mapping 3) Inter board communication and communicating the Co-ordinates |
1) Point to point travel using PID control loop. Code written PID tuning in progress. 2) Object detection completed. Co-ordinates mapping in progress. 3) Inter board communication completed. |
Completed |
4 | 05/05/2015 |
1) Integration, testing and Bug fixing |
- | Scheduled |
Parts List & Cost
Serial No. | Part Description | Cost |
---|---|---|
1 | Robot chassis and motors | $66.7 |
2 | Servo motors | $27.38 |
3 | Wireless camera | $26.21 |
4 | Ultrasonic sensor | $17.98 |
5 | Lipo Batteries and charger | $43.28 |
6 | H bridge IC - L293d | $10.91 |
7 | Connectors, cables etc | $45 |
8 | Antennas for wireless module | $15 |
9 | Foam board for arena | $65 |
Design & Implementation
Hardware Design
- All parts of the robot was assembled by the team. Robot assembly started with connecting chassis with dc motor and later on putting the wheels together for the robot. The movement of the motors is controlled by the L293D IC. An ultrasonic sensor is mounted on stepper motor to detect obstacles in the way of robot. The stepper motor helps to rotate the ultrasonic sensor from initial position through 180 degrees.
- Robot chassis is a circular cardboard material which is strong enough to withstand materials utilized by the robot. These chassis were bought online from https://www.elabpeers.com/smart-car-robot-with-chassis-and-kit-round-black.html
- The schematic was designed by the team and it was embedded on the PCB using the actual process carried on to embed a circuit layout on the PCB. H-bridge image provides the layout information of the motor driver. H-bridge drives the two dc motors of robot which helps in its movement. The dc motor is driven by a rechargeable lipo battery.
- The L293D circuit along with the LM7805 regulator schematic was drawn using orcad design tool. The aim of the schematic was to achieve proper connections between the motor,L293D IC and 7805. L293D IC is used to drive the two dc motors as shown in the image. The dc motors are driven by supplying a PWM to the enable pin of the L293D. The LM7805 voltage regulator is used to supply power for SJ-One board and its peripherals.
- IR Sensor circuit is used for object detection above the surface. The schematic was drawn using orcad design tool. IR sensor is turned ON by supplying a voltage of 3.3 volt. The transmitter LED sends a light pulse and receiver LED receives the reflected light, depending on the amount of light received by the receiver LED the voltage across the resistor changes. If no light is received by the receiver LED then voltage across the resistor will be very less.
Hardware Interface
In this section, you can describe how your hardware communicates, such as which BUSes used. You can discuss your driver implementation here, such that the Software Design section is isolated to talk about high level workings rather than inner working of your project.
Software Design
Show your software design. For example, if you are designing an MP3 Player, show the tasks that you are using, and what they are doing at a high level. Do not show the details of the code. For example, do not show exact code, but you may show psuedocode and fragments of code. Keep in mind that you are showing DESIGN of your software, not the inner workings of it.
- Robot control and wireless communication is accomplished with the help of FreeRTOS software.
- Modules of FreeRTOS utilized are:
- 1. FreeRTOS Task and Scheduler
- 2. FreeRTOS Queues
- 3. FreeRTOS Binary Semaphore
- 4. FreeRTOS Mutex
- FreeRTOS scheduler is used to run all the tasks on the robot.
- FreeRTOS Queues are used to communicate between tasks.
- FreeRTOS Binary Semaphore is used to enable a task.
- FreeRTOS Mutex helps in sharing resources.
- Robot to Robot communication is performed with the help of Wireless mesh network.
- PWM API developed by preet is used for controlling motors and interfacing ultrasonic sensor.
- API to read the analog values which is developed by preet is used to read the values from IR sensors
- Camera access and detection of robot is implemented on a computer with the help of openCV library.
Implementation
Motor Control
DC Motor: DC motors are used to move the robots. PWM supplied to the enable pin will drive dc motor. PWM is generated with the help of API provided by Preet. The robot is made to turn or go straight during different scenarios. The wheels are rotated in opposite direction to turn the robot.
Servo Motor: Ultrasonic sensors mounted on the robot are turned to left or right with the help of servo motor. When an obstacle is detected the ultrasonic sensors are turned to left and right to check free space. PWM signals are provided to servo motors to rotate the shaft.
Obstacle detection
This is achieved with help of an ultrasonic sensor. Trigger pin of the ultrasonic sensor is signaled and echo pin is monitored for a falling edge. Time taken to receive a falling edge from the moment of triggering an ultrasonic sensor is formulated to calculate the distance of the obstacle. When distance to obstacle is less than a threshold, software is interrupted and the robot changes its direction to avoid collision. Robot is turned to move in a direction where there is no obstacle.
Target detection
Infrared sensors are used to detect the target. Target which in this case is a black spot, is detected when the value from the IR sensor is below a threshold. Analog value from the IR sensor is read at regular intervals. IR sensors are kept near both wheels. Any one of the IR sensor can indicate the detection of target. The robot is turned towards the target according to the input from IR sensors.
Detecting and locating robot
This is achieved with the help of an overhead wireless camera. Each robot will be updated with its present location.
Detection of robot : Each robot is of a different color. This will help in differentiating the robots from one another. Images from the camera are captured every 30 millisecond, these images obtained will be in RGB format which is converted to HSV format. The converted image is then filtered. Hue(H), Saturation(S) and Value(V) are different for different color, hence the image can be filtered by defining the range for each color. The filtered image is then processed to remove noise.
Location of robot : Each filtered image contains only one object, the outline of the object is found out and checked if the area is more than threshold. If the area is less than the threshold, then it is discarded as noise. The spatial coordinates of the outlined image is found out which gives the position of the robot.
Communication between robots
Each robot has unique ID, this is utilized to communicate with a particular robot. The data between robots is exchanged with the help of inbuilt wireless module written by Preet. Queues and Mutex are utilized at this point of time. Queues are used to communicate the co-ordinates of robots between the tasks. Mutex is used to lock the access of robot co-ordinates to one task.
Communicating locations to robots
Co-ordinates of each robot detected through openCV is transmitted to a SJone board using DB9 connector and UART3 on SJone board. Each co-ordinate is sent with a header and Robot ID. This board sends out the information to all other robots through wireless network. The robots keep track of its location. Direction of its movement is determined. Once the target is found, the respective robot will broadcast its present location to other robots and also indicates that the target is found. Upon receiving the message that target is found, the other robots will start moving towards the target location.
Testing & Technical Challenges
Describe the challenges of your project. What advise would you give yourself or someone else if your project can be started from scratch again? Make a smooth transition to testing section and described what it took to test your project.
Include sub-sections that list out a problem and solution, such as:
Issue 1 : Interfacing Ultrasonic sensor
- Details - Initially we were trying to use polling method to detect the falling edge of the echo signal on the micro-controller pin. This method seemed rather difficult to capture the edge on the pin. With further testing and debugging, later it was found the ultrasonic sensor trigger pin was damaged and hence the sensor operation wasn't on the expected lines.
- Solution - Ultrasonic sensor was replaced and approach was also changed from polling method to external interrupt method on the micro-controller pin. This provided the results on expected lines.
- Advice - First check with multiple hardware for expected working. If this fails, then check with software logic once.
Issue 2 : PCB for Motor Driver
- Details - The pcb layout for the dc motor driver was designed by the team. In the initial phase, the etching process was carried using ferric chloride and after the process was completed the etched pcb was not according to the schematic since the tracks were discontinuous at few places and hence the pcb had to be discarded.
- Solution -
Conclusion
Conclude your project here. You can recap your testing and problems. You should address the "so what" part here to indicate what you ultimately learnt from this project. How has this project increased your knowledge?
Project Video
Upload a video of your project and post the link here.
Project Source Code
References
Acknowledgement
The hardware components were procured from HobbyKing, ebay, Amazon, getFPV, HomeDepot and various other sources for this project. Thanks to Preetpal Kang for teaching this class and inspiring, guiding and support us with our coursework and project. Thanks to entire team who helped and supported each other during all stages of the project and spending weekends and extra hours to get all parts of the project working.
References Used
List any references used in project.
Appendix
You can list the references you used.