Automatic Street Lightning

Created a small project to control a relay using LDR, potentiometer is used to control sensitivity of the LDR.

http://www.youtube.com/watch?v=d6u0i6AjQ98&feature=youtu.be

Thanks

Dr Watson,

That's a nice little project. Do you have plans to package it and put it in a project box?

Pat.

Hi Pat,

Ah yes , we have a company that builds LT control panels for transformers, street lightnings etc. Currently the vendors ask for a time tracking automatic control system ( which starts at 100$ depending on which company L&T, GE etc). Time based circuit uses small cells in them which require maint. every half yearly or so . If they are not maintained and in case of power failure they loose track and it messes up the whole system , when a manual intervention is required. So as a small prototype developed this circuit , This will drive another big ass relay that controls the power to an array of street lights. I am not sure how this will behave when it will be on 24/7 how sturdy it will be etc . I will test this in my front yard for couple of days to see its behavior.

The connecters were used so that we can adjust it according to the enclosure and can extend wires if required. since it uses an LDR we cant place it just below street light , will be somewhere in shade and potentiometer will control the sensitivity. Even if this fail it was a good learning for me :).

Thanks

Nice idea, you could do this with an atTiny85 and reduce the size/price. You could also use the MCU's internal clock and save the price of the external crystal and it 2 capacitors. Another idea to possibly get rid of the potentiometer is track the maximum & minimum brightness the LDR reads and then set the relay trigger point as a percentage of this value. Over time one can assume the maximum value would be bright sunshine and minimum would be a moonless night and your dawn/dusk value would be a fixed point between the two. This could account for variations of components there positions in the final enclosure.

Hi Riva,

Thanks for the suggestion. I have never worked with atTiny would try it out. Price wise there wasn't much difference thats why I didn't started with that. I didn't knew you can work with the internal clock only. Are there any disadn. of using internal clock versus crystal impl. ? Can we use its internal clock like a RTC ? I think removing external crystal will really simplify the circuit/soldering stuff. Apart from keeping it flexible I added a potentiometer is to bypass the LDR if required , in real world situation something like a backup. We already accounted for bypassing the entire circuit in case required.

Thanks

dr_watson: Hi Riva,

Thanks for the suggestion. I have never worked with atTiny would try it out. Price wise there wasn't much difference thats why I didn't started with that. It depends where and in what quantities you need but them but Mouser price the tiny less than half that of the mega328. Add to this the reduced PCB size needed for the tiny and you could save even more money & time. Using internal clock will also reduce costs as your 2x capacitors and 1x crystal better off.

I didn't knew you can work with the internal clock only. Are there any disadn. of using internal clock versus crystal impl. ? The internal clock may not be as accurate as a crystal but for timings of a few seconds/minutes it may not drift to much. Can we use its internal clock like a RTC ? I think removing external crystal will really simplify the circuit/soldering stuff. How long a duration are you trying to measure? I would not even use a crystal controlled arduino as an RTC to measure more than a few minutes as clock speed will vary with temperature. Also loss of power will mean clock needs setting again.

dr_watson:
I didn’t knew you can work with the internal clock only.

All AVR chips can do it, they all have various options for system clock.

dr_watson:
Are there any disadn. of using internal clock versus crystal impl. ?

No.

dr_watson:
Can we use its internal clock like a RTC ?

It has calibration but really it’s not accurate enough to tell time.

(neither is a crystal, if you want RTC you have to add an RTC module)

Neat! I recommend a 100nF cap between 5v and gnd of your atmega to stabilize voltage. You should consider RTC with temperature compensation for timing. Adafruit sells chronodot that you can try. Without temp compensation the crystal will be stiffer in winters and less stiff in summers, resulting shift of time. Most crystals for rtc yiu see on ebay are probably for weist watches that assume close to body temperature.