
Bad Circuit Design - nvr219
http://cmosedu.com/cmos1/bad_design/bad_design.htm
======
staycoolboy
Nice. This forum could use a little more circuit discussion IMHO, but I think
IRL the ratio of analog-circuit blogs to web-design blogs is close to epsilon.

~~~
ur-whale
> This forum could use a little more circuit discussion

Yes, and specifically _analog_ circuit design.

Digital circuits are nice and all, but in the end they're very much like
coding than actual electronics.

~~~
vonmoltke
As long as your tolerances are large enough. And you remember all your pull-
ups/pull-downs. And...

~~~
TFortunato
To paraphrase a joke I heard before, the only difference between an Analog
Engineer and a Digital Engineer, is the analog engineer knows they are working
on analog circuits.

~~~
pstuart
I thought it was s/analog circuits/ an antenna/, but yours works too.

------
teddyh
“ _Look at how offensively huge this oscillator is!_ ”

— [http://www.wastedtalent.ca/comic/matter-
scale](http://www.wastedtalent.ca/comic/matter-scale)

~~~
inamberclad
Great webcomics feel like one of victims of our new internet...

------
cogburnd02
Some chump has run the data lines right through the power supply! Amateur
hour! I've got tears in my eyes!

~~~
doersino
I _am_ a giddy goat.

------
dragontamer
The main circuit confuses me, but apparently that's because I haven't studied
CMOS design much.

What's going on is that CMOS chips have accurate capacitors, but inaccurate
resistors. So the "switched capacitor" converts capacitors into resistors by
oscillating the switches Phi1 and Phi2 at a certain rate.

However, the switched capacitors prevent the feedback loop from properly
forming on the OpAmp.

[http://cmosedu.com/cmos1/bad_design/bad_design.jpg](http://cmosedu.com/cmos1/bad_design/bad_design.jpg)

If anyone else has issues understanding the designs... remember that this
seems to be tailored for CMOS circuits, not ordinary circuits that you'd make
on a breadboard.

I guess its a "leaky abstraction". The switched-capacitors are supposed to be
"thought of as resistors", but because it cuts off the op-amp feedback, you
cannot use them directly as resistors in this case.

The full discussion of this circuit is here:
[http://cmosedu.com/cmos1/bad_design/bad_design6/bad_design_6...](http://cmosedu.com/cmos1/bad_design/bad_design6/bad_design_6.htm)

Very enlightening for sure. But I'm not entirely sure how one would even get
into CMOS design as a hobby. So this sort of stuff remains the realm of
textbooks and theory for me. Just gonna stick with simpler breadboards for my
own hobbies...

~~~
ptarmigan
To add a bit of context for anyone interested, there are some interesting
reasons why switched capacitor circuits are powerful in integrated CMOS
design. In terms of matching, the choice between resistors and capacitors is
due to size and matching. Large values of resistance require large resistors
or can be implemented with smaller capacitors, switches, and a clock
([https://en.wikipedia.org/wiki/Switched_capacitor#The_switche...](https://en.wikipedia.org/wiki/Switched_capacitor#The_switched-
capacitor_resistor)). Resistance values which would be prohibitively large to
get with a resistor in modern processes can be achieved with switched
capacitors. Additionally (and more importantly), capacitors can have better
matching due to their geometries. If we want a gain of 10 on-chip, switched
capacitor circuits are very well suited. Switched capacitor circuits obviously
can't be used everywhere (need a clock, not continuous time), but they provide
some good advantages.

Considering a resistor as a sheet with a length and width, increasing the
length or decreasing the width will increase the resistance. A large
resistance means a long and thin material. For a capacitor, we just care about
the overall area of the plates and normally use squares. There are variations
to the dimensions generated for both of these shapes. The long, thin resistor
is more sensitive to these absolute changes in its width and thus the best
matching is reduced. The absolute values of both resistors and capacitors are
poor, but the matching of capacitors can be as good as 0.1% (enough for
10-bits of accuracy).
[http://ims.unipv.it/Courses/download/AIC/Layout03.pdf](http://ims.unipv.it/Courses/download/AIC/Layout03.pdf)

There are a few switched-capacitor ICs, though they're more for boutique
applications at this point. [https://www.analog.com/media/en/technical-
documentation/data...](https://www.analog.com/media/en/technical-
documentation/data-sheets/1043fa.pdf)

------
imba404
This website assumes you've studied CMOS circuit design for analog circuitry
(amplifiers, analog-digital converters), and have the corresponding course
book. It's a good list of when the linear model breaks down and you actually
have to do the analysis.

I really like #3, placing a capacitor on a high-impedance node.

------
lukifer
javascript:[...document.querySelectorAll("*")].map(x=>x.style.fontFamily="Helvetica")

~~~
amelius
[https://designblog.rietveldacademie.nl/wp-
content/uploads/20...](https://designblog.rietveldacademie.nl/wp-
content/uploads/2011/03/save-the-bunny.png)

Anyway, the blog was about "bad circuit design", not "bad design".

~~~
yellowapple
Meanwhile, on every page maintained by the OpenBSD devs:
[https://3.bp.blogspot.com/-Y2lMqbfEn8E/T-aJSC76_6I/AAAAAAAJC...](https://3.bp.blogspot.com/-Y2lMqbfEn8E/T-aJSC76_6I/AAAAAAAJCsQ/ksmYJpM15Y0/s1600/funny+rabbit+%2812%29.jpg)

Apparently I don't have Comic Sans installed on this machine, though. I should
probably fix that.

