• Count the number of vehicles on the bridge at a time.
• Show signals accordingly to the incoming traffic.
• If a ship comes close to the bridge, split the bridge in the middle and let it pass through.
The first part was the counting. We used the common 74183 ICs to count the two sub-lanes also the two sub-lanes. Assuming that the traffic enters from the left side, the number of vehicles on the bridge is the subtraction of the second from the first.
To track cars entering or leaving, we used common 38KHz infrared sensors at the top and infrared LED at the bottom. When no vehicle present, the clock pin of 74183 is logic 1, but when a car enters it drops logic 0 for a split seconds, so it works as a clock input.
Fig: Counting with 74283 IC to track no of traffic.
The next part is to show signals to the incoming vehicles. We used a random number 8 up to which it is safe for a vehicle to get onto the bridge. Also the bridge must not be split when a car enters so the GREEN signal is showed when the (number of vehicles is less than 9) && (The counter tracking the ships is 0). YELLOW is shown when the number becomes 9 and RED is shown when it’s 10. Also an alarm is unleashed if a car violates the signal and the number becomes 11 or the remote IR sensing the ships tracks a ship to tell all the traffic leave the bridge immediately.
The bottom part of the circuit is just to track the ships. It the sensor finds the ship, the counter value becomes 1 and it goes to a one shot circuit. The job of the one shot is to create a single pulse. The output is connected to a stepper motor driver circuit. The condition is also latched so that the bridge once open, doesn’t want to be opened again.
Fig: Counting used to track ships
Fig: One shot circuit using 74121 (courtesy: Digital Fundamentals by Thomas L. Floyd)
Tw=0.7 * R1* C4
Fig: One shot using 555 IC (courtesy: Operational Amplifiers and Linear Integrated Circuits by Robert F. Coughlin & Frederick F. Driscoll)
Th = 1.1*Ra*C3
Fig: Stepper Motor Driver Circuit (courtesy: Datasheets L297 & L298 Driver ICs)
When the ship leaves, the counter goes to zero, and the output causes the stepper motor rotate to the opposite direction leaving the bridge into the normal state.
Fig: Full Circuit