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.

circuit simulator

Status
Not open for further replies.
mayankguru,

Your suggestion of using an SR latch is a sound one, however I am a little confused as to where you suggest to put it. My suggestion is to use the latch in between the output of your multiplexer and the input to the NAND gate which stops the counter from counting. Then, when a key is pressed the output from the multiplexer goes low, causing the SR to latch low. This causes the counter to permanently stop counting, and all you need to do then is decode the data on the multiplexer's inputs which correspond to which key was pressed. I've changed the setup of your demultiplexer and connected it as a decoder instead, so that it will suit this purpose.

When I simulated it in multisim I found that sometimes the decoder would give an erronous output - in other words the output of the decoder did not correspond to the key that was pressed. I think that's just a bug in the simulation, it probably wouldn't happen in real life. The error only occured every now and then - all other times the output of the decoder corresponded perfectly to which key was pressed, and I checked this for all of the keys.

What do you think?

Brian
 

Attachments

  • Electro-Tech2.gif
    Electro-Tech2.gif
    25.1 KB · Views: 252
By the way, you need to be mindful of your clock frequency here. It needs to be fast enough that the buttons are scanned incredibly quickly, and pressing any of the buttons results in a perceived immediate reaction. But the clock must not be so fast that during the propogation delay of the SR latch and the NAND gate it moves on to the next count!!!

Brian
 
ThermalRunaway said:
mayankguru,

My suggestion is to use the latch in between the output of your multiplexer and the input to the NAND gate which stops the counter from counting.
Brian

i think there is some misunderstanding . .
the circuit is not to show
"who pressed the key first"
but to know
"which keys are pressed"

i.e if i press key 1 the latch at the output of the DMUX will hold the corresponding output low untill we manually reset the latch.and we dont need to stop the clock. . the clock will b stop just for a spur of moment that is when the push button is pressed once it is released the clock will start counting again. .and i m using latch at the DMUX output so that the led will keep glowing even after releasing the push button..

actually this circuit after testing will be divided in two parts

part one will consist of:
KEYS
MUX
NAND gates
COUNTER
555 timer


part two will have
DMUX
LATCH
LED's

i might sound sillly but really hav a question in my mind
:eek: can we use different 5v supply for each part?
 
Hmmm. I think you've chosen the wrong circuit altogether. If you look at the original circuit you fetched off the internet, it's called a "first event detector". In other words, it's designed to tell you which event occured first. I critisised that circuit because there was no latching system employed, and that meant it only told you which event occured first for as long as the event occured - not a good circuit.

I've added a latch into the circuit now so it does what it says on the tin, but now you're saying all you need is a circuit which tells you which buttons have been pressed. There's no need to know which one was pressed first. That's a different circuit altogether!

Complete redesign required.

Brian
 
All you need here mayank guru, is your row of buttons each connected to a latch of their own. Tie all the reset lines together. When a button is pressed it will be latched on, and the LED will for that button will glow continuously. As other buttons are pressed, the same will happen to them. The LED panel will continue to represent which buttons have been pressed until you press your reset button, which will clear all of the SR latches simultaneously.

Job done.

Brian
 
Hang on, I just remembered you saying that it was a requirement to reduce the number of cables between the Mux and Demux so that the buttons and the display panels could be in remote locations without having to run lots of cables. In that case, the mux/demux circuit still serves a purpose. Leave the event detector as it was (don't use my latch), but you'll need to latch each of the outputs of the demux and tie all the reset lines together. Easy modification, and it'll do what you want.

Brian
 
ThermalRunaway said:
latch each of the outputs of the demux and tie all the reset lines together. Easy modification, and it'll do what you want.

Brian

right it will work like this,
but what about using different power supplies(+5volts) at each part (part1 mux and part 2 DMUX)
can i use different power suppllies or not??
 
I see what you mean - the mux and demux will be in seperate locations and therefore will need seperate supplies. Yes you should be able to use seperate supplies without a problem. In a worst case, you would need to tie the grounds together so that the TTL logic levels are references from the same potential, but I don't think that will be an issue...

Brian
 
ThermalRunaway said:
Yep let us know how it goes!

Brian

i connected the latch with the output pins of the DMUX. . it holds the led on till we manually reset the latch. .

now
when no switch is pushed (ideal state) all the output pins of DMUX are high (that is right) when any of the switch is pushed the corresponding pin of the DMUX shows low and the led lites up(that is also correct),but the problem is that the pin which is right next to the corresponding pin is also showing a slight voltage drop because of this the latch turns on that led also:mad:


now when i remove the latch the led remains on till i hold the button and the other led also lites up but cannot b seen as it doesn't glow so brightly.

so now what i think that i need is to connect some component to the ouptut pins of the DMUX and the latch which will send low signal to the latch only if it gets a good amount of voltage drop and not send low signal of those pins where the voltage drop is very less. . .

i think i make myself clear:confused:

now i dont know which component will do the need full . .
any idea??????
 
i am working on a general PCB and some one told me that there might b some leakage in the pcb thats why i m facing the problem. . .
so i will try some good quality PCB and lets see wat happens after that
 
ThermalRunaway said:
mayankguru, are you able to attach a copy of the latest version of your circuit? I'll take a look at it.

Brian
sorry for the delay . . .
the circuit is in its final stage. .once its over i will attach the coppy here. .
appreciate ur concern..



do u hav any idea that how to connect a relay with a phone so that when ever the relay gets on,the phone will dail a particular number (already stored in the phone) some of the home security devices are doing the same stuff.but i don't hav any idea how to do that. .
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top