ECET 365 Embedded Microprocessor System DeVry
Just
Click on Below Link To Download This Course:
https://bit.ly/2AIo8Rf
ECET
365 Embedded Microprocessor System DeVry
ECET 365 Week 1 Motor
Control DeVry
ECET 365 Week 1 Discussions
WEEK 1: PWM AND DC MOTORS
What
are the advantages of using PWM to run a motor slowly compared to using a low
DC voltage?
WEEK 1: USING AN H-BRIDGE
How
does an H-bridge control the current going to the motor?
ECET 365 Week 1 HOMEWORK
Complete
the following Homework in your text: Pages 454–455, Problems 8.9, 8.10, D8.13,
D8.14, D8.15. Please write all of your answers in Word.
Don’t
forget to submit your assignment.
ECET 365 Week 1 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 1, it is highly recommended to read the Construction
Notes for the Robotic Car, found in the Files section of the Course Menu.
ECET 365 Week 1 Lab
Lab 1:
Programming for Stepper Motors, DC Motors, and Servos Using an H-bridge
Objectives
- Develop software routines that control
Stepper Motors, small permanent magnet DC motors, and Servos.
- Understand
how an H-bridge can be used to control DC motors and Stepper Motors.
Parts List
- Smart Car Kit or Other Provided Kit
(e.g. robotics kit, supplementary parts kit)
- Freescale Tower Kit with S12G128 CPU
board or Other Provided CPU Board
- PC with IDE
software (e.g. CodeWarrior Development Studio V5.1)
Introduction
- DC motors are used in the Smart Car Kit.
Also used are a servo and H-Bridge. Stepper motors may be used in the
Robotics Kit. The Supplementary Parts Kit may have a stepper motor.
- This lab
explores the techniques used to interface to these devices and also how to
program and control them.
Deliverables
Answer all
questions in Week 1 Lab Cover Sheet here (Links
to an external site.)Links to an external site..
Submit
your Week 1 Lab Assignment.
You
can also download the cover sheet for Week 1 Lab in the Files section of the
Course Menu.
Required
Software
CodeWarrior
Development Studio for S12(x) V5.1
Lab Steps
STEP 1:
Procedures
- Determine if your motor is a DC motor or
a stepper motor. (Hint: DC motors are powered with two wires. Stepper
motors may have four or more wires. DC motors will begin running when DC
voltage is applied. Stepper motors will not run unless several pulse trains
are applied. Go to the appropriate procedures below.
- Procedures
for DC Motors
- Develop an interface from the CPU board
to the motor.
- Choose a Port on the CPU board. Only
one bit is required. If an H-bridge is available, connect the
appropriate bit from the chosen Port to the appropriate input to the
H-bridge. The double H-bridges that come with the Smart Car Kit require
4 input bits. Consult the Week 2 Lecture for ways to operate the
H-bridge.
- If you
don’t have an H-bridge, you may have to use a transistor, relay, or
optical isolator to build an interface between the Port and the device.
Your reading assignment in the suggested reference textbook offers many
suggestions. Also, see the Week 2 Lecture.
- Controlling speed with program loop
- Start by turning the motor on by
sending the appropriate byte to the Port, using a short C program.
- Send the appropriate byte to the Port
to turn the motor off.
- You can now turn the motor on or off
by changing the byte value in the program, recompiling, and loading the
program into the CPU board.
- Now, however, we want to control the
speed of the motor by changing the width of the bit at Port C. Do this
by adding a delay program that keeps the pulse on for a 50% duty cycle.
Let the period of the pulse be 200 microseconds, giving a frequency of 5
kHz. Use an endless loop in the program.
- Experiment
with pulse widths of 25% and 75%. Note that the speed varies with the
pulse width.
- Controlling speed with PWM registers
- See Week 2 Lecture for example of PWM
programs that produce a pulse train with 50% duty cycle and pulse
frequency of 7.7 kHz. This pulse train provided a medium speed for the
Smart Car. Note that the pin PWM0 (Channel 0) is located on the Axiom
S12G128 CPU board primary side pin A40.
- The PWMDTY0 command controls the width
of the pulse.
- Notice
that the sequence of PMW commands keeps the signal going to the PMW0 pin
automatically, while the rest of the program can be doing something
else. The PMW pin is connected to one H-bridge digital input.
- Using the H-bridge
- You might need to use the H-bridge to
control the battery voltage to the motors. If you have a two-motor
system, each motor is connected to one of the rear wheels. An H-Bridge
can be used to feed the digital PWM pulse inputs to an output that is
connected to the higher voltage motor system. For example, a 12-volt
supply may be used by the motor, while the rest of the electronic
modules might use 3.3V or 5V.
- In a
simple Smart Car with one motor, the operator only needs one digital
input that the CPU board can turn on and off. The other inputs can be
hardwired to 5V or ground as appropriate.
- Download
the Week 1 Lab Cover Sheet here and answer the questions for Step 1:
Procedure.
STEP 2:
Stepper Motor Procedures
ACTIVITY 1:
Examine the “Using H-Bridge to Drive Stepper Motor” in website below:
Examine the “Using H-Bridge to Drive Stepper Motor” in website below:
- Use an ohmmeter to measure the
resistance of leads. This should identify the COM leads A through D
winding leads.
- The common
wires are connected to the positive side of the power supply. In many
motors, +5V is sufficient. DO NOT USE +5V POWER FROM DRAGON12 PLUS BOARD.
Make sure to use an external power supply.
ACTIVITY 2:
After making sure that Activity 1 works, write and run the following:
After making sure that Activity 1 works, write and run the following:
Connect
a switch to PORTH and use it for clockwise or counter clockwise. Use PORTH1=0
for CW and PORTH=1 for CCW.
ACTIVITY 3:
Use two more bits of PTH (such as PORTH7 and PORTH6) DIP switches to choose the degree of rotation as shown below:
Use two more bits of PTH (such as PORTH7 and PORTH6) DIP switches to choose the degree of rotation as shown below:
|
PORTH7
|
PORTH6
|
|
|
0
|
0
|
90 degrees
|
|
0
|
1
|
180
|
|
1
|
0
|
270
|
|
1
|
1
|
360
|
STEP 3:
Procedures for Interfacing to the Servo
- Refer to the Smart Car Instruction
Manual in the Files section of the Course Menu section of the course
shell.
- Produce a logic pulse train with a
period of about 20 milliseconds. A signal generator may be suitable. You
can also write a loop program.
- The width of the pulse determines the position
of the servo. A 0.5-millisecond pulse rotates the servo fully clockwise
(about 45 degrees from the center of movement. A 1.5-millisecond
pulse rotates the servo to the opposite end of rotation. A 1.0 millisecond
pulse puts the servo at the center of rotation. DO NOT SEND PULSES WIDER
THAN 2 MILLISECONDS.
- Write a small C program that controls
the Servo by providing a pulse train with controlled pulse widths. This
routine will later be used to control the steering (using the servo) with
an input number derived from the linear video array. See the Program
Listing in Appendix A of the Smart Car Construction Manual.
- Complete
questions for Step 3 in the Week 1 Lab Cover Sheet.
ECET 365 Week 1 Quiz
Instructions
Welcome to
Week 1 Quiz.
- This quiz covers CO 3 and Chapter 8.
- This quiz is worth 20 total points,
which include the following questions:
- 3 multiple-choice questions at 5 points
each; and
- 1
short-answer question at 5 points each.
- You have 60 minutes to finish the quiz.
- Here is a reminder to SAVE frequently,
because when the time limit is reached you will be exited from the
exam.
- This quiz
contains one page.
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.
ECET 365 Week 3 Software and Hardware
Subsystems DeVry
ECET 365 Week 3 Discussions
WEEK 3: FINITE STATE
MACHINE MODULES VS. PROCEDURAL CODE
What
are the advantages and disadvantages of a Finite State Machine model compared
to a Procedural model?
WEEK 3: SOFTWARE MODULES
FOR THE PROJECT
What
software modules are suggested for the current project?
ECET 365 Week 3 HOMEWORK
Pages
146—147, Problems 2.18, 2.19, 2.20, D2.23, D2.24.
Don’t
forget to submit your assignment.
ECET 365 Week 3 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.
The
Lab this week requires the students to develop a set of subsystems that will
fulfill a given set of requirements for the Robotic Car. These requirements can
be found in the Files section of the Course Menu.
ECET 365 Week 3 Lab
Lab 3:
Converting Requirements to a Work Schedule
Objectives
- Develop a map showing which hardware
subsystems from the kit will be used to meet each requirement. Determine
if additional parts are required.
- Determine which hardware subsystems will
require software support to control the subsystems or provide
communications between subsystems.
- Produce a set of tasks needed to meet
the requirements. Assign tasks to team members.
- Develop a
work schedule for a presentation to the class. Include serial and parallel
scheduling of tasks to meet the time requirements.
Parts List
- Robotics Car Kit or Other Provided Kit
- Freescale Tower Kit with S12G128 CPU
board or Other Provided CPU Board
- PC with IDE software (e.g. CodeWarrior
Development Studio V5.1)
- Scheduling
software (e.g. Microsoft Project)
Introduction
- The purpose of this course is to prepare
you for the Senior Project. If you think this course is intense, consider
that, in the Senior Project, you will not be given a kit to build. You
will have to determine what you will build. In this course, the kit will
be determined, although you may find that additional materials are
required.
- You will also be given a set of
requirements for this course. In the Senior Project, you will develop your
own requirements. This course will give you an idea of how requirements
are met.
- You will also learn how to develop a
work schedule for a project. This knowledge will serve you well in the
Senior Project.
- Finally, you will learn how to develop
techniques to build the system so that you have a test plan that can be
used to troubleshoot should any malfunctions occur. It is rare when
nothing fails. Having a test plan will greatly maintain your sanity as the
project deadline approaches.
- The lab for
this week consists of mapping the hardware subsystems to the requirements,
determining what software modules are required to support the subsystems,
assigning work tasks to team members, and producing a work schedule that
will be presented to the class at the end of the week.
Deliverables
Answer all
questions in Week 3 Lab Cover Sheet here (Links
to an external site.)Links to an external site..
Submit
your Week 3 Lab Assignment.
You
can also download the cover sheet for Week 3 Lab in the Files section of the
Course Menu.
Required
Software
CodeWarrior
Development Studio for S12(x) V5.1
Lab Steps
STEP 1:
Procedures
- Determine
the project requirements.
- Read the ECET365 Smart Car Contest
Rules in the Files section of the Course Menu.
- For each
relevant item in the Rules, determine what subsystems are required to
meet the requirement. For example, the following items may be relevant:
- The Robotic Car must follow a
1-inch-wide black stripe down the middle of the track.
- The track curves will have a bending
radius not less than 500 mm. Therefore, the Robotic Car must be
able to follow a curve of 500mm radius.
- The track width will be at least 600
mm, so the Smart Car must stay on the track, even as it goes around the
curves.
- The Robotic Car must go around the
track twice.
- The Robotic Car must stop within 3
meters after completing two laps.
- The fastest Robotic Car wins. The time
is the fastest lap time for either of the two laps.
- The
Robotic Car is autonomous. It is not controlled by an external driver or
computer.
There
may be other requirements hidden in the rules, especially about the type and
number of microprocessors allowed.
- Determine
alternative subsystems to meet the requirements.
- Create a
table of requirements and alternative subsystems. A brief example is
shown below:
|
Table 1
|
|||
|
Requirement
|
Alternative
1
|
Alternative
2
|
Alternative
3
|
|
Follow centerline on track
|
Linear array subsystem
|
Webcam subsystem
|
Photodiode subsystem
|
|
Make two laps, then stop at finish line
|
Counter/timer subsystem
|
Video/counter subsystem
|
Voltage monitor subsystem
|
- You may not
need as many as three alternatives, or you may find that you can think of
more alternatives. Use the “brain-storming” technique at this point, which
means that no idea is discounted. At least, it is not discounted yet.
- Determine a set of alternatives for the
actual plan. Note that there are different possible sets of
alternatives, but some will come together because of their similarities
and use of common resources. Consider the following:
- Time and expense to use the
alternative. If the kit contains a module, that may save expense, but
buying something else may save you time.
- Ordering items can be more expensive
for overnight delivery, or it may cost you time to choose less expensive
shipping.
- Using items with a common voltage
requirement may save you development time and expense. Otherwise, you may
need multiple power supplies.
- Capability
of team members. Some members may be skilled at certain circuit building,
sensor, or motor control techniques. This might lead you to choose an
alternative.
- Prepare a work schedule.
- This is the part of the process that uses the most
guesswork. You must estimate the amount of time required to assemble each
subsystem, test it, connect the subsystems, test them, assemble the final
prototype, and test it. Note that some subsystems require both hardware
and software to be developed.
- You need to decide the order in which the
subsystems will be developed and which tasks can be performed in
parallel. Consult the Outline of Smart Car Project in the Files
section of the Course Menu. It gives a rough idea of how much time each
task requires, but it does not show you which tasks could be done with
more people.
- You need to assign people to the tasks
and responsibilities to the team members. Microsoft Project is
suitable for building the work schedule, but of course, there are
alternatives.
- Observations
– Complete the following questions in the Week 3 Lab Cover Sheet and
submit your Lab assignment.
- The class may have suggestions for improving your
work schedule.
- You may find ideas from other schedules.
- A sanity test is best done by others
outside your team.
ECET 365 Week 3 Quiz
Instructions
Here is some
information about your Quiz.
- This quiz covers COs 1, 2 and Chapters
1, 2.
- 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.
ECET 365 Week 4 Power
Systems DeVry
ECET 365 Week 4 Discussions
WEEK 4: ALTERNATE BATTERY
TYPES
What
are the advantages and disadvantages of using NICAD, NIMH, lithium, or sealed
lead-acid rechargeable batteries?
WEEK 4: SUBSYSTEM POWER
REQUIREMENTS
Compare
the power requirements for the subsystems of your project to the power
requirements for the motors.
ECET 365 Week 4 HOMEWORK
Page
242, Problem 4.10. Page 586, Problem 11.5c,g. Page 589, D11.20, D11.21
Don’t
forget to submit your assignment.
ECET 365 Week 4 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.
The
Lab is focused on tasks required to develop a power supply system for the
project.
ECET 365 Week 4 Lab
Lab 4:
Converting Requirements to a Work Schedule
Objectives
- Test the main power supply of the Smart
Car or robotic system.
- Test the
subsystem power supplies and determine if a separate battery system is
required for the subsystems.
Parts List
- Robotic Car Kit
- Freescale Tower Kit with S12G128 CPU
board
- PC with IDE software (e.g. CodeWarrior
Development Studio V5.1)
- Alternative
Robotics Kit or other kit if applicable
Introduction
- A project system contains several
subsystems that require power. The Robotic Car Kit, for example, has a
visual sensor subsystem, a steering subsystem, a CPU board subsystem, and
a motor control subsystem. It may be possible to run the subsystems from
one main power supply (e.g. a 9V or 12V rechargeable battery). Warning: DO
NOT POWER DC MOTORS USING THE POWER FROM THE DRAGON BOARD OR POWER BOARD.
USE A SEPARATE POWER SUPPLY.
- The Robotic Car uses 4 AA batteries. The
power supply on the Primary elevator board accepts a 5 V input to produce
3.3V for the Tower. Four new alkaline AA batteries have a starting voltage
of 1.61 X 4 = 6.44 V. This is a bit too much for the power supply.
The power supply was tested at this voltage for a short time, but the
current drain was 100 ma. The current drain was much less, as the
voltage input approaches 5 V.
A rechargeable NiMH battery has a peak
voltage of 1.35 V. This gives a total voltage of 1.35 x 4 = 5.4V. This is much
better. If you don’t see the wisdom of rechargeable batteries, you could drain
the non-rechargeable batteries using a resistor (greater than 10 ohms) until
the voltage is 1.35 V.
- It is also possible that the subsystems
might require a separate battery system to avoid interference from the
large motor pulses powered by the main power system.
- This lab will evaluate the power
provided to the subsystems to determine if a separate battery is needed.
- Similar
procedures would be used for a robotics project with subsystems.
Deliverables
Answer all
questions in Week 4 Lab Cover Sheet here (Links
to an external site.)Links to an external site..
Submit
your Week 4 Lab Assignment.
You
can also download the cover sheet for Week 4 Lab in the Files section of the
Course Menu.
Required
Software
CodeWarrior
Development Studio for S12(x) V5.1
Lab Steps
STEP 1:
Procedures
- Robotic Car
Subsystems
- The interacting subsystems are the
visual sensor subsystem, the steering subsystem, the motor subsystem, and
the CPU board subsystem. We need to ensure that the motor subsystem does
not affect the other systems.
- Set the assembled car on blocks so that
the motor wheels can move freely. Consider that the front wheels must
have room to move.
- Load the Robotic Car program into the
CPU board. Ensure that the visual sensor inputs and outputs are connected
to the CPU board. Also, ensure that the H-Bridge inputs are
correctly connected.
- In a previous lab, we have tested the
steering of the front wheels with an index card that has a 1-inch-wide
stripe down the center of the card. This time, we will test the system
with the wheels powered.
- Test the system with the subsystems
powered, but the motor power to the H-bridge disconnected. Single-pole
single-throw switches are recommended, but you can just disconnect the
appropriate wires. Troubleshoot the system if it does not operate
satisfactorily. Once the visual system works correctly, proceed to the
next step.
Note: These procedure steps can be performed
whether the Tower system has been mounted on the Robotic Car chassis or not. It
is recommended that the Tower be mounted on the chassis. Otherwise, the system
is a confusing pile of wires. Nevertheless, it can be tested in such a manner.
See the Robotic Construction Notes in the Files section of the Course Menu.
- Again, test the steering system, but
turn the motor power on. The H-bridge is sending large pulses to the
motor. If the subsystems are connected to the same battery as the motor
power subsystem, the motor pulses may interfere with the steering
subsystems. The Robotic steering works by stopping the motor on one side
when the sensor on the other side detects the white background of the
foam board track.
- If there is no interference, proceed to
step 8. If there is interference such that the steering is not
working correctly, use the oscilloscope to observe the power going to the
subsystems. First, try the power going to the CPU board. The power supply
on the Tower primary elevator provides the 3.3V to the protoboard and CPU
board. Check the 3.3V bus for interference.
It
may be that a few more capacitors on the subsystem power lines may reduce the
noise enough for the steering to work correctly. Note that you can add filter
capacitors (tens of microfarads) before and after the voltage regulators.
Consider the filter shown in the Robotic Construction Notes (see the Files
section of the Course Menu).
If not, you may consider a separate battery
for the subsystems. The batteries are heavier than the capacitors.
If a separate battery does not work, go back to step 5 and verify that the
system works without the motor running. If running the motor with
separate batteries for motor and subsystem, check for wiring and connection
errors. Again, the oscilloscope is very useful for tracking noise
pulses. When you have a correctly working system, proceed to step 8.
- If the steering works correctly with
the motor running, and you haven’t done so already, mount the tower
system on the Smart Car chassis. See the Robotic Construction Notes
document in the Files section of the Course Menu.
- Observations
- For each subsystem, determine the
actual current draw. If a sensitive ammeter is not available, use a
small (0.1 or 1 ohm) resistor in series with the power lead. Measure the
voltage across the resistor and calculate the current using Ohm’s Law (I
= V/R).
- Video sensor _____
- Servo
_____
- CPU board
_____
- Motor
_____
- Sketch the subsystem power voltages
displayed by the oscilloscope. If noise was discovered and reduced,
sketch the display before and after the noise was reduced.
- Calculate
the expected operating time for the system. Ensure that the motor power
operating lifetime will not exceed the CPU board operating lifetime
Motor System Lifetime
_____
CPU Board Lifetime _____
CPU Board Lifetime _____
- Let the
system run until either the CPU board or the motor stops running. If the
CPU board stops before the motor does, increase the capacity of the CPU
board power supply.
ECET 365 Week 4 Quiz
Instructions
Here is some
information about your Quiz.
- This quiz covers CO 5 and Chapters 4,
11.
- 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.
ECET 365 Week 5 Timing and
Intterupts DeVry
ECET 365 Week 5 Discussions
WEEK 5: SOFTWARE INTERRUPT
COMMANDS
What
software commands are used to allow the 9S12 program to receive interrupts?
WEEK 5: POLLING VERSUS
INTERRUPTS
For
your project, which subsystems should use polling and which should use
interrupts?
ECET 365 Week 5 HOMEWORK
Page
241, Problems 4.1–4.9
Don’t
forget to submit your assignment.
ECET 365 Week 5 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.
Although
this week’s Lab focuses specifically on interrupts, you should use this
opportunity to ensure that the software works correctly. This means that you
will be loading each of two programs from Appendix A of the Construction Notes
for the Robotic Car (Found in the Files section of the Course Menu).
The
Lab is focused on tasks required to develop a power supply system for the
project.
ECET 365 Week 5 Lab
Lab 5:
Converting Requirements to a Work Schedule
Objectives
- Determine the timing requirements for
data to and from subsystems.
- Change a procedural subroutine to an
interrupt-driven subroutine.
- Compare the
interrupt-driven system operation to the procedural system.
Parts List
- Robotic Car Kit with visual sensor
- Freescale Tower Kit with S12G128 CPU
board
- PC with IDE software (e.g. CodeWarrior Development
Studio V5.1)
- Alternative Robotics Kit or other kit if
applicable
- Oscilloscope
with X10 probe
Introduction
- A system can use many ways to ensure
that operations are controlled. A procedural code program can manage the
data to and from devices within the main program, or it can use interrupt
requests to cause the CPU to jump from the main program to a subroutine.
- We will take
the code for the Smart Car and modify it to use an interrupt service
routine. We will then compare the performance of the two approaches by
measuring the period of the SI pulse on the video sensor.
Deliverables
Answer all
questions in Week 5 Lab Cover Sheet here (Links
to an external site.)Links to an external site..
Submit
your Week 5 Lab Assignment.
You
can also download the cover sheet for Week 5 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
- Robotic Car Subsystems
- The interacting subsystems are the
visual sensor subsystem, the steering subsystem, and the CPU board
subsystem. We need to ensure that the motor subsystem does not affect the
other systems.
- Set the assembled car on blocks so that
the motor wheels can move freely. Consider that the front wheels must
have room to move side to side, and that the back wheels will be powered.
- Load the car program into the CPU
board. Ensure that the video sensor inputs and outputs are connected to
the CPU board. Also, ensure that the servo inputs are correctly
connected.
- In a previous lab, we have tested the
steering with an index card that has a 1-inch-wide stripe down the center
of the card. This time, we will test the system with the wheels powered.
- Test the system with the subsystems
powered, but the motor power to the H-bridges disconnected. Troubleshoot
the system if it does not operate satisfactorily. Once the steering
system works correctly, proceed to the next step.
- Load the CPU with the first program
shown in Appendix A of the Construction Notes for the Robotic Car (see
the Files section of the Course Menu). If a test track is available, run
the Robotic Car program and observe the operation. If a test track is not
available, set up the car on a block so that the wheels are free to turn.
Use the test index card with the center black stripe. Observe the
operation of the car as the stripe is moved left and right.
- Load the
CPU with the second program shown in Appendix A. Run the program and
observe the operation of the Robotic Car as the index card center stripe
is moved left and right.
- Observations
– Complete the following questions in the Week 5 Lab Cover Sheet and
submit your Lab Assignment.
- Compare the operation of the first
program with the operation of the second program.
- Explain why the timing has changed.
- What
changes should be made to the second program to enhance the Robotic Car
performance?
ECET 365 Week 5 Quiz
Instructions
Here is some
information about your Quiz.
- This quiz covers CO 6 and Chapter 4.
- 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.
ECET 365 Week 6
Interfacing to Networks DeVry
ECET 365 Week 6 Discussions
WEEK 6: NETWORKS AND
SERIAL INTERFACES
What
is the difference between a network and a serial interface?
WEEK 6: 9S12 BOARD
INTERFACES
Which
interfaces on the 9S12 are designed for networking?
ECET 365 Week 6 HOMEWORK
Page
710: Problems 14.1–14.4, 14.8–14.13
Don’t
forget to submit your assignment.
ECET 365 Week 6 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.
The
Lab for this week involves locating suitable communications systems on the
Internet and comparing them. These could be used on the Robotic Car Project,
but they are not required.
ECET 365 Week 6 Lab
Lab 6:
Interfacing to Networks
Objectives
- Compare characteristics of different
wireless communications modules.
- Compare characteristics of different
wireless Internet communications modules.
- Determine which modules are the most
suitable for the Smart Car or Robotics project.
- Develop a
preliminary design for connecting a wireless module to the Smart Car or
Robotics project.
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)
- PC with
Internet access
Introduction
- Wireless operation allows you to control
your project without being connected with a wiring harness. Your textbook
mentions the ZigBee system, but there are many commercial systems
available. We will investigate some systems by using the Internet to find
and compare systems.
- We will also consider systems that
provide access to the Internet using wireless communications.
- Finally, we
will determine which systems are suitable for the Smart Car or Robotics
projects.
Deliverables
Answer all
questions in Week 6 Lab Cover Sheet here (Links
to an external site.)Links to an external site..
Submit
your Week 6 Lab Assignment.
You
can also download the cover sheet for Week 6 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
- Search the Internet for wireless
adaptors that can connect directly to digital ports. The adaptors should
consist of a Transmitter section and a Receiver section so that two CPU
boards could communicate with each other.
- Choose three wireless systems (a ZigBee
system can be one of them).
- Compare the three systems in terms of
- Price;
- Ease of implementation (hardware and
software);
- Data rate;
- Security;
- Latency; and
- After choosing the best system from Step
C above, sketch the method you would use to connect it to your project.
- As you did for the wireless systems
above, find three wireless Internet communication systems, and compare
them using the elements of Step C above.
- After choosing the best system from Step
E above, sketch the method that you would use to connect it to your
project.
- Observations
- Write your
observations of the three wireless systems in the table below:
|
Comparison
Item
|
System A
|
System B
|
System C
|
|
Price
|
|
|
|
|
Implementation
|
|
|
|
|
Data Rate
|
|
|
|
|
Security
|
|
|
|
|
Latency
|
|
|
|
|
Interference
|
|
|
|
|
|
|
|
|
- Sketch how you would connect the chosen
system to your project. Attach the sketch to your lab report.
- Write your
observations of the wireless Internet systems in the table below:
|
Comparison
Item
|
System A
|
System B
|
System C
|
|
Price
|
|
|
|
|
Implementation
|
|
|
|
|
Data Rate
|
|
|
|
|
Security
|
|
|
|
|
Latency
|
|
|
|
|
Interference
|
|
|
|
|
|
|
|
|
- Attach a
sketch showing how you would connect the chosen system to your project.
ECET 365 Week 6 Quiz
Instructions
Here is some
information about your Quiz.
- This quiz covers CO 4 and Chapter 14.
- 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.
ECET 365 Week 7
Integration of Subsystems DeVry
ECET 365 Week 7 Discussions
WEEK 7: POSSIBLE
ADDITIONAL FEATURES
Now
that you are performing the final assembly of your system, what would you add
if you had more time?
WEEK 7: POSSIBLE USES FOR
THE PROJECT
What
are some possible uses of your project? Include possible spinoffs.
ECET 365 Week 7 HOMEWORK
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 7 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.
The
Lab this week consists of integrating the various subsystems into a functional
Robotic Car. This involves testing and troubleshooting the individual
subsystems as well as testing the interaction among the subsystems. Also, a
Test Plan is developed to specify the tests that determine that a subsystem is
functioning correctly.
The
Lab contains an optional step involving a test track. A picture of a suggested
test track is available in the Files section of the Course Menu. The track
consists of sections of foam board and a center line consisting of black 1-inch
wide Gorilla Tape, a duct tape on steroids. Hint: The Robotic Car wheels will
need the rubber bands that are included in the kit. Otherwise, the hard plastic
wheels will slip on the foam board surface.
ECET 365 Week 7 Lab
Lab 7:
Integration of Subsystems
Objectives
- Complete the assembly of project
subsystems.
- Test the
operation of the completed project.
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 focus of the previous weeks of this
course has been on the building and testing of the various subsystems of
the project. This week is devoted to assembling the entire project and
testing its operation.
- Considerable
emphasis will be placed on test procedures that ensure the subsystems
interact correctly with each other.
Deliverables
Answer all
questions in Week 7 Lab Cover Sheet here (Links
to an external site.)Links to an external site..
Submit
your Week 7 Lab Assignment.
You
can also download the cover sheet for Week 7 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
- The Robotic
Car has the following subsystems:
- Visual Sensor Subsystem
- Steering Subsystem
- Driver Motor Subsystem
- Computer
Subsystem
Test
each system above to ensure that each is operating correctly. Part of
this lab’s purpose is to make sure that you have a test for each subsystem.
Make any necessary corrections to the subsystems before proceeding to the next
step.
- Test the operation of the visual
sensors, steering subsystem, and computer subsystem, using a white index
card with a black 1-inch-wide stripe across the center of the card to
ensure that the steering mechanism is following the video input to keep
the wheels centered on the stripe. (See Figure 1.) Move the card slowly
and observe the motion of the front wheels. Be aware that, if the light
environment is too strong, the wheels will jerk very quickly. If the car
moves too far from the center line, it may not recover. Try using a light
that is less intense. If you can get the wheels to correct as you move the
card slowly to the left and right, declare victory and proceed to the next
step.
- Set the car on a block so that the
wheels are not on the ground. Test the drive motor subsystem and computer
subsystem to ensure that the motor runs smoothly. You may hear a high
frequency due to the pulse frequency. Again, record your test results and
correct any hardware or software problems before proceeding to the next
step.
- (Optional)
When the entire system has been assembled and tested, put the car on the
test track. (See Appendix A of the “ECET365 Smart Car Contest Rules for
one example of a test track, located in the Files section of the Course
Menu.) Make sure that the car can go at least two laps around the track.
Observations
Note
that each of the subsystems below also uses the computer subsystem to control
operations or data. Be sure to include any tests that involve software as well
as hardware.
- Visual Subsystem
- Test Method: (Briefly describe the test
method used to verify the correct operation of the visual subsystem.)
- Test Results:
(Record the measurements that indicate the visual subsystem is operating
correctly.)
- Steering Subsystem
- Test Method: (Briefly describe the test
method used to verify the correct operation of the steering subsystem.)
- Test
Results: (Record the measurements that indicate the steering subsystem is
operating correctly.)
- Visual sensor and
steering operation interaction
- Test Method: (Briefly describe the test
method used to verify that the visual sensor subsystem and the steering
subsystem are working correctly together.)
- Test
Results: (Record the measurements that indicate the video sensor and
steering servo subsystems are working correctly together.
- Drive Motor
Subsystem
- Test Method: (Briefly describe the test
method used to verify that the drive motor subsystem is working
correctly.)
- Test
Results: (Record the measurements that indicate the drive motor subsystem
is operating correctly).
- System Operation
- Test Method: (Briefly describe the test
method used to verify that the system operates correctly when all the
subsystems are operating.)
- Test
Results: (Record the measurements that indicate the system is operating
correctly.)
Additional
Questions:
- Have your problems been mostly hardware
or software? Explain your answer.
- How does your estimate of energy
required to do two laps compare with your measurements?
- What is the pulse frequency of the drive
motor control signal?
- (Optional) How many laps can the car
perform?
ECET 365 Week 8
Presentation of the Project DeVry
ECET 365 Week 8 Discussion
WEEK 8: LOOKING AHEAD
Class,
looking back over the Course Objectives for this course, what are you looking
forward to learning more about throughout your education and career?
ECET 365 Week 8 COURSE PROJECT: ROBOTIC CAR
The
Robotic Car portion of your Course Project is due this week. See the Course
Project Overview under Introduction & Resources area for more specifics.
ECET 365 Week 8 COURSE PROJECT: PROJECT MANUAL
The
Project Manual portion of your Course Project is due this week. See the Course
Project Overview under Introduction & Resources area for more specifics.
ECET 365 Week 8 Final Exam
Instructions
Here is some
information about your Final Exam.
- This exam covers COs 1-7 and Chapters 1,
2, 4, 7, 8, 11, 12, and 14.
- This exam is worth 240 total points, which
include the following questions:
- 17 multiple-choice questions at 10
points each;
- 7
short-answer question at 10 points each; and
- You have 3 hours and 30 minutes to
finish the exam.
- Here is a reminder to SAVE frequently,
because when the time limit is reached, you will automatically be
exited from the exam.
- This exam
has 2 pages. You don’t need to complete them in order


Comments
Post a Comment