A little project I've been working on - Page 1
Forum section: electronics / general

author: Red Squirrel
author_rank: Super Contributor
timestamp: July 17, 2016, 03:43:00 am
content: ... and it took longer than I care to admit, but it's DONE! Well still need to do some painting and cosmetic touches.Basically it's a portable solar system for camping or emergency power. Has some 12v plugs and a micro controller to track voltage, if the voltage is too low it starts a count down timer and shuts off. Original plan was for it to BE the charge controller too but ran into some last minute issues and I just wanted to get this done by end of this week so I re-introduced the existing charge controller.Note to self: next time I will learn to get a proper PCB made, it was more work than it was worth to wire this by hand.The actual system:Inside:That wiring is a huge mess but oh well, it's hidden. I was really rushing near the end, doing stuff like this on a week off is a bad idea, time off seems to go by about 10x as fast as normal time.Folding solar panel:Original plan was to make the box bigger so I can store stuff in it like an inverter and battery chargers and stuff, but think I'll just get a tool box and put that stuff in. There is a board that goes over all the wires, then it makes a small compartment to put a few items, like the solar panel power cord and a few lights.Going to bring it on a camping trip, should come in handy to charge up flashlight batteries, have lighting in the tent etc. I had it last year but it was strictly just the charge controller and battery hooked up to the plugs, so no auto shut down or way to know what the voltage was, which is good so you don't run down the battery too much.

author: mikron
author_rank: Contributor
timestamp: July 17, 2016, 10:06:26 am
content: Quote from: Red Squirrel on July 17, 2016, 03:43:00 amOMG!

author: MK14
author_rank: Super Contributor
timestamp: July 17, 2016, 11:02:12 am
content: In electronics the neater and better the wires/connections/project looks, usually/often the more reliable and less likely it is to short circuit or the wires fall out etc.Although microcontrollers seem to be used with just about everything these days. I'm not entirely convinced that a (presumably) simple solar charger/power pack really needs such a system.You can have a simple two way toggle switch labeled, "Charge" and "Output Socket", or even a three way switch, or two switches. Then maybe 1 or 2 leds, to show what is happening and some simple electronic circuitry to watch/control it all.I.e. No microcontroller needed ?Adding an arduino? system to it, makes it a lot more work, with not necessarily much useful gain in functionality. It may drain your batteries and waste power as well.

author: SeanB
author_rank: Super Contributor
timestamp: July 17, 2016, 11:15:00 am
content: Quote from: mikron on July 17, 2016, 10:06:26 amYes, those normally are really big, about 2 light hours across at a minimum. Making one that is hand held, even without the regular definition of human hand, is pretty amazing.

author: Brumby
author_rank: Unknown
timestamp: July 17, 2016, 02:43:09 pm
content: Quote from: SeanB on July 17, 2016, 11:15:00 amNot at all.The galaxy is on Orion's belt.......

author: Seekonk
author_rank: Super Contributor
timestamp: July 17, 2016, 03:39:31 pm
content: Tell us about your circuit, doesn't look like MPPT. A little $2 2596 module on ebay can be made to operate at power point with just the addition a a transistor and not much more. That is portable!

