# DIY PWM sunrise/sunset, moonrise/moonset LED lighting



## FishBeast (5 Jan 2010)

Hi guys,

I have finally got something to show you guys since I first mentioned it over 4 months ago. I started studying everything I needed to know (and alot that I probably didnt) in order to make a led setup which simulates sunrise/sunset, moonrise/moonset. 

So here goes, I will start from the beginning.

The blue leds emit a max of 23 lux
The daylight leds emit a max of 43 lux
They are 1 watt leds which I like because they cost less, they are more efficient and do not produce as much heat.
There are 8 blue and 8 white in total.

I placed the leds into one of those aluminium strips which you run along the edge of carpet. I used some thermal paste between the led's and the strip and used some silicone to hold them in place. The idea is that the stip acts to dissipate the heat produced from the led's.





This setup doesn't use any led drivers. Instead I ran alot more wiring and put in a few resistors.







I used a length of 40mm pvc pipe and a grinder to cut out the openings for the leds. After this picture was taken I cut up some softdrink bottles and zip tied the cutouts over top of the light openings. You will see if you look at the youtube video I will link with this post.




Here is the link to the youtube video:
The video demonstrates the PWM in action. I sped it up so you can see it fading in and out.


----------



## jarthel (5 Jan 2010)

amazing fishbeast! I was thinking of building one myself but I just didn't have the time (I have unfinished DIY audio amps gathering dusts )

where did you get the 1W LEDs?

thanks for the reply


----------



## FishBeast (6 Jan 2010)

jarthel said:
			
		

> amazing fishbeast! I was thinking of building one myself but I just didn't have the time (I have unfinished DIY audio amps gathering dusts )
> 
> where did you get the 1W LEDs?
> 
> thanks for the reply



I bought the leds through Farnell. I beleive that they operate in the UK aswell. Here they are excellent. I buy something and receive it the next day , every time.


----------



## FishBeast (6 Jan 2010)

I have finished my prototype tonight. It is set up to fade in for 6 minutes for sunrise, fade out for 6 minutes for sunset. Then fade into moonlight over 6 minutes and stay on for another 4 hours and then fade out over another 6 minutes.

Here is a picture of the moonlight as close to how it looks to the naked eye as I could get.


----------



## FishBeast (15 Jan 2010)

I have been ironing out a few bugs in the project over the last week. I have a large voltage drop (2.5V) over each of the transistors which is making my led's dull. So I am going to play with a few things in the circuit and hopefully figure out a way to fix the problem without upping the voltage of the circuit.  Trial and error.

I also put 8 more leds in. I couldn't go past these ones. They are 3W but they pump out 150 luminems   . A full voltage the tank is very well let up.

Anyways here is a pic of the schematic so you can see how it goes.


----------



## FishBeast (25 Jan 2010)

I have pretty much finished tweaking the setup now. I have removed all but one resistor which has increased the light output greatly. There is still a little more room for some brightness although I am struggling to work out how to do it. I would have to learn more about transistors and find an adequate replacement. But for now the setup works well.

One bug which I need to iron out in time is the timer for the atmega8 isnt working accurately. Apparently there are a number of factors which come into play here and will take quite some time to study enough to be able to solve the problem.

To get around the timer problem for now all the program is designed to do is fade in, stay on for 10 or so mins then fade out. Then moon phase starts. So I have a timer which turns the setup on to simulate the sunrise. Then the timer switches the setup off. Then the timer switches back on before the T5's turn off and then stays on until the moonlight phase has stopped, then switches off.


----------

