SlideShare a Scribd company logo
2016
JasonMeier
DeVryUniversity
4/13/2016
ECET 365 Robot Project Manual
i
This document is to provide fundamental information in regards to the
DeVry University course ECET 365 Embedded Microprocessors Systems w/
Lab. During the course of this document each section and stage of
development will be discussed to include an overview, identification of
systems and subsystems, testing, and the basic operation of the robot.
Contents
Overview.....................................................................................................................................................1
Project Requirements ..................................................................................................................................1
Projected Project Cost for Materials:..................................................................................................1
Projected Project Cost for Alternative Materials:...............................................................................2
Power Supply and Filter..............................................................................................................................2
Visual Sensors and Modules.......................................................................................................................3
Motors .........................................................................................................................................................4
Potential Wireless Enhancements ...............................................................................................................5
Basic Operation of Robotic Car..................................................................................................................6
Testing Plans...............................................................................................................................................8
Motor Testing........................................................................................................................................8
IR Proximity Sensor Testing...............................................................................................................9
Visual Subsystem Testing...................................................................................................................9
Steering Subsystem Testing.............................................................................................................10
Power Supply Testing........................................................................................................................10
Current Draw Testing.........................................................................................................................10
Visual sensor and steering operation interaction ..........................................................................12
Drive Motor Subsystem.....................................................................................................................13
System Operation Testing ................................................................................................................13
Appendix A – Data Sheets....................................................................................................................14
Source Code ...........................................................................................................................................15
1
ECET 365 Robot Car Project
Overview
The robot car, when completed will follow a 1” wide centerline track in the shape of an oval. The
track may be composed of a foam board using black tape as the track line or centerline. The overall
objective of this project is to build a robot that contains subsystems to a main system which will enable
it to follow the black line for a minimum of two laps on the provided track. The subsystems are power
supply, steering, motor controls, and visual sensors. The manual will provide data for each subsystem,
parameters, diagrams, and testing methods and results.
Project Requirements
The project requirements are in two parts, the hardware, and software or code. The general list of
materials are as follows:
Identify Physical Requirements
Identify Modular Groups to create/assemble end
goal
Identify Required Code for each subsystem
Clock
I/O
Counters (if needed)
Comparators (if needed)
Identify possible alternative motors
Datasheets
Identify possible alternative sensors
Datasheets
Identify alternative microcontrollers
Datasheets
Projected Project Cost for Materials:
Item Part
Number
Cost
ROBOTIC CAR KIT
Kit includes:
PmodHB5 – H-Bridge Module
PmodLS1 Infrared Light Detector Modules
909-MOD-LTR501ALS
Long Range Sharp GP2Y0A02YK0F
Support Frame
Wheels (2)
240059 $168.37
DeVry Tower Kit twredukit $376.64
2
Projected Project Cost for Alternative Materials:
Alternative Replaces Function Cost
ARM STM32 Cortex-
M4
STM32F4DISCOVERY
TWR-S12G128
Board
Microcontroller 140.99
L298 Dual H-Bridge
DC Motor Controller
PmodHB5 H-Bridge Module 7.56
909-MOD-LTR501ALS PmodLS1: Infrared
Light Detector
Visual Sensor
Module
18.44
Infrared Proximity
Sensor Long Range -
Sharp GP2Y0A02YK0F
Digilent IR Proximity
Sensors
Visual Sensor 14.59
Required software is CodeWarrior IDE. This is a product of Freescale, now part of NXP (NXP.com,
2016). IDE allows the user to program in C which the Pulse Width Modulator, set the Duty Cycle to
adjust the speed of the robot, and to enhance its function at a later date.
Power Supply and Filter
The robot requires at a minimum of +5.5V DC to operate both the tower which contains the
microcontroller and the two DC motors that propel the robot. The power is supplied by four NiMH
rechargeable AA batteries that provide 1500mAh each with an average DC output of +5.5V. And eight
NiMH rechargeable AA batteries with an average output of +11.5V for the DC motors. By separating
the two systems and dedicating each its own power supply, it will ensure a longer lifecycle for the robot
between charges. The power for the tower and microcontroller is fed through a DC power filter to
remove and potential spikes or any noise that may damage the microcontroller.
The filter consists of two 1000uF capacitors, two 0.1uF capacitors, and one 100mH inductor and
assembled in accordance with the below schematic.
Figure 1 Power Supply Filter 1
3
Visual Sensors and Modules
The visual sensors are Digilent IR proximity sensors that have both an IR transmitter and IR
receiver built in. The kit is equipped with four sensors however the project only requires two to function.
In addition to the IR Proximity sensors, the IR Detector module directs the signal to the microcontroller.
The visual sensors require a +3.3V DC to operate which is delivered by the microcontroller via the
sensor module.
Figure 2-a IR Sensor Placement 1
Figure 2-b 1
4
Motors
The motors that are used in this project are model IG220019X00015R. They are a 12V DC
motor. The turn both clockwise and counter clockwise. The project requires two motors, located in the
front of the robot to “pull” the robot forward. The rear of the robot is supported by a large plastic post
place centerline on the back of the robot.
When the motors were received, they were tested for functionality. They were tested by applying
5V DC to the positive (Red) and ground to the negative (Black) wires. The direction of spin was
annotated. Next the leads were reversed, by placing the 5V DC to the negative (Black) wires and ground
to the positive (Red). This proved that the motor rotated in the opposite direction. This result was also
recorded. Next a 12V DC power supply was applied to each motor to test the maximum rating to ensure
that each motor rotated in both directions at maximum DC voltage.
Figure 3-a: Motor Specs 1
Figure 3-b Mounted Motors 1
5
Potential Wireless Enhancements
The microcontroller has the potential to expand with a wireless capability. The microcontroller
has the ability to use both Bluetooth and Wi-Fi for adding additional peripherals that can communicate
and be controlled by the microcontroller. By using the Wi-Fi option the user may be able to control the
robotic car directly by sending direction to the car. The car can also be equipped with a recording deice
that can send data to a central location via Wi-Fi or Bluetooth for review at a later time. Some of these
modules are listed below:
Bluetooth Table 1 1
Comparison
Item
XBee 802.15.4 Digi-Key RN4020-V/RM-
ND
TDK
SESUB-PAN-T2541
Data Rate 250kbps 1Mbps 250kbps, 500kbps,
1Mbps, 2Mbps
Security 128-bit AES AES 128 Encryption AES-128 w/ CTR, CCM,
CBC-MAC modes
Interference DSSS(Direct Sequence
Spread Spectrum
Simple, UART UART/SPI/I2C/GPIO/A
DC2.4GHz Bluetooth
Wi-Fi; Internet; 802.11 b/g/n Table 2 1
Comparison
Item
ESP-WROOM-02 WiFi
802.11 Module
Tiny UART Embedded
WiFi Module - HF-
LPT100
Embedded WiFi Module
- 802.11 b/g/n Industrial
Temperature HF-A11
Data Rate 1Mbps,6Mbps,
6Mbps,11Mbps,
54Mbps,65Mbps,
72.2Mbps
802.11b: -93 dBm (@
11Mbps)
802.11g: -85 dBm (@
54Mbps)
802.11n: -82 dBm (@
HT20, MCS7)
UART: 230,000 bps max
Ethernet: 10/100Mbps
Security WPA/WPA2
WEP/TKIP/AES
Encryption
WEP/WAP-PSK/WAP2-
PSK
WEP/WAP-PSK/WAP2-
PSK/API
WEP64/WEP128/TKIP/A
ES Encryption
Interference 802.11 b/g/n
TCP/UDP/HTTP/FTP
 TCP/IP/UDP/FTP/HTTP
Networking Protocols
802.11 b/n/g
UART
10/100 Ethernet
GPIO (up to 7, mode
dependant)
6
Basic Operation of Robotic Car
The robotic car in its base configuration is designed to run on a track with an
approximately one inch thick centerline. This track is to be in the shape of an oval or large
circle (all system tests were conducted on a circular track). Once the robot is placed on the
track there are four power switches that need to be switched to the power on position. The first
switch is located in the rear of the tower on the lower right corner (Figure 5-a).
Figure 4-a 1
Tower Power Switch
7
The additional power switched are located on the chassis, one on each side for each
motor and one in the rear for the tower (Figure 5-b).
Figure 4-b 1
Once all power switches are in the on position the robot will start moving along the black
centerline drawn in the oval or circular form. To stop the robotic car left it from the track and
switch the rear power switch to the off positon.
Left Motor Power Switch
Tower Power Switch
Right Motor Power Switch
8
Testing Plans
Motor Testing
Use Ohmmeter to measure resistance for DC motor used in this Lab.
Resistance was measured by placing the DMM leads on the Red and Black wire pins
connected to the motor wiring harness. Ensuring that the DMM was in the proper mode
to measure resistance and all power was disconnected from the motor, the reading was
5.9 Ω
Explanation of how you turned the DC motor “on” and “off.”
The microcontroller is loaded with the code that has a 75% duty cycle. The
microcontroller outputs the signal to the H-bridge, which in turn saturates or turns ‘On”
the motor during the positive portion of the wave (75% Duty Cycle or Pulse Width)
which provides enough average voltage to turn the motor.
How to choose the speed of DC motor.
To choose the speed of the DC motor, the duty cycle is adjusted. The longer the pulse
width the higher the voltage, the faster the rotation of the motor.
Definition of load and no-load RPM in DC motor.
The load is when friction is applied or resistance applied to the motor when activated.
The no-load is when there is no resistance applied to the motor shaft.
Connect a DC motor leads to +5V and Ground and measure the current usage on current meter.
Examine loaded and no-load current usage. Give your conclusion.
No-Load Current: 128mA @ 10VDC
w / Load Current: 153mA @ 10VDC
Why use the PWM technique.
Using the Pulse Width Modulation (PWM) technique, we can achieve analog results with
digital means. The pulse provides short burst or pulses of DC voltage and when adjusted
to a frequency faster than the human eye can see, a light would appear to be on even
though it is blinking or pulsing.
9
IR Proximity Sensor Testing
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.
The change in output from the visual sensors went from a low to high DC change in
voltage. When the dark area on the card was under the sensors the LEDs on the module
were ‘On’ and when the card was moved so that only the white was below the sensors the
LEDs were ‘Off’. The attached video also captures the O-Scope reading.
Describe the effect of the potentiometer on the output of the sensor module.
The potentiometer of the sensor module is used to adjust the sensitivity of the sensors. By
adjusting the pot value to an optimum value or threshold the sensors were able to detect
and acknowledge the change in density (light and dark) of the card.
If the motors and software are installed, describe the action of the drive wheels as the index card
is moved left and right.
As the card is moved from right to left, the motors would change their velocity to turn the
robot so that it will follow the dark line on the card.
Visual Subsystem Testing
Test Method: (Briefly describe the test method used to verify the correct operation of the visual
subsystem.)
Method used to test the visual system: Visual sensors were connected to the visual
control module which was connected to the 9S12 microcontroller. A voltage of +3.3 V
was applied to the Vcc pin of the module. With the sensors power applied and sensors
enabled a card with a 2” x 2” black square was moved below the sensors.
Test Results: (Record the measurements that indicate the visual subsystem is operating
correctly).
The measurement was taken using an oscilloscope which allowed for a graphical reading
of voltage change. As the card was moved under each sensor, a voltage change occurred.
When the card was removed from beneath the sensor, the voltage would change again
going from High to Low and Low to High. Also when the voltage would change, the
LEDs on the visual sensor module would light indicating that there was a change in the
output of the sensors.
10
Steering Subsystem Testing
Test Method: (Briefly describe the test method used to verify the correct operation of the steering
subsystem.)
The steering system was tested by connecting the motors to the H-Bridge modules. The
Right motor to the Right H-Bridge module and the Left motor to the Left H-Bridge
module. A +3.3V DC was connected to the DIR pin of the H-Bridge modules. An
oscilloscope was connected to the Enable pin to ensure that a control voltage is received
from the tower.
Test Results: (Record the measurements that indicate the steering subsystem is operating
correctly.)
The results were that each module received a +0 to +3.3V DC(2.3V DC) voltage was
applied to the enable pin of the H-Bridge module. Both modules, Right and Left received
the voltage
Power Supply Testing
The power supply filter, once assembled was tested by applying +5.5V DC to the input of the
circuit. Once connected, using a DMM, the negative lead of the meter is connected to the
negative side of the circuit which is connected to the negative side of the power source (four AA
batteries). The positive lead is then used to step across from the input of the board to the lead of
the first capacitor (1000uF), then to the capacitor (0.1uF), the input of the 100mH inductor, then
to the second 0.1uF capacitor, to the lead of the second 1000uF capacitor. The lead of the second
1000uF capacitor is the output of the filter circuit.
Secondly, the filter circuit is connected to an oscilloscope to monitor the input voltage verifying
that there is zero noise or power spikes that could damage the microcontroller.
Current Draw Testing
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).
Visual sensor 0.5mA The measurement was taken by measuring the current draw for the
tower with the Visual sensors connected (21.7mA), then again without the sensors not
connected (21.2mA). The difference was taken which is 0.5mA.
11
Tower/CPU 21.2mA This was taken with all modules and peripherals disconnected.
Right Motor 117mA / 115mA See below for details
Left Motor 124mA / 126mA See below for details
*The motor values were measured using two methods to compare for accuracy as they
will be the largest current consumption parts of the robot. The first method was by
connecting an ammeter between the power supply and each motor. By doing so, the
circuit is completed and the amps are measured as the amps are pulled from the power
supply.
The second method was by taking a 1Ohm resister and placing is in series with the motor
circuit and the power supply. Once connected and circuit was completed the voltage
across the resister was taken and recorded then used to calculate the current using Ohm’s
Law I=V/R yielding the second set of results above for the Right and Left motors.
There is a slight difference so for the future calculations the higher value will be used as
the minimum current draw required to ensure that there will be sufficient current
available for the project.
Calculate the expected operating time for the system. Ensure that the motor power operating
lifetime will not exceed the CPU board operating lifetime.
In calculating the Motor System Lifetime and CPU Board Lifetime, the following
calculations were used:
For the motor current, the higher of the two values, 126mA was used for calculations.
The formula Amps * Duty Cycle (minimum of 60%) will yield the required amps needed
for one motor. By doubling this value will will yield the minimum current draw required
for the 2 motors. This should also provide additional available current if needed. If the
NiMH battery is used a single AA provides 1500mAh of current. By dividing 1500mAh
by 252mA the Motor System Lifetime value should be 5.95h.
*Even though the above calculations have been completed with the values of a single AA
each power source will be comprised of a minimum of four AA batteries to produce a 6V
DC which will be provided to the DC motors which are rated to 12V DC.
Motor System Lifetime 5.95h
Calculating the CPU Board Lifetime is a little less complicated as there will not be a
Duty Cycle to use in the calculations. The direct current draw of the CPU or in this case
the Tower to include the visual sensor modules and H-Bridge modules is 21.9 mA. Using
12
the same battery type and values of 1500mAh and dividing by the 21.9mAh the
CPU/Tower Lifetime should be 68.49h.
*Even though the above calculations have been completed with the values of a single AA
each power source will be comprised of a minimum of four AA batteries to produce a 6V
DC which will be provided to an 7805 voltage regulator which will provide +5V to the
power filter which will then provide power to the tower.
CPU Board Lifetime 68.49h.
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.)
The sensor and steering system tested together was accomplished by connecting the
motor subsystem and the visual subsystems to the 9S12 microcontroller tower. The tower
provides a PWM and a Duty Cycle of 60% as recommended by the construction notes.
The H-Bridge modules are connected to the tower which supplies the +3.3V DC Vcc and
+0 to +3.3V DC enable voltage. A +5V DC is connected to J3 of the H-Bridge module to
supply the motor with a drive current to turn the motors.
Test Results: (Record the measurements that indicate the visual sensor and steering subsystems
are working correctly together.)
With the robot inverted so that the sensors are facing upward and the wheels are upward a
card with a 2” x 2” black square is passed over the sensors. As the square moves over
each sensor, the corresponding H-Bridge receives a voltage on the Enable pin. When the
black square is over both sensors, both H-Bridge modules receive the enable voltage from
the tower at the same time which would turn the motors if they were connected. Each
motor turned in the correct direction due to having the DIR pins of the H-Bridge modules
connected to the +3.3V DC and Ground respectively.
13
Drive Motor Subsystem
Test Method: (Briefly describe the test method used to verify that the drive motor subsystem is
working correctly.)
To test the drive motor subsystem each motor was connected to +5V DC to J3 on the H-
Bridge modules to drive the motors. Then a +3.3V DC was applied to the enable pin of
the H-Bridge module to enable the motor(s). Then Ground was connected to the DIR pin
of the H-Bridge module to test each motor for a reverse direction.
Test Results: (Record the measurements that indicate the drive motor subsystem is operating
correctly).
When the +3.3V DC was applied to the enable pin of the H-Bridge module the motor
would engage. The speed of the motor depended on the Duty cycle provided by the
tower. This value can be adjusted by editing the source code for the tower. Currently it is
set at 60%. Each motor turned in both directions. This was tested by connecting both
+3.3V DC and Ground to the DIR pin of the H-Bridge module and testing each
separately.
System Operation Testing
Test Method: (Briefly describe the test method used to verify that the system operates correctly
when all the subsystems are operating.)
The visual sensors are mounted to the frame and connected to the tower via the sensor
module. The H-Bridge modules are connected to the motors and to the tower. The tower
provides a PWM and a Duty Cycle of 60% as recommended by the construction notes.
The motors and the H-Bridge modules are connected to the tower which supplies the
+3.3V DC Vcc and +0 to +3.3V DC enable voltage. The H-Bridge modules will have
+5V DC and +12V DC tested. The motors are +12V DC motors.
This test will be conducted in two stages; first stage is with the robot inverted so that the
wheels have zero load; second with the robot upright so that it can run along the track
line.
Test Results: (Record the measurements that indicate the system is operating correctly.)
The robot during first test (+5V DC for motors) seems sluggish. Will recharge batteries to
ensure test is with full charge. Second test run robot seems to operate properly. The speed
of the robot will be adjusted so that it can maintain a maximum life cycle in regards to the
power supply of both the tower and the motors.
Robot with fully charged batteries performed on target. Microcontroller was re-flashed
with a lower duty cycle to slow the speed which brings the robot to a more controllable
speed in regards to the given track that is must follow. At 60% duty cycle the robot would
not be able to correct its line of travel and would travel off the track and come to a stop.
14
Appendix A – Data Sheets
Motor Datasheet.pdf
H-Bridge Datasheet.pdf
Visual Sensor Module Data Sheet.pdf
TSL1401 Video Sensor Datasheet.pdf
MC9S12G Microcontroller Overview.pdf
15
Source Code
#include <hidef.h>
#include <math.h>
#include "derivative.h"
byte sensor;
void main(void) {
// Set variables for the Pulse Width Modulation (PWM) Signal.
PWMCLK = 0x03;
PWMSCLA = 2;
PWMPOL = 0x03;
PWMPER0 = 200;
PWMPER1 = 200;
PWMDTY0 = 145;
PWMDTY1 = 145;
CPMUCOP_CR = 0; // disable COP
DDRA=0x00;
for(;;)
{
sensor = PORTA & 0x03;
switch(sensor)
{
case 0: // Both sensors are off.
PWME = 0x03; // Turn both motors on.
break;
16
case 1: // Right sensor is on.
PWME = 0x01; // Turn right motor on, left motor off.
break;
case 2: // Left sensor is on.
PWME = 0x02; //Turn left motor on, right motor off.
break;
case 3: //Both sensors are on.
PWME = 0x00; // Turn both motors off.
break;
}
}
} /* loop forever */
/* make sure that you never leave main */

