Computer circuit schematic:
The circuit begins with the countdown on the seven segment display using the display, the clock, the driver and the decimal counter. This portion of the circuit is similar to the circuit we built in class on week 7 with some minor adjustments to make the clock count down instead of up. Then the outputs of the counter are also branched off to the series of or gates which give the output of 1 for every number beside zero. Then that output is put into a xor gate which has its output connected to an NPN transistor. This then allows a separate supply voltage current to flow through the transistor once a base voltage is supplied. This emitter current is used to power a small motor that only runs for 1 second while the clock is on zero but should theoretically be enough time to pull a cover off of the photo sensor. The photo sensor is used as R1 in the non-inverting op amp shown below and by using the photo resistor in this way when the photo resistor is covered the gain will be essentially 1 because the resistance of the covered resistance is about 30k ohms. Therefore, with R1 being about 4k when the photo resistor is uncovered it has a resistance of about 3k so by analyzing the equation provided below the gain should double when uncovered vs covered and it does. Then the output of the op amp is applied to a relay so that when the cover is removed the relay switches outputs and powers the larger motor to power the lift. This is where the circuit ends.
Photo 1: Entire circuit minus the two motors.
Photo 2: Close up of relay, op amp and driver.
Photo 3: Close up of clock, decimal counter, and or gates.
Photo 4: Close up of Xor gate, transistor and display.
Video 1: Shows how the clock counts down and is used to pull the paper away from the circuit.
Video 2: Shows the problem with the motor pushing the entire contraption away from itself.
I have encountered many failures throughout the process with connection issues and also just simple design flaws. The two major failures that I am still in the process of overcoming is how to get the small motor to move the cover from the photo resistor and how to secure the motor and lift in place so that they don't push each other away. These mechanical failures are proving to be harder than anything I encountered while building the circuit. One failure I have overcome was with triggering the relay I was trying to use the photo resistor in a different way. I was trying to use it as a current divider of some sort and then I did a little reading into the op amp and realized that the op amp is just a configuration of a bunch of CMOS transistors and that no current actually flows through the input. This is when I got the idea to use it as R1 on the non inverting op amp and that worked much much better.