Damn that week went fast!
Here is the circuit I promised:
The only parts not in the current design are U1 and R1
U1 is a voltage detector. I used one I had on hand which has a trigger voltage of around 4V and a hysteresis of about 200mV. It also has no inbuilt delay.
R1 here simply turns on the mosfet. In real life, it would be connected to the microcontroller's output. I used a 680 ohm resistor.
Also note that during testing, a resistor was placed across C1 to give a current draw of approximately 500uA. The voltage detector draws 1 to 2 uA.
My power supply was set for 5.65V (for no really good reason) and current limited to 50mA. The load was a 100 ohm resistor.
This is the scope with the input shorted. I have photographed the display so you can calculate voltages and times as well. This is the reference unless otherwise noted. (Oh, and I'm using a 10x probe)
This is the voltage across the device. Note that it has a minimum of about 0.3V because I wasn't using a very fancy mosfet The short pulses are the mosfet being turned off to charge the cap.
If we change the horizontal timebase we can see that it takes a little over 0.1ms to charge the capacitor, and with this load, 1.4ms to discharge the capacitor.
Looking at the voltage across the capacitor, it falls to a little under 4V (the trigger voltage of my voltage detector) before rising to a little above 4.5V.
Looking at that in more detail (note that this is AC coupled), you can see a small dip as the voltage detector triggers, drawing current before the mosfet switches off, then another dip just after the voltage reaches a peak as the mosfet's gate is charged (the time it takes for the voltage detector to fully turn off may be a factor here as well).
Vgs of the mosfet shows the capacitor slowly discharging followed by the mosfet being turned off and then on.
The stunningly well placed cable hides the fact that the vertical amplifier is set to 0.2V/div for both traces, and the horizontal timebase is 0.5ms/div. The ground reference for these traces is the bottom and middle graticule. This is with the same 10k (500uA) load.
Changing to a 220k load (about 22uA) and the delay between charging cycles extends to a little over 15ms. This is a little less than you might expect, but acceptable. The charging period should remain the same at around 0.1ms, so less than 1% of the time is taken charging the capacitor. (You might say it looks more like 0.25ms -- and indeed it does)
If there are any problems in getting the microcontroler to regulate the capacitor voltage, then this circuit (the addition of 2 components) should get the job done.
Here is the circuit I promised:
The only parts not in the current design are U1 and R1
U1 is a voltage detector. I used one I had on hand which has a trigger voltage of around 4V and a hysteresis of about 200mV. It also has no inbuilt delay.
R1 here simply turns on the mosfet. In real life, it would be connected to the microcontroller's output. I used a 680 ohm resistor.
Also note that during testing, a resistor was placed across C1 to give a current draw of approximately 500uA. The voltage detector draws 1 to 2 uA.
My power supply was set for 5.65V (for no really good reason) and current limited to 50mA. The load was a 100 ohm resistor.
This is the scope with the input shorted. I have photographed the display so you can calculate voltages and times as well. This is the reference unless otherwise noted. (Oh, and I'm using a 10x probe)
This is the voltage across the device. Note that it has a minimum of about 0.3V because I wasn't using a very fancy mosfet The short pulses are the mosfet being turned off to charge the cap.
If we change the horizontal timebase we can see that it takes a little over 0.1ms to charge the capacitor, and with this load, 1.4ms to discharge the capacitor.
Looking at the voltage across the capacitor, it falls to a little under 4V (the trigger voltage of my voltage detector) before rising to a little above 4.5V.
Looking at that in more detail (note that this is AC coupled), you can see a small dip as the voltage detector triggers, drawing current before the mosfet switches off, then another dip just after the voltage reaches a peak as the mosfet's gate is charged (the time it takes for the voltage detector to fully turn off may be a factor here as well).
Vgs of the mosfet shows the capacitor slowly discharging followed by the mosfet being turned off and then on.
The stunningly well placed cable hides the fact that the vertical amplifier is set to 0.2V/div for both traces, and the horizontal timebase is 0.5ms/div. The ground reference for these traces is the bottom and middle graticule. This is with the same 10k (500uA) load.
Changing to a 220k load (about 22uA) and the delay between charging cycles extends to a little over 15ms. This is a little less than you might expect, but acceptable. The charging period should remain the same at around 0.1ms, so less than 1% of the time is taken charging the capacitor. (You might say it looks more like 0.25ms -- and indeed it does)
If there are any problems in getting the microcontroler to regulate the capacitor voltage, then this circuit (the addition of 2 components) should get the job done.