More Related Content

What's hot

Solution on Portable Blood Pressure Monitor System
Solution on Portable Blood Pressure Monitor SystemSolution on Portable Blood Pressure Monitor System
Solution on Portable Blood Pressure Monitor System
Premier Farnell
 
Gate driver design and inductance fabrication
Gate driver design and inductance fabricationGate driver design and inductance fabrication
Gate driver design and inductance fabrication
Pantech ProLabs India Pvt Ltd
 
Obstacle Avoidance Robotic Vehicle
Obstacle Avoidance Robotic VehicleObstacle Avoidance Robotic Vehicle
Obstacle Avoidance Robotic Vehicle
Edgefxkits & Solutions
 
[YOUSUNG] Product Catalog
[YOUSUNG] Product Catalog[YOUSUNG] Product Catalog
[YOUSUNG] Product Catalog
LukePark12
 
Robotic Car Controlled over Bluetooth with Obstacle Avoidance
Robotic Car Controlled over Bluetooth with Obstacle AvoidanceRobotic Car Controlled over Bluetooth with Obstacle Avoidance
Robotic Car Controlled over Bluetooth with Obstacle Avoidance
kiet group of institution
 
Básicos de Functional Test Systems - Testing Days Tijuana
Básicos de Functional Test Systems - Testing Days TijuanaBásicos de Functional Test Systems - Testing Days Tijuana
Básicos de Functional Test Systems - Testing Days Tijuana
Interlatin
 
