Ece 485 electrical engineering design i project
This presentation is the property of its rightful owner.
Sponsored Links
1 / 56

ECE 485: Electrical Engineering Design I Project PowerPoint PPT Presentation


  • 121 Views
  • Uploaded on
  • Presentation posted in: General

ECE 485: Electrical Engineering Design I Project. By Group 2: Joel Marcia, Paul Rosensteel, Scott Laminack, and Justin Lanham. Overview: The Problem. To design and implement the hardware and software to control the Trekker Robot in three competitions: Go around outside loop 3 times.

Download Presentation

ECE 485: Electrical Engineering Design I Project

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Ece 485 electrical engineering design i project

ECE 485: Electrical Engineering Design I Project

By Group 2: Joel Marcia,

Paul Rosensteel,

Scott Laminack,

and Justin Lanham


Overview the problem

Overview: The Problem

  • To design and implement the hardware and software to control the Trekker Robot in three competitions:

  • Go around outside loop 3 times.

  • Go around outside loop at least once, then take the inside loop twice.

  • Evade an obstacle on the track and follow the guidelines from competition 2.


Overview specifications

Overview: Specifications

  • OOPic R with a L7806 – 6V Voltage Regulator (TO220 Package)

  • OOPic R Expansion Board

Pictures from http://www.superdroidrobots.com/shop/category.asp?catid=25


Overview specifications1

Overview: Specifications

  • A Sharp GP2D12 IR Sensor

  • A Devantech SRF04 Ultrasonic Ranger


Overview specifications2

Overview: Specifications

  • 4 QRB1134 Phototransistors with mounting bracket

  • 2 HiTec HS-422 servos to control the wheels

  • 1 HiTec HS-311 servo to control the ranger or IR sensor

Pictures from http://www.superdroidrobots.com/shop/category.asp?catid=25


Optimizing software and algorithms

Optimizing Software andAlgorithms


Game plan

Game Plan

  • No “If … Then” statements

    • Might be easier getting stated, but more work in the long run

  • Use object codes to create a virtual circuit

    • Simplify the code

    • Easier to debug

    • Changes are easier to make


Key object codes used

oServoSP1

oTracker

oNavCon

oCompare2

Key Object Codes Used


Oservosp1

oServoSP1

  • Designed to control servos or to interface servos with different objects

  • Specifically used with hacked servos

  • Supports URCP values (positive and negative values)

  • Unique property – set Value property to 0, no pulses are sent to the servo (wheels stop completely)


Key points using oservosp1

*Key Points using oServoSP1

  • Set the left servo InvertOut property to “1” – sets wheels turning in the same direction

  • Set Refresh property to “1” – doubles the pulses sent to servos (increases torque)

    • Tested using o’scope: 36.2 Hz to 73.53 Hz


Otracker

oTracker

  • Designed to use digital sensor inputs (line followers) to determine the location of a black line on a white background

  • Formats URCP readings to express how much it needs turn

    • Range of values +/-8, +/-16, +/-24, +/-32

  • Maximum of four sensor inputs


Key points using otracker

*Key Points using oTracker

  • Setting the Width property to “1” allows the use of only three sensors

    • Range of values +/-8, +/-24, +/-32 (no +/-16)

    • The fourth sensor was used to detect the “inner circle” with an oEvent


Onavcon

oNavCon

  • Coverts the information received from oTracker into motor control speed for the servos

    • Takes the predetermined “Speed” value then adds or subtracts the values received from oTracker (URCP values) and send them to the servos


Key point using onavcon

*Key Point using oNavCon

  • Set oNavCon to ”0” to turn off the line following subroutine

    • This allowed us to turn off or override the line following subroutine to make adjustments for a special “event”


Ocompare2

oCompare2

  • Used with the sonar sensor

  • Triggered depending on distance

  • Compares two numbers (predetermined upper and lower limits) and sets the servo speed values to follow a along a wall or go around a “box”


Basic flow diagram

