News for hackers. Stuff that matters.
Re:Bad Circuit Design by dragontamer on Wednesday June 10, 2020 @06:52PM (#23483127)
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

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...

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...

Re:Bad Circuit Design by ptarmigan on Wednesday June 10, 2020 @07:29PM (#23483403)
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...). 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

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...