author: Red Squirrel
author_rank: Super Contributor
timestamp: July 17, 2016, 04:31:20 pm
content: My original plan was to do some form of MPPT, but I ran out of time near the end when I ran into an issue with my circuit - overlooked the fact that mosfets have to be driven low side, without some added complexity so I went back to the old controller. I'm honestly not sure what kind of system that controller uses, it's not PWM as I put my scope on it, but for the price I doubt it's MPPT. I will probably revisit it at some point and also redo all the wiring. I was doing the wiring harnesses while the actual box was still curing (glue for switches etc) in the garage so had to guess on wire lengths. The shape also makes it very hard to do anything inside. Live and learn. Next design - whether it's another solar system, or completely different project will be more flat so there is an easier work area. The somewhat modular design with the slide in circuit board turned out kind of neat though.The main idea behind the MCU is being able to detect and set low voltage threshold so I can have it auto power off if battery is below a certain voltage. It uses a latching relay for on/off, that way the relay does not use up battery power. I can connect a laptop with USB to configure some parameters as well, and calibrate. i have it set to 15 minute shut down time if voltage goes below 10.5v. Idealy I would probably turn of loads manually before it gets to that point. That parameter can be changed though, just have to connect the USB port to a PC. Uses a MCP2221 for the serial interface.The current reading does not work though, I've never been able to get shunt readings to work properly, I always end up with too much noise and it jumps around a lot. I might cheat and use a premade current sense IC instead when I choose to revisit it. There's an issue where when you power on a big load the MCU resets, which to me is really odd because I can't imagine it taking the battery voltage down low enough for that to happen. I might just try adding a bigger capacitor after the 5v regulator. I have a 2200uf one lying around, I figured that would be overkill so went with a 320uf one.So still some issues to iron out but in general it works and will come in handy for camping or if power goes out. When I learn more in depth electronics I want to design a single circuit board that will have the charge controller, a separate 12vpsu for output power, and an inverter all built in. The whole thing would be way more miniaturized as well. Could even make it use 18650 cells, though I like the idea of lead acid because it's stable in harsher environments, like camping where it might hit 25C or hotter outside.

author: MK14
author_rank: Super Contributor
timestamp: July 17, 2016, 05:33:05 pm
content: Lithium type batteries are usually much lighter, relative to the power they can store, compared to lead acid batteries. If you are carrying it by hand, somewhere. By car does not matter that much.But if you need a wide temperature range, then that might make a significant difference in battery choice.All the complexity you describe, explains why you are using an MCU. I'm just surprised someone would want to give so much complexity and functionality to a solar power source, which is (presumably) only occasionally used.

author: Kilrah
author_rank: Unknown
timestamp: July 17, 2016, 08:54:57 pm
content: +1. To me it seems the only thing that's needed is a siren that starts blaring when the lowest desired voltage is met, so that you can then manually power down the loads you feel are less important at the time

author: Seekonk
author_rank: Super Contributor
timestamp: July 17, 2016, 09:19:43 pm
content: I have a UNO running a whole house, multiple arrays, water heating, refrigeration, and pumps. For a display I have two blinking LED. People make things complex because they want to.

author: Red Squirrel
author_rank: Super Contributor
timestamp: July 17, 2016, 09:38:13 pm
content: Quote from: Kilrah on July 17, 2016, 08:54:57 pmStill need an MCU for that, whether I have it set off a siren or a relay, it comes up to the same thing. Though, there may be a way to do it with analog electronics to turn a transistor on or off when a certain (low) voltage is reached, but I'm still a noob so not aware of a way to do that. MCU was the easy way out.This was also most or less just of a fun thing to do, was my first MCU project outside of an Arduino.. Well I still used Arduino code, so kinda cheated. The serial interface menu was kind of fun to make too. I need to build a menu framework for projects of this nature though, a lot of the code was duplicated and it was kinda a mess.I still want to revisit the circuitry so I can design my own controller too, and even an inverter, and maybe even a 12v PSU for the output (instead of being connected straight to the battery and outputting whatever voltage it's charging at). Basically one board that does it all, also would double as a basic UPS if I add an AC in option. I don't think I will modify this one, but if I decide to revisit this project I'll probably build a whole new one. Making one that uses a bunch of 18650 cells could be interesting too but nice thing with lead acid is it's a more stable tech that is not as likely to catch fire if something goes wrong.Probably a reason why cars and telcos still use lead acid. Can just give it float voltage and it's happy.

author: tautech
author_rank: Super Contributor
timestamp: July 17, 2016, 10:15:24 pm
content: Quote from: Red Squirrel on July 17, 2016, 09:38:13 pmThese make that relatively simple:http://www.intersil.com/en/products/power-management/power-supply-support/supervisory/ICL7665S.html

author: Brumby
author_rank: Unknown
timestamp: July 18, 2016, 03:43:09 am
content: Quote from: Red Squirrel on July 17, 2016, 09:38:13 pmThere are some very simple ways to do that with just a handful of components.Here's one idea you could play with...The important thing for this circuit is that the supply to the 555 needs to be a constant voltage for the detection to work. They can run down to 4.5V, so running a regulator off a 12V battery should have no problems - even if the battery is a bit sick. Output on pin 3 can sink or source up to 200mA.

