You are on page 1of 4

Faculty Packet 1.

Introduction The design of the car for this project is up to the faculty implementing the project, and as long as a couple basic requirements are met, a similar should work fine with the project outlined. This packet documents the design used successfully at Virginia Tech. 2. Physical Materials The physical materials required for this lab include a microcontroller controlled car, and laminated sheets for the car to drive on. 2.1 The Car The car for this project consists of 5 major components: otor!wheels, caster, two infrared sensors, programmable microcontroller, and "#$ board 2.2 Motors/Wheels The motors used in this project are small 5V %# motors. They are connected through a gear bo& to two rubber treaded wheels. The motors spin very fast and produce little torque, so we used a gearbo& that increased torque and decreased speed. 'e used the highest torque!lowest speed configuration of the gearbo& and the car was still too fast for the course at full speed. This is good, though, because it will teach the students that the fastest speed is not always the best speed. 'e used a dual digital ()bridge controller that allows the microcontroller to set the motors forward and reverse. 'e obtained the motors, gearbo&es, wheels, and ()$ridge controller from www.sparkfun.com. They are manufactured by Tamiya. The *park+un part numbers and costs are as follows: ()$ridge otor %river ,%ual otor 3ear$o& w! otors Toy Tires 6 $asic #. )//0,5 4.$)//0,5 4.$)//720 12.05 1,/.55 17.55

2.2 Caster 'e used a caster instead of rear wheels to preclude, which is a lot cheaper and easier to use than wheels with a steering mechanism. 'ith the caster, directional control can be achieved by spinning one motor slower than another. The caster was obtained from www.sparkfun.com and is manufactured by Tamiya. 8ach unit from *park+un comes with two casters. .mni)%irectional etal #aster & 2 4.$)//02/ 15.55

2.3 Infrared Sensors The infrared sensors used in this project consist of two parts: an 94 transmitter and 94 receiver. They are packaged in the same unit. +or this project, we used a +airchild :4%,,,7. 9t features a 2/m- 94 ;8% and an 94 phototransistor with a daylight filter. The 94 ;8% was wired to be always on, and the 94 phototransistor was

setup with a ,/k< pull)up resistor. This large resistor means that the V sd voltage will be /V when the sensor is shining on a white surface and 5V when it is shining on a dark surface. This means that the sensor can be used as a digital input to the microcontroller and no analog to digital conversion is required. Two of these are used for the project and they are mounted ne&t to each other. The unit is available at www.sparkfun.com: .ptical %etector ! "hototransistor &2 *8=)//27> 1,.,0

2.4 Pro ra!!a"le Microcontroller +or this project, we used a small programmable microcontroller trainer board ?-"*,2#02*;@A from +ree*cale. 9t measures about ,.5B&0B and includes everything necessary to program and run the microcontroller, and contains digital input!outputs. The "$ #C*;@ project board from +ree*cale includes a number of other features, but for this project it is only used for the #ode'arrior and C*$ support. The only requirement for the microcontroller is digital inputs and pulse width modulation. The microcontroller used in our solution is relatively outdated and newer units with direct C*$ support ?rather than using the project boardA would be ideal, but would require a redesign of the board layout that is supplied. The trainer board used requires 5V and /.5 amps supplied to it by barrel connector. 'e attempted to use battery power, but the trainer board required too much power and the batteries died quickly. 'e instead used the barrel plug that an -# adapter connects to. The downside of this is the car is now wired and the students have to be careful the wire doesnDt get tangled or in the way of the car. These units are available from www.freescale.com. The student project assignment includes instructions for using #ode'arrior, which comes free with the project board. "roject $oard icrocontroller board "$ #C*;@ -"*,2#02*;@ ,E5.// 50.0>

2.# PC$ $oard The "#$ $oard that the car was built on was designed using the free version of 8agle #-%, which limited the dimensions of the board to 0&7. There are holes in it for the gearbo& and caster to bolt onto. The front of the board had a 0B & FB strip with perforations. The idea is the 94 sensors are mounted on it, and it is mounted on 5!GB spacers down away from the board so the 94 sensors can be close to the ground. There is a 7/)pin connector on the top of the board that trainer board mounts onto. The 94 sensors and ( bridge controller is connected to the microcontroller board through this 7/)pin connector. 2.% Solderin and asse!"ly The board design supplied requires some soldering and assembly. The gearbo& and motor unit from Tamiya requires about ,/ minutes per unit, while the caster requires about 5 minutes per unit. The soldering involves mostly through)hole soldering which is simple enough for an undergraduate to complete. The detachable board that the sensors mount to require 7 surface mount resistors. These are the large variety of surface mount resistors, so soldering will require care but is not challenging.

