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.

Counter miscounting?

Status
Not open for further replies.

alec_t

Well-Known Member
Most Helpful Member
I would have expected a continuous 256-step ramp output from this sim with a 4024 counter, but there are clear discontinuities at multiples of 16 clock pulses. Any idea why this is, or how to overcome apparent miscounting?
 

Attachments

  • CounterTest.asc
    1.7 KB · Views: 280
In answer to my own question, the discontinuities arise because I failed to take into account the internal resistance of the Q outputs of the counter. It appears LTS models this as ~500 Ohm. By subtracting 500 Ohm from the value of each weighting resistor to compensate, the ramp output becomes monotonic. Something to bear in mind if you want to use a counter (or shift register) plus weighting resistors for synthesising a waveform.
 
So here's a good example of a simulation discovering a somewhat subtle problem before the circuit is actually built.:)
 
Last edited:
Yes. I've become a recent convert to simulation. I'm sure it will prove an invaluable tool for designing circuits and save a fortune in blown fuses, popped transistors etc. Plus, you don't need to keep a huge inventory of components for experimenting. It's important, though, to realise its limitations.
 
Certainly you must be aware of the limitation of simulations as you should for all tools. I made note of your success with it because there seems to be a lot of overly negative comments about circuit simulations on some of these forums, which I think may discourage people from using a very useful tool. I find them very handy to verify the basic operation of an initial design where it can catch a lot of bugs before you build the circuit. You still need to breadboard it, of course, to validate the final design.
 
Agreed. Theory and practice rarely coincide exactly, particularly in the realm of electronics. A case in point is oscillator circuits. What works as a sim sometimes doesn't in reality; and vice versa. The component models don't seem to take random stimuli and noise fully into account, and it's these which can initiate oscillation.
 
Sometimes you can initiate oscillation in a simulation by momentarily inputting a small AC signal (using a voltage controlled switch for example) into the appropriate node of the oscillator to kick-start the circuit.

As you said, in the real circuit noise and other random factors will start the oscillation.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top