A quite interesting project is a useless box. The electronics is simple, but still pretty clever (see figure below):
In the start or home position, the mechanical finger, that is connected to a gear motor M1, is pushing against micro switch SW1, so it is pushed open. That means it is switched off and not conducting. SW1 is located inside the box.
The manual operated toggle switch SW2, that is on the outside of the box, is in the OFF position. When the user toggles SW2 manually to the ON position, the motor is activated and starts moving. The mechanical finger that is attached to the motor will move out of the home position and releases SW1, so SW1 gets switched on. The motor continues to run until the mechanical finger has pushed SW2 back to the OFF position. When SW2 is in the OFF position (SW1 is still switched on), the motor reverses direction and starts moving the mechanical finger back to the start position.
When the mechanical finger has reached the start position again, it pushes SW1 into the off position. The current to the motor is now interrupted by SW1, so the motor stops and stays in the home position, until SW2 is manually switched to the ON position again.
Below, the different states in the working cycle of the useless box are shown. The electrical connection of the positive supply voltage is indicated with a red color and the negative voltage with a green color:
State 1
In the home position, the mechanical finger is pushing the microswitch SW1 open, so it is not conducting. The toggle switch SW2 is in the OFF position. The electrical circuit is interrupted, and the motor does not get any current, so it is not running.
State 2
Toggle switch SW2 is manually switched to the ON position by the user. Now current starts flowing through the motor and the motor starts running in clockwise direction. The motor moves the mechanical finger towards toggle switch SW2. As soon as the mechanical finger leaves the home position, microswitch SW1 is closed. This has no influence on the current state.
State 3
The mechanical finger has reached toggle switch SW2 and pushes this switch into the OFF position. Microswitch SW1 is still closed. The motor reverses direction since the current is now flowing into the opposite direction. So the motor starts running counterclockwise, thereby moving the mechanical finger away from SW2 and back towards the home position.
State 4
The mechanical finger now has reached the home position again and pushes micro switch SW1 open, so SW1 is switched off. This interrupts the current to the motor and the motor stops.
The mechanical finger is now back in the home position, waiting for the user to toggle SW2 to the ON position, so the whole cycle starts over again.
After I assembled the useless box and tried it, I found that the motor was moving way too fast. So when you toggled the switch, the switch was pushed back to the initial state almost instantly before you had the chance to retract your finger.
To solve that problem, I added the following circuit that causes an adjustable delay. This delay prevents that the motor starts moving right away, so you have the time to move your finger out of the way.
The delay is created by capacitor C1, which is charged via R1`at the moment that SW2 is toggled to the ON position manually by the user, connecting the motor to the circuit.
At the first instant, C1 is not charged, so the voltage over the base-emitter junction of the darlington transistor Q1 is 0 and Q1 will not conduct. When C1 is charging and the voltage over C1 reaches about 1.2V, the darlington transistor Q1 will start conducting. With R1, the delay can be adjusted, because R1 determines the charge current for C1. If you want a longer delay, the 5K potmeter R1 can be replaced with a 10K potmeter to get maximum 2 seconds delay. Or you can double the value of C1 to 2200uF, but that might get too bulky to fit into the box.
I used a darlington transistor to minimize the base current in order to minimize the load that the transistor forms on the RC network. Darlington transistors have a very high beta, i.e., current amplification = ratio of the collector current and the base current. A logic level P-MOSFET can also be used because it has a low gate voltage threshold (1 to 2V) and the gate will not load the R/C delay network formed by R1 and C1.
A standard P-MOSFET has a gate threshold voltage between 2 and 4V, so not really useful for this circuit that is powered with 3x AA-batteries = 4.5V.
With the circuit below in place, the motor is not started instantaneous when SW2 is toggled by the user, but is delayed by a period that is set by R1 (between 0 and about 10 seconds) :
A disadvantage of the previous circuit is that the TIP137 darlington transistor drops about 1.2V over the emitter-collector when it is conducting. This means that the motor does not get the full 3V that is delivered by the 2x AA-batteries that are connected in series, but 3V -1.2V = 1.8V. This will make the motor run slower than when connecting it directly to the batteries. A solution is to put an extra 1V5 AA-battery in series with the 2x AA-batteries to compensate for the 1.2V voltage drop of the TIP137 darlington transistor.
But we want to stick to the 2x AA-batteries of the original design, so we need to come up with a more efficient delay circuit that is still simple to build with common available parts.
To get rid of the 1.2V voltage drop of the darlington transistor, we need to replace it with a standard PNP medium power transistor, which will have a voltage drop of about 0.3V over the emitter-collector when conducting. This standard transistor has a DC current amplification factor (beta 0r hFE) of about 150.
The TIP137 darlington transistor has a DC current amplification factor of about 10000. Because of this high DC current amplification factor of the darlington transistor, we could connect the base of the darlington directly to the RC delay circuit formed by R1 and C1. The current flowing into the base of the darlington will be very small and does not affect the time delay. When we are going to use a standard medium power PNP transistor, we will need a buffer in between the base of the power transistor and the delay circuit, so the base current of the PNP transistor does not affect the time delay. Below, you find the improved delay circuit to generate a delay between 0 and ca. 7 seconds:
The time delay network is formed by potmeter R1 and capacitor C1. You can change the values of R1 and C1 to change the maximum value of the time delay. When you want to maintain the time delay but use other values for R1 and C1, then take care that R1 * C1 does not change. F.e. when you change R1 to 50K (10 times bigger), then you need to change C1 to 100uF (10 times smaller).
Q2 is used as a buffer for the time delay network and will start conducting when the voltage over C1 = voltage at the junction of R3 and R4 + base-emitter voltage of Q2 = (3V / (220 + 100)) * 100 + 0.6V = ca. 1.5V. So when the voltage over C1 exceeds 1.5V (which is about half of the supply voltage), Q2 will start conducting. Meanwhile, Q1 is held in cut off state by R2, pulling up the base of Q1 to the supply voltage. When Q2 starts conducting, Q2 will force Q1 into conduction too, because Q2 then pulls the base of Q1 towards ground via R4. Q1 will make the motor run when it is conducting.
When the user toggles the toggle switch SW2 to the ON position, the time delay circuit is powered and will activate the motor when the set time delay has passed. SW1 is closed at the moment that the motorized finger leaves the home position. The motorized finger will toggle the switch SW2 back to the OFF position. In the OFF position, SW2 will change the polarity of voltage going to the delay circuit. The delay circuit will not function when reversing the polarity of the voltage that powers it, but it can handle it without a problem. But when the polarity is reversed, we want the motor to run in the opposite direction. Schottky diode D1 takes care of that and provides current to the motor when SW2 is in the OFF position. D2 protects the polarized elco C1 from being reversed polarized.
Summarizing :
We have put the delay circuit in between SW2 and the motor. SW2 either provides a positive or a negative voltage to the delay circuit. The delay circuit will control the motor when SW2 switches a positive voltage to the delay circuit. When SW2 switches a negative voltage to the delay circuit, the delay circuit will not be functional and D1 takes care that the motor runs in the opposite direction.
Note :
Transistor Q3 and resistor R5 are not strictly necessary. Without Q3 and R5, Q1 will go into conduction slower. Q3 "helps" Q1 by providing positive feedback from the collector of Q1 back to the base of Q1. This way Q1 is forced into immediate conduction at the moment the time delay has passed.
The component side of the delay circuit:
The solder side of the delay circuit:
Closed up of the circuit: