The Godfather talking
You can run, but you can't hide.
Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
November 28, 2024, 03:35:03 15:35


Login with username, password and session length


Pages: [1]
Print
Author Topic: Chicken Clock  (Read 4416 times)
0 Members and 2 Guests are viewing this topic.
mick the mend
Active Member
***
Offline Offline

Posts: 109

Thank You
-Given: 109
-Receive: 101


« on: April 11, 2011, 07:03:13 19:03 »

A friend has asked me if I can build a timer to control a door lock/opener to operate twice a day - open just after dawn and close just after dusk. I was going to use a simple Pic and LCD. I would like to use Flow Code but at my age I can't get my head round the logic so any guidance would be welcome. I don't mind building the lookup table for the calender timing as that part is just boring (365 open 365 close) bugger the leap year.
Logged
sphinx
Hero Member
*****
Offline Offline

Posts: 918

Thank You
-Given: 614
-Receive: 270



« Reply #1 on: April 11, 2011, 07:26:19 19:26 »

use a photo resistor that you use for sensing light/dark then just a relay for it to open as soon set lightness is ok then when it gets dark close circuit no need for either pic or lcd

/regards
Logged

laws of physics are not laws at all, just assumptions and formulas that work as long as we don't figure something new that wrecks the calculations. the infinite onion try to peel that one
Wizpic
Global Moderator
Hero Member
*****
Offline Offline

Posts: 1203

Thank You
-Given: 554
-Receive: 409



« Reply #2 on: April 11, 2011, 09:34:47 21:34 »

You can just buy a On-at-dusk Off-at-dawn light controller for a few dollars and use it's signal. It will have all the circuitry to prevent undesirable operation due to lightning flashes, car headlights, etc.

http://www.amazon.com/ACE-DUSK-DAWN-LIGHT-CONTROL/dp/B000UEIAEY
http://www.touchandglow.com/Dusk-To-Dawn-Light-Controls-s/4.htm


That takes all the fun out in building one and our hobby :-)
Logged

When you think, "I can't do anymore. I need a break," that is the time to challenge yourself to keep going another five minutes. Those who persevere for even an extra five minutes will win in life..
solutions
Hero Member
*****
Offline Offline

Posts: 1826

Thank You
-Given: 656
-Receive: 905



« Reply #3 on: April 12, 2011, 06:30:46 06:30 »

 Roll Eyes Yes..and you can wave your hand over the light sensor and it's "dusk" any time of day....with a flashlight, the "sun" can rise all night. 

There may be a RTC chip or app note for a micro, arduino, or whatever, that'll get you there with a clock. 

Speaking of which, you can take the minute and seconds hands off a clock movement, use a brass hour hand, and use it as a 12 hour switch pole by drilling a hole in the clear plastic cover...mechanical contact or optical switch from there....if that's too James Bond for you, a simple wall timer running on the mains will do it as well
Logged
oldvan
Senior Member
****
Offline Offline

Posts: 372

Thank You
-Given: 154
-Receive: 107


If the van is a Rockin'...


WWW
« Reply #4 on: April 12, 2011, 09:06:13 09:06 »

Many PIC24F family have RTC built in, takes care of the clock issue with limited pain.

The MacGyver options add more adventure for sure.

New feature idea:  Fox detector that does NOT open the door if a fox is waiting in a dinner jacket & carrying a fork.
Logged

Give a man a fish and you feed him for a day.
Teach a man to fish and he will sit around in a boat drinking beer all day.
Ichan
Hero Member
*****
Offline Offline

Posts: 833

Thank You
-Given: 312
-Receive: 392



WWW
« Reply #5 on: April 12, 2011, 05:48:10 17:48 »

Negative side of RTC is it need battery or capacitor backup, once it missing the timing will be messy. Imagine how to change that little backup battery and / or re-ajdusting the RTC on the top of street lighting pole. Got this kind of problematic once, with a remote sensing device which is located deep in the forest.

-ichan
Logged

There is Gray, not only Black or White.
oldvan
Senior Member
****
Offline Offline

Posts: 372

Thank You
-Given: 154
-Receive: 107


If the van is a Rockin'...


WWW
« Reply #6 on: April 12, 2011, 08:33:19 20:33 »

Ichan:  Most people I know don't raise their chickens on top of street light poles, lest all the eggs are scrambled.   Grin

