chipKIT Max32 and Solar Panels

Hi there I'm totally new to Arduino and have a compatible chipKIT Max32. On my kayak I'm placing a battery (12V sealed lead acid) and two 12V 2.5W solar panels (in parallel so 12V 5W in total for around 400mA on a good sunny day), it's going to be used to power some small lights and hopefully a fish finder.

I'm wondering with my Arduino if and how I would connect it all up to record how much energy is being made by the panels and how much is being used by the equipment connected to it. Is the 512k flash RAM enough to store the programming needed and a few hours of data logging or is this the kind of thing where I'd need to have it connected to a PC or some kind of data storage shield?

Thanks for any help you can offer!

No-one? Can I just connect the Arduino to the 12V battery with the solar panels forming a triangle then charging the battery and connected to an Analog input pair? They produce about 14V (although I guess could potentially surge a little higher :-s ), is that too high for the analog inputs? Or would I need to connect the panels on a switch so at any one point they are either charging the battery or connected to the arduino. I am a total noob with this and don't want to fry anything. I was lucky enough to get the board for free but really don't know what I'm doing with it lol

It sounds like what you want to do is totally do-able. There are some things that are not clear. Do you just have a chipKIT Max32 or do you also have an Arduino. If you have an Arduino which one do you have?

The Max32 has 128K of RAM and 512K of Program space. The program space can be used to store data, but depending on how much you want to store you may want to use an external SD card. The easy way to store data in the program space is to use the virtual eeprom that uses program space. There is only 4K of space reserved for the virtual EEPROM.

If you want to measure voltage grater than the Vref of the microcontroller (3.3V for the Max32 and 5V or some other voltage depending which board you have) you need to divide down the voltage with some resistors. If you do not divide down the voltage you will blow the pin and possible the whole chip.

The amount of memory you need to store your data depends on the amount of data and how often you want to log the data.

To record energy you need to measure voltage and current, calculate power and the integrate power with respect to time. The easiest way measure current is with a current sense resistor, if you are only measuring current coming from the solar cells you can get away with this. If you want to measure energy in and out of the battery you need to level shift the current measurements so that you don't put negative voltage into the ADC's when the current runs in the opposite direction.

Good luck,

Jacob