Arduino controlled outdoor solar system

Hello i am about to start my first arduino project. I would like to build and program an outdoor solar lighting system. I would like it to charge itself from a solar panel and when needed a 120 volt charger, but only when need. The battery bank will be a number of 12 volt batteries. Also i would like it to monitor the amount of sunlight, know what time it is and what day of the week it is to decide which bank of lights to turn on. The LED's will be of different wattage depending on location. I have a general idea of how to proceed but any suggestions would be greatly appreciated.

Thanks

I have a general idea of how to proceed

Care to share that?

but any suggestions would be greatly appreciated.

Really? Any?

Proceed in small steps. Get one feature working at a time. There are plenty of projects similar to what you want to do, such as charging the batteries. Google is your friend.

Also i would like it to monitor the amount of sunlight

Without recording it, monitoring it seems pointless. What, exactly, are you intending to monitor? Just light/dark is not going to tell you much.

know what time it is and what day of the week it is

An inexpensive RTC is the best option.

The LED's will be of different wattage depending on location.

Better think about how you are going to power them, then. The Arduino isn't going to.

I was thinking of a teal time clock and a relay bank controlled by the arduino. And yes i was thinking about data logging for the amount of light/dark to decide when to turn on and off.

Since you refer to 12V batteries I guess these are lead-acid batteries in which case you can get a reasonable estimate of charge level from the voltage.

You can use a Light Dependent Resistor (LDR) to measure the daylight brightness.

If you want some of the logic to depend on time-of-day then you can add a Real Time Clock (RTC) module .

There are relay shields available which can switch low current and voltage. You will need to work out how much voltage and current you want to switch and see if you can find a compatible shield/board.

If this is going to be configurable then this implies some additional complexity but the extent depends how you're going to configure it, and we have no clues about that yet. If you're willing to have all the behaviour hard-coded in the first version then so far you haven't introduced any behaviour that would require complicated code.

You don't need to log anything to know when to turn lights on. Just use a light dependent resistor or phototransistor to detect the light level. If it fall below your chosen level the lights should be switched on.

You can work out the time of sunset and sunrise from here to eternity mathematically. All the monitoring necessary for the sun's behaviour was done thousands of years ago.

...R

PeterH:
If this is going to be configurable then this implies some additional complexity but the extent depends how you're going to configure it, and we have no clues about that yet. If you're willing to have all the behaviour hard-coded in the first version then so far you haven't introduced any behaviour that would require complicated code.

Being new to all this can you explain complexity based on configuration and behaviour hard-coding?
thanks

Handymanscott:
Being new to all this can you explain complexity based on configuration and behaviour hard-coding?

No, I can't. Only you can explain what behaviour your project needs to provide relating to configurability. All I can say is that hard-coding behaviour is generally easier than making it configurable.

Being new to all this can you explain complexity based on configuration and behaviour hard-coding?
thanks

Generally speaking, it's a trade-off between making your application flexible at the cost of having to add more code and possibly hardware.

For example, taking this requirement:

[charge] when needed [from] a 120 volt charger, but only when needed

Your system is going to have to decide on some criteria when to charge. Let's assume that you measure the voltage of your battery bank and decide, that if it's an hour before sunset and the voltage is less than 12.4V, you'll charge for half an hour.

So there are three parameters in play - how long before sunset do you wait before you assume that the solar isn't going to do the job; what voltage indicates a charge is needed and how long will you charge for.

The simplest solution is to have these values in your sketch (preferably as const) and if you ever need to change them, you can simply edit the sketch and upload the new copy. It might be more convenient though if you could adjust these variables without having to attach a PC to do so. A simple way might be to have some potentiometers that you analogRead to get those numbers, or you might have a menu system driven by a keyboard and LCD display.

If you're happy being close enough and don't mind reloading the sketch a bunch of times, the hardcoded route is simpler. If you want to be able to fine tune the system to minimize AC charging, perhaps reloading the sketch repeatedly will become burdensome. N.B. if the latter, you'll likely need a much more intelligent algorithm that the example given above.

I understand what you have told me and it sounds simple enough. Is also makes me think of other things I might want it to monitor and take into consideration when it making decisions. Now I just have to start looking at hardware and getting a better handle on the language.