Hardware:

The Automated Bartender utilized a wide variety of hardware to achieve the level of functionality we were seeking. The major components are as follows:

Keypad
The Keypad is a matrix of 16 switches that are organized into 4 rows and 4 columns. When a logical high is sent along a particular row, the 4 columns are taken in as input. If a column goes high, then the button pushed is the one that corresponds to that unique row and column. Pull-down resistors (1Kohm) are needed on all 4 columns to make sure that the columns are pulled down to a logical zero when they are not being driven. The sampling rate is determined by how often all 4 rows are driven and the columns read. A 2 bit decoder was used to lessen the number of test points needed for the keypad. The hardware for the keypad consisted of an address decode/TA generation, sending logic, and receiving logic. The sending logic consisted of a 2 bit counter that was slowed down so that the keypad had enough time to respond. A clock divider was used in order to slow the signal down. The receiving logic constantly read in all four columns and sampled them on a clock edge. Based on the result of the four columns and the output of the two-bit counter, a specific key was latched in and a level interrupt was thrown. A write to the keypad’s location cleared the interrupt and the hardware began sampling again.

Conveyor Belt
We constructed a conveyor belt to deliver the drink to the user after it has been mixed. The conveyor belt was hand built out of wood and is approximately 1 _ feet long. The belt is powered by a gear motor. The conveyor had to have the ability to move the belt forward and backward so we had to be able to reverse the polarity of the motor. The easiest way to do this was to utilize an H-bridge. The H-bridge supplied the necessary current to drive the motor both directions just by using the 823 to send 2 control signals to the H-bridge

Distance Sensors
We needed a way to determine which end of the conveyor the cup was on and also we had to have a way to stop the conveyor when the cup reached the end. The easiest solution was to use an infrared distance sensor on either end of the conveyor. The sensors are powered by a supply voltage and output an analog signal proportional to how far away the object is from the sensor. In order to effectively use the sensors we had do analog to digital conversion on the output of the sensors. We used the onboard A to D converter for this.

Fluid Solenoids
We used 4 fluid solenoids to transfer the proper ingredients from the bottles to the cup. In order to ensure that there was enough current supplied to switch on the solenoids we had to build transistor circuitry to amplify the current. We needed to send 4 control signals to the solenoids from the 823 to turn the appropriate solenoids on and off. We did not have enough test points available to us so we had to use a decoder to reduce the amount of test points needed.

NES Controller
The NES Controller uses serial interface that responds to particular signals in order to sync itself and respond with appropriate data. The three main signals are PULSE, LATCH, and DATA. When the LATCH signal is asserted, the device latches the current buttons being pushed and sends the first button (active low) on the DATA wire. The PULSE is then used as a clock, where each piece of data is sent when the NES controller receives a PULSE edge.
In order to make a serial to parallel interface, hardware was used that counted the number of pulses being sent and fed the result into a different flip flop. If a flip flop was determined to show that a button had been pushed, a level interrupt was thrown and no more button pushes were allowed. A read from the NES’s location showed which button was pushed and a write allowed the hardware to continue sampling the NES controller.

Liquid Crystal Display (LCD)
We took a unique approach to controlling the LCD screen. Due to our already massive code and the limited number of test points available we chose to use a PIC microcontroller to control the LCD screen. We chose to use the 16F84A PIC microcontroller and programmed it in BASIC. A 4 bit data bus from the microcontroller was used to communicate with the LCD screen. A 2 bit data bus was used to communicate to the microcontroller from the 823. These 2 bits allowed us to encode signals to transition the screen through the various menus. A 4 Mhz clock was used on the microcontroller. This required us to send extremely long pulses to the microcontroller which was one of the large problems we faced with this aspect of the project.

Stepper Motor
We chose to use a stepper motor to control the rotation of the liquids due to the fact that we needed exact rotation and the ability to return from rotations. A stepper motor is ideal for this circumstance. The microcontroller we used was the 16F84A programmed in BASIC. The microcontroller generates a clock signal with a particular duty cycle. This clock is fed into a stepper motor driver that generates the necessary pulses for the stepper motor controller. The 4 outputs from this driver are fed in a Darlington Array buffer that supplies the necessary current to drive the motor. A 2 bit data bus was used to control the microcontroller from the 823. Once again the slow clock of the microcontroller forced us to send a very large signal to from the 823.

The University of Michigan, EECS 373 - Winter Semester 2006