Solar power question

Hello,

i am building regulator for driving solar pump (vacuum heat-pipe collectors system for heating water). Simple configuration with 2 temperature sensors (first in boiler, second in collector) and circulation pump output. Everything will be realized on stand-alone arduino.

I am planning to power everything up with solar panel, since i don't need the system works through the night (without batteries, only solar panel). Pump (with MPPT) will be powered directly from solar panel and microcontroller via LM7805 regulator (so minimum input voltage should be around 7,5V).

My question is what will happen in the morning or in the evening, when the sun will go up/down and there will occur power ripples. I don't want that the whole system will flash on and off or freeze in that time so i am wondering if there is any circuit that could turn the system up only when there will be enough sun light for stable work, or how else could i solve this problem?

I've got 30W solar panel and Topsflo MPPT solar pump (6-24V)

Worst than that is that the rise time on the power supply will be insufficient to trigger the internal reset.
So you need to gate the regulator with a voltage comparator, and add some hysteresis in so as not to oscillate.
I haven't seen such a circuit but it should not be too hard to design.

There are chips that are designed for that sort of thing, for example MC34064.

However what might work would be to enable brown-out reset in the Atmega processor and couple that with a lengthy delay in startup.

The brown-out ensures that the chip is held in reset if the voltage is low, the delay stops things flashing on and off rapidly.

Your "no battery" requirement makes the problem very difficult to solve. If I were in your shoes I'd just be tying the pump to the solar panel and letting it fly on its own -- when there's enough sun to run the pump then your solar collector is going to be hot enough to require circulation.

MPPT refers to how power from a solar panel is maximized by controlling the output current. It's a function of the charge controller -- not the pump.

Grumpy_Mike:
So you need to gate the regulator with a voltage comparator, and add some hysteresis in so as not to oscillate.

A solar panel will report a high voltage the moment it goes open circuit. You'd need to toggle the switch on the regulator between a dummy load so there's always some current being pulled from the panel while you're measuring the voltage.

MPPT without a battery simply doesnt work.
Trying to run a pump off a solar panel by itself wont work either
unless the capacity of the solar panel is so big that it can supply the pumps start current
in the low light conditions early in the morning.
You need a battery in between the solar panel and the pump.

Chagrin:
Your "no battery" requirement makes the problem very difficult to solve. If I were in your shoes I'd just be tying the pump to the solar panel and letting it fly on its own -- when there's enough sun to run the pump then your solar collector is going to be hot enough to require circulation.

I need regulator anyway, i must solve this somehow (or use aditional batteries).

I didn't think this will be such a big problem..

I know for one regulator which is able to do that so i am wondering how they solve it.. It's called UVR61-PV and it can work directly from PV panels.
http://www.ta.co.at/en/single-triple-circuit-universal-controller-uvr61-pv

Quote
"Operation without a charge controller is also possible using PV panels with outputs greater than 25 W"

If i understand it correctly i need some kind of circuit which will turn output off, if input will be lower than for example 5V. I looked in the datasheet of MC34064 that you recommended but i am not quite sure how exactly it works and how should i connect them. Please correct me if i am wrong.

-Power supply from my PV panel is connected to LM7805 and than to MC34064 and microcontroller
-Reset pin from MC34064 is connected to microcontroller reset pin. If output of LM7805 will be lower than 5V microcontroller will be reseted all the time.. Is that correct?

I read something more about this settings here - AVR Tutorial - Fuses

I understand why brown-out stands for and it looks like this is exactly what i need. If voltage will be lower than for example 4,3V chip will turn off and reset them.

Couple that with a lengthy delay in startup. The delay stops things flashing on and off rapidly.

Is this watchdog fuse?

If i understand it correctly if i set this BOD and long delay i shouldn't get CPU freezing. I am planning to include option to disable solar pump in case that PV modul voltage is lower than 10V. So in first place i only need to power microcontroller and actually if the whole circuit would flicker a few times in the morning/evening and don't freeze after that.. I am tottaly satisfied :slight_smile:

delay.png

Reset pin from MC34064 is connected to microcontroller reset pin. If output of LM7805 will be lower than 5V microcontroller will be reseted all the time.. Is that correct?

Yes the idea is that the chip holds the processor in reset.

Is this watchdog fuse?

No, the watchdog is something that fires after an interval of up to 8 seconds elapses.

If i understand it correctly if i set this BOD and long delay i shouldn't get CPU freezing.

You shouldn't, but I wouldn't promise until I tested it.

Ok, how can i set this startup delay than? Also with fuses?

I am using ATmega8 with 16 MHz external oscillator and ATtiny with internal 8 MHz clock.. Which BOD settings would you recommend to start with? 4,3V?

No, just in setup. eg.