Migration ux to windows - ICT i3070
Migration ux to windows - ICT i3070Migration ux to windows - ICT i3070
Migration ux to windows - ICT i3070
Interlatin
 
Functional Test Systems - Testing Days Bajío
Functional Test Systems - Testing Days BajíoFunctional Test Systems - Testing Days Bajío
Functional Test Systems - Testing Days Bajío
Interlatin
 
LTE 4G FDD GPS tracker TK419 -Eelink
LTE 4G FDD GPS tracker TK419 -Eelink LTE 4G FDD GPS tracker TK419 -Eelink
LTE 4G FDD GPS tracker TK419 -Eelink
Eelink communication Technology Limited
 
IRJET- Design and Development of Gesture Controlled Robot
IRJET- Design and Development of Gesture Controlled RobotIRJET- Design and Development of Gesture Controlled Robot
IRJET- Design and Development of Gesture Controlled Robot
IRJET Journal
 
IRJET- Automated Elevator-An Attentive Elevator to Elevate using Speech Recog...
IRJET- Automated Elevator-An Attentive Elevator to Elevate using Speech Recog...IRJET- Automated Elevator-An Attentive Elevator to Elevate using Speech Recog...
IRJET- Automated Elevator-An Attentive Elevator to Elevate using Speech Recog...
IRJET Journal
 
