The circuits, along with a lot of other things on our project, erred on the over-engineered side. We tried to do things with electrical hardware that most of our classmates would have done with software or mechanical hardware.
The IR sensors were important for locating the active basket. Since they flashed at 1560 Hz we could easily tell them apart from background IR by using filters. Our basic circuit for the five rough IR sensors is shown below. The outputs were read by the on-chip A/D and then the values were compared and manipulated in software. We made sure to have a pot to control the overall signal gain; these were very useful in calibrating the sensors so they reponded equally to equal stimuli.
A similar circuit was used for each of the two fine sensors. However, we wanted a logic level signal of which of the two were brighter very fast, so we wanted to implement it all in hardware. So instead of going to A/D, the outputs were fed into a differential amplifier and then a comparator. Again, pots were included for tuning. In the end we didn't really use the signal from our fine sensors, but they seemed to work as designed.
![]() |
![]() |
![]() |
We drove our tape sensor transmitters with signal around 900Hz so we could filter out background levels. The driver was implemented with a 555 oscillator, then an output transistor to make sure we had sufficient current.
The photodiode side of the tape sensors was done in a similar fashion to the beacon sensing IR detectors, also with filtering and adjustable gain.
They worked great, but we ended up abandoning them because we abandoned the arms, and because the "ball-loaded sensors" weren't strictly necessary. But the circuit was designed, built, and tested, then not used.
![]() |
![]() |
![]() |
To drive the DC motor for the main platform we used the provided H-bridge driver (based on the SN754410) so we could run in both directions.
To drive the steppers (for the turrets, abandoned arms, and later-abandoned catapult platform) we used the provided stepper-driver boards (based on the MC3479). For one of the turrets the direction seemed to flip every once in a while, but otherwise we encountered no problems.
To drive the catapult shaft itself, we originally planned to use the power driver board to the motor between positive supply and ground. We had tested the motor's strenth and determined it was adequate by simply plugging it into the power supply. However, when we hooked up the board our shot was weak, presumably because the board wasn't allowing enough current to pass. We experimented with using power transistors switched from the main board to do the trick, but without success. We finally ended up using a mechanical switch activated by a solenoid, which solenoid was in turn controlled by the main board interfacing with a power driver module (based on the DS3658).
![]() |
![]() |
![]() |
The main platform DC motor operated from 12V, and so we used a LM317 to generate a constant voltage for it down from the 15V imput from the supply.
We decided to run the arm and turret steppers (5 in all) off of the 5V supply so they wouldn't cut into our 1A current budget for the variable supply. We didn't use the arms in the end so this was untested. For the turrets this approach proved adequate for only one level of balls in the tube, but probably wouldn't have been OK for stacked tubes.
Originally we were going to power-down the catapult platform stepper while it was in a holding state, so we designed a nifty adjustable voltage source for it that could be controlled by the processor, although we didn't end up using that motor (is this a theme?).
The sensor circuits were run from the +/-15V supply to simplify the op-amp circuitry (despite the seeming taboo in this class against negative supplies). The MC11 board was powered simply from the 15V supply.
The catapult shaft was originally going to be run from the 15V supply. However, even after we hooked up the mechanical switch we couldn't get enough "umph" out of the motor to shoot 7 feet (it was more like 5). So, we got desperate and tried batteries. With a 9V battery the shot was about the same, but with two 9V batteries in series we were shooting 10-12 feet instead of the required 7. So we simply added in a 7.5 Ohm power resistor in series with the two batteries and our solenoid-driven mechanical switch, as shown above.
Our power supply connection had three power lines (5V, +15V, -15V) and then three grounds to keep them clean (one for sensors, one for the HC11, and one for the motors). We didn't run into any noise problems as far as we can tell.
![]() |
From the very beginning we decided to use linear code instead of the events and services framework since our strategy was so linear. Our first version of the code was quite comprehensive. However, by the time the robot was actually plugged in and running we had pared down our strategy so much that we started the code almost from scratch. We experimented briefly with the events and services methodology when it appeared that the code we used as timers was blocking PWM and PLS.
However, in the end we discovered that it wasn't and went back to linear code. The final product was a single file, about 100 lines of "real code" with another 100 lines of comments, printf's, and #defines for calibration constants and such.
You can look at our final code here if you like.