Links

Overview

Hardware and Software

Results and Conclusions

Media

Hardware

Servo

Each servo has three wires, ground (black) , VCC (Red) and a signal wire (Yellow). They require 5V. The signal wire is fed a pulse signal with a width of 2.4ms. The servos used for the wheels had 360 degrees rotation capabilities. A pulse with a duty cycle greater than 65% was used for forward movement of the wheels and a pulse with a duty cycle less than 65% was used for backwards movement. Ideally, a pulse with a 65% duty cycle kept the servos at a stopped state. The servo for the “eye” had a 180 degree movement. A pulse with a duty cycle greater than 65% moved the servo from the center (90 degrees) towards 180 degrees while a duty cycle less than 65% moved it towards 0 degrees.

 

Infrared Distance Sensor


The infrared sensors have three wires, ground (black), VCC (red), and a signal wire (yellow/white.) They require 5V. These sensors constantly send an analog signal (voltage) based on the distance of the object they detect. For our design, we used two of these sensors to detect the edge of a table to keep from falling. Another one was placed in front of the vehicle to detect obstacles.

Binary distance Sensor


The binary distance sensor is used for close range applications. It has three wires, black (ground), VCC (red), and a signal wire (yellow). It requires 5V. This sensor sends a high (1) or a low (0) when detecting an object. This sensor was used in our design to detect collisions by connecting it to an interrupt line.

 

Solenoids


The solenoids were pretty simple to implement, to operate a solenoid we simply had to run a current through the coils, essentially creating an electromagnet that sucked in our ammunition.
In order to control the solenoids we implemented a small circuit on a separate board in order to minimize noise. The circuit consisted of a relay and a BJT transistor. We also had to divide the voltage of the control signal comming from the FPGA, because the voltage was to high and smoking the BJT, to do this we created a voltage divider using a series of resistors.


Photosensor


The photosensor works by changing the resistance between two electrodes on the photosensor. When a light is detected the resistance increases, and when it is dark the resistance decreases. By creating a small resistor circuit we were able to measure the voltage drop across the voltage sensor and decide which direction had the brightest light.

Nintendo Controller

The Nintendo Controller has 5 connector wires: ground (black), VCC (yellow), pulse (white), latch (blue), and data (red). It operates on 5V. The interfacing description is given here. In our design, when a user presses START on the controller, hardware implemented on the FPGA blocks command signals from the processor, instead taking them directly from the controller to drive the car. When a user presses SELECT, the hardware stops taking input from the controller, and allows the processor to control the car again.

 

All hardware used is documented on the 373 web page

Software

Our software implemented many of the concepts covered in the course, including interrupts, ABI compliance, device drivers, timers, and memory-mapped I/O.

Interrupts and hardware drivers are written in assembly, while the main part of the navigation software is implemented in C.
On initiation, the car rotates to locate the beacon with its photosensor, and then proceeds to navigate towards the beacon.
One real-time issue encountered was the need to avoid driving over table edges and running into obstacles. When the vehicle gets too close to an obstacle, or detects the edge of the table nearby, an interrupt occurs to ensure that the vehicle's operation goes on unhindered.

Flowchart