I am still, in fact, working on this project. In my last project log I was trying to find a way to enable/disable the hacked RT8299 buck regulator to give me a open-circuit voltage (Voc) reading, which is then used as the maximum power point target until the next sample is taken.
I've played with a variety of different oscillators, and eventually landed on a single Op-Amp multivibrator. It's an attractive solution thanks to the low parts count: offering a potential for significant cost reductions. The basic circuits looks like this (image courtesy of this site):
The principle is quite simple. The OpAmp acts as a comparator, comparing the voltage on a capacitor to a reference voltage. The reference is generated right off the OpAmp's output (R1 & R2), and resistor R is used to limit the charge/discharge rate of the capacitor.
This basic multivibrator circuit generates 50% duty cycle square waves, but for this MPPT application, I need something closer to 99% duty cycle (sample VOC briefly, turn on RT8299 and track MPPT the rest of the time). This can be easily done by adding a diode in parallel with resistor R to provide a fast discharge path. To control the discharge rate, another resistor is used in series with the diode.
The modified circuit ends up looking like the image below (found from this site, which contains enough interesting material to keep folks such as myself busy for entirely too long):
The only difference between this image and the actual circuit I build was that the values of R1 and R2 are flipped, effectively inverting the output duty cycle.
This circuit works well and integrates nicely with my current MPPT implementation, with a caveat. In order to get long periods (over 10sec), I need a large RC time constant. To keep cost down, I chose the largest R in my arsenal in an attempt to make the C reasonable.
Bad idea!
With a sufficiently large R, not enough current enters the input of the OpAmp (they have a required minimum, usually referred to as the "Input Offset Current"). When not enough current enters the OpAmp, the circuit no longer oscillates.
This left me with the uncomfortable position of having to chose a large C, which is more expensive.
Right off the bat, this doesn't sound like a deal breaker, until you add up the costs. After adding the cost of the OpAmp multivibrator, the large timing capacitor, the reference voltage used to regulate the output, the output comparator (an OpAmp "can" be used with sub-par results), the feedback override OpAmp (see this post for an explanation) and the Voc sampling circuit (see this post), it ends up being cheaper to use a PIC.
Somehow the universe decreed PICs to be amazingly cheap.
All this to say, I'm no better-off than I was prior to this nonsense science.
This is just part of the news. I'll post another entry with my other experiments.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.
I'd like to second (or third) a STM8 for this. :) Have my own STM8L based MPPT system in a box that I should continue to work on some time.
You have run into why most designs contain a microcontroller nowadays. They are so cheap and powerful it's hard to beat the functionality when things start to get somewhat complex (more than a simple analog signal chain).
Another option I've had some interest in are the Silego GreenPAK devices, if you want to go more of a state machine route. Too bad they only come in ridiculously tiny packages that aren't very usable by makers.
Are you sure? yes | no
The Silego GreenPAK looks interesting. If you follow that road and ask for something programmable you'll get something like the GA144.
Are you sure? yes | no
Didn't know about that, thanks for pointing it out!
Seems to be aimed at different applications though. The GreekPAK devices seem nice for this application because of their mixed-signal nature.
Are you sure? yes | no
The GA144 is extreme in many respects: massive parallel clock-less operation, compute nodes with "analog" I/O, very low power consumption unless there is something to process. However, to my knowledge, there isn't a single GA144 volume application. It's too extreme I guess.
Are you sure? yes | no
You are absolutely correct: it's hard to beat an MCU when it comes to price, and I should have known better. Somehow I was trying to be hopeful. Alas.
I've eyed the GreenPAKs before and talked with a Silego FAE about them. The development process is definitely geared towards engineering firms (i.e. companies with money), but that shouldn't be a reason not to consider them as a viable option.
Are you sure? yes | no
Working with STM8S003F3 is a good choice if you need powerful features (e.g. IAP, capable timers, SPI with CRC, I2C device) and your project is price sensitive (i.e. semi-dispensable data loggers, giveaways). I've seen 10pcs for $2.23, or 100pcs for $19.80.
https://www.aliexpress.com/item/50pcs-lot-New-STM8S003F3P6-STM8S003F-TSSOP-20-IC-8S003F3P6/32488985499.html
https://www.aliexpress.com/item/Free-shipping-20PCS-1Lot-STM8S003F3P6-8S003F3P6-ST-TSSOP-20-IC-100-New/1905432776.html
Are you sure? yes | no
Chinese sourced STM8S003F3 can be cheaper than PIC. US $2.38 for 10 pieces. It is not as cheap as 555 though, but you might he able to integrate more functions. Full hardware debugger at $2 range and they don't cripple the compiler.
https://www.aliexpress.com/item/Free-shipping-10pcs-STM8S003F3P6-Value-line-16-MHz-STM8S-8-bit-MCU-STM8S003F3P6TR/32399834476.html
https://hackaday.io/project/18286-misc-8-bit-uc-projects
Are you sure? yes | no
I used a STM8 for work years ago, and haven't looked back. But you bring up an excellent point. At $0.22 each, this is very competitive pricing. Maybe I should look again.
Are you sure? yes | no
If "interactive MPTT parameter setting" sparks your interest have a look at my...
Are you sure? yes | no