In: Electrical Engineering
First, we know that manual push button/ switch needs to be connected to photo diode in order to open the garage door, which activates on sunlight, else from the headlights of the vehicle.
Moreover, it needs to stay open for 30 seconds and door should only open when it is previously closed. Hence, we need to consider a memory storing device. We can take reference from a basic flip flop .
I am designing a basic electronic circuit which can easily mounted on a bread board/ PCB.
The above circuit diagram suffices all the required criteria for the garage circuit. I have considered a 9V battery for the supply and 4 main resistors (1k ohm, 100k ohm, 4.7k ohm, 47k ohm) to undergo flip flop operation in the circuit. These resistors are connected to NPN transistors (preferably BC547) as they ideally act as switch.
There are two LEDs connected in the circuit (GREEN and RED) which gives information about the status of the garage door. The green LED indicates that the door is open and red LED indicates that the door is closed.
The flip flop has a special aspect that it can store information, and it will stay on the state till an external pulse or disturbance is provided. The central module of the circuit has a photo diode installed which can power the push button switch to open the garage. By default , the switch is in state B, indicating the garage door closed. When the button is pressed, the switch goes to state A, and the garage door opens.
Finally , we have a 555 timer circuit , which works as a monostable timer, which is useful for the garage door to close after 30 seconds. The 555 circuit is shown below.
In 555 timer, we have 8 pins which needs to be connected as shown in the above circuit. The R2 value is 100k ohm and C2 value is 0.01 F.
The time response of the circuit of monostable timer is given by T=1.1R1C1
Therefore incorporating the value of R1= 300k and C1=85F,
The Time response becomes T=1.1*(300*103)*(85*10-6) sec= 30.85 sec which is the time garage should stay open. When garage is opened(state A), after 30 seconds , the monostable timer is activated and the circuit switches back into closed state (state B).