links

[home]

[high level design]
[task distribution]
[hardware design]
[software design]
[design results]
[conclusions]
[media]
[links]

The Automated Beverage Dispenser

Team Members:
Michael Everhart
David Castellani

Hardware Design:
The following components were implemented in hardware:
1) General IO Controller: The general IO controller provided the interface between the MPC823 and the servos and sensors. All of our sensors and servos were used as memory mapped devices, and the general IO controller performed the address decode and TA signal generation. Additionally, the general IO controller was split into four subcomponents: sonar ranger control, tilt servo control, valve servo control, and cup detection control.

+ Sonar ranger control: The sonar ranger control was the most complex subcomponent of the general IO controller. It required a 10us pulse to begin the distance measurement, at which point the output signal would go high for an amount of time relative to the distance away from the object. We chose to implement both the pulse generation and response time measurement in the general IO controller. While we could have implemented both of these functions in software using the MPC823's built in timers, using this implementation reduced the complexity of the software and freed up the timers for other functions. Using this implementation, writing any value to 0x02500000 would signal the ranger to measure the distance, and a read from 0x02500000 would return the length of the return pulse. Additionally, the sonar ranger control would generate an edge triggered interrupt to the processor when the distance was ready to be read.

+ Servo control (both tilt and valve): The control sections for the two servos was identical, with the exception that they were at different address. The servo control consisted of a single bit register connected to the input pin of the servo. As the servos needed a pulse width modulated control signal, the software and the MPC823 timers were used to generate the appropriate signal. The tilt and valve servo registers were located at 0x02500004 and 0x02500008, respectively.

+ Cup detection control: The cup detection control portion of the general IO controller consisted of a single bit register and some control logic. The laser sensor and short range light sensor were both tied into the control logic, and the register was only set to '1' if both sensors registered that a cup was inserted. The cup detection register was read by the software at address 0x0250000C.

2) Display IO controller: The display IO controller provided the interface between the MPC823 and the character display we were using to display system status and user instructions. Primarily, the display IO controller performed the address decode for writes to the display and connected the MPC823's internal data bus to the external bus for the display. Originally we wanted to implement a bidirectional interface between the processor and the display for the purpose of checking the status bit on the display. However, we were unable to implement a bidirectional interface, and instead implemented a mandatory delay between writes to the display, to ensure that the display would be ready for the next write. Also, we implemented a 4 bit data bus to the display, so every command and character that was to be written required 2 writes. The display was written to at address 0x03000000.

3) Display delay generator: Since we were unable to implement a bidirectional interface between the display and the processor, we had to delay between writes to the display to ensure that the display controller was ready for the next write. To this end, we simply designed a 0.2ms timer in hardware that would interrupt the processor every 0.2ms so that the next write could be performed.

Component characteristics and functionality: The following is a brief description of the characteristics and functionality of the external devices used in our design.

1) Servo motor: The servo motors we used have a +/- 180 degree angular displacement, and are controlled with a pulse width modulated input signal. The duration of the pulse width determines the position that the motor rotates to. The input signal is high for the desired length of time, and then low for 20ms, and then high again for the desired amount of time. The servo will not hold its position without an input signal, so it must be driven continuously if it is desired that the position remain constant. The servo has three input wires, power, ground, and PWM signal. The relationship between position and pulse width is documented in the project overview slides.

2) Sonic ranger: The sonic ranger is capable of measuring distances between 3cm and 3m. It has 4 signal pins, power, ground, trigger input, and echo output. When the device receives the trigger input signal, it sends a high frequency sonic pulse, and raises the echo output line high. When it receives the echo back from the reflecting object, it lowers the echo output line. Thus, the distance to the reflecting object can be calculated by measuring the duration that the echo output signal is high. The trigger pulse must be 10us at a minimum, and the echo pulse will be approximately 36ms if no object is detected.

3) Light sensor: The light sensor that we used to detect the laser beam is a simple photo-resistor, tied into a digital comparator. The resistance of the photo-resistor varies depending on the amount of light shining on it. When there is a large amount of light shining on it, the resistance becomes very high, and the output voltage drops to approximately 0. When there is no light shining on it, the resistance becomes very small, and the output voltage is approximately the input voltage. The digital comparator was used to provide a clean digital signal to the Xilinx hardware, since we were only interested in using it as a digital device, and not actually measuring the amount of light present. The light sensor has 3 output pins, power, ground, and Vout.

4) Short range light detector: The short range light detector is used for detecting objects in close proximity to the device. It sends out a modulated light signal, and the output line is only raised high if it detects the reflected modulated light signal. It is not fooled by ambient light, making it ideal for this application. It has 3 connection pins, power, ground, and Vout.



All material copyright 2005 Michael Everhart and David Castellani.