E72 Lab #8

uRobot


You need to start thinking about your final projects!
Some ideas are here, but you can pick anything related to the course.
Details are here.
For seniors, this may be a way to get started on your E90.


Board Schematic, Layout. You will need your light blinking board that you layed out in Lab 1.

To Do:

Add shorting pins and a shorting jumper across J7 (this will connect the photodector circuit to the band pass filter).

Add shorting pins and a shorting jumper across JA5 (this will connect the detector circuit to the MSP430).

Add a photodiode (SFH206K) at D2.  The polarity of the photodiode is important - the diode should be facing away from the board (blue face of diode away from board - the longer lead in the hole with the square pad).

The board should now be fully populated.

Attach the motors, side wheels, and tail skid to your robot.

Verify that the photodiode circuit works works - the easiest way to do this is to observe the BP output of the filter (with a 10kHz center frequency) while varying the frequency of your blinker from lab 1 to maximize output of bandpass filter.  Do this while blinking at high frequency by removing JSlow. The light should be at a low enough level that the voltage at JPD doesn't go to zero (i.e., avoid saturation).  The output of the bandpass filter should be effectively immune to light at other frequencies.

Connect the motors to the two low side NMOS transistors (Q3 and Q4) by connecting between the 6 pin header M1 and the two pin header J5.  This will allow you to turn the motor in one direction only, but you can vary the speed through PWM.  Even though Q1 and Q2 aren't used, you need to leave them in (turned off) because we need the built in freewheeling diode since the motors represent an inductive load.  PWM for the motors (to control speed) should be about 15 kHz (you did this in Lab 5). Discuss among yourselves how this will work before starting - there should be no chance to burn out fuses in this lab since Q1 and Q2 should never be on.

Write a program that makes the robot go towards the flashing light (blinking at the bandpass center frequency).   The algorithm need not be robust (take the robotics course for that) - this lab is about integrating all of the systems. I envision the solution to the problem to be something like what a dog does (with only one nostril) following a scent. The dog would go back and forth trying to maximize the scent to stay on the trail. Obviously the dog also has some higher order reasoning - we'll skip that (put it in the category of a robotics course). I would do something like starting both motors at an equal speed (50%).  Increase one motor's speed slightly and decrease the other.  If the signal from the bandpass filter increases, you have turned towards the light and should step as before; if not you have turned away from the light and should and should switch which motor has speed increased, and which decreased. Develop a test where you can verify that your algorithm does as expected (it still might not work really well - but our sensor system is pretty basic). If noise seems to be a problem, you could average several A/D values.

Make sure you put some kind of delay in your loop between A/D readings to give the robot a chance to move, so that consecutive A/D readings have a significant difference.

Note: you may not be able to debug with the debugger connected but your program need not be very complicated.   You should be able to debug the motor control part of your code.

You should probably debug with a plug-in power supply - a dc supply (7-9 Volts) may work better than the AC supply you have been using.  If you want to connect a battery, let me know and we'll see if we can dig one up. 


To Turn in: