F13: Obstacle Avoidance Robot

From Embedded Systems Learning Academy
Revision as of 01:55, 7 December 2013 by Proj user8 (talk | contribs) (Hardware Design)

Jump to: navigation, search

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.

Object Sensing and Avoidance Robot

Abstract

The purpose of this project is to develop a robotic platform using the class issued NXP LPC1758 development boards. The main operation of the robot will be to sense objects near it using a distance sensor and then use a moveable platform to steer away from the sensed objects.

Objectives & Introduction

Show list of your objectives. This section includes the high level details of your project. You can write about the various sensors or peripherals you used to get your project completed.

Team Members & Responsibilities

  • Joel
    • Sensor Development
  • Dan
    • Motor Drive Development

Schedule

Show a simple table or figures that show your scheduled as planned before you started working on the project. Then in another table column, write down the actual schedule so that readers can see the planned vs. actual goals. The point of the schedule is for readers to assess how to pace themselves if they are doing a similar project.

Week# Date Task (Planned) Task (Result)
1 10/8 Project Proposal Complete
2 10/15 Research parts Complete
3 10/22 Order & receive parts Complete. Received parts 10/23. Found that another order was necessary. Only one motor, needed two. Need bracket hardware.
4 10/29 Research motor driver & A/D converter functions Complete. Not as many A/D channels as hoped for I/R sensor. Considered external A/D, decided on reducing A/D inputs to match available channels.
5 11/5 Write & test motor driver & A/D code Complete. One motor drive output seems a little weaker than the other. Viewed outputs on oscilloscope, no issue found.
6 11/12 Write & test combined avoidance robot code Complete. Updated motor driver. Able to achieve autonomous motion. See video.
7 11/19 Write & test combined avoidance robot code. Complete. Calibrated I/R sensor. Integrated all functionality together. See video.
8 11/26 Work documentation Worked algorithm and schematic documentation. Took videos for final presentation.
9 12/3 Project due Complete. Presentation shown during class.

Parts List & Cost

Item Description Qty Unit Cost Total Cost
1 #713 TB6612FNG Dual Motor Driver Carrier 1 $5.00 $5.00
2 #2107 Pololu 5V, 600mA Step-Down Voltage Regulator D24V6F5 1 $5.95 $5.95
3 #965 0.100" (2.54 mm) Breakaway Male Header: 1x40-Pin, Straight 4 $0.99 $3.96
4 #1134 Pololu Carrier with Sharp GP2Y0D810Z0F Digital Distance Sensor 10cm 4 $6.95 $27.80
5 #1700 Premium Jumper Wire 50-Piece Rainbow Assortment F-F 6" 1 $12.49 $12.49
6 #1944 Aluminum Standoff: 1" Length, 2-56 Thread, M-F (4-Pack) 2 $1.59 $3.18
7 #1940 Aluminum Standoff: 1/4" Length, 2-56 Thread, M-F (4-Pack) 2 $1.29 $2.58
8 #1067 Machine Hex Nut: #2-56 (25-pack) 1 $0.99 $0.99
9 #1955 Machine Screw: #2-56, 1/4" Length, Phillips (25-pack) 1 $0.59 $0.59
10 #1501 Pololu 5" Robot Chassis RRC04A Solid Black 1 $7.95 $7.95
11 #1218 Pololu 42x19mm Wheel and Encoder Set 1 $39.95 $39.95
12 #2365 50:1 Micro Metal Gearmotor MP 2 $16.00 $32.00
13 #925 T Connector Male-Female Pair 1 $1.49 $1.49
14 #955 Pololu Ball Caster with 3/4" Metal Ball 1 $2.99 $2.99
15 2150441 SENSOR, IR COMPOUND EYE, 200mm 1 $9.95 $9.95
16 2157870 PAN/TILT, 2-SERVO INCL, 8g 1 $14.95 $14.95
17 LiPo Battery 1 $7.00 $7.00
18 SJSU Development Board 1 $75.00 $75.00
Total $253.82
Figure 1: Parts

Design & Implementation

The design section can go over your hardware and software design. Organize this section using sub-sections that go over your design and implementation.

The photo below shows the implementation/progress as of 11/10/2013.

Figure 2: Assembly as of 11/10/2013

The photo below shows the implementation/progress as of 11/17/2013. The oscilloscope in the background was being used to display the PWM signal for the motor drives.

Figure 3: Assembly as of 11/17/2013

Hardware Design

Discuss your hardware design here. Show detailed schematics, and the interface here.

The design is built onto a Pololu 5" round robotic chassis that is designed to accept two independently driven wheels. As Figure 1 shows, there are two electronic boards stacked onto each other. The board on top is the SJSU NXP LPC1758 development board. Below that is a board that contains the motor driver and the 12V to 5V regulator. This board also worked well for a power distribution board so several headers are located on this board. There are two main voltages. The battery pack provides 12V to run the motors and as input power to the 5V switching regulator. The 5V out from the switching regulator provides power for the SJSU board at the USB interface as well as for the motor driver logic and I/R sensor power.

High Level Schematic

File:Obstacle bot schem.pdf

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.

We are using the SJSU board PWM and GPIO outputs to the motor driver and I/R servo. We are using the A/D inputs to read voltage from the I/R sensor itself. The motor driver then interfaces directly to the two motors.

In order to integrate the I/R sensor with the robot, we need to perform a calibration to determine the characteristics of the sensor. The basic calibration procedure was to read the A/D counts as a white surface was held at a particular distance from the sensor head. The chart below shows the calibration data from each of the four sensors on the I/R sensor head.

I/R Sensor Calibration

From this data, we were able to determine that a sensor reading less than 1000 counts meant that an object was far enough away to take no action. However a reading of greater than 1000 counts meant that an object is getting closer than 5 to 6 inches and it is time to stop the robot from going forward and run an algorithm to determine the best direction to move the robot.

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.

We have working functions that can drive the motors forwards and backwards and read from the I/R sensor. The plan is to find a generally clear direction to go from the I/R sensor input. This function will send a direction to go to the motor drive section. Currently, we are investigating the use of interrupts in order to tie all of the pieces together to make it function smoothly.

Implementation

This section includes implementation, but again, not the details, just the high level. For example, you can list the steps it takes to communicate over a sensor, or the steps needed to write a page of memory onto SPI Flash. You can include sub-sections for each of your component implementation.

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

Voltages: We had an issue with what voltages to use to drive everything. At first, we thought we might need 12V for the motors, 3.3V for the SJSU board, and 5V for the motor control logic. We also ran into the bug on the SJSU board when it is powered directly with 3.3V. When this is the case, the USB to RS232 chip holds the board in reset. In the end, we found that the GPIO pins were 5V tolerant and therefore could accept 5V from the motor control driver. We also found that the best solution to power the SJSU board was with 5V through the USB power to keep the USB to RS232 chip from resetting the NXP chip.

Issue #2

We discovered another limitation in with this board. It appears only one frequency of PWM can be used at a time. We are looking at different solutions.

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.

The video below shows the first autonomous testing of the motor functionality.

Motor Test Video

This video shows the complete functionality of the robot.

Full Functionality Video

Project Source Code

Send me your zipped source code and I will upload this to SourceForge and link it for you.

References

Acknowledgement

Any acknowledgement that you may wish to provide can be included here.

References Used

List any references used in project.

Appendix

You can list the references you used.