Embedded Systems & Robotics Projects
Embedded Systems & Robotics Projects Embedded Systems & Robotics Projects
Embedded Systems & Robotics Projects
Technogroovy India
 
PowerMate15 Technical Specification
PowerMate15 Technical SpecificationPowerMate15 Technical Specification
PowerMate15 Technical Specification
Rimsky Cheng
 
ARDUINO BASED GAS LEAKAGE REPORT FULL
ARDUINO BASED GAS LEAKAGE REPORT FULLARDUINO BASED GAS LEAKAGE REPORT FULL
ARDUINO BASED GAS LEAKAGE REPORT FULL
Hari sankar
 
Arduino Interface LM35 MQTT Using UART
Arduino Interface LM35 MQTT Using UARTArduino Interface LM35 MQTT Using UART
Arduino Interface LM35 MQTT Using UART
Sanjay Kumar
 
IRJET - IoT based Speed Control of DC Motor using PWM Technique
IRJET -  	  IoT based Speed Control of DC Motor using PWM TechniqueIRJET -  	  IoT based Speed Control of DC Motor using PWM Technique
IRJET - IoT based Speed Control of DC Motor using PWM Technique
IRJET Journal
 
Multi-Function Automatic Move Smart Car for Arduino
Multi-Function Automatic Move Smart Car for ArduinoMulti-Function Automatic Move Smart Car for Arduino
Multi-Function Automatic Move Smart Car for Arduino
Wanita Long
 

What's hot (20)

Solution on Portable Blood Pressure Monitor System
Solution on Portable Blood Pressure Monitor SystemSolution on Portable Blood Pressure Monitor System
Solution on Portable Blood Pressure Monitor System
 
Gate driver design and inductance fabrication
Gate driver design and inductance fabricationGate driver design and inductance fabrication
Gate driver design and inductance fabrication
 
Obstacle Avoidance Robotic Vehicle
Obstacle Avoidance Robotic VehicleObstacle Avoidance Robotic Vehicle
Obstacle Avoidance Robotic Vehicle
 
[YOUSUNG] Product Catalog
[YOUSUNG] Product Catalog[YOUSUNG] Product Catalog
[YOUSUNG] Product Catalog
 
Robotic Car Controlled over Bluetooth with Obstacle Avoidance
Robotic Car Controlled over Bluetooth with Obstacle AvoidanceRobotic Car Controlled over Bluetooth with Obstacle Avoidance
Robotic Car Controlled over Bluetooth with Obstacle Avoidance
 
final report
final reportfinal report
final report
 
Básicos de Functional Test Systems - Testing Days Tijuana
Básicos de Functional Test Systems - Testing Days TijuanaBásicos de Functional Test Systems - Testing Days Tijuana
Básicos de Functional Test Systems - Testing Days Tijuana
 
Migration ux to windows - ICT i3070
Migration ux to windows - ICT i3070Migration ux to windows - ICT i3070
Migration ux to windows - ICT i3070
 
Functional Test Systems - Testing Days Bajío
Functional Test Systems - Testing Days BajíoFunctional Test Systems - Testing Days Bajío
Functional Test Systems - Testing Days Bajío
 
Rf robot
Rf robotRf robot
Rf robot
 
LTE 4G FDD GPS tracker TK419 -Eelink
LTE 4G FDD GPS tracker TK419 -Eelink LTE 4G FDD GPS tracker TK419 -Eelink
LTE 4G FDD GPS tracker TK419 -Eelink
 
IRJET- Design and Development of Gesture Controlled Robot
IRJET- Design and Development of Gesture Controlled RobotIRJET- Design and Development of Gesture Controlled Robot
IRJET- Design and Development of Gesture Controlled Robot
 
IRJET- Automated Elevator-An Attentive Elevator to Elevate using Speech Recog...
IRJET- Automated Elevator-An Attentive Elevator to Elevate using Speech Recog...IRJET- Automated Elevator-An Attentive Elevator to Elevate using Speech Recog...
IRJET- Automated Elevator-An Attentive Elevator to Elevate using Speech Recog...
 
Embedded Systems & Robotics Projects
Embedded Systems & Robotics Projects Embedded Systems & Robotics Projects
Embedded Systems & Robotics Projects
 
PowerMate15 Technical Specification
PowerMate15 Technical SpecificationPowerMate15 Technical Specification
PowerMate15 Technical Specification
 
ARDUINO BASED GAS LEAKAGE REPORT FULL
ARDUINO BASED GAS LEAKAGE REPORT FULLARDUINO BASED GAS LEAKAGE REPORT FULL
ARDUINO BASED GAS LEAKAGE REPORT FULL
 
Pic bluetooth
Pic bluetoothPic bluetooth
Pic bluetooth
 
Arduino Interface LM35 MQTT Using UART
Arduino Interface LM35 MQTT Using UARTArduino Interface LM35 MQTT Using UART
Arduino Interface LM35 MQTT Using UART
 
IRJET - IoT based Speed Control of DC Motor using PWM Technique
IRJET -  	  IoT based Speed Control of DC Motor using PWM TechniqueIRJET -  	  IoT based Speed Control of DC Motor using PWM Technique
IRJET - IoT based Speed Control of DC Motor using PWM Technique
 
Multi-Function Automatic Move Smart Car for Arduino
Multi-Function Automatic Move Smart Car for ArduinoMulti-Function Automatic Move Smart Car for Arduino
Multi-Function Automatic Move Smart Car for Arduino
 

Similar to Meier_ECET365_Manual_LI

final project report_full edit
final project report_full editfinal project report_full edit
final project report_full editSayam Roy
 
IRJET- Portable Surveillance Robot using IoT
IRJET-  	  Portable Surveillance Robot using IoTIRJET-  	  Portable Surveillance Robot using IoT
IRJET- Portable Surveillance Robot using IoT
IRJET Journal
 
IRJET- FPGA based Controller Design for Mobile Robots
IRJET- FPGA based Controller Design for Mobile RobotsIRJET- FPGA based Controller Design for Mobile Robots
IRJET- FPGA based Controller Design for Mobile Robots
IRJET Journal
 
Ball following Robot using ESP32-cam & Arduino UNO
Ball following Robot using ESP32-cam & Arduino UNOBall following Robot using ESP32-cam & Arduino UNO
Ball following Robot using ESP32-cam & Arduino UNO
IRJET Journal
 
RF Controlled Robot Using Advanced Sensors
RF Controlled Robot Using Advanced SensorsRF Controlled Robot Using Advanced Sensors
RF Controlled Robot Using Advanced Sensors
IRJET Journal
 
Smart Surveillance Bot with Low Power MCU
Smart Surveillance Bot with Low Power MCUSmart Surveillance Bot with Low Power MCU
Smart Surveillance Bot with Low Power MCU
IRJET Journal
 
Anam rajkumar sarvesh
Anam rajkumar sarveshAnam rajkumar sarvesh
Anam rajkumar sarvesh
shailesh yadav
 
Anam rajkumar sarvesh k10779,k10626
Anam rajkumar sarvesh k10779,k10626Anam rajkumar sarvesh k10779,k10626
Anam rajkumar sarvesh k10779,k10626
shailesh yadav
 