author: apis
author_rank: Super Contributor
timestamp: July 21, 2016, 05:02:28 pm
content: Looks nice!You might find this circuit interesting as well:http://256.uk/?page_id=68(This looks like an older webpage about the same project:http://www.256.co.uk/)He (Julian Ilet) has been working on an Arduino MPPT charge controller as well, but I think that is experimental still. (Info on the same website)He also have a lot of videos explaining in a lot of detail how it's intended to work, etc:https://www.youtube.com/user/julius256/videos

author: lapm
author_rank: Frequent Contributor
timestamp: July 22, 2016, 03:49:56 pm
content: Quote from: Brumby on July 18, 2016, 03:43:09 amJust remember heatsink that regulator if its linear one. 7 Volts voltage drop and 0.2A current means nice 1.4W power loss. Depending on regulator this might cause thermal issues or not...

author: aandrew
author_rank: Frequent Contributor
timestamp: July 22, 2016, 04:37:12 pm
content: Don't forget an undervoltage cutoff for the monitored battery voltage. No sense killing the batteries because you left them connected accidentally over the winter and forgot to disconnect them...Also a CMOS version of the 555 would be a good idea to help minimize current draw, along with a high-ish value series resistor on those pots to help reduce the current draw of the sensing circuit.

author: Red Squirrel
author_rank: Super Contributor
timestamp: July 22, 2016, 10:09:32 pm
content: Just got back from camping and used this. One issue I did notice with my circuit that I overlooked is that even when the master switch is off, the solar panel will actually power the LCD, the problem with this is that the battery is not in circuit, so it delivers a ridiculously high voltage to the circuit. We had too much crap on top of the box (it made for a nice table in the tent) so check how hot the 5v reg was getting, but pretty sure the 20 something volts was over it's limit. I quickly disconnected the solar panel when I noticed this.We were able to use the mattress pump with this, charge phones and other stuff, so it came in real handy. Also had a super bright 12v led light that would light up the whole tent. Voltage display was nice as it gave a good idea of how much juice we can get out of it. At one point we were watching TV episodes on a laptop and I had it on the inverter for a while but it started to use up too much power. There was not much sun that day.One feature I need to add to this is the ability to charge it with AC 120v power though, so I can keep the batteries topped up when it's just in storage. I can probably add a small battery tender in there and a computer style plug on the outside. I do want to redo the wiring at some point too, it was a rush job as I wanted to bring it camping and the days were running out. I need to come up with some kind of backplane mechanism, so that I can take out the circuit board assembly without even disconnecting wires. Though idealy if I make any changes to this or the circuit I'll take the time to learn the PCB side of Kicad and just have a PCB made.What would be neat is to make a PCB that has the solar charge controller, pure sine inverter, and 120v charger circuit built right in. It would be somewhat multi purpose as it could technically act as a dual conversion UPS if you plug it in the wall. The solar would take priority if available. Probably end up using two MCUs for that, since the LCD takes up a lot of pins on it's own.

author: Brumby
author_rank: Unknown
timestamp: July 23, 2016, 01:24:14 am
content: Quote from: lapm on July 22, 2016, 03:49:56 pmThe 555 can run on a wide range of supply voltage. 5V, 15V or anywhere in between is fine - just pick a number that you can reliably depend on. This will help.As for current - there's no need to pull that sort of current from the 555. Just get the output to simply drive the base of a BJT where the load it switches runs from the unregulated supply. Only the 555 supply needs to be regulated ... but even then, you really only need the control pin (pin 5 usually) to be supplied with a stable reference voltage for the comparators to function properly.

author: bollio
author_rank: Contributor
timestamp: July 23, 2016, 03:25:04 am
content: Quote from: Brumby on July 17, 2016, 02:43:09 pmI feel this I going to be under appreciated...

author: T3sl4co1l
author_rank: Super Contributor
timestamp: July 23, 2016, 07:12:05 am
content: Quote from: bollio on July 23, 2016, 03:25:04 amThat's because people are panicky idiots, and you know it!...Tim