Basic Flow Diagram

Line following

(oTracker)

oNavCon on

oNavCon

oNavCon off

oNavCon off

Inner Circle

(oEvent)

Go around box

(oCompare2)

Wheels

(oServoSP1)


Competitions 1 2

Competitions 1 & 2


Round 1 of line following competition

Round #1 of Line Following Competition

Objective: To complete three laps around the black line track where one lap must be around the outer loop of the track.


The line following sensors

The Line Following Sensors


The line following circuit

The Line Following Circuit

  • The circuit for an individual line-follower

    • Pull-Up Resistor = 10 kW

    • Rf Resistor = 220 W

    • Line follower Capacitor = 0.1 mF


Complete line following circuit

Complete Line Following Circuit


The line following printed circuit board

The Line Following Printed Circuit Board


Capacitors used in line following circuit board

Capacitors Used in Line Following Circuit Board

  • We found documentation explaining how capacitors could be included in the line following circuit to reduce noise that the line followers may pick up.

  • The capacitors are connected to the line followers in hopes of leveling out the ripple in the signal out.


No significant difference

No Significant Difference

  • We tested the Trekker with, and without the capacitors in the circuit

  • No significant difference was found.

  • Therefore we chose to remove the capacitors from the line following circuit board.

  • Our design of the circuit board made removal of the capacitors easy, as they were connected from behind using free wires

  • These wires were cut, electronically removing the capacitors from the circuit


Direction of travel around the track

Direction of Travel Around the Track


Servo values s4 and s5

Servo Values S4 and S5

  • The coded values of S4 and S5 refer to server rotational speeds

  • S4’s value directly corresponds with the Right Wheel’s rotational speed

  • S5’s value directly corresponds with the Left Wheel’s rotational speed


Finding the center of the servos rotational speed values

Finding the center of the servos rotational speed values

  • From Trekker Experiment #3

  • S4 and S5 relationship with the rotational speed of the wheel was found


Left and right wheel speeds are not the same

Left and Right Wheel Speeds are not the same


Reversal of direction

Reversal of Direction

  • Because the left servo and the right servo are opposite of each other, they each travel in opposite directions relative to one another

  • To remedy this, one of the servo’s values is inverted

  • Now both wheels will move the Trekker forward at the same time.


First competition program works

First Competition Program Works!!

  • The initial line following program was uploaded to the OOPic R.

  • The Trekker successfully went around the outer loop of the track

  • First run around the track was very slow


Improvements to program

Improvements to Program

  • Had to find a good value for the servo speeds

    • Not too slow, or the Trekker would take too long around the turns. It would have a very “jerky” stop and go manuever.

    • Not too fast, or the Trekker would leave the black line on the turns and not return.

  • A speed value of 31 was found to be the best for what we needed


Number of line following sensors

Number of Line Following Sensors

  • The more line following sensors employed in the design, the faster the Trekker should be able to traverse the course

  • Using Four Sensors

    • Time around track = 1 min 6 sec

  • Using Three Sensors

    • Time around track = 1 min 5 sec

  • Three sensors are used in the final design of the Line Following program


Three outer loops no inner loops

Three Outer Loops, no Inner Loops

  • Our Trekker made it successfully around the outer loop of the track three times.

  • No inner loop attempt was made


Round 1 line following competition results

Round #1 Line Following Competition Results

  • Best time around the track:

    • 01:00.75

  • Competition Ranking:

    • 4th Place overall

    • 8 Points awarded


Round 2 of line following competition

Round #2 of Line Following Competition

Competition Objectives:

  • To complete three laps around the black line track

  • One lap around track must be upon the outside loop

    Group Objectives:

  • To complete two laps around the inner loop of the track

  • Make a better time around the track three times than in Round #1 of the Line Following Competition


Line following and inner track sensors

Line Following and Inner Track Sensors

  • Line Following Sensors

    • Three used, as were used in the Round #1 of the competition

  • Inner Track Sensors

    • One was used away from the three Line Following Sensors