A Voice Controlled Vehicle For The Aid Of Disabled Person
A Voice Controlled Vehicle For The Aid Of Disabled PersonA Voice Controlled Vehicle For The Aid Of Disabled Person
A Voice Controlled Vehicle For The Aid Of Disabled Person
IRJET Journal
 
GESTURE CONTROL FORKLIFT
GESTURE CONTROL FORKLIFTGESTURE CONTROL FORKLIFT
GESTURE CONTROL FORKLIFT
IRJET Journal
 
IRJET- Autonomous Adjustable Pesticide Spraying Device for Agricultural Appli...
IRJET- Autonomous Adjustable Pesticide Spraying Device for Agricultural Appli...IRJET- Autonomous Adjustable Pesticide Spraying Device for Agricultural Appli...
IRJET- Autonomous Adjustable Pesticide Spraying Device for Agricultural Appli...
IRJET Journal
 
IRJET- Design and Realization of Labview based Monitoring and Control of ...
IRJET-  	  Design and Realization of Labview based Monitoring and Control of ...IRJET-  	  Design and Realization of Labview based Monitoring and Control of ...
IRJET- Design and Realization of Labview based Monitoring and Control of ...
IRJET Journal
 
Robotic Vehicle with Hand Motion Control Using a RF Module
Robotic Vehicle with Hand Motion Control Using a RF Module Robotic Vehicle with Hand Motion Control Using a RF Module
Robotic Vehicle with Hand Motion Control Using a RF Module
Associate Professor in VSB Coimbatore
 
IRJET- Line following and Obstacle avoiding Bluetooth Controlled Surveillance...
IRJET- Line following and Obstacle avoiding Bluetooth Controlled Surveillance...IRJET- Line following and Obstacle avoiding Bluetooth Controlled Surveillance...
IRJET- Line following and Obstacle avoiding Bluetooth Controlled Surveillance...
IRJET Journal
 
IRJET- Industrial Safety Device for Employees in Overhead Bridge Crane us...
IRJET-  	  Industrial Safety Device for Employees in Overhead Bridge Crane us...IRJET-  	  Industrial Safety Device for Employees in Overhead Bridge Crane us...
IRJET- Industrial Safety Device for Employees in Overhead Bridge Crane us...
IRJET Journal
 
IRJET- Wireless Controlled Robot for Bomb Detection and Defusion
IRJET- Wireless Controlled Robot for Bomb Detection and DefusionIRJET- Wireless Controlled Robot for Bomb Detection and Defusion
IRJET- Wireless Controlled Robot for Bomb Detection and Defusion
IRJET Journal
 
Long Range micro Drone with Stabilization
Long Range micro Drone with StabilizationLong Range micro Drone with Stabilization
Long Range micro Drone with Stabilization
IRJET Journal
 
IOT Virtual Doctor Robot for Online Doctor Consultation of Patient Healthcare...
IOT Virtual Doctor Robot for Online Doctor Consultation of Patient Healthcare...IOT Virtual Doctor Robot for Online Doctor Consultation of Patient Healthcare...
IOT Virtual Doctor Robot for Online Doctor Consultation of Patient Healthcare...
IRJET Journal
 
Pick and Place Robotic Arm utilizing Microcontroller and Wireless Communication
Pick and Place Robotic Arm utilizing Microcontroller and Wireless CommunicationPick and Place Robotic Arm utilizing Microcontroller and Wireless Communication
Pick and Place Robotic Arm utilizing Microcontroller and Wireless Communication
IRJET Journal
 
SPYROV (IoT based Surveillance Rover)
SPYROV (IoT based Surveillance Rover)SPYROV (IoT based Surveillance Rover)
SPYROV (IoT based Surveillance Rover)
IRJET Journal
 

Similar to Meier_ECET365_Manual_LI (20)

final project report_full edit
final project report_full editfinal project report_full edit
final project report_full edit
 
IRJET- Portable Surveillance Robot using IoT
IRJET-  	  Portable Surveillance Robot using IoTIRJET-  	  Portable Surveillance Robot using IoT
IRJET- Portable Surveillance Robot using IoT
 
IRJET- FPGA based Controller Design for Mobile Robots
IRJET- FPGA based Controller Design for Mobile RobotsIRJET- FPGA based Controller Design for Mobile Robots
IRJET- FPGA based Controller Design for Mobile Robots
 
Ball following Robot using ESP32-cam & Arduino UNO
Ball following Robot using ESP32-cam & Arduino UNOBall following Robot using ESP32-cam & Arduino UNO
Ball following Robot using ESP32-cam & Arduino UNO
 
RF Controlled Robot Using Advanced Sensors
RF Controlled Robot Using Advanced SensorsRF Controlled Robot Using Advanced Sensors
RF Controlled Robot Using Advanced Sensors
 
Smart Surveillance Bot with Low Power MCU
Smart Surveillance Bot with Low Power MCUSmart Surveillance Bot with Low Power MCU
Smart Surveillance Bot with Low Power MCU
 
Anam rajkumar sarvesh
Anam rajkumar sarveshAnam rajkumar sarvesh
Anam rajkumar sarvesh
 
Anam rajkumar sarvesh k10779,k10626
Anam rajkumar sarvesh k10779,k10626Anam rajkumar sarvesh k10779,k10626
Anam rajkumar sarvesh k10779,k10626
 
A Voice Controlled Vehicle For The Aid Of Disabled Person
A Voice Controlled Vehicle For The Aid Of Disabled PersonA Voice Controlled Vehicle For The Aid Of Disabled Person
A Voice Controlled Vehicle For The Aid Of Disabled Person
 
GESTURE CONTROL FORKLIFT
GESTURE CONTROL FORKLIFTGESTURE CONTROL FORKLIFT
GESTURE CONTROL FORKLIFT
 
IRJET- Autonomous Adjustable Pesticide Spraying Device for Agricultural Appli...
IRJET- Autonomous Adjustable Pesticide Spraying Device for Agricultural Appli...IRJET- Autonomous Adjustable Pesticide Spraying Device for Agricultural Appli...
IRJET- Autonomous Adjustable Pesticide Spraying Device for Agricultural Appli...
 
IRJET- Design and Realization of Labview based Monitoring and Control of ...
IRJET-  	  Design and Realization of Labview based Monitoring and Control of ...IRJET-  	  Design and Realization of Labview based Monitoring and Control of ...
IRJET- Design and Realization of Labview based Monitoring and Control of ...
 
Robotic Vehicle with Hand Motion Control Using a RF Module
Robotic Vehicle with Hand Motion Control Using a RF Module Robotic Vehicle with Hand Motion Control Using a RF Module
Robotic Vehicle with Hand Motion Control Using a RF Module
 
IRJET- Line following and Obstacle avoiding Bluetooth Controlled Surveillance...
IRJET- Line following and Obstacle avoiding Bluetooth Controlled Surveillance...IRJET- Line following and Obstacle avoiding Bluetooth Controlled Surveillance...
IRJET- Line following and Obstacle avoiding Bluetooth Controlled Surveillance...
 
IRJET- Industrial Safety Device for Employees in Overhead Bridge Crane us...
IRJET-  	  Industrial Safety Device for Employees in Overhead Bridge Crane us...IRJET-  	  Industrial Safety Device for Employees in Overhead Bridge Crane us...
IRJET- Industrial Safety Device for Employees in Overhead Bridge Crane us...
 
IRJET- Wireless Controlled Robot for Bomb Detection and Defusion
IRJET- Wireless Controlled Robot for Bomb Detection and DefusionIRJET- Wireless Controlled Robot for Bomb Detection and Defusion
IRJET- Wireless Controlled Robot for Bomb Detection and Defusion
 
