Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Please help me with my project...I'm hopelessly stuck..

Status
Not open for further replies.

Bloodninja

New Member
Hello everyone,

I'm working on my graduation project, and I decided to design a parking lot system, I attached the circuit to this post as I've completed about 50% of it.

My problem is I want to use the 74LS192D (BCD Up/Down Counter) as an Up counter when the Switch is open (I want to use LDR and a Laser later) then the counter goes up by one. Similar thing will happen at the exit and the counter goes down by 1. the issues are:

- How can I freeze my up counter at 9 for it to wait for someone else to exit ? (I thought about diode AND logic but simulation program (Multisim) refuses)

- 74LS192D counts Up only when DOWN is HIGH...and counts Down when UP is high...I'm confused and troubled with this issue...

I have attached an image and a Multisim file.

Your help is very appreciated

Thanks in advance.

Notes:

the LED at the enterance symbolize the motor direction, nothing more.
 

Attachments

  • multisim file..zip
    306 KB · Views: 328
  • cir..png
    cir..png
    37.5 KB · Views: 1,956
Hello everyone,

I'm working on my graduation project, and I decided to design a parking lot system, I attached the circuit to this post as I've completed about 50% of it.

My problem is I want to use the 74LS192D (BCD Up/Down Counter) as an Up counter when the Switch is open (I want to use LDR and a Laser later) then the counter goes up by one. Similar thing will happen at the exit and the counter goes down by 1. the issues are:

- How can I freeze my up counter at 9 for it to wait for someone else to exit ? (I thought about diode AND logic but simulation program (Multisim) refuses)

- 74LS192D counts Up only when DOWN is HIGH...and counts Down when UP is high...I'm confused and troubled with this issue...

I have attached an image and a Multisim file.

Your help is very appreciated

Thanks in advance.

Notes:

the LED at the enterance symbolize the motor direction, nothing more.

hi,
The 74LS192 requires the unclocked clock to be high while the other is clocked, both for up and down.:)

If you dont reset/clear the LS192, it will hold the count until the supply voltage is removed.

EDIT:
Looking at the drawing you have the Down clock connected to +V.???

Which signal determines if a car is entering or exiting the park.??
 
Last edited:
Hello ericgibbs, you don't know how much i'm thankful to you for replying...I was going to add another Timer555 at the exit just like i did in the enterance...
All I want is to use 74LS192 as UP and DOWN at the same time

- when a signal comes from the enterance...it goes up by one
- when a signal comes from the exit...it reduces by one
- when the parking is Full...stop until the exit is reduced

here is the schematic after adding the other timer555
 

Attachments

  • circuit--..png
    circuit--..png
    54.8 KB · Views: 679
Last edited:
Hello ericgibbs, you don't know how much i'm thankful to you for replying...I was going to add another Timer555 at the exit just like i did in the enterance...
All I want is to use 74LS192 as UP and DOWN at the same time

- when a signal comes from the enterance...it goes up by one
- when a signal comes from the exit...it reduces by one
- when the parking is Full...stop until the exit is reduced

here is the schematic after adding the other timer555

hi,
A quick look at your new diagram. [ I will look in more detail later today]

The diode D2 will not allow the LS192 Up counter to work, the 555 cannot pull it low, it will always assume a logic High.

At rest on a 555 the pin #3 output is low [0v] so that will hold the unused clock pin of the LS192 Low, [ without that D2 diode] so the clock on the other pin will not make the LS192 count.!

Why are you using the 555's , are they being used as monostables just to clean the Photo detector signals.??

Check the K1 relay, its appears to be either driving the barrier gate up or down continuously

Hints:
I expect you have a photocell path on either side of the barrier gate.?

Consider when the Input OR Output beam is broken the barrier must be raised and kept raised.

And if the Input beam AND Output beam are not broken the barrier should go down and stay down

OK.?:)
 
hi,
Look at this minimal option. It should help with the gating logic.

On a real life system there would be additional safety features and interlocks.

Note:
The IN Beam is placed close to the entrance side of the barrier and the OUT beam is placed close to the barrier on the other [exiting] side.

As the car breaks either beam the barrier will open and will remain open while either beam is broken, this should ensure that the car is no longer in the barriers closed path.

