Hi, I am new to Arduino and have only simple electronic knowledge. I have set up a 12v shaftless skylight system using a solar panel and LED lights though a Victron controller to bring the voltage down to 12v. The LEDs flicker when the panel is in partial shade so I have added a battery to the system. The controller runs the LEDs through the battery and they work as I hoped, and the controller will manage the battery charging intelligently. My problem is that the lights now stay on when the panel is not providing power, so I want to set up a relay that I can program to switch on and off when it is daylight.
I realise that this is probably not a new problem but I do not have enough knowledge find a solution so I am after pointers to topics that may cover this problem or what components I will need to research to put the hardware together. I want to do as much of this project on my own but need help to get started.
Cheers.
My problem is that the lights now stay on when the panel is not providing power, so I want to set up a relay that I can program to switch on and off when it is daylight.
Permission granted. How will you know it is daylight? Specifically, how will the Arduino know that it is daylight?
If you are going to do the switching, not the Arduino, then the Arduino doesn't need to know, and all that it needs to do is read the state of the switch that defines whether the LEDs should be on or off, and set the relay pin accordingly.
I can't imagine what you need to research.
Thanks for the reply.
I intend to use some sort of timer, and my research so far suggest something like a DS1307. The controller and battery are in the roof, so a light sensor will be problematic. I was thinking about using the output from the solar panel but that may be a later refinement when I understand more about setting up this system.
Regarding research! I first heard about Arduino today, this is a completely new field of knowledge to me!
If you want it to be based on time, you can get timers that plug into an outlet and switch it based on the schedule you input. Plug a 5V wall wart into one of those and use it to switch a relay for the lights.
That's the easy way of course. If you want to do it the Arduino way, feel free to ignore this suggestion.
Three ways I can think of.
- timed switch. Simple on/off based on time, or maybe you can get sunset/sunrise times from some web site and add that as a lookup table to your system so it follows the actual sunlight hours. You'll need some external time input, either from an RTC or if you're using an Internet enabled microcontroller such as the ESP-8266 you can grab the current time over NTC. Advanced: regulate the brightness during the day, following a sine function, to simulate the actual brightness of the daylight.
- brightness. Add a brightness sensor to the roof, or another convenient place, and you can switch on the lights at a specific brightness, and off again when it gets dark. Advanced: have the brightness of your LEDs follow the brightness of the light outside.
- solar power supply. Maybe you can find a way to tap into your charge controller, so your Arduino can sense whether it's charging or not, and switch or even regulate the LED brightness accordingly. It may be hard to follow outdoor brightness this way.
Thanks for your replies, I will have to ponder them.
What I had in mind was a timer attached to a board that controlled a relay. I don't know the simplest board I can use. Once I get the system running as I want it I will then play with refinements such as you suggest.
Greybear:
\What I had in mind was a timer attached to a board that controlled a relay. I don't know the simplest board I can use.
Timer + relay is all you need indeed, in the simplest form.
Thank you for your interest, wvmarle. My knowledge is not enough to do anything yet, so I have just purchased an Arduino starter kit to start the process. Until I can solve my problem I will just have to use the switches I originally installed. Nothing is quite like spending many hours to save a few seconds a day, but the payoff is in acheivement. I am using the Ladyada lessons first. Cheers
Greybear:
Hi, I am new to Arduino and have only simple electronic knowledge. I have set up a 12v shaftless skylight system using a solar panel and LED lights though a Victron controller to bring the voltage down to 12v. The LEDs flicker when the panel is in partial shade so I have added a battery to the system.
Which exact Victron Controller do you have?
the 75/15. I thought I could use the Streetlight function but that goes to off after sunrise I have found and according to a person that works with them.