Long Range micro Drone with Stabilization
Long Range micro Drone with StabilizationLong Range micro Drone with Stabilization
Long Range micro Drone with Stabilization
 
IOT Virtual Doctor Robot for Online Doctor Consultation of Patient Healthcare...
IOT Virtual Doctor Robot for Online Doctor Consultation of Patient Healthcare...IOT Virtual Doctor Robot for Online Doctor Consultation of Patient Healthcare...
IOT Virtual Doctor Robot for Online Doctor Consultation of Patient Healthcare...
 
Pick and Place Robotic Arm utilizing Microcontroller and Wireless Communication
Pick and Place Robotic Arm utilizing Microcontroller and Wireless CommunicationPick and Place Robotic Arm utilizing Microcontroller and Wireless Communication
Pick and Place Robotic Arm utilizing Microcontroller and Wireless Communication
 
SPYROV (IoT based Surveillance Rover)
SPYROV (IoT based Surveillance Rover)SPYROV (IoT based Surveillance Rover)
SPYROV (IoT based Surveillance Rover)
 

More from jmeier72

TD_Tesh_LOR
TD_Tesh_LORTD_Tesh_LOR
TD_Tesh_LORjmeier72
 
Jason_Meier_BEET-ABET
Jason_Meier_BEET-ABETJason_Meier_BEET-ABET
Jason_Meier_BEET-ABETjmeier72
 
NTHSLetterOfRecommendation
NTHSLetterOfRecommendationNTHSLetterOfRecommendation
NTHSLetterOfRecommendationjmeier72
 
Abousleiman_LOR_for_JasonMeier
Abousleiman_LOR_for_JasonMeierAbousleiman_LOR_for_JasonMeier
Abousleiman_LOR_for_JasonMeierjmeier72
 
ITT_Official_Transcript
ITT_Official_TranscriptITT_Official_Transcript
ITT_Official_Transcriptjmeier72
 
Meier_REET_425_Final_Project
Meier_REET_425_Final_ProjectMeier_REET_425_Final_Project
Meier_REET_425_Final_Projectjmeier72
 

More from jmeier72 (6)

TD_Tesh_LOR
TD_Tesh_LORTD_Tesh_LOR
TD_Tesh_LOR
 
Jason_Meier_BEET-ABET
Jason_Meier_BEET-ABETJason_Meier_BEET-ABET
Jason_Meier_BEET-ABET
 
NTHSLetterOfRecommendation
NTHSLetterOfRecommendationNTHSLetterOfRecommendation
NTHSLetterOfRecommendation
 
Abousleiman_LOR_for_JasonMeier
Abousleiman_LOR_for_JasonMeierAbousleiman_LOR_for_JasonMeier
Abousleiman_LOR_for_JasonMeier
 
ITT_Official_Transcript
ITT_Official_TranscriptITT_Official_Transcript
ITT_Official_Transcript
 
Meier_REET_425_Final_Project
Meier_REET_425_Final_ProjectMeier_REET_425_Final_Project
Meier_REET_425_Final_Project
 

