User avatar
Imperf3kt
Posts: 3235
Joined: Tue Jun 20, 2017 12:16 am
Location: Australia

Re: Raspberry Pi - Sunrise/Sunset Timer for Christmas Lights

Mon Dec 17, 2018 4:25 am

This project looks interesting, but more complex than necessary. Wouldn't a couple of diodes pointing at the sun do the same job?
When exposed to sunlight, they'll produce a small voltage which can probably be detected via the GPIO and then switch stuff on or off.
On when voltage is low / none, off when voltage is high (i.e. The sun is out)

It's essentially how those cheap solar garden lights work, they detect sunlight and turn the led off while switching their charging circuit on. When the sun goes down, they do the opposite.
55:55:44:44:4C
52:4C:52:42:41

User avatar
scruss
Posts: 2824
Joined: Sat Jun 09, 2012 12:25 pm
Location: Toronto, ON
Contact: Website

Re: Raspberry Pi - Sunrise/Sunset Timer for Christmas Lights

Mon Dec 17, 2018 3:08 pm

That would require the sun to be visible from where you have the Raspberry Pi. Also, you couldn't do things like "turn the lights on half an hour before sunrise" with it, as a sensor can't be proactive. So we use ephemeris.

Cheap garden solar lights are marvels of "just enough tech to work". They use a very cheap PWM controller to switch between charging and lighting. Shame they all use NiCd batteries - but I've had ones still light up despite 5 Canadian winters and ant/spider infestations.
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.

User avatar
rpdom
Posts: 16127
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Raspberry Pi - Sunrise/Sunset Timer for Christmas Lights

Mon Dec 17, 2018 9:55 pm

scruss wrote:
Mon Dec 17, 2018 3:08 pm
Cheap garden solar lights are marvels of "just enough tech to work". They use a very cheap PWM controller to switch between charging and lighting. Shame they all use NiCd batteries - but I've had ones still light up despite 5 Canadian winters and ant/spider infestations.
One reason they use NiCd batteries is that you don't need a complicated charging circuit for them. NiMH would be better, as that also doesn't require the complexity that LIon or LiPo must have and has a better capacity.

User avatar
Imperf3kt
Posts: 3235
Joined: Tue Jun 20, 2017 12:16 am
Location: Australia

Re: Raspberry Pi - Sunrise/Sunset Timer for Christmas Lights

Tue Dec 18, 2018 1:06 am

rpdom wrote:
Mon Dec 17, 2018 9:55 pm
scruss wrote:
Mon Dec 17, 2018 3:08 pm
Cheap garden solar lights are marvels of "just enough tech to work". They use a very cheap PWM controller to switch between charging and lighting. Shame they all use NiCd batteries - but I've had ones still light up despite 5 Canadian winters and ant/spider infestations.
One reason they use NiCd batteries is that you don't need a complicated charging circuit for them. NiMH would be better, as that also doesn't require the complexity that LIon or LiPo must have and has a better capacity.
I was under the impression it was also because they stand up to abuse much better than other kinds of batteries.
Although, all recent solar lights I purchased included a 14650 or an 18650, but were considerably more than a couple of dollars.

Anyway, we're drifting off topic. I see now why my idea wasn't as great as I first assumed.
55:55:44:44:4C
52:4C:52:42:41

Len-Tikular
Posts: 24
Joined: Tue Dec 24, 2013 5:54 pm

Re: Raspberry Pi - Sunrise/Sunset Timer for Christmas Lights

Tue Dec 18, 2018 11:05 am

scruss wrote:
Mon Dec 17, 2018 4:15 am
Yes, it can be done. Will we do it for you? Unlikely. We'll help you learn, but the process is all yours.

How big a flag? How tall a pole? Do you have mains power nearby?

You'll need limit switches for stepper motors, unless you can guarantee the flag mechanism will never slip.
Many thanks for the reply,
Agreed, limit switches would be a good idea,
Pole would be max 20Feet tall, flags would be no bigger than 5'x3',
Should we move this to another thread to avoid any confusion here. ?

I already have 2 Pi's rev 1, a 16x2 LCD Pi Face , a motor control board with 2 relays and 4 pushbuttons and a Pi Gertboard along with 2 stepper motors 1.8deg 200 steps 4 wire. I guess I'll need a stepper motor driver board to drive the 2 steppers.

Thanks

George

Return to “Automation, sensing and robotics”