2.% The Courses There are 5 different courses that are used for each task. They should be laminated so the tires get better traction and the paper doesnDt slide out under the force of the motors. The courses are supplied in separate file, named courses.Hip. 'ith Task I2, the students are told to first send the car to the line at full speed. The purpose of this is to show the students that if the car is traveling too fast, it wonDt be able to stop in time. 9f the car is different from the designed used at Virginia Tech, the black line might need to be thinner or thicker to make sure the car doesnDt stop. 3. Soft&are Materials *upplied with this project is the programming framework used for the tasks. The programming framework attached is a #ode'arrior project, hence it includes a lot of e&traneous files. 9f the project board and microcontroller board mentioned above are used with codewarrior, then the attached #ode'arrior project can be used as is. 9f another microcontroller board or programming environment is used, then the main.c and carlogic.c files will have to be modified ?the files are well commentedA. The students will edit a simple # file, #ar;ogic.c, that is included in the programming framework. The students should not be e&posed to the complicated code needed to setup the processor, handle input, and pulse width modulation. The state of the infrared sensors is gathered during each iteration and passed to the programming framework function. The motor commands that the students use setup the pulse width modulation. - value of ,/ represents a ,//J duty cycle, a value of 7 represents a 7/J duty cycle, and so on. 4. Possi"le I!'ro(e!ents .ne possible improvement is to use a better microprocessor board with C*$ capabilities and lower power consumption. +or our design, the microcontroller board consumes as much power as the motors. -nother area that could use improvement is the power supply. The design used at Virginia Tech has a cable that plugs into a wall. This is awkward for something that moves around, so a portable battery would be ideal. 5V battery was tested, but ran out of power too quickly. +our -- batteries were tested would not power the microprocessor board ?despite the board running at 5V, it apparently requires a 5V inputA. - better microprocessor board could allow for the use of -batteries. #. Strate ies for runnin the 'ro)ect .ne strategy emphasiHed in this project was the fact that freshman engineering students have not yet decided what specific field they like, so they should be e&posed to a variety of different topics. *tudents this early in the engineering education process should not be stressed to learn a lot of specific information about certain topics, but should rather learn a little bit about a lot of topics. +rom there, they might find that they like a particular topic, be it electrical engineering, computer programming, digital logic, and so on. %. *earnin o")ecti(es -s stated before, the students will be introduced to a wide variety of topics. The idea of this project is they will be e&posed to a small scale e&ample of what would be a multi) disciplined engineering design. The topic of autonomous vehicles involves many

disciplines and is therefore a good real world concept to wrap this project in. This project includes programming, sensing, waves, motors, logic concepts, control theory, and design tradeoffs. This project presents these topics in a challenging way that will keep the students interested without bogging them down with details. 9t is vital that freshmen are e&posed to the many different topics involved in electrical and computer engineering so they can start focusing on a specific field, as well as decide if the overall field is what they are truly interested in. %.1 +!"edded Pro ra!!in The most of the embedded programming is done and the students will only use basic commands, so it is not e&pected that this project will teach specific embedded programming concepts. The students will, however, be e&posed to an e&ample of an embedded development tool chain. *tudents will see how a program can be written and compiled on a computer, then downloaded and run on an embedded processor. %.2 State Ta"les The state table concept is important because students who move onto introductory computer engineering and digital design classes, one of the first things they will be e&posed to is state tables. %.3 Closed *oo' Control The closed loop control concepts that are taught in the post)lecture are a good introduction into advanced control theory concepts such as feedback loops. %.4 Sensin *tudents are taught basic concepts relating to sensing. The sensing used in this project is 94 sensing, which sends out an 94 beam and measures the response. This type of sensing is used in many applications such as 4-%-4, ;9%-4, *.=-4, etc. %.# Wa(es *tudents are also taught very basic information about waves. The wave used in this class is a square wave with a variable duty cycle. *tudents will also be taught that some waves take on other shapes and vary other properties like amplitude and frequency. ,. Su!!ary "resented in this document are all the instructions required to implement the project. -s said in the beginning, the design can be changed as long as the basic requirements listed are followed. The specific design listed in this project, as well as the board design and additional documents mentioned all are in reference to the successful implementation of this project at Virginia Tech.

You might also like