Meier_ECET365_Manual_LI

  • 2. i This document is to provide fundamental information in regards to the DeVry University course ECET 365 Embedded Microprocessors Systems w/ Lab. During the course of this document each section and stage of development will be discussed to include an overview, identification of systems and subsystems, testing, and the basic operation of the robot.
  • 3. Contents Overview.....................................................................................................................................................1 Project Requirements ..................................................................................................................................1 Projected Project Cost for Materials:..................................................................................................1 Projected Project Cost for Alternative Materials:...............................................................................2 Power Supply and Filter..............................................................................................................................2 Visual Sensors and Modules.......................................................................................................................3 Motors .........................................................................................................................................................4 Potential Wireless Enhancements ...............................................................................................................5 Basic Operation of Robotic Car..................................................................................................................6 Testing Plans...............................................................................................................................................8 Motor Testing........................................................................................................................................8 IR Proximity Sensor Testing...............................................................................................................9 Visual Subsystem Testing...................................................................................................................9 Steering Subsystem Testing.............................................................................................................10 Power Supply Testing........................................................................................................................10 Current Draw Testing.........................................................................................................................10 Visual sensor and steering operation interaction ..........................................................................12 Drive Motor Subsystem.....................................................................................................................13 System Operation Testing ................................................................................................................13 Appendix A – Data Sheets....................................................................................................................14 Source Code ...........................................................................................................................................15
  • 4. 1 ECET 365 Robot Car Project Overview The robot car, when completed will follow a 1” wide centerline track in the shape of an oval. The track may be composed of a foam board using black tape as the track line or centerline. The overall objective of this project is to build a robot that contains subsystems to a main system which will enable it to follow the black line for a minimum of two laps on the provided track. The subsystems are power supply, steering, motor controls, and visual sensors. The manual will provide data for each subsystem, parameters, diagrams, and testing methods and results. Project Requirements The project requirements are in two parts, the hardware, and software or code. The general list of materials are as follows: Identify Physical Requirements Identify Modular Groups to create/assemble end goal Identify Required Code for each subsystem Clock I/O Counters (if needed) Comparators (if needed) Identify possible alternative motors Datasheets Identify possible alternative sensors Datasheets Identify alternative microcontrollers Datasheets Projected Project Cost for Materials: Item Part Number Cost ROBOTIC CAR KIT Kit includes: PmodHB5 – H-Bridge Module PmodLS1 Infrared Light Detector Modules 909-MOD-LTR501ALS Long Range Sharp GP2Y0A02YK0F Support Frame Wheels (2) 240059 $168.37 DeVry Tower Kit twredukit $376.64
  • 5. 2 Projected Project Cost for Alternative Materials: Alternative Replaces Function Cost ARM STM32 Cortex- M4 STM32F4DISCOVERY TWR-S12G128 Board Microcontroller 140.99 L298 Dual H-Bridge DC Motor Controller PmodHB5 H-Bridge Module 7.56 909-MOD-LTR501ALS PmodLS1: Infrared Light Detector Visual Sensor Module 18.44 Infrared Proximity Sensor Long Range - Sharp GP2Y0A02YK0F Digilent IR Proximity Sensors Visual Sensor 14.59 Required software is CodeWarrior IDE. This is a product of Freescale, now part of NXP (NXP.com, 2016). IDE allows the user to program in C which the Pulse Width Modulator, set the Duty Cycle to adjust the speed of the robot, and to enhance its function at a later date. Power Supply and Filter The robot requires at a minimum of +5.5V DC to operate both the tower which contains the microcontroller and the two DC motors that propel the robot. The power is supplied by four NiMH rechargeable AA batteries that provide 1500mAh each with an average DC output of +5.5V. And eight NiMH rechargeable AA batteries with an average output of +11.5V for the DC motors. By separating the two systems and dedicating each its own power supply, it will ensure a longer lifecycle for the robot between charges. The power for the tower and microcontroller is fed through a DC power filter to remove and potential spikes or any noise that may damage the microcontroller. The filter consists of two 1000uF capacitors, two 0.1uF capacitors, and one 100mH inductor and assembled in accordance with the below schematic. Figure 1 Power Supply Filter 1
  • 6. 3 Visual Sensors and Modules The visual sensors are Digilent IR proximity sensors that have both an IR transmitter and IR receiver built in. The kit is equipped with four sensors however the project only requires two to function. In addition to the IR Proximity sensors, the IR Detector module directs the signal to the microcontroller. The visual sensors require a +3.3V DC to operate which is delivered by the microcontroller via the sensor module. Figure 2-a IR Sensor Placement 1 Figure 2-b 1
  • 7. 4 Motors The motors that are used in this project are model IG220019X00015R. They are a 12V DC motor. The turn both clockwise and counter clockwise. The project requires two motors, located in the front of the robot to “pull” the robot forward. The rear of the robot is supported by a large plastic post place centerline on the back of the robot. When the motors were received, they were tested for functionality. They were tested by applying 5V DC to the positive (Red) and ground to the negative (Black) wires. The direction of spin was annotated. Next the leads were reversed, by placing the 5V DC to the negative (Black) wires and ground to the positive (Red). This proved that the motor rotated in the opposite direction. This result was also recorded. Next a 12V DC power supply was applied to each motor to test the maximum rating to ensure that each motor rotated in both directions at maximum DC voltage. Figure 3-a: Motor Specs 1 Figure 3-b Mounted Motors 1
  • 8. 5 Potential Wireless Enhancements The microcontroller has the potential to expand with a wireless capability. The microcontroller has the ability to use both Bluetooth and Wi-Fi for adding additional peripherals that can communicate and be controlled by the microcontroller. By using the Wi-Fi option the user may be able to control the robotic car directly by sending direction to the car. The car can also be equipped with a recording deice that can send data to a central location via Wi-Fi or Bluetooth for review at a later time. Some of these modules are listed below: Bluetooth Table 1 1 Comparison Item XBee 802.15.4 Digi-Key RN4020-V/RM- ND TDK SESUB-PAN-T2541 Data Rate 250kbps 1Mbps 250kbps, 500kbps, 1Mbps, 2Mbps Security 128-bit AES AES 128 Encryption AES-128 w/ CTR, CCM, CBC-MAC modes Interference DSSS(Direct Sequence Spread Spectrum Simple, UART UART/SPI/I2C/GPIO/A DC2.4GHz Bluetooth Wi-Fi; Internet; 802.11 b/g/n Table 2 1 Comparison Item ESP-WROOM-02 WiFi 802.11 Module Tiny UART Embedded WiFi Module - HF- LPT100 Embedded WiFi Module - 802.11 b/g/n Industrial Temperature HF-A11 Data Rate 1Mbps,6Mbps, 6Mbps,11Mbps, 54Mbps,65Mbps, 72.2Mbps 802.11b: -93 dBm (@ 11Mbps) 802.11g: -85 dBm (@ 54Mbps) 802.11n: -82 dBm (@ HT20, MCS7) UART: 230,000 bps max Ethernet: 10/100Mbps Security WPA/WPA2 WEP/TKIP/AES Encryption WEP/WAP-PSK/WAP2- PSK WEP/WAP-PSK/WAP2- PSK/API WEP64/WEP128/TKIP/A ES Encryption Interference 802.11 b/g/n TCP/UDP/HTTP/FTP  TCP/IP/UDP/FTP/HTTP Networking Protocols 802.11 b/n/g UART 10/100 Ethernet GPIO (up to 7, mode dependant)
  • 9. 6 Basic Operation of Robotic Car The robotic car in its base configuration is designed to run on a track with an approximately one inch thick centerline. This track is to be in the shape of an oval or large circle (all system tests were conducted on a circular track). Once the robot is placed on the track there are four power switches that need to be switched to the power on position. The first switch is located in the rear of the tower on the lower right corner (Figure 5-a). Figure 4-a 1 Tower Power Switch
  • 10. 7 The additional power switched are located on the chassis, one on each side for each motor and one in the rear for the tower (Figure 5-b). Figure 4-b 1 Once all power switches are in the on position the robot will start moving along the black centerline drawn in the oval or circular form. To stop the robotic car left it from the track and switch the rear power switch to the off positon. Left Motor Power Switch Tower Power Switch Right Motor Power Switch
  • 11. 8 Testing Plans Motor Testing Use Ohmmeter to measure resistance for DC motor used in this Lab. Resistance was measured by placing the DMM leads on the Red and Black wire pins connected to the motor wiring harness. Ensuring that the DMM was in the proper mode to measure resistance and all power was disconnected from the motor, the reading was 5.9 Ω Explanation of how you turned the DC motor “on” and “off.” The microcontroller is loaded with the code that has a 75% duty cycle. The microcontroller outputs the signal to the H-bridge, which in turn saturates or turns ‘On” the motor during the positive portion of the wave (75% Duty Cycle or Pulse Width) which provides enough average voltage to turn the motor. How to choose the speed of DC motor. To choose the speed of the DC motor, the duty cycle is adjusted. The longer the pulse width the higher the voltage, the faster the rotation of the motor. Definition of load and no-load RPM in DC motor. The load is when friction is applied or resistance applied to the motor when activated. The no-load is when there is no resistance applied to the motor shaft. Connect a DC motor leads to +5V and Ground and measure the current usage on current meter. Examine loaded and no-load current usage. Give your conclusion. No-Load Current: 128mA @ 10VDC w / Load Current: 153mA @ 10VDC Why use the PWM technique. Using the Pulse Width Modulation (PWM) technique, we can achieve analog results with digital means. The pulse provides short burst or pulses of DC voltage and when adjusted to a frequency faster than the human eye can see, a light would appear to be on even though it is blinking or pulsing.
  • 12. 9 IR Proximity Sensor Testing 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. The change in output from the visual sensors went from a low to high DC change in voltage. When the dark area on the card was under the sensors the LEDs on the module were ‘On’ and when the card was moved so that only the white was below the sensors the LEDs were ‘Off’. The attached video also captures the O-Scope reading. Describe the effect of the potentiometer on the output of the sensor module. The potentiometer of the sensor module is used to adjust the sensitivity of the sensors. By adjusting the pot value to an optimum value or threshold the sensors were able to detect and acknowledge the change in density (light and dark) of the card. If the motors and software are installed, describe the action of the drive wheels as the index card is moved left and right. As the card is moved from right to left, the motors would change their velocity to turn the robot so that it will follow the dark line on the card. Visual Subsystem Testing Test Method: (Briefly describe the test method used to verify the correct operation of the visual subsystem.) Method used to test the visual system: Visual sensors were connected to the visual control module which was connected to the 9S12 microcontroller. A voltage of +3.3 V was applied to the Vcc pin of the module. With the sensors power applied and sensors enabled a card with a 2” x 2” black square was moved below the sensors. Test Results: (Record the measurements that indicate the visual subsystem is operating correctly). The measurement was taken using an oscilloscope which allowed for a graphical reading of voltage change. As the card was moved under each sensor, a voltage change occurred. When the card was removed from beneath the sensor, the voltage would change again going from High to Low and Low to High. Also when the voltage would change, the LEDs on the visual sensor module would light indicating that there was a change in the output of the sensors.
  • 13. 10 Steering Subsystem Testing Test Method: (Briefly describe the test method used to verify the correct operation of the steering subsystem.) The steering system was tested by connecting the motors to the H-Bridge modules. The Right motor to the Right H-Bridge module and the Left motor to the Left H-Bridge module. A +3.3V DC was connected to the DIR pin of the H-Bridge modules. An oscilloscope was connected to the Enable pin to ensure that a control voltage is received from the tower. Test Results: (Record the measurements that indicate the steering subsystem is operating correctly.) The results were that each module received a +0 to +3.3V DC(2.3V DC) voltage was applied to the enable pin of the H-Bridge module. Both modules, Right and Left received the voltage Power Supply Testing The power supply filter, once assembled was tested by applying +5.5V DC to the input of the circuit. Once connected, using a DMM, the negative lead of the meter is connected to the negative side of the circuit which is connected to the negative side of the power source (four AA batteries). The positive lead is then used to step across from the input of the board to the lead of the first capacitor (1000uF), then to the capacitor (0.1uF), the input of the 100mH inductor, then to the second 0.1uF capacitor, to the lead of the second 1000uF capacitor. The lead of the second 1000uF capacitor is the output of the filter circuit. Secondly, the filter circuit is connected to an oscilloscope to monitor the input voltage verifying that there is zero noise or power spikes that could damage the microcontroller. Current Draw Testing 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). Visual sensor 0.5mA The measurement was taken by measuring the current draw for the tower with the Visual sensors connected (21.7mA), then again without the sensors not connected (21.2mA). The difference was taken which is 0.5mA.
  • 14. 11 Tower/CPU 21.2mA This was taken with all modules and peripherals disconnected. Right Motor 117mA / 115mA See below for details Left Motor 124mA / 126mA See below for details *The motor values were measured using two methods to compare for accuracy as they will be the largest current consumption parts of the robot. The first method was by connecting an ammeter between the power supply and each motor. By doing so, the circuit is completed and the amps are measured as the amps are pulled from the power supply. The second method was by taking a 1Ohm resister and placing is in series with the motor circuit and the power supply. Once connected and circuit was completed the voltage across the resister was taken and recorded then used to calculate the current using Ohm’s Law I=V/R yielding the second set of results above for the Right and Left motors. There is a slight difference so for the future calculations the higher value will be used as the minimum current draw required to ensure that there will be sufficient current available for the project. Calculate the expected operating time for the system. Ensure that the motor power operating lifetime will not exceed the CPU board operating lifetime. In calculating the Motor System Lifetime and CPU Board Lifetime, the following calculations were used: For the motor current, the higher of the two values, 126mA was used for calculations. The formula Amps * Duty Cycle (minimum of 60%) will yield the required amps needed for one motor. By doubling this value will will yield the minimum current draw required for the 2 motors. This should also provide additional available current if needed. If the NiMH battery is used a single AA provides 1500mAh of current. By dividing 1500mAh by 252mA the Motor System Lifetime value should be 5.95h. *Even though the above calculations have been completed with the values of a single AA each power source will be comprised of a minimum of four AA batteries to produce a 6V DC which will be provided to the DC motors which are rated to 12V DC. Motor System Lifetime 5.95h Calculating the CPU Board Lifetime is a little less complicated as there will not be a Duty Cycle to use in the calculations. The direct current draw of the CPU or in this case the Tower to include the visual sensor modules and H-Bridge modules is 21.9 mA. Using
  • 15. 12 the same battery type and values of 1500mAh and dividing by the 21.9mAh the CPU/Tower Lifetime should be 68.49h. *Even though the above calculations have been completed with the values of a single AA each power source will be comprised of a minimum of four AA batteries to produce a 6V DC which will be provided to an 7805 voltage regulator which will provide +5V to the power filter which will then provide power to the tower. CPU Board Lifetime 68.49h. 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.) The sensor and steering system tested together was accomplished by connecting the motor subsystem and the visual subsystems to the 9S12 microcontroller tower. The tower provides a PWM and a Duty Cycle of 60% as recommended by the construction notes. The H-Bridge modules are connected to the tower which supplies the +3.3V DC Vcc and +0 to +3.3V DC enable voltage. A +5V DC is connected to J3 of the H-Bridge module to supply the motor with a drive current to turn the motors. Test Results: (Record the measurements that indicate the visual sensor and steering subsystems are working correctly together.) With the robot inverted so that the sensors are facing upward and the wheels are upward a card with a 2” x 2” black square is passed over the sensors. As the square moves over each sensor, the corresponding H-Bridge receives a voltage on the Enable pin. When the black square is over both sensors, both H-Bridge modules receive the enable voltage from the tower at the same time which would turn the motors if they were connected. Each motor turned in the correct direction due to having the DIR pins of the H-Bridge modules connected to the +3.3V DC and Ground respectively.
  • 16. 13 Drive Motor Subsystem Test Method: (Briefly describe the test method used to verify that the drive motor subsystem is working correctly.) To test the drive motor subsystem each motor was connected to +5V DC to J3 on the H- Bridge modules to drive the motors. Then a +3.3V DC was applied to the enable pin of the H-Bridge module to enable the motor(s). Then Ground was connected to the DIR pin of the H-Bridge module to test each motor for a reverse direction. Test Results: (Record the measurements that indicate the drive motor subsystem is operating correctly). When the +3.3V DC was applied to the enable pin of the H-Bridge module the motor would engage. The speed of the motor depended on the Duty cycle provided by the tower. This value can be adjusted by editing the source code for the tower. Currently it is set at 60%. Each motor turned in both directions. This was tested by connecting both +3.3V DC and Ground to the DIR pin of the H-Bridge module and testing each separately. System Operation Testing Test Method: (Briefly describe the test method used to verify that the system operates correctly when all the subsystems are operating.) The visual sensors are mounted to the frame and connected to the tower via the sensor module. The H-Bridge modules are connected to the motors and to the tower. The tower provides a PWM and a Duty Cycle of 60% as recommended by the construction notes. The motors and the H-Bridge modules are connected to the tower which supplies the +3.3V DC Vcc and +0 to +3.3V DC enable voltage. The H-Bridge modules will have +5V DC and +12V DC tested. The motors are +12V DC motors. This test will be conducted in two stages; first stage is with the robot inverted so that the wheels have zero load; second with the robot upright so that it can run along the track line. Test Results: (Record the measurements that indicate the system is operating correctly.) The robot during first test (+5V DC for motors) seems sluggish. Will recharge batteries to ensure test is with full charge. Second test run robot seems to operate properly. The speed of the robot will be adjusted so that it can maintain a maximum life cycle in regards to the power supply of both the tower and the motors. Robot with fully charged batteries performed on target. Microcontroller was re-flashed with a lower duty cycle to slow the speed which brings the robot to a more controllable speed in regards to the given track that is must follow. At 60% duty cycle the robot would not be able to correct its line of travel and would travel off the track and come to a stop.
  • 17. 14 Appendix A – Data Sheets Motor Datasheet.pdf H-Bridge Datasheet.pdf Visual Sensor Module Data Sheet.pdf TSL1401 Video Sensor Datasheet.pdf MC9S12G Microcontroller Overview.pdf
  • 18. 15 Source Code #include <hidef.h> #include <math.h> #include "derivative.h" byte sensor; void main(void) { // Set variables for the Pulse Width Modulation (PWM) Signal. PWMCLK = 0x03; PWMSCLA = 2; PWMPOL = 0x03; PWMPER0 = 200; PWMPER1 = 200; PWMDTY0 = 145; PWMDTY1 = 145; CPMUCOP_CR = 0; // disable COP DDRA=0x00; for(;;) { sensor = PORTA & 0x03; switch(sensor) { case 0: // Both sensors are off. PWME = 0x03; // Turn both motors on. break;
  • 19. 16 case 1: // Right sensor is on. PWME = 0x01; // Turn right motor on, left motor off. break; case 2: // Left sensor is on. PWME = 0x02; //Turn left motor on, right motor off. break; case 3: //Both sensors are on. PWME = 0x00; // Turn both motors off. break; } } } /* loop forever */ /* make sure that you never leave main */