- Does anyone know why (with the circuit below), once I lower the supply voltage lower than 1.85V, (and I measure the Vout at as -2.59V on the negative side of C2), the voltage then suddenly takes a dive towards 0V and LED starts blinking. Lowering the input slightly more, then stops the LED lighting up at all?
I don' think that configuration is a true 2-stage pump, the capacitors would need to be driven by complementary signals, not in-phase ones. The pump probably isn't able to generate enough voltage to overcome the forward voltage of the LED and 3 diodes.
I'm not sure how your simulator works, but it looks like the other end of the square wave generator isn't connected to anything. Is that how it's supposed to be? I would have expected it to be connected to 0V.
- Also, when I removed C3 from the junction of diodes 2 and 3 above, I found the inverter was more linear for some reason. Why? I found at low voltage (1.85) I could attain a 1mA current, whereas I couldn't with C3. Also, the frequency to supply voltage has a more linear inverse proportion (as shown in the 3rd table as compared to the 2nd table below). Why?
I don't know, I would have expected it to work worse than before. The middle capacitor is meant to be a reservoir that the first (right) stage can pump charge into on the upstroke, and the second (left) stage can pump charge out of on the downstroke. Without it I don't think it can be a true two-stage pump. Though that really won't matter for the way you've wired it since it's still a doubler even with 1 stage.
I don't like this setup very much though. If you look at my circuits you'll see that both ends of the diode chain are connected to 0V. I did this for a very specific reason, which you can see if you take a closer look at your circuits. With both ends connected to the same voltage (0), there is absolutely no chance for current to flow when the pumping signal is not engaged.
It is an entirely different story when the anode end is connected to a positive voltage. With a 18.V LED and 3 x 0.4V Schottkies being all that's in the way between the +V and GND, that adds up to about 3V worth of forward voltage. That is dangerously close to the fresh battery voltage. Any more than that and you risk overcurrenting because you only have diodes to provide resistance. If you hook up 3.3V or (heaven help you) 5V for testing or programming you're going to get very large, uncontrolled currents even if the pumping signal is disengaged.
From the beginning, I wasn't expecting a linear relationship between input voltage and frequency. I was expecting it to be more like a reciprocal function. The frequency should increase sharply as the input voltage is lowered. I don't think you can linearize it without making it much more complicated. Instead of worrying about deriving a formula to calculate the frequency as a function of voltage, make a static lookup table as an array of voltage-frequency pairs. Read the voltage, find the nearest voltage in the table, and pump that frequency. You'll need separate tables for green and red, but that's an easy thing to deal with.
- Lastly, in running both a green (voltage ok) and red (voltage low) RG led, could I power each of the anode pins via a separate digital pin (say D4 and D5), and in the sketch turn on both D9 + D4 for say green or D9 + D5 for red (based on reference voltage measurement)?
I've got a better idea, a bit similar to that but just a tiny bit different. I hadn't thought of it before until just now.
Swap the LED and the leftmost Schottky so that the LED is now on the left end of the string. Connect the anode end to 0V, and put back in the middle intermediate reservoir capacitor, but make it much bigger than the pump capacitors, like 10uF. I'd go for at least 10x bigger. Have the two LEDs in parallel on the left side output, and connect their cathodes to different Arduino pins. Now it's a booster instead of an inverter, but it's still much the same really. The current is still being pumped from right to left through the diode chain, the only different is which end the LED is on.
With the pump signal off, it doesn't really matter what level the Arduino pins are at. If they're LOW, the LED will have no voltage across it, and if they're HIGH then they're LED will be reverse-biased (and also have no current). Most LEDs should be able to handle up to 5V reverse bias voltage like this LiteOn one (though usually not much more), so there's no danger of anything bad happening. You will need to engage the pump for there to be any current flow.
When you want to light one of the LEDs, make HIGH the LED you want off and LOW the one you want on, then start the pump signal. With the two LEDs in parallel like that, the current will all flow into the one that needs less voltage to turn on. For the LOW LED, that voltage is just the forward voltage of the LED itself. But for the HIGH one, that voltage is the forward voltage + the pin voltage. Because the HIGH LED will require much more voltage to turn on, all the current will get dumped into the LOW one.