check out this voltage regulator:
I used this circuit on a motorcycle I owned. I made a couple of changes: flipped all the polarities around in order to switch the low side of the field, and substituted a mosfet for the darlington. It worked pretty well. Now I have a couple of questions.
1) About cap C1 that rolls off the higher frequencies so T1 doesn't oscillate: How does one calculate the rolloff frequency? -- it's worth knowing for practical and theoretical reasons.2) I think it would make sense to put a cap in series with R4, making the positive feedback transient and ensure a minimum PWM frequency in order to keep the headlight from flickering, a problem I had. The original circuit uses hysteresis, so the switching rate depends on external factors -- charging system, wiring harness, loads. f = 1/(2RC)? If so, then adding 0.01 uF in series with R4 at 120 k would ensure predictable switching at a bit over 400 Hz. Did I get this right?