I am fooling around with a solar panel, just to try stuff and learn in the process (not trying to produce something I would actually use).
Its placement is very far from optimal - vertically behind a window pointing south-west. In the late afternoons it gets somewhat close to optimal conditions - sun light coming from a decent angle. The rest of the time it works off ambient light more or less.
Under these circumstances, it produces around 18-20V open circuit. But when I connect a load (let's say 60mA) it quickly drops to 5V (these numbers vary a lot depending on the conditions).
This is all normal and to be expected, but I was wondering if there is an easy way to squeeze more power from it. So I read about solar charge controllers, MPPT, etc. I could just buy one and be done, but my goal is not to actually use the panel for anything (I just bought it because it was relatively cheap and sounded like a fun gadget to play with). So, I am trying to see what I can do myself with parts lying around.
So far I have come up with this:
simulate this circuit – Schematic created using CircuitLab
The Load is an adjustable step down buck converter, with a beefy 1000uF cap across its output, which is then powering an arduino pro micro through an INA219 voltage and current monitor breakout and has an LCD attached to display voltage and current.
The arduino and LCD consume about 60mA at 5V. I can also attach additional load, like a LiPo battery charger and its current consumption will also be measured.
The regulator is pretty bad for this application (it consumes 10-20mA itself), but it is the only one I got which will work with these input voltages.
Now, to the point: The whole idea of this circuit is to keep the solar panel voltage near its maximum power voltage. When the panel voltage drops (due to insufficient current) bellow some threshold (which I can adjust with the pot) the comparator will output low and cut the ground of the load through M1. This will result in the panel voltage increasing (due to no load) and the comparator outputs high again, allowing current to flow through the load. Then the voltage would drop again etc. etc.
The result is rapidly switching the load on and off, but keeping Vcc near its optimal value, which should result in increased power output.
If the panel produces enough power, Vcc will not drop bellow threshold voltage and the whole circuit will behave more or less like if the load was directly connected to the panel.
It sort of works - I was able to power the arduino through it at noon, while connecting the load directly to the panel would not. So there is at least some minimal gain.
But then I noticed that M1 got a bit warm to the touch. In my (very little) experience this indicates that the NMOS is not always fully open or fully closed. Which is strange, because its gate is fed from a comparator, so it should be always either very close to GND or the zener voltage (which I measured around 5.4V). Looking at the data sheet of IRF510, it does seem completely possible that it is not fully on at 5.4V.
But then I decided to check the gate voltage with an oscilloscope. Note that it is not a real professional oscilloscope, it is something I made myself (an arduino measuring analog voltages as fast as it can and sending the data over serial to the PC). So it is slow, inaccurate, but still fairly useful in many cases.
Here is what gate voltage looks like:
And here is Vcc (panel voltage):
So it does the job somewhat, but it seems M1 is constantly driven in the "intermediate" region (never fully on or fully off). Which means Rds is not as low as it should be and there are power losses as result. The heat is not a problem by itself (it doesn't get really hot, just a bit warm to the touch), but losing power like this in this application is a little embarassing :)
Any idea why the gate voltage is not sharp rectangular wave from ~0V to ~5.4V?
Can it be the switching speed? According to my "wooden" scope, it is around 14.6Kz, which should be no problem for IRF510. Or am I wrong?
Or is the comparator being a bad boy and not outputting sharp LOW and HIGH values, but something inbetween?
Or is it something else?
Oh and while writing this I just realized I should move the pullup on the comparator output from the zener voltage to Vcc, so the HIGH output is higher voltage. I guess it will improve things, but not solve the problem with "intermediate" voltage levels at the gate. I just have to be careful, as Vcc can go above 20V, which is the maximum gate-source voltage specified for IRF510.
EDIT: Due to lack of answers and my failure at understanding what is going on I reworked the circuit, so instead of the LM2903P comparator I am now using an ATTiny85 - same form factor (DIP8) and for the moment doing the same thing ... almost. I added hysteresis and ditched the potentiometer (replaced by a fixed voltage divider), because I can now control the threshold voltages in software.
Now, things look like they should:
Green (channel 1) is panel voltage and red (channel 2) is MOSFET gate voltage.
I am now powering the ATTiny from a voltage regulator (the same one that used to be at the front of the load), the MOSFET is now BS170 instead of IRF510 (because of the lower gate threshold).
Power consumption went up a little - the ATTiny is sampling the ADC constantly, no time to sleep it, which consumes ~10mA, compared to the less than 1mA power consumption of the comparator IC, but it is not that much of a big deal.
This does shift the problem to software (which is my comfort zone) and opens up a lot of possibilities, but completely misses the point of the whole exercise - to learn more about electronics.
So, I would still love to know - what was wrong with the original circuit using a comparator IC, and why it didn't produce the nice square waves, like the ones I get with the microcontroller.