Auto Light controller with Bidirectional counter using 74LS192

Thread Starter

rokuhsz

Joined Aug 9, 2015
10
ive been searching high and low for a thread similar. a few came up but doesnt rpovide me the info i need. so i think better if i open a new one and make sure it completed. people would recommend using a PIC but i just want to make it simple and cheap. so i choose the 74LS192, but the counter doesnt work as it should. the counter start at 1 when it should be zero and the second 7seg doesnt show any number. im planning to connect the circuit to ta relay to control the light. any recommendation on how to do so? some helps, advice would be very nice.

the circuit below is generated with livewire pro.

i put a switch next to the phototransistor for testing purposes only.
 

ScottWang

Joined Aug 23, 2012
7,397
What's your purpose of D(data) and C(clear,reset) when you connected that way, I'm afraid of this could be a little conflict, normally D and C have a delay that it depends on which signal want to be delay, R15 change to 330Ω, TTL can't use the pull low resistor too high, R16, R17 can be change to 10K, TTL can't connect the Vcc to 9V, it will kill the IC, TTL only can be supply the power as 4.75V~5.25V, I don't know the spec of 7-seg LED, normal LED as 2V/10mA then you should use 330Ω.

What's the LED and photo bjt(IR?), and how do you use them, do you have any datasheet?
 

Thread Starter

rokuhsz

Joined Aug 9, 2015
10
What's your purpose of D(data) and C(clear,reset) when you connected that way, I'm afraid of this could be a little conflict, normally D and C have a delay that it depends on which signal want to be delay, R15 change to 330Ω, TTL can't use the pull low resistor too high, R16, R17 can be change to 10K, TTL can't connect the Vcc to 9V, it will kill the IC, TTL only can be supply the power as 4.75V~5.25V, I don't know the spec of 7-seg LED, normal LED as 2V/10mA then you should use 330Ω.

What's the LED and photo bjt(IR?), and how do you use them, do you have any datasheet?
the led is a transmitter and the photobjt is the receiver. it counts up and down when object pass through the beam. when people come in, it count 1 and more and the light in the room would turn on. its continues on when the digit is more than 0. when people exit, till the counter goes to 0. the light will turn off. something like that.

here is an upgrade i made to the circuit. replace the flipflop with 2 timer555. i tried 5v but the 7segment seems like not working unless i raise the volts to 9.

now my problem is how to connect the relay spdt to the counter circuit.
 

Thread Starter

rokuhsz

Joined Aug 9, 2015
10
this is the original circuit that i modified

and i have some problem with the relays. i don know what the main purpose of pin 27, 28 and 32. so i cant connect it any point in the circuit.
can anybody give me a clue.
 

ScottWang

Joined Aug 23, 2012
7,397
I'm not sure what you trying to do with the two bjts circuit of the right side, the connections was wrong, you can using 74LS85 to do the comparing job and the output of 74LS85 can be connecting to bjt to drive the relay, you can setup the number to do the comparing from 1~9, you will need 2 pcs of 4 dip switches and eight 10K resistors for pull high.

Another easy way is just to detect the zero value, you can using CD4072 to do the detection if the inputs of 74LS47 are all 0V and the output will be 0V, but the output current of CD4072 maybe not enough to drive the bjt, you can add a 4.7K pull up resistor, or you can add a n ch mosfet to drive the relay, and the 4 inputs of CD4072 also need to add four 10K pull high resistors to raising the output voltage for 74LS192.
 

Thread Starter

rokuhsz

Joined Aug 9, 2015
10
I'm not sure what you trying to do with the two bjts circuit of the right side, the connections was wrong, you can using 74LS85 to do the comparing job and the output of 74LS85 can be connecting to bjt to drive the relay, you can setup the number to do the comparing from 1~9, you will need 2 pcs of 4 dip switches and eight 10K resistors for pull high.

Another easy way is just to detect the zero value, you can using CD4072 to do the detection if the inputs of 74LS47 are all 0V and the output will be 0V, but the output current of CD4072 maybe not enough to drive the bjt, you can add a 4.7K pull up resistor, or you can add a n ch mosfet to drive the relay, and the 4 inputs of CD4072 also need to add four 10K pull resistors to raising the output voltage for 74LS192.
thanks for the comments. i'll do some research with those components and post it back here.
 

Thread Starter

rokuhsz

Joined Aug 9, 2015
10
Hi, i did the circuit like u shared, seem like something goes wrong. the relay doesnt auto turn on when the counter goes to 0. here's how i did it. n when i simulate for fault. my 7segment display got fried. can u check my circuit and comment what went wrong??



i try this circuit too. seem like it has the same problem.
 

ScottWang

Joined Aug 23, 2012
7,397
You missing the pull high 1Kx8 resistors to connecting on the input of the CD4078 to the +5V.
If you have prepared some of the other resistors then you can try the pull high resistor from 4.7K to 1K as 4.7K, 3.3K, 2.2K, 1K.

TTL signals to the CMOS and CMOS to TTL.
 

JohnInTX

Joined Jun 26, 2012
4,787
@ScottWang makes a good point. The giveaway is your NOR gate - it shows a 1 output when not all of the inputs are a solid 0 - that's an error. The CMOS stuff also has to be powered by 5V to interface with TTL using just a pullup.
 

absf

Joined Dec 29, 2010
1,968
my 7segment display got fried. can u check my circuit and comment what went wrong??
The 7-segment LED I used is a simulated software devices. It has latch, decoder & driver all built in. You must use current limiting resistors if you use the 74LS47 decoder. The proteus device is available as TIL311 hex display... I have a few left over when I did the COSMAC ELF 1802 project.

http://incolor.inebraska.com/bill_r/elf/html/elf-1-33.htm

Allen
 

Attachments

Last edited:

Thread Starter

rokuhsz

Joined Aug 9, 2015
10
that is a very cool LCD display. im not very good with electronics. im from a electrical mechanical background. thank you very much for the reply. i try to make wat i can understand from ur comment. tq.
 

ScottWang

Joined Aug 23, 2012
7,397
that is a very cool LCD display. im not very good with electronics. im from a electrical mechanical background. thank you very much for the reply. i try to make wat i can understand from ur comment. tq.
That isn't a LCD display, it is a mixed component with IC and LED, you can treat it as 74LS47 + 7-seg LED, and it can be decode and display the hexadecimal values from A-F(1010B~1111B).
 

Thread Starter

rokuhsz

Joined Aug 9, 2015
10
The 7-segment LED I used is a simulated software devices. It has latch, decoder & driver all built in. You must use current limiting resistors if you use the 74LS47 decoder. The proteus device is available as TIL311 hex display... I have a few left over when I did the COSMAC ELF 1802 project.

http://incolor.inebraska.com/bill_r/elf/html/elf-1-33.htm

Allen
how do i connect the relay with a 240v ac fluorescent lamp? can u show how the relay is connected?
 

ScottWang

Joined Aug 23, 2012
7,397
If you connect the COM pin and N.O pin of relay as a switch to the 240 Vac fluorescent lamp, when the relay was activated then the lamp will be light up.
 

Thread Starter

rokuhsz

Joined Aug 9, 2015
10
yesterday i was busy killing viruses all over my laptop. damn. the demo version cant save file. so i try some crack one. no so lucky i guess.
 
Top