Hi all. I was thinking again some more about what I was trying to accomplish in what was described in a previous post of mine (
thread here) - using an analog mux to switch between various fixed resistors in order to alter the timing of an RC circuit. It occurred to me that, fundamentally, all I really need to accomplish is to control the current flow going into the capacitor.
So, the idea I came up with today was simply PWM-ing a MOSFET on/off at a variable duty cycle in order to control the current flow. It seems so simple, it's almost stupid! I don't know why it didn't occur to me before.
The circuit I came up with is as follows:
I have an N- & P-channel pair to switch the current, with the 0-5V square wave to be generated by microcontroller. Lowering the duty cycle should lengthen the charge time, and vice-versa. A 100% duty cycle should leave the P-channel FET on, giving me my 'zero' setting that I talked about before.
I simulated the circuit, and it seems to work fine and do what I want. It also appears to handle the negative voltage (caused by the other side of the cap changing polarity when the 'home' switch is tripped) without issue. But I can't help feeling that there's some "trap for young players" that I'm missing, and that there may be other considerations to be taken into account.
My concerns:
- The simulator shows that both 'FETs spend a fair amount of time in linear mode (in fact, the N-channel seems to spend all its time like that). I gather that MOSFETs produce more heat when in linear mode. Will this be a problem? Or is it relative to current flow? We're only talking a couple of mA at most here for either of them.
- Will I be reducing the lifespan of the capacitor with this circuit? It is my understanding that excessive ripple current causes capacitors to heat up. Does that apply here? I don't want to prematurely degrade this particular part as I'm trying to not do any modifications or have any adverse effect on the existing componentry.