Do you follow.?:)

CarGate3..gif
 
hi,
A quick look at your new diagram. [ I will look in more detail later today]

The diode D2 will not allow the LS192 Up counter to work, the 555 cannot pull it low, it will always assume a logic High.

At rest on a 555 the pin #3 output is low [0v] so that will hold the unused clock pin of the LS192 Low, [ without that D2 diode] so the clock on the other pin will not make the LS192 count.!

Why are you using the 555's , are they being used as monostables just to clean the Photo detector signals.??

Check the K1 relay, its appears to be either driving the barrier gate up or down continuously

Hints:
I expect you have a photocell path on either side of the barrier gate.?

Consider when the Input OR Output beam is broken the barrier must be raised and kept raised.

And if the Input beam AND Output beam are not broken the barrier should go down and stay down

OK.?:)

Hello ericgibs,

I thought of using the D2 to prevent the signals going to the 74LS192 from reaching the 3rd pin in 555, and I'm using the 555 because it would give the car a certain time to pass through or wait for it to cross the signal, besides I wanted it to be the digital interface for the counter. The relay K1 drives the motor continuosly, but I was going to place physical obsticals to stop it from opening more than 90 degrees.

-----------

Yes I understand your suggestion very well, and I should try it now and return an answer to you as soon as possible. thank you so much
I will also consider the possibilty of adding two inverters at the up and down pins. I will return an answer soon.
 
Last edited:
ericgibs, in the schematic you presented, why are there 2 In1 and Out1 ? where should I connected them ?

many thanks
 
ericgibs, in the schematic you presented, why are there 2 In1 and Out1 ? where should I connected them ?

many thanks

hi,
Look at this image, I have shown the connections.


AAesp08..gif
 
what if both happens at the same time, one vehicle tries to enter mean time another exits?
also keeping a certain time delay for a vehicle to pass is not a good idea, use two sensors as ericgibbs told. or use loop detection method.
 
ericgibs, just out of caution...in the simulation program, if i put switches between the circuit and the sources V1, V2 to symbolize the sensors, the triggering isn't stable (approx. 1 trigger per try) but if I put a clocked voltage source that produces square waves, the circuit works wonderfully with up and down functions at the same time...does this matter in reality? (simulation is set to Real mode)

-----------------
mbarazeen
Yes I agree with you. :)
 
Last edited:
ericgibs, just out of caution...in the simulation program, if i put switches between the circuit and the sources V1, V2 to symbolize the sensors, the triggering isn't stable (approx. 1 trigger per try) but if I put a clocked voltage source that produces square waves, the circuit works wonderfully with up and down functions at the same time...does this matter in reality? (simulation is set to Real mode)

-----------------
mbarazeen
Yes I agree with you. :)

hi,
The In1 and Out1 must remain enabled while their beams are broken.

I would add R/V filters to U1 and U2 [In1 & Out1] inputs.
You can see I have already got R/C filters on the Latch inputs.

In addition to cars entering and exiting at the same time, you have to consider the case where this 'theoretical' car park is FULL with 9 cars.

If car #10 is waiting at the barrier, no other car can exit the car park.

This problem is normally solved by using separate 'enter' and 'exit' barriers.

BTW: consider the LS192 /Carry out pin as a 9th count detect.
 
Last edited:
- How can I freeze my up counter at 9 for it to wait for someone else to exit ? (I thought about diode AND logic but simulation program (Multisim) refuses)

-.

you can drive a 4input NAND gate at the out puts of U2 to get a signal when its full (set any number 0-9 to be selected as full) it can drive the enable of the counter as well as open gate controller.

Edit: you can use limit switches at the gate too, to count IN or OUT when the gate close finally. for simeltanious enter and exit you can make some logic to queue the count or cancell each other since the final count will be the same.
 
Last edited:
ericgibbs,

I'm sorry I couldn't answer earlier this week (it was a busy week), I have simulated the circuit and it worked wonderfully even with switches. next step now is to add more ideas too this base circuit.

I just wanted to tell you that I can only thank you by crediting your name in my graduation project, and if everything works ok I certainly won't forget to post a video of it working. so thanks so much again :)
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top