1 Electromechanical Arithmetic Logic Unit David Bober E90 Project Proposal 12/2/2008
2 Abstract A Full Adder capable of summing two unsigned four bit binary numbers will be constructed from simple mechanical logic gates. The binary values will be represented by the presence or absence of ball bearing flow. The logic gates will be entirely controlled by streams of ball bearings. The mechanical systems inputs and outputs will be connected to a digital controller which will provide the user interface. The mechanical system serves as a highly simplified simple visual representation of the inner workings of VLSI devices. The project is also an example of a functional mechanical logic system, of which there is considerable interest in several fields. Introduction This device will serve primarily as an instructional demonstration and general curiosity item. The Engineering department will benefit by its teaching value for courses that include digital logic, such as E15. It will also provide a unique addition to Hicks. The operation of the gate array will be clearly visible and the centerpiece of the project. The user will be able to track the flow of bearings and see the operation of a full adder. Judicious use of color coding and explanatory symbols will help the viewer understand the algorithm. At the beginning of an operation the user enters the desired operands into the digital controller. It will retract the proper solenoid and allow bearings to flow into the logic array. The full adders in the logic array carry out the computation and output the correct bearing flow pattern. The balls will flow through the gate array under the force of gravity. Electrical switches sense the output flow and return the value to the digital controller. The controller then displays the result on the display. After the operation is complete, the pump lifts the ball bearings to reset the device. The operation of these subsystems is shown in block diagram 1.
3 Solenoids Keypad Pump Gate Array PIC 7 Segment Display Sensors Figure 1: System block diagram Technical discussion Gate Array Design In designing the logic gates there are several problems common to conventional integrated circuits that must be addressed. Firstly, propagation delays could cause timing error malfunctions. If the gates are operated with single bearings representing logical values then the speed of signal propagation would be critical. For example, an AND gate will yield an error if the two input balls arrive asynchronously. This could require a complex timing system requiring different input delays and then more intermediate delays. Such mechanisms would be exceeding complex to execute with only mechanical components. Timing problems are largely eliminated by instead representing logical values by the flow of bearings. Although timing errors will initially occur, they will be eliminated as the system reaches steady state. The continued flow of bearings will tend to wash out timing errors in a manner not accomplished by a single bearing system. For the AND gate example, there will still be an error if one stream of balls enters first but it will be eliminated immediately upon the other streams arrival. The initial errors will be easily dealt with by not sampling the output until the steady state solution is reached. The initial errors can be further lessened by using delayed inputs, which is easily accomplished with the input solenoids and microcontroller. Fan out is another problem shared with conventional digital systems. Splitting a stream of ball bearings into two or more streams could be very problematic. This could cause errors in subsequent gates because of unequal input volumes and inertias. Fortunately, the proposed design has fan out of zero.
4 The design of logic gates operated by ball bearings also poses a number of unique design challenges not encountered in electrical systems. Based on informal experimentation, I have found that ball bearings do not flow as would be intuitively expected from analogy to Newtonian fluids. Depending on the organization of the balls, they may be capable of exerting very significant shear forces. If the balls are organized in a hexagonal close packed fashion, each layer of balls interlocks with its neighbors and can form a very stable structure if confined by normal forces. By analogy to molecular behavior of solids, this packing seems most likely at low average kinetic energy. In rheology, it could be compared to an extreme shear thinning. Some industrial hopper designs overcome this problem by using strong vibrations to maintain a free flow of small objects 1. This behavior will prove critical to designing functional gates. A confined flow of ball bearings arriving at a constriction may stop dead if they become close packed. This type of packing is seems very likely if the balls are on the same size scale as the channels and are neither moving very fast nor being vigorously vibrated, as is the desired operating mode. This immediately suggests that a simple funnel device may be a poor design for an OR gate. However, with care close packing may be able to be avoided by providing that the balls never undergo a confined flow constriction. The designs currently under consideration are entirely static and function on only ball bearing inertia and gravity. These gates should be more reliable than those using moving parts but will be sensitive to ball velocity and the devices plumb. The same gate design will be used to implement both an AND and XOR. The proposed AND/XOR and OR gates are shown in figure 3. Similar designs have been previously implemented in fluidics 2. If only one stream enters inlet A then its inertial will carry it to outlet A B on the opposite side. The same is true of a single stream entering inlet B. If streams enter both inlets A and B then they will collide and drop down the center toward outlet A B. Outlet A B will not jam because any conflicting 1 F.D. Jones F.D and J.A. Newell and H.L. Horton, Ingenious Mechanisms for Designers and Inventors, Industrial Press Inc (1967). 2 Paulo Blikstein, Programmable water (2003).
5 bearings will be ejected to the open space around it, which is a Null space that returns bearings to the stock pile. To complete the XOR functionality, the A B and A B outputs must be connected to an OR gate to yield A B. The Block diagram in figure 4 further illustrated this behavior. Conveniently, the AND/XOR gate described has all the functionality of a half adder. Simply consider the XOR output to be to the sum bit and the AND output to be the carry bit. To construct a full adder from these half adders, only an additional OR gate is needed. This behavior has also been used in microfluidic logic 3. The full adders will be built from these individual half adders. Figure 3: XOR/AND and OR Gate design. 3 Tor Vestad, David Marr, Toshinori Munakata, Flow Resistance for Microfluidic Logic Operations Applied Physics Letters, (2004).
6 A B AND/XOR A B A B A B OR A B Figure 4: Gate function block diagram The gates will be constructed with the CNC router housed on the third floor of Hicks. For prototyping, they can be cut from Styrofoam in approximately 5 minutes. For the final machine, they may be fabricated by stacking milled sheets of plastic into full adders or by milling a wax gate mold and then casting gates from a polymer resin. In either case, the construction will be CNC based and receive a SolidWorks design. Controller The digital controller will be made from a Microchip Technology PIC microcontroller. The user will enter input from a simple key pad, requiring 7 input bits. The calculation input and output will be displayed on three 2 digit seven segment displays, requiring a total of 30 output bits. The control of the solenoids will use 8 output bits, while the sensors require 5 input bits. The pump will only use 1 output bit. All I/O are binary and no A/D or D/A capabilities are required. The power requirements of the pump and solenoids will necessitate the use of additional transistors or solid state relays. The system will be programmed with PIC C and be rewritable. They system is represented by the block diagram shown in figure 5
7 Keypad Sensor Input 7 bit 1 bit PIC C Program 30 bit Display 8 bit Solenoid 1 bit Pump Figure 5: Microcontroller block diagram Pump A special pump will be required to move the ball bearings because there are no commercial units designed to pump relatively large objects at low flow rates. The exact flow rate is yet undetermined but is relatively unimportant because the pump will only be used to reset the device between calculations. The device will be a simple screw conveyer, a device similar to Archimedes water screw. Similar systems are common for materials handling, with examples on both agricultural combined and ceramic processing equipment. The auger will be bought commercially in the form of a brace bit. It will then be connected to suitable bearings and a small DC motor. Gate Array Input/Output The input control solenoid should be relatively easy to implement. The solenoid throw must be only slightly longer than one ball diameter and little force will be required. Care will be needed in selecting a model with convenient mounting brackets and hardware. The output sensors will be either sensitive paddle switches or a paired LED and photoelectric sensor. Either should be relatively cheap and easy to install. The photoelectric model would be less likely to jam the flow but could be more prone to false readings. Project Plan The projects main tasks are shown in the critical path diagram labeled figure 6. This figure demonstrates the necessary order of completion and timeline. The CPM shows the project time line in the format of (earliest start time, latest start time,
8 [duration]). Times are in units of weeks, with t=0 being the first day of the semester. Project updates will be conducted using a Wiki set up by Prof. Cheever. Frequent wiki updates summarizing progress and mile stone completion will later be used to help complete the final report. Completion of each CPM task will serve as a milestone. The tasks are also listed and briefly described below: 1.) Gate prototype and testing: design and prototype each type of gate. 2.) Array design: combine individual gates into a full adder. 3.) Array fabrication: Use CNC router to cut gate array into plastic. 4.) Pump design: design motor, auger and piping to move bearing back to top of device. 5.) Pump fabrication: Shop work to build the pump. 6.) Input control design: design connection of solenoids and initial release of bearings. 7.) Input control fabrication: assemble solenoids to CNC cut plastic to attach top gate Array. 8.) Output design: design sensors to read the presence or absence of ball bearings. 9.) Output fabrication: assemble sensors on CNC cut plastic to be attached to gate array. 10.) Controller design: Select the proper microcontroller board and associated power transistors or relays. Also includes user input. 11.) Controller programming: program the microcontroller. 12.) Assembly: all subsystems must be assembled. 13.) Testing: evaluate performance and durability. This will include frequency of jamming and the effect of being out of plumb. 14.) Procurement: parts specification and ordering.
9 Pump Design (0, 0, ) Pump Acquisitions (2, 2, [2.5]) Pump Fabrication (5.5, ) Gate Design (0,1, ) Array Design (2, 1, ) Array Acquisitions (5, 5.5, ) Array Fabrication (6, 6.5, ) Assembly (8.5, 8.5, ) I/O Control Design (0,0, ) I/O Acquisitions (2, 2, ) Controller Design (4, 6.5, ) Programming (9.5, 9.5, ) Final Testing (10.5, 10.5, ) Final Report (11.5, 11.5, ) Completion in week 12 Figure 6: CPM diagram
10 Project qualifications My qualifications to complete this project include previous design and course work and a strong motivation to graduate in the spring of Relevant design work includes a bicycle design under a Halpern Grant, which is currently inching toward completion. Relevant course work includes E15, E11, E12, E82, CS21, E6, E59, E58 and E41. Project cost The project will cost approximately $350. Unfortunately, the large variety of materials and suppliers will make it difficult to find donors. The estimated cost for each subsystem is shown in table 1. The real cost paid could be reduced because a number of the components may be readily available in departmental stock. I will need to request additional funds above the preapproved $200. Hopefully this expense can be justified by the projects benefit to the department, primarily as a teaching tool. The actual project cost will be highly dependent on proper parts specification. The specification process also deserves attention because it is a time consuming task with the potential to derail the CPM. The table in appendix A lists each subsystem and the items that are already known to be needed. It also includes a brief note on the requirements for those parts and, in some cases, a preliminary specification is included. Cost has also been estimated where possible. Table 1: Estimated Budget Subsystem Gate Array 150 Microcontroller 145 Pump 55 Total 350 Estimated Cost (USD)
11 References Blikstein, Paulo. Programmable water. (2003). Retreived 1/12/08 from Jones, F.D; Newell, J.A; Horton, H.L. Ingenious Mechanisms for Designers and Inventors. Industrial Press Inc (1967). Vestad, Tor; Marr, David; Munakata, Toshinori. Flow Resistance for Microfluidic Logic Operations. Applied Physics Letters (2004).
12 Appendix A: Initial part specifications These selections are preliminary and are mainly for the purpose of budgeting. Shaded entries represent only rough estimates. Subsystem Part Name Description Quantity Vendor Part # Cost (USD/pcs) total cost (USD) Gate Array Gate cover 2x2' clr polycarbonate 1 McMaster 8574K Gate Plastic 2'x2' blk polyethylene 2 McMaster 85705K Ball bearings 1/8", steel 2000 McMaster 96455K solenoids 1/4", pull photoelectric sensor 5 DigiKey 1 5 LED 5 DigiKey 1 5 Microcontroller PIC keypad 12 key 1 DigiKey GH5008 ND segment 2 digit, red 3 DigiKey ND power transistor 8 DigiKey 2 16 relay 1 DigiKey CC1061 ND Pump brace bit 1" auger pipe 1" ID 1 McMaster bearing 1" ID 1 McMaster 60355K total