Go Down

Topic: How to implement zenner regulator to solar power ATtiny85? (Read 2 times) previous topic - next topic

Nick Gammon

Just as an idea, how about using a CR2032 lithium button battery as the backup? That delivers 3V for roughly 200 mAH.

I tested a sketch using the watchdog timer on this page: http://www.gammon.com.au/power

If you supply 3V rather than 5V the power consumption in sleep mode is 4.2 uA. My calculations show the battery (at that rate) would last around 5 years.

Maybe you could have a second processor with the lithium battery on it. Its job is just to wake up every 8 seconds and monitor the solar power output. If too low, it asserts reset on the second processor, and goes back to sleep. If high enough, it releases reset on the main processor (the one powered by the solar panel) which then gets to work without brownout issues.

Quote
But still I am concerned that the solar panel will just get up enough voltage to exceed the 85 brownout; the 85 will power up and exceed the current available from the panel; the voltage will drop; brownout occur; 85 drops out; voltage rises... and so on. How do I get around this?


Does this matter anyway? It will just keep resetting until the sun is bright enough.

Nick Gammon

How about something like the MC34064?

Quote
The MC34064 is an undervoltage sensing circuit specifically designed for use as a reset controller in microprocessor?based systems. It offers the designer an economical solution for low voltage detection with a single external resistor. The MC34064 features a trimmed?in?package bandgap reference, and a comparator with precise thresholds and built-in hysteresis to prevent erratic reset operation.

dc42

#7
Oct 20, 2012, 09:13 am Last Edit: Oct 20, 2012, 11:36 am by dc42 Reason: 1

Therefore I would power the 85 from the 12v solar panel that can put out up to 24 volts. The zenner/resistor network would regulate the voltage to the 85. I was thinking a 4.3v zenner.


Why not use a 78L05 or other 5V low dropout regulator instead? It's more efficient than a resistor and zener.


However I have a couple of problems related to hysterisis that I need resolved. As the sun comes up there will be weak power from the solar panel. The voltage may be just enough to power the 85 into an unstable state but not enough to fire it up properly. To overcome this I would set the brown-out on the 85 to 4.1 volts. I would use powersaving settings on the 85 and would expect a current draw of, say, < 2ma. But still I am concerned that the solar panel will just get up enough voltage to exceed the 85 brownout; the 85 will power up and exceed the current available from the panel; the voltage will drop; brownout occur; 85 drops out; voltage rises... and so on. How do I get around this?


If you run the 85 at a low frequency, you can probably get the current consumption well under 2mA. If the situation you describe occurs, why not put a delay at the start of your program, so that you know the power has remained stable for some time before it does anything?

If you are worried that when you start the charge pump, the voltage will drop, how about putting a large capacitor across the 5V supply? That will power the 85 long enough for it to detect the drop in solar cell voltage and stop the charge pump.


Also the 85 is measuring the voltage of the solar panel through a resistor divider connected to one of its AI pins.
This voltage will be measured relative to the supply voltage to the 85 (or that applied to AREF but the AREF pin doubles as MOSI which I use to communcate with the charge controller). Therefore, when the solar panel is providing just a few volts at the start and end of the day (and below the zenner voltage), the voltage reading (as seen by the ADC) will be incorrectly overstated and the 85 will tell the charging chip to pump current into the LiPo when it shouldn't be.

Any views on how I can fix this?


Use the internal 1.1V or 2.56V reference instead of using the 5V supply as the reference.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

cjdelphi

I was thinking about this...

And I decided that if i was going to attempt this, I'd have an analog circuit, using a voltage divider, that way when the voltage rises high enough (depending on the 2 resistor values), the base of your transistor will switch on..

12v --- 30k ~~~~ . ~~~~10k  ---0v
                         .
                         .___________ base will rise to 3v,  when the solar panel reaches 12v, the base of the resistor will be 3volts.

Collector/Emitter begin to flow, which can turn on the 85 safely, using this voltage divider, the solar panel has to reach 12v.


Change the values to suit your specific needs, but any reason why this would not work?  

cjdelphi

http://www.hobbyprojects.com/unijunction_transistor/unijunction_transistor.html


A unijunction switches on at 0.5v, if so, use the resistors to give a 0.5v (ON) when the panel reaches say 5v, this ensures it to be switched on and be supplied with enough current for your 85.

I don't see unijunctions mentioned very often ever... why?

Go Up