ECET 365 Week 2 Complete DeVry
Just Click
on Below Link To Download This Course:
https://bit.ly/2EY6wVP
ECET
365 Week 2 Complete DeVry
ECET 365 Week 2 Interfacing with Sensors and
Subsystems DeVry
ECET 365 Week 2 Discussions
WEEK 2: COMPARISON OF
COMMUNICATIONS PROTOCOLS
What
are the advantages and disadvantages of the different communications protocols
introduced in this week?
WEEK 2: PROTOCOLS USED IN
THE PROJECT
Which
protocols are required by the subsystems in the project?
ECET 365 Week 2 HOMEWORK
Complete
the following Homework in your text:
Pages
384 – 387, Problems 7.1, 7.4, 7.9, 7.13, D7.17.
Page
639, Problems 12.1 – 12.5.
Don’t
forget to submit your assignment.
ECET 365 Week 2 COURSE PROJECT (DUE IN WEEK 8)
Review
the Course Project Overview under the Introduction & Resources area for an
overall description of the Course Project, grading rubric, and deliverables.
In
addition to doing Lab 2, it is highly recommended to read the Construction
Notes for the Smart Car that pertain to the Visual Sensor, found in the Files
section of the Course Menu.
ECET 365 Week 2 Lab
Lab 2:
Interfacing to the Smart Car Video Sensor
Objectives
- Develop a hardware interface to the
visual sensor in the Robotic Car Kit.
- Test the
sensor with software and use data to control the steering servo.
Parts List
- Robotic Car Kit with visual sensors
- Freescale Tower Kit with S12G128 CPU
board
- PC with IDE
software (e.g. CodeWarrior Development Studio V5.1)
Introduction
- The Robotic Car is required to follow a
one-inch-wide centerline around a track. In the actual contests, various
track configurations could be encountered. Here, we use an oval track made
with sheets of white foam board and 1-inch-wide black cloth Gorilla Tape
(labeled “Not Electrical Tape).
- The visual
sensor system is provided in the Robotic Car Kit to follow the center
line. The scheme is to use two sensors, one on each edge of the center
track. The sensors are infrared sensors. There are also two infrared LEDs
that illuminate the area of the track seen by the sensors. Each sensor
detects the infrared energy that is reflected from the track surface. When
the Robotic Car is centered on the centerline, both sensors see almost no
infrared light reflected from the black surface. However, if one of the
sensors strays onto the white background (the foam board), the infrared
light is greatly reflected and the sensors alert the CPU that the car has
moved too far left or right.
Deliverables
Answer all
questions in Week 2 Lab Cover Sheet here (Links
to an external site.)Links to an external site..
Submit
your Week 2 Lab Assignment.
You
can also download the cover sheet for Week 2 Lab in the Files section of the
Course Menu.
Required
Software
CodeWarrior
Development Studio for S12(x) V5.1
Access the
software at http://www.nxp.com/ (Links
to an external site.)Links to an external site. (Links to an external site.)Links to an external
site..
Lab Steps
STEP 1:
Procedures
- Construct
Interface between Visual Sensors and CPU Board
- The PmodLS1
Infrared Light Detector Module Reference Manual (in the Files section of
the Course Menu) describes the module that is the interface between the
CPU Board and the Visual Sensors. Examine the photographs in
Appendix B of the Construction Notes for the Robotic Car and observe that
the module is soldered to the proto-board via the 6-pin header
strip. The pins need to be bent down (carefully) at a 45 degree
angle so that the module is slanted upward. The cables from the
sensor modules (attached to the front bumper via Velcro supplied in the
Robotic Car Kit) are connected to the module. Note the color coded
wires correspond to the markings on the module. This project uses
S3 and S4. The module includes LEDS to show the functioning of the
outputs of the sensors. An LED which is on means that a logical 1
is on the output pins. See Figure 3 showing the orientation of the
sensors on the bumper.
- Testing the Video SensorsIt is
recommended to operate the sensors from the +3.3V power on the
proto-board. This power comes from the power supply at the bottom of
the primary elevator of the Tower. The power supply has two screw
terminals for +5V input and Ground. You should use the battery
holder (4 AA cells), but make sure the total battery voltage is less than
5.5 volts. If you run the sensors from +5 V directly, you will put
more than 20 mA through the LEDs, possibly damaging them.In place of an
actual track, we can use an index card with a center stripe that is black
and 1inch wide. See Photos 1 and 2 in Appendix B. Black
GorillaTMTape is recommended, but you could use a
black felt marker. Make sure the color is uniform.
- The PmodLS1 module contains a small
potentiometer that can be adjusted with a small flat bladed screwdriver
approximately 0.070 inches in width. We want to adjust the
potentiometer so that the LEDs on the module (LD3 and LD4) are off when
the center strip is along the center axis of the car. As the strip
is moved to one side, one LED will light up as the sensor sees the white
background of the index card. The other LED will light up when the
card is moved to the other side.Both LEDs will light up if both sensors
see the white background, which indicates that the car has left the center
track entirely.
- The right sensor output (LD4) is
connected to Primary side pin A47. The left sensor output (LD3) is
connected to Primary side pin A48. These pins are accessible from the
proto-board. The connecting wires can be soldered to the holes from
either the top or bottom of the proto-board.Pin A47 is the input to Port A
(A0). Pin A48 is the input to Port A (A1 ). By examining the
Robotic Car programs in Appendix A, you can see how the sensor inputs are
used for the steering logic.
- The program
stops the right wheel if the left sensor sees the white background.
Similarly, the left wheel is stopped if the right sensor sees the white
background. In either case, the result is that the wheel which is still
turning moves the sensor back onto the black stripe.If both sensors light
up, it means that the car has gone off the black stripe completely, and
both motors stop.
When all motor and sensor connections and the
power wiring is complete, we can load the first program and test the steering
system. We will do this in the next task.
- Set the car on a block (firm packing
foam works) so that the wheels can turn without interference.
Ensure that the batteries are installed.
- The TWR-S12G128 CPU board and the
proto-board should be installed in the Tower. Make sure the primary
edges of the boards are installed on the primary elevator of the
Tower. The boards can be installed backwards but they will not
work.
- Consult the TWR-S12G128_UG.pdf User
Guide. The Power section shows that the Power Select jumper
(JP5) should be set to pins 3 and 4, the default setting. This is
necessary for the PC to program the CPU board.
- Turn on SW1. The +5V LED and
+3.5V LED at the bottom of each elevator should light up. Also, a
green LED on the CPU board will light up.
- Using a PC with the CodeWarrior V5.1
installed, connect the USB cable between the PC and the CPU board.
More LEDs will light up on the CPU board. See the “Connecting the
Robotic Car to CodeWarrior” document in the Files section of the Course
Menu.
- Once the program is running, you can
remove the USB cable from the CPU board. The program will shut down
when you shut down the power to the CPU board, but it will resume when
the power is again applied.
- Center the striped index card under the
Visual Sensors and ensure that both sensors are over the black
stripe. Turn on SW2 and SW3. Both wheels should be rotating.
- Move the card to the right side.
When the left sensor reaches the white background, the wheel on the right
side should stop.
- Move the card to the left side.
As the sensors go over the black stripe, both wheels will
rotate. When the right sensor reaches the white background,
the left wheel will stop.
- This
completes the testing of the Robotic Car.
- Observations
– Complete the following questions in the Week 2 Lab Cover Sheet and
submit your Lab assignment.
- Sketch the change in the output of the
visual sensors as the striped index card is moved from the center to each
side of the center line.
- Describe the effect of the
potentiometer on the output of the sensor module.
- If the
motors and software are installed, describe the action of the drive
wheels as the index card is moved left and right.
ECET 365 Week 2 Quiz
Instructions
Here is some
information about your Quiz.
- This quiz covers CO 4 and Chapters 7,
11, and 12.
- This quiz is worth 20 total points,
which include the following questions:
- 3 multiple-choice questions at 5 points
each;
- 1
short-answer question at 5 points each; and
- You have 60 minutes to finish the quiz.
- Here is a reminder to SAVE frequently,
because when the time limit is reached, you will automatically be
exited from the exam.
- This quiz
contains one page.


Comments
Post a Comment