Digital monostable multivibrator.


 

I am having trouble with a digital circuit. It takes too long to solve. Have I done anything wrong?
 
File is digital_monostable.zip


 

I did not yet get down to the nitty gritty about the 74LS02 in your circuit.
 
But I noticed your voltage-controlled switch is improperly set up.  You drive it with a waveform that swings between 0.0 and 1.0 V.  But you set the switch's threshold Vt to 1.0 V.  This means it switches ON when the control voltage exceeds 1.0 V, which it technically never does.  It's a Reallly Bad Idea to set a threshold equal to one of the signal's logic levels.
 
This seems to be an awfully common mistake for people to make.  Yes it might work in spite of that, but you really need to set your switching threshold in the middle of the signal's voltage.  Say around Vt=0.5.
 
Did you really want the second 74LS02 to be powered by the divided-down voltage, after the 10K pot?  That looks to me like a mistake.
 
You must be using a very old version of LTspice, yes?  The 74LS02 model file is in a place that has not been used by LTspice in many many versions - I think not since LTspice IV, before 2016.
 
Andy
 


 

Unless you are doing something unusual with your LS02's,  I recommend trying it with LTspice's built-in OR/NOR gate.  It is named "or" and it has both true and inverted outputs.  Leave the unused inputs with nothing connected to them.
 
Andy
 
 


 

Yes, I copied the switch statement from another of my circuits.
 
I am very lazy today, Thanks Andy.
 


 

I am using version 17 now and I had trouble with the symbol and finding it.


 

Ok, so when I reordered some pins on the symbol, I neglected to update the pin order.


 

On Fri, Nov 22, 2024 at 02:11 PM, Richard Andrews wrote:
Ok, so when I reordered some pins on the symbol, I neglected to update the pin order.
The pin order looks OK to me.
 
But you should never put or use models in C:\Program Files\LTC\LTspiceXVII\lib\sub\.  That has been the wrong place for a very long time.
 
Andy
 


 

On the other hand, I guess you wired up the gates incorrectly.  "Y" is the NOR's output pin.  "A" and "B" are its inputs.  The symbol is OK, but the schematic that uses it is not.
 
The auto-generated symbol unfortunately conveys no meaning of the gate nor its pins.  It would not be too difficult to draw a new gate, or borrow another one.
 
Andy
 


 

Thanks Andy about the placing of models. The symbol may look right, because I changed the pin order on the symbol only.
 
I updated the file. Had to delete the switch and as I said earlier, because I don't need it yet.


 

OOOOh another thing I am over looking. I will just put it aside until I am more into it. Thanks Andy for your help I am in a rush and thought I could just throw this together.


 

I uploaded "digital_monostable_fix.zip".  It fixes
  • the wrong wiring to the gate input and output pins,
  • and the wrong power connection to the second LS02,
  • and the wrong Vt of the switch element,
  • and it extends the simulation time to include one full pulse of the output.
It could have been done better, but this was a quick-and-dirty fix.
 
Andy
 
 


 

Hmm.  I see that you updated your original upload, by uploading another file in its place.  The new one is also named "digital_monostable.zip" and it says "updated pin order on symbol".
 
I hate to say it, but the new one is wrong.  It will not work.  It "fixed" something that wasn't broken, and in doing so, it broke it.
 
The model's pin-order is: Y A B VCC AGND.
 
The original symbol's pin-order was: Y A B VCC AGND.  That was right.
 
The new symbol's pin-order is: Y A VCC B AGND.  It does not match the pin-order of the model.
 
It also still links to the Program Files directory structure on your hard drive.  It might work for you, but not for anyone else, and generally that folder should not be used for SPICE models anymore.
 
Andy
 


 

Adding one or two more FYIs - 
 
I question how good that SPICE model is, from T.I.  I see that the second gate does not switch until the inputs reach 2.5 V, which is way out of bounds for that part.  The input switching levels for 74LS is supposed to be between 0.8 V and 2.0 V, but this one waits until its input reaches almost 2.5 V.  I think it is not right.  I don't have the time to pull it apart to see why.  It is possible that they never checked it for that, thinking that it would be used only with digital signals.  It is most likely that the SPICE model is at fault, not the actual part.
 
The slow rise time of the input signal to the second gate could be cause for trouble, in real circuits.  Many engineers suggest using a Schmitt device for the second gate, to avoid that problem.  The 74LS02 is an ordinary NOR gate and it lacks that.
 
Andy
 


 

Thank you Andy for your work, as I am getting to this now I've see my errors, but I'll just download your fill so I can play with it.
 
p.s. I will use the Document directory for my files.