The magic is that the inverter self-bias. Yep, that's right: the output and the input converges itself to about ½ Vcc; the slight discrepancy is due to unequal gate strength, and makes the output slightly toward 0V (for CMOS, N-channel is "stronger" than a P-channel because the motility of electrons is about 3 times the motility of holes)rainwarrior wrote:A question about using an inverter as an amplifier: to accomplish this, we need to bias the input to some middle voltage? Right? (2.5v?)
VRC7 and 5B amplifier investigation, also VRC7 LFO reset!
Moderator: Moderators
- Jarhmander
- Formerly ~J-@D!~
- Posts: 569
- Joined: Sun Mar 12, 2006 12:36 am
- Location: Rive nord de Montréal
Re: VRC7 and 5B amplifier investigation, also VRC7 LFO reset
((λ (x) (x x)) (λ (x) (x x)))
Re: VRC7 and 5B amplifier investigation, also VRC7 LFO reset
Yup, and that's most of what the external resistor is doing there. It means that if you take the Vin vs Vout curve in the inverter, and plot that on top of a transposed version of the same, it'll self-bias to where the line crosses its transposed version.rainwarrior wrote:A question about using an inverter as an amplifier: to accomplish this, we need to bias the input to some middle voltage? Right? (2.5v?)
The same is true for the Famicom/NES's internal amplifiers, and even the one inside the Famicom's microphone.
I'd be a little surprised if that were the relevant topology.Would a voltage divider inside the 5B before the inverter input account for the highpass strength? For example if I put the input from pin 2 through the middle of a 10k / 10k divider, it seems to lower the cutoff from ~145Hz to ~30Hz.
My hunch, as I tried to say before, is that the functional mixing circuit is something like this:
Code: Select all
audio from 2A03 ------10k-----+
|
----------+ +-----1uF----...
inside 5B | |
ideal source--5k--|----1k-----+
|
----------+
Only because of the external resistor to provide external negative feedback! Without that resistor, it'll just rail.Jarhmander wrote:Yep, that's right: the output and the input converges itself to about ½ Vcc
Uhhh.. sort of.N-channel is "stronger" than a P-channel because the motility of electrons is about 3 times the motility of holes [and therefore] makes the output slightly toward 0V
It's straightforward to design an inverter with any choice of properties you want. But that has nothing to do with CMOS vs NMOS, instead only with the properties (dimensions, doping levels, &c) of the transistors inside.
So while it's true that if you used the exact same dimensions of nMOSFET and pMOSFET, the self-bias voltage would be lower. But there's no reason that the IC designers will have chosen to make the two transistors the same size.
Furthermore, I know the MMC5 is NMOS. I suspect the 5B is also, but really don't know. The datasheet for the YM2149F says it's NMOS, but the YMZ284 datasheet says it's CMOS.
- rainwarrior
- Posts: 8732
- Joined: Sun Jan 22, 2012 12:03 pm
- Location: Canada
- Contact:
Re: VRC7 and 5B amplifier investigation, also VRC7 LFO reset
Ah, yes I can see in LTspice how that affects the cutoff in the same way.lidnariq wrote:My hunch, as I tried to say before, is that the functional mixing circuit is something like this...
Jahrmander wrote:The magic is that the inverter self-bias. Yep, that's right: the output and the input converges itself to about ½ Vcc...
Ah, this is interesting. Thank you.lidnariq wrote:Yup, and that's most of what the external resistor is doing there. It means that if you take the Vin vs Vout curve in the inverter, and plot that on top of a transposed version of the same, it'll self-bias to where the line crosses its transposed version.
- rainwarrior
- Posts: 8732
- Joined: Sun Jan 22, 2012 12:03 pm
- Location: Canada
- Contact:
Re: VRC7 and 5B amplifier investigation, also VRC7 LFO reset
I'm sure I'm missing something important here, but I figured I might as well try this just to see what it LTspice says. This appears to shift the cutoff way down compared to the op-amp version?
Edit: same as below with the PMOS backwards, and the cutoff was like 1.5Hz but it was horribly broken in this configuration anyway.
Edit: same as below with the PMOS backwards, and the cutoff was like 1.5Hz but it was horribly broken in this configuration anyway.
Last edited by rainwarrior on Sat Sep 15, 2018 1:21 pm, edited 3 times in total.
- Jarhmander
- Formerly ~J-@D!~
- Posts: 569
- Joined: Sun Mar 12, 2006 12:36 am
- Location: Rive nord de Montréal
Re: VRC7 and 5B amplifier investigation, also VRC7 LFO reset
Your pMOS transistor is reversed. Flip it vertically i.e. exchange the drain and the source.
((λ (x) (x x)) (λ (x) (x x)))
- rainwarrior
- Posts: 8732
- Joined: Sun Jan 22, 2012 12:03 pm
- Location: Canada
- Contact:
Re: VRC7 and 5B amplifier investigation, also VRC7 LFO reset
Thanks, now it's working better. Now it looks more like what I expected, and I can see the 2.5V bias and proper amplification now in transient mode which I could not before. (Wish I could figure out a way to quickly switch between the transient and ac analysis modes.)
After doing this, the new cutoff appears to be ~14 Hz, so it's lowered, but not quite as drastically as with the transistor backwards. (With the op amp version it was more like 175 Hz.) Equivalent to putting more resistance... somewhere...? (Sorry if these are silly questions. I'm just playing around, seeing if I can learn anything at all here.)
After doing this, the new cutoff appears to be ~14 Hz, so it's lowered, but not quite as drastically as with the transistor backwards. (With the op amp version it was more like 175 Hz.) Equivalent to putting more resistance... somewhere...? (Sorry if these are silly questions. I'm just playing around, seeing if I can learn anything at all here.)
- rainwarrior
- Posts: 8732
- Joined: Sun Jan 22, 2012 12:03 pm
- Location: Canada
- Contact:
Re: VRC7 and 5B amplifier investigation, also VRC7 LFO reset
Incidentally the 47µF capacitor (5V-GND) appears to fail a quick ohmmeter test (measures as a steady 500 ohms). Maybe I should consider replacing it.
I do have a crummy digital scope. I might try to measure their response later, just to try and verify that I'm not trying to replicate something that's in a broken state. (I've also asked someone else I know with a Gimmick cart to record my test, for similar verification.)
I do have a crummy digital scope. I might try to measure their response later, just to try and verify that I'm not trying to replicate something that's in a broken state. (I've also asked someone else I know with a Gimmick cart to record my test, for similar verification.)
- rainwarrior
- Posts: 8732
- Joined: Sun Jan 22, 2012 12:03 pm
- Location: Canada
- Contact:
Re: VRC7 and 5B amplifier investigation, also VRC7 LFO reset
Looking more closely at my earlier test of LFO reset now that we finally have a proper patch set dump...
Apparently we can reset the tremolo LFO, but not the vibrato LFO. I had mistakenly assumed they would both work the same in that respect, and wasn't too careful about testing both. I've revised the lfo_vrc7 test ROM I made earlier to differentiate this.
Edit: a better method of resetting LFO was found! See this post. The VRC7 has a test register at $0F, and bit 1 of this register holds both LFOs at 0 (resetting and halting them). Toggling this bit does reset them!
Apparently we can reset the tremolo LFO, but not the vibrato LFO. I had mistakenly assumed they would both work the same in that respect, and wasn't too careful about testing both. I've revised the lfo_vrc7 test ROM I made earlier to differentiate this.
Edit: a better method of resetting LFO was found! See this post. The VRC7 has a test register at $0F, and bit 1 of this register holds both LFOs at 0 (resetting and halting them). Toggling this bit does reset them!
- rainwarrior
- Posts: 8732
- Joined: Sun Jan 22, 2012 12:03 pm
- Location: Canada
- Contact:
Re: VRC7 and 5B amplifier investigation, also VRC7 LFO reset
I finally got around to replacing the capacitors on my Gimmick! board. Re-ran the previous tests, including the sweep test from before.
The results have only changed slightly, so that's probably a good sign that previous results were valid (i.e. I didn't need to replace the capacitors): Still kinda sad that I broke one of the tabs on the cart shell while opening it. It will never close quite the same.
The results have only changed slightly, so that's probably a good sign that previous results were valid (i.e. I didn't need to replace the capacitors): Still kinda sad that I broke one of the tabs on the cart shell while opening it. It will never close quite the same.