Variable-Gain Amplifier, adapted for etching into silicon.

One of the subjects which I’ve blogged about before was, The design of a variable-gain amplifier stage, that was really a variable-attenuation stage. This stage was neither suited for direct implementation with discrete components, nor on an IC. The reason for the latter detail was, that that circuit still contained coupling capacitors. Those are difficult to implement on an IC. However, I’ve done my best to do so now, in order to design a stage, which can be etched onto an IC.

My strategy for implementing a coupling capacitor was, that I’d tie the Source, Drain and Bulk electrodes of a P-channel MOSFET together on the side of the input, and use the Gate as output. However, since the N-doped well of a P-channel MOSFET also has capacitance to the substrate, I added a schematic component, that would be a ‘Semiconductor Capacitor’ according to ‘NG-SPICE‘, and the rectangular dimensions of which would just be slightly larger in each direction, than those of the MOSFET. This is meant to simulate the added, unwanted bypass-capacitor, which the preceding transistor-stage would need to be able to overpower.

This is the schematic:

Default_NM_Gain_IF_6

These are the model-cards used:

http://dirkmittler.homeip.net/text/NMOS2.mod.txt

http://dirkmittler.homeip.net/text/PMOS2.mod.txt

http://dirkmittler.homeip.net/text/JUNCCAP1.mod.txt

And this was the Net-List that defines both the circuit, and one of the simulations:

http://dirkmittler.homeip.net/text/Default_NM_Gain_IF_6.net.txt

Obviously, on an actual IC, the capacitor ‘C1′ would not exist either. Instead, a presumed preceding stage would have another transistor, that does what ‘MC1′ does in this stage.

The concept behind this circuit was, that ‘M1′ is a working inverting amplifier with reasonable voltage gain – in the ballpark of ~18, if there was no circuitry designed to make it attenuate a signal. Simply because the voltage-divider exists between ‘R2′ and ‘R3′ at the input, that goes down to ~9. Additionally, the fact that ‘R5′ follows ‘MC1′, brings the voltage-gain down to ~6, when the control-voltage is 3.0V. But, as ‘M3′ starts to conduct, it starts to feed the inverted signal from the coupling-capacitor back to the Gate, where the feedback competes with the current being fed by ‘R2′. The higher the gain of ‘M1′ is, the better the negation of the signal is, that results.

All outputs should have some sort of load indicated, so I added ‘R5′. In fact, I get the impression that NG-SPICE runs into difficulty simulating an output-voltage, if there is no load resistor. But in reality, the current that flows from the Source to the Drain of ‘M3′ will also see to it that any following, chained stages are biased as this stage was biased. (:1)

This circuit has a surprising, simulated behaviour, in that it will regulate the output voltage down, almost to zero, as the control voltage increases between 4.1V and 4.25V…

(Updated 7/30/2019, 10h20 … )

Continue reading Variable-Gain Amplifier, adapted for etching into silicon.

Why it is unsafe for common customers, to open up AC-connected appliances today.

Back when I was young, we also had appliances which connected to an AC power outlet in some way, but which operated at reduced, DC voltages. Those appliances used 60Hz transformers, to down-convert the AC voltage first, and then to rectify it.

This type of AC-to-DC power conversion is not commonly done anymore, because the transformers needed, were too bulky and expensive to manufacture. At the power-levels needed in many common appliances, one solution commonly used today is called a Buck Converter. This circuit assumes, that an arbitrary DC voltage is available, and that this voltage can be switched at frequencies of many Kilohertz. And, because Kilohertz-frequencies are used, the inductance of the main coil can also be made much lower – i.e., the coil now only needs to have far-fewer turns – of potentially heavy, enameled wire, than transformer coils needed to have, which operated at 60Hz.

But the very basis of a Buck Converter – an available DC input voltage – needs to be questioned in itself, not because the AC wall outlet offers AC power, but because again, the simplest way to rectify that AC power needs to be applied, which also uses the fewest and smallest physical components. And so one solution which people may imagine, is that we might just connect a rectifier to the wall outlet, and then some small capacitor to the output of the rectifier. But this is a complete non-solution, because if any load-current is drawn, this would also cause a strong, DC current-component to flow from the wall outlet. This would actually be counter to electrical codes and prohibited!

And so what the Electrical Engineer might think of next, if he did not know circuit theory, is just to connect the phase-wire of the AC to a decoupling capacitor, the capacitance of which is such, that it conducts at 60Hz, but not at much-lower frequencies. But the first approximation of a circuit which results, would also be wrong, and would look as follows:

rect_simp_3

The problem here would be, that as long as the load is drawing current, and D1 conducting, C2 would reverse-charge, and would stop conducting at some point, because the reversed voltage on D1 would get blocked – successfully – by D1. The above circuit is anon-functioning circuit, which I’ve provided for reference purposes only.

This circuit can be modified however, by just adding one more diode – D2 – so that it will draw AC from the source, and deliver DC to the load, as follows:

rect_simp_2

The problem with all this has to do with the actual voltages which result. When we say that the AC voltage of our outlets, in Canada and the USA, is 110VAC, this is the ‘RMS voltage’ – i.e., the ‘Root-Mean-Square voltage’ – and is meant to count as the DC-equivalent voltage. It actually corresponds to a ‘peak voltage’ of 155.5V . But, the circuit shown, which is also the simplest way to convert pure AC into DC, actually doubles this voltage, so that the no-load voltage that appears as output, will actually be the peak-to-peak voltage, that the input had! This is because, when D2 conducts and the AC input is at its most-negative value, the voltage across C2 is actually the peak voltage, forward. And, when the input voltage goes positive, the voltage which will appear across D2 will have the voltage of C2 added to it, and will be twice the peak voltage. When D1 finally conducts, it will also cause this voltage to be stored in C1.

There are many people who might not guess, that if they open up a 110VAC appliance, there would be voltages of 311VDC inside, and if we did get a shock from that, we’d additionally be getting a shock from a capacitor, which is a component which provides high currents to go with that, if there is a sudden voltage-change across the capacitor.

(Updated 06/10/2018, 17h30 … )

Continue reading Why it is unsafe for common customers, to open up AC-connected appliances today.