Direction of travel and inner loop sensor placement

Direction of Travel and Inner Loop Sensor Placement

  • Direction of Travel around track

    • Clockwise

  • Placement of Inner Loops Sensor

    • On the left side of the Trekker when facing the Trekker front first.


Line following and inner loop sensor placement

Line Following and Inner Loop Sensor Placement


Outer loop behavior

Outer Loop Behavior

  • For the first lap, the Inner Loop Sensor will record each time it passes over the inner loop.


Inner loop behavior

Inner Loop Behavior

  • After the first lap, and the inner sensors having noted the inner loop twice.

    • Every time the inner loop sensor notices a black line the Trekker will turn to the right, and take the Inner Loop around until it finds the opposite side of the track on the Outer Loop


Testing and improvements

Testing and Improvements

  • We needed to make the Trekker have smoother turns around the corners of both the outer and inner loops of the track

    • This was done by changing the coded values for the right servo’s center, the left servo’s center, the oNav.Center, the LeftServo.Value, the RightServo.Value, and the overall speed of the Trekker


Results of testing and round 2 of the line following competition

Results of Testing and Round #2 of the Line Following Competition


Round 2 line following competition results

Round #2 Line Following Competition Results

  • Best time around track:

    • 0:50.51

  • Competition Ranking:

    • 3rd Place Overall

    • 18 Points Awarded


Competition 3

Competition 3


Round 3 of line following competition

Round #3 of Line Following Competition

  • A familiar problem:

  • Recognize Inner Loop

  • Recognize Tool Box

  • Line Follow: once outer Loop, and twice inner Loop

  • Oh, and navigate at most 8.5 inches from Tool Box


Tool box solution

Hardware:

Devantech SRF04 Ultrasonic Range Finder

HiTec HS-311 Servo

Objects to utilize hardware:

oSonarDV

oServoSP1

oCompare2: Properties (Above, Below and Between)

Tool Box Solution


The set up

The Set Up

1st oCompare2.Input set to oSonar.Value

2nd ReferenceIn1 set to Lower oSonar.Value = 53 and ReferenceIn2 set to Upper oSonar.Value = 58

3rd Allow oCompare to call Sub Routines to maintain 8.5 inches from tool box


Sonar

Sonar

  • Operation of Sonar device

  • Maximize sample rate. How? (Link Sonar.Operate to OOPIC.HZ60)


Srf04 timing

Need to toggle at a rate that sonar needs to monitor

SRF04 Timing


Srf04 graph

SRF04 Graph


Function of sub routines

Function of Sub Routines

  • We had Four Sub Routines:

  • Flag Inner – Used differently than previous competitions.

  • Above - Servo control to turn left.

  • Below – Servo control to turn right.

  • Between – Servo control to go Straight

  • Note: Each Sub controlled operation of oNavcon


Competition day

Competition Day

  • What Happened? A) Failed to detect object consistently B) When oCompare operated, Sonar Servo lost sight of object and Our Left Turn Sub routine was called.

  • Possible Solution:

    A) First Right Turn was a hard turn, we needed a set up sub routine and a means to return to line follower.

    B) Improve Sonar Performance.


Overall results

Overall Results

  • Completed two of the three competitions.

  • Placed 2nd in the class overall.

  • Project was a success overall


Conclusions

Conclusions

What we learned:

  • The importance of working as a team.

  • Using indicators in a circuit to help with troubleshooting.

  • Integration of external devices with a microcontroller.

  • Data sheets are helpful in design and implementation.


Conclusions continued

Conclusions Continued

What we learned:

  • How an infrared sensor, a sonar sensor, and optical sensor work.

  • Utilization of these devices to accomplish an objective.


References

References

  • “OOPic Manual.” Retrieved from http://www.oopic.com/.

  • “Trekker Robot. Retrieved from ”http://www.superdroidrobots.com/shop/.


  • Login