Auto Light controller with Bidirectional counter using 74LS192

Discussion in 'The Projects Forum' started by rokuhsz, Aug 11, 2015.

  1. rokuhsz

    Thread Starter New Member

    Aug 9, 2015
    10
    0
    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.
    [​IMG]
     
  2. ScottWang

    Moderator

    Aug 23, 2012
    4,855
    767
    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?
     
  3. rokuhsz

    Thread Starter New Member

    Aug 9, 2015
    10
    0
    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.
    [​IMG]
     
  4. rokuhsz

    Thread Starter New Member

    Aug 9, 2015
    10
    0
    this is the original circuit that i modified
    [​IMG]
    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.
    [​IMG]
     
  5. ScottWang

    Moderator

    Aug 23, 2012
    4,855
    767
    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.
     
  6. rokuhsz

    Thread Starter New Member

    Aug 9, 2015
    10
    0
    thanks for the comments. i'll do some research with those components and post it back here.
     
  7. absf

    Senior Member

    Dec 29, 2010
    1,493
    372
    This is how I did it. Hope I didn't spoil the fun:p.

    AUTO LIGHT USING LS192.PNG

    Allen
     
    rokuhsz and ScottWang like this.
  8. rokuhsz

    Thread Starter New Member

    Aug 9, 2015
    10
    0
    Wow. Thanks allen. Good idea, i'll implement it on my circuit n see how it goes.
     
  9. rokuhsz

    Thread Starter New Member

    Aug 9, 2015
    10
    0
    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??

    [​IMG]

    i try this circuit too. seem like it has the same problem.
    [​IMG]
     
  10. ScottWang

    Moderator

    Aug 23, 2012
    4,855
    767
    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.
     
  11. JohnInTX

    Moderator

    Jun 26, 2012
    2,347
    1,029
    @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.
     
  12. absf

    Senior Member

    Dec 29, 2010
    1,493
    372
    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
     
    Last edited: Aug 18, 2015
  13. rokuhsz

    Thread Starter New Member

    Aug 9, 2015
    10
    0
    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.
     
  14. ScottWang

    Moderator

    Aug 23, 2012
    4,855
    767
    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).
     
  15. rokuhsz

    Thread Starter New Member

    Aug 9, 2015
    10
    0
    i dont have that in my simulator. bummer. it would be more easier.
     
  16. rokuhsz

    Thread Starter New Member

    Aug 9, 2015
    10
    0
    how do i connect the relay with a 240v ac fluorescent lamp? can u show how the relay is connected?
     
  17. ScottWang

    Moderator

    Aug 23, 2012
    4,855
    767
    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.
     
  18. rokuhsz

    Thread Starter New Member

    Aug 9, 2015
    10
    0
    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.
     
Loading...