Solar Battery Charger

Hi,

I'm completely new to microcontroller world, i build a solar battery charger using MCP73833 & it charges lithium poly battery 3.7V 1200mAH and then i'm using voltage booster to boost it to 5V so i can charge cell phone or mp3 or ipod with it. I also have a backup battery that kicks in if lithium battery is not charged. Now my teacher wants to make this project more complicated by adding microcontroller functionality to it.

Like I said earlier i never worked with microcontroller, i came across Arduino that its easy to learn and use. I want to add this somewhere in my project it can do any functionality either display battery charge on LCD or as switch between backup battery and lithium battery or anything else.

Please help with this...Thanks

Hi there. Well, we really only have a couple of rules here, one of which is be specific - so if you could, tell us exactly what you want us to help you with.

To get you started tho, I'll say that yes, you can use the arduino to display charge on an lcd (you will have to monitor the battery's voltage using the arduino and "graph" that). As for switching between backup and lithium, I am pretty sure you can find an ic for that task.

Thanks for replying....I know switching can be done with an IC and I already have ICL7673 that does it for me, but can you guide me how i can display charge left in battery.

Since your battery will be running at 3.7v max(-ish), it's safe to monitor it's voltage without a voltage divider. I'd double check this with someone else, because I've never done this myself, but I am pretty sure all you really need to do is plug in a wire coming from the battery's + lead into an arduino's analog pin (the only reason I question this is because I don't want you frying your board because I missed something). Then, using the analogRead() function, you can monitor the analog version of the ratio between your battery's voltage and 5v. You'll need some baselines, so you'll want to use a multimeter to measure the actual voltage of the battery and record the value your Arduino reads (or you can just do the math and equate the ratios - x/1023 = Vin/5v - where x is the output of the analogRead() function).

Once you get all that, all you need to do is "graph" it on your choice of lcd. The simplest option is an LCD w/ a HD44780 chip (very common lcd driver). You can read how to run it here:

If you want to simply write the percent-battery left, you'll want to find what the battery's (or the boost regulator's - which ever comes first) cutoff voltage is, and do some more math to figure out how much percent battery life is left depending on what you get for Vin - (should be something along the lines of (Vin - Cutoff) / (Vmax - Cutoff) = x / 100

where x is your percent value, vmax is the maximum battery voltage (should be around 3.7V), vin is the actual voltage, and cutoff is the cutoff voltage for either battery or boost reg.

hope this helps and hope I didn't make a mistake somewhere :wink:

Thanks alot for your help man, like i said i have never used microcontrollers before so its gonna take me lil bit longer to understand all the functionality and can you advice me which arduino kit to order which will be suitable for this?

and also if you know where can I get the LCD from aswell.
Thanks

I prefer (although others may not agree :wink: ) Sparkfun for arduino-related orders:

And also adafruit:

Now, depending on the setup you will have, you'll need to choose the appropriate arduino variation:

But you should start with the Uno (the basic board to get started with), preferably in a "starter's kit", that way you can first get the feel for the IDE, the language, and the board with some practice tutorials and a bunch of components in the kit:

^ this kit should get you started well.

For the lcd, a simple one would be

but if you want to be more fancy, you can use any on this page:

(the graphic ones would let you draw some more complicated stuff, and of course give you access to a relatively large array of pixels, whereas the first lcd is a simple character-style 16 columns by 2 rows setup, so you have access to 32 characters to display)

Thanks Bro...lemme get started and please keep in touch as I will need help on da way!! :slight_smile:

For compact Arduino functionality in "permanent" projects I prefer the RBBB (unless it's something like my weather station project, where I needed shield compatibility to make it easy to add Ethernet). It's small, cheap, and doesn't add the cost of the USB chip to projects that don't need it.

Note that you'll also need something like their P4 board or BUB to connect the RBBB to a PC for programming. But I only need one to program the 5 RBBBs I have, so it's a big savings if you're planning to make multiple gadgets.