void setup ()
  {
  delay (20000);  // wait 20 seconds
 
  // other stuff
  }

That way if there is just a glimmer of sunshine which cuts out after a few seconds the sketch hasn't done anything useful.

Great, i would never thought on that kind of solution.. Just learned something new again :slight_smile:

First i will try only with this delay and BOD settings.. If system will freeze i will also try with MC34064 (or equal).

Now i've got only one more question about setting BOD.. I read a lot about how to set fuses but always with AVR-DUDE. Since i don't have any other programmer (i am burning bootloaders with UNO) i am wondering if is it possible to set BOD fuse in "boards.txt" file in arduino hardware file and burn bootloader with new fuse settings again?

This is part of "boards.txt" file of "optiboot-v5.0" for ATmega8. Can i just add or change fuse settings for getting correct BOD here and burn bootloader again?

atmega8o.name=[Optiboot] Arduino NG or older w/ ATmega8
atmega8o.upload.protocol=arduino
atmega8o.upload.maximum_size=7680
atmega8o.upload.speed=115200
atmega8o.bootloader.low_fuses=0xbf
atmega8o.bootloader.high_fuses=0xdc
atmega8o.bootloader.path=optiboot
atmega8o.bootloader.file=optiboot_atmega8.hex
atmega8o.bootloader.unlock_bits=0x3F
atmega8o.bootloader.lock_bits=0x0F
atmega8o.build.mcu=atmega8
atmega8o.build.f_cpu=16000000L
atmega8o.build.core=arduino:arduino
atmega8o.build.variant=arduino:standard

That should work, but double-check your fuses or you can brick the processor by turning off the "it can be programmed" fuse.

http://www.engbedded.com/fusecalc

Ok, so i should change only low and high fuses, nothing else..

Since i am using external 16 MHz crystal i choose "Ext. crystal HIGH frequency" and "BOD level at 4V".

Regarding fuse calculator for this settings low fuse should be 0x3F and 0xD9 for high fuse. Can you please just check if that's ok? Processor is ATmega8.

luxy:
Ok, so i should change only low and high fuses, nothing else..

Those are the only two fuses!

luxy:
Since i am using external 16 MHz crystal i choose "Ext. crystal HIGH frequency" and "BOD level at 4V".

Regarding fuse calculator for this settings low fuse should be 0x3F and 0xD9 for high fuse. Can you please just check if that's ok? Processor is ATmega8.

Looks OK. Only change the low fuse, the high one is more dangerous (RSTDISBL and SPIEN are the ones you have to not change).

Ok, only low fuse than.. I will test this today with BOD and startup delay settings, PV module and 7805 regulator. If i won't get any freezes that's it (will report later).

I just tested everything together.. I connected PV module on LM7805 with a few capacitors and set microcontroller BOD level to 4,3V and startup-delay to 10 seconds. I tested it with 2x16 LCD and two NTC10k thermistors. I tested it with ATtiny85 (multiplexed LCD).

I was measuring voltage after LM7805 and covering PV module. When it fallen under about 4,3V everything stopped (numbers on LCD freezed) and when i uncovered PV module (voltage above 4,3V ) microcontroller reset itself and start working again. I bolded "about" because sometimes if i covered PV module just for a second (voltage around 3,8-4V) and then uncovered it immediately, microcontroller didn't reset and has worked on.

If i make a conclusion, after 15 minutes of testing (with this i mean covering and uncovering PV modul to get voltages around 3,5-4,5V) i didn't get not a single freeze! :slight_smile: After i will finish the whole project i will test it in real conditions but for now i am completely satisfied with results.

I am also planning to measure voltage of PV module all the time and if it will be lower than 10V, i won't start the pump.

Nick, thank you for all your help! After i will finish the project i will report how it will work in real conditions.

sometimes if i covered PV module just for a second (voltage around 3,8-4V) and then uncovered it immediately, microcontroller didn't reset and has worked on.

Do you have a filter capacitor on VCC? Quite possibly it had enough charge to keep the processor going for a second.

Yes i do.. I thought that should be a reason.

Hello,

i said that i will report about my "solar-without batteries project" and here are first, more serious results.

For now everything is still on breadboard but whole circuit is almost completed (version with lcd display). After a few days of testing and playing with code everything works like it should. Up till now i didn't get not a single system freeze. If voltage of PV module is lower than 10V for more than 5 seconds i disable solar pump and enable it if voltage is higher than 16V for more than 5 second. The same is with lcd display only that it is disabled if voltage is lower than 8V for more than 5 seconds and turned on if voltage is higher than 10V for more than 5 seconds.

Next step is to make PCB and test the whole system at different weather conditions.

Conclusion: So far so good :wink:

Excellent. I hope my next project goes that smoothly. At least I haven't seen smoke yet. :wink: