Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
|
Forum Index : Microcontroller and PC projects : 28 pin 170 solar powered
Author | Message | ||||
OA47 Guru Joined: 11/04/2012 Location: AustraliaPosts: 911 |
I have a project using a 28 pin 170 and MMBasic 5.3 which is powered by a solar panel and in turn is maintaining charge on a 12v lead acid battery. The panel is fed into a 5v reg then to a 3.3v reg to power the 170 etc. The 170 has a 10k/100uf rc network for a delayed start. I am having occasional issues with lockups due to the low output voltage of the solar panel. Is there a way I could use a zener or similar to restrict the 5v reg from supplying the 170 power until a decent voltage is reached? GM |
||||
crez Senior Member Joined: 24/10/2012 Location: AustraliaPosts: 152 |
2017-05-08_023405_turnon.pdf I had a similar problem with a duinomite controlled solar battery charger I designed. The duinomite would not boot reliably with a slow rise in supply voltage. I fixed it with the circuit shown. when the input voltage reaches a high enuf level, q7 begins to turn on which turns on q6. positive feedback thru r12 gives a fast rise time, keeping the duinomite happy. In your case q7 could be bc559, z5 could be 9v and you might have to play with the resistor values. I can't seem to upload the picture at the moment. I'll try again later. I couldn't get 'upload picture' to work, so it's there as a PDF. |
||||
MicroBlocks Guru Joined: 12/05/2012 Location: ThailandPosts: 2209 |
Use a supervisory chip. This monitors the voltage and makes sure the microcontroller gets clean power or else it keeps it in reset. This prevents lockups as especially in brown out situations the microcontroller execution can get corrupted. On everything i design i always include one as they are cheap and do their job perfectly. Microblocks. Build with logic. |
||||
CaptainBoing Guru Joined: 07/09/2016 Location: United KingdomPosts: 1986 |
+1 http://www.microchip.com/wwwproducts/en/MIC803 |
||||
crez Senior Member Joined: 24/10/2012 Location: AustraliaPosts: 152 |
yeah, I was going to mention them too... |
||||
isochronic Guru Joined: 21/01/2012 Location: AustraliaPosts: 689 |
The pic survives an aborted power-up without problems but can your software ? It is not unlikely, that the voltage from the panel can drop out at a bad time, you need backup power for the electronics ed - The point here, is that AFAIK the MMBasic interpreter writes to flash memory during start up [I guess there is an erase sequence there as well]. So if the power drops out during start up, obviously the start up is not completed. In fact erasing flash memory is a spike of maximum power use, and the power supply has to be solid for it to work at all. I have seen dodgy systems flicker into the ground on low battery voltage - the system sees low voltage and shuts down and stops drawing current, after a while the battery/power does a dead-cat bounce and the voltage rises a little, the system then attempts a power up and draws current for a second, the voltage drops again...and again...ugly. |
||||
MicroBlocks Guru Joined: 12/05/2012 Location: ThailandPosts: 2209 |
Maybe add a supercap of 1F to have some extra power available when the main power is going down. You could use a pin to monitor the main power to detect it and do a controlled shutdown. Microblocks. Build with logic. |
||||
Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3165 |
It only does this on the first startup after being programmed. After that it should be immune from rapid power loss/restore. Regardless, a bouncing power supply is not a good thing. Geoff Geoff Graham - http://geoffg.net |
||||
MicroBlocks Guru Joined: 12/05/2012 Location: ThailandPosts: 2209 |
@Geoff, Would it not be possible to fill the flash with the right values when programming the chip. The routine that fills the flash at the first startup could then be skipped. This would then also prevent the verify errors you get when programming with IPE or others. My sequence is. Program a chip. (This gets a verify error). Read the content and save it to a file. Use that file to program other chips. This works fine and also does not give a verify error. Theoretically you could end up with a bricked firmware when the very first startup is interrupted by bad power supply or bad contact. Microblocks. Build with logic. |
||||
OA47 Guru Joined: 11/04/2012 Location: AustraliaPosts: 911 |
Done a bit of experimenting over the last week and the software/ pic chip side of things looks to be holding up ok. The area that seems to be the most trouble is the initiation of the ILI9341 display on boot up during low light circumstances. In a previous version I used the battery that is being charged to supply the LCD and cct but this was not being efficient. I have managed to place a 40v/6800uF cap across the solar input and this seems to be overcoming the problem. I will have to see what value of electrolytic across the 3V or 5V rail will have the same effect. (the size of the 40V electro is not at all small) Graeme |
||||
Print this page |