Could say phooey on RTC, go GPS like I did on my garage clock 9 years ago.  http://oldvan.com/garage/

When the stated goal is dawn and dusk, a photo-sensor seems most sensible and least expensive.  Maybe the
chickens don't want out as early on dreary days anyhow.
Logged

Give a man a fish and you feed him for a day.
Teach a man to fish and he will sit around in a boat drinking beer all day.
mick the mend
Active Member
***
Offline Offline

Posts: 109

Thank You
-Given: 109
-Receive: 101


« Reply #7 on: April 12, 2011, 08:51:45 20:51 »

Ok all, this isn't a joke.
The clock chip is all very well but dawn and dusk varies by hours during the year so not a lot of use. using a light sensor has been tried without success as hens KNOW when dawn is regardless of the actual light levels which vary a lot depending on weather etc. Cockerels aparently start making a noise BEFORE dawn if they are locked in so 30 mins before dawn is needed.
What I had in mind would be to program in actual times based on the date using a lookup table

My mate would like to be able to vary the opening and closing times

Thanks for the silly comments though
Logged
Ichan
Hero Member
*****
Offline Offline

Posts: 833

Thank You
-Given: 312
-Receive: 392



WWW
« Reply #8 on: April 12, 2011, 09:14:15 21:14 »

Haha.. you are right Oldvan, chicken will not like that. The Solar powered lighting pole is in my mind right now, can't decide it yet how to control the on/off time, it should be a cheap solution.

GPS is the best if the cost is not a problem and the location is good for receiving the satellite signal.

Mick, if you haven't then reading the thread below might be useful. Me still don't understand it. Wink

http://www.sonsivri.com/forum/index.php?topic=32632.0

Edit: see Microchip AN1303A-Software Real-Time Clock and Calendar Using PIC16F1827, cheap enough US$1.82 a piece at digikey.

-ichan
« Last Edit: April 12, 2011, 09:31:49 21:31 by Ichan » Logged

There is Gray, not only Black or White.
pickit2
Moderator
Hero Member
*****
Offline Offline

Posts: 4667

Thank You
-Given: 834
-Receive: 4322


There is no evidence that I muted SoNsIvRi


« Reply #9 on: April 12, 2011, 10:22:36 22:22 »

could you not adapt an egg timer?

Mick, if you haven't then reading the thread below might be useful. Me still don't understand it. Wink

http://www.sonsivri.com/forum/index.php?topic=32632.0

Edit: see Microchip AN1303A-Software Real-Time Clock and Calendar Using PIC16F1827, cheap enough US$1.82 a piece at digikey.

-ichan
Logged

Note: I stoped Muteing bad members OK I now put thier account in sleep mode
solutions
Hero Member
*****
Offline Offline

Posts: 1826

Thank You
-Given: 656
-Receive: 905



« Reply #10 on: April 13, 2011, 07:15:39 07:15 »

Ok all, this isn't a joke.
The clock chip is all very well but dawn and dusk varies by hours during the year so not a lot of use. using a light sensor has been tried without success as hens KNOW when dawn is regardless of the actual light levels which vary a lot depending on weather etc. Cockerels aparently start making a noise BEFORE dawn if they are locked in........
Therein lies your answer, grasshopper
Logged
DarkClover
Active Member
***
Offline Offline

Posts: 167

Thank You
-Given: 37
-Receive: 60


Still alive...


« Reply #11 on: April 13, 2011, 10:06:13 22:06 »

How is it if you use a simple timer switch for common power outlet? Then there are two ways. Either you catch the
signal from the internal timer or just switch a Thyristor controlled relay or something.

Or use a photoelectric sensor like the others said and connect id with the ADC of your PIC.
This would be a good learning lesson Wink
Logged

Not thinking means to believe what others say!
TRY & ERROR... the fundamental principle our existence is based on
Pages: [1]
Print
Jump to:  


DISCLAIMER
WE DONT HOST ANY ILLEGAL FILES ON THE SERVER
USE CONTACT US TO REPORT ILLEGAL FILES
ADMINISTRATORS CANNOT BE HELD RESPONSIBLE FOR USERS POSTS AND LINKS

... Copyright © 2003-2999 Sonsivri.to ...
Powered by SMF 1.1.18 | SMF © 2006-2009, Simple Machines LLC | HarzeM Dilber MC