The Godfather talking
This is god damn my place! Capisci?
Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
December 10, 2016, 03:40:00 15:40


Login with username, password and session length


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

Posts: 113

Thank You
-Given: 109
-Receive: 100


« on: April 11, 2011, 08:03:13 20: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
*****
Online Online

Posts: 504

Thank You
-Given: 234
-Receive: 124



« Reply #1 on: April 11, 2011, 08:26:19 20: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

the more you learn, the lesser you get to understand. is it then good know alot but not understand what you know or.......
Wizpic
Global Moderator
Hero Member
*****
Offline Offline

Posts: 976

Thank You
-Given: 197
-Receive: 344



« Reply #2 on: April 11, 2011, 10:34:47 22: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: 1446

Thank You
-Given: 591
-Receive: 851



« Reply #3 on: April 12, 2011, 07:30:46 07: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
V.I.P
Senior Member
*****
Offline Offline

Posts: 375

Thank You
-Given: 152
-Receive: 106


If the van is a Rockin'...


WWW
« Reply #4 on: April 12, 2011, 10:06:13 10: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: 840

Thank You
-Given: 312
-Receive: 387



WWW
« Reply #5 on: April 12, 2011, 06:48:10 18: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
V.I.P
Senior Member
*****
Offline Offline

Posts: 375

Thank You
-Given: 152
-Receive: 106


If the van is a Rockin'...


WWW
« Reply #6 on: April 12, 2011, 09:33:19 21: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: 113

Thank You
-Given: 109
-Receive: 100


« Reply #7 on: April 12, 2011, 09:51:45 21: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: 840

Thank You
-Given: 312
-Receive: 387



WWW
« Reply #8 on: April 12, 2011, 10:14:15 22: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, 10:31:49 22:31 by Ichan » Logged

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

Posts: 3816

Thank You
-Given: 567
-Receive: 2049


There is no evidence that I muted SoNsIvRi


« Reply #9 on: April 12, 2011, 11:22:36 23: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: If you have no posts other than, I want or reporting a dead link Then you can't complain If I remove your post So Stop Leeching
solutions
Hero Member
*****
Offline Offline

Posts: 1446

Thank You
-Given: 591
-Receive: 851



« Reply #10 on: April 13, 2011, 08:15:39 08: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: 170

Thank You
-Given: 36
-Receive: 60


Still alive...


« Reply #11 on: April 13, 2011, 11:06:13 23: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