Author Topic: Automatic chicken door time input (low power, simple)  (Read 4629 times)

0 Members and 1 Guest are viewing this topic.

Offline AmperTopic starter

  • Frequent Contributor
  • **
  • Posts: 286
  • Country: 00
Automatic chicken door time input (low power, simple)
« on: January 15, 2019, 01:09:22 pm »
Hi!

Im looking for some random ideas here, no perfect solutions for my problem but just a bit of brainstorming help.

A year ago i built an automatic chicken coop door for my mother. It has to close and open a door every day and lock it reliably. Since its usually quite dirty around and i didnt want to play around i decided to mount two industrial pneumatic cylinders to the swing open door and since i dont want a chicken decapitator its powered by a small 12V air pump rather than a real compressor. The mechanical part works very nice for over a year now but the electronics were just bodged together by lack of time. I used a leftover arduino, and some chinese boards to control the two selenoids and the pump. Since i want it to be operated by everyone intuitively and i dont want to write a manual the adjustment of the "business hours" is currently done by adjusting an external line power timer that tells the arduino to open or close. This obviously sucks big time and im not proud of hacking stuff together like that. Also the continuous power consumption of the mechanical timer, the line relay and the arduino make me dependent on the grid.

Its no big deal power wise but it sucks to have cables laying around in the dirt and also in a wooden house with hay and dust its a significant fire hazard.

Since i have also built a few low power data loggers recently i decided that its time to change this thing. Power will be supplied by a small solar panel on the window and stored in two 400F 2.7V Supercaps (I also dont like batteries that freeze and/or leak when broken). The arduino will be kicked out and be replaced with just the ATM328, the selenoids need quite a bit of power (6W) and will be replaced by a second air pump.  This way only very little standby power is needed (5uA for the micro is all) and the Opening / closing takes only around 100J each day.

What worries me only is the adjustment of the times depending on seasons, weather and other needs. There has to be some way of telling the 328 two daily times  in 24h format when to open and close. The obvious solution would be to add an oled display and an encoder, wake the 328 via pin change interrupt and have a menu appear. But i dont really like this idea for practical reasons of noone wanting to climb a ladder and change settings on a tiny screen. Also i like low tech solutions in these situations.

The next idea was to use bcd coding switches but to put these directly onto the pins of the controller would take 10 pins even if i decided that i dont need minute adjustment. This will not leave open enough for the RTC and control of the door.

Enough blabbering around on my side, do you guys have any nice ideas?

cheers
 

Offline nsrmagazin

  • Regular Contributor
  • *
  • !
  • Posts: 156
  • Country: ru
Re: Automatic chicken door time input (low power, simple)
« Reply #1 on: January 15, 2019, 01:48:42 pm »
This is easy, but the cables can not be avoided unless you have a heavy duty battery and you charge it at least every 3 months. Why not pass the cables with a good cable and outside isolation? Its a plastic square tube through which you pass the cables. Its the best solution to me, you don't need to pass them through the ground, it can be through the roof.
Hi all!
If you like the post, please press "thanks".
 

Offline mycroft

  • Regular Contributor
  • *
  • Posts: 70
  • Country: br
Re: Automatic chicken door time input (low power, simple)
« Reply #2 on: January 15, 2019, 01:51:02 pm »
How about two pontentiometers for the opening and closing times? Put a hand written scale and it is done.
 

Offline rhodges

  • Frequent Contributor
  • **
  • Posts: 306
  • Country: us
  • Available for embedded projects.
    • My public libraries, code samples, and projects for STM8.
Re: Automatic chicken door time input (low power, simple)
« Reply #3 on: January 15, 2019, 02:12:18 pm »
I was thinking about using a table or equation to adjust the open and close times every day, to follow the day and night cycles. The solar cell might give a useful signal to help this.

I like the suggestion of two pots. They could be for absolute times, or offsets from the internal day and night times.
Currently developing STM8 and STM32. Past includes 6809, Z80, 8086, PIC, MIPS, PNX1302, and some 8748 and 6805. Check out my public code on github. https://github.com/unfrozen
 

Offline nsrmagazin

  • Regular Contributor
  • *
  • !
  • Posts: 156
  • Country: ru
Re: Automatic chicken door time input (low power, simple)
« Reply #4 on: January 16, 2019, 10:42:52 am »
For absolute times the pots are the best option. You should mark the pot setting so you can use it again afterward.

If you want to do it with the changing of the light, you can use an IR LED with a comparator. You can still add pots to the circuit to make it calibratable.

Here is an example(exclude the white transmitter IR LED, it will be replaced by the day and night sunlight unless something blocks it like a leaf or other).
http://elonics.in/breadboard-projects/infrared-ir-proximity-obstacle-sensor-using-lm-358

With absolute settings(which is better) you need to remove the IR white transmitter LED. Remove the black receiver IR LED and add the input voltage in the place of the black receiver IR LED.

A digital clock with a timer 555 would be an option too. The clock counts 24 hours and on certain hours it does something.

I guess you don't want to go in the dark and check the chiken's door, if its because you are afraid of something its a dog you need.
« Last Edit: January 16, 2019, 10:47:32 am by nsrmagazin »
Hi all!
If you like the post, please press "thanks".
 

Offline AmperTopic starter

  • Frequent Contributor
  • **
  • Posts: 286
  • Country: 00
Re: Automatic chicken door time input (low power, simple)
« Reply #5 on: January 16, 2019, 12:18:16 pm »
Thanks for the suggestions!

Running cables cleanly would be no issue, thats true but things are already cluttered enough and since the transformer in our doorbell almost burned down the house this summer i really dont like the idea of anything being plugged in constantly when its not really needed for reasons of high power. Using batteries i considered in the beginning but as i know my peers they will rather shut the thing manually than change them  ;D also in that case it would need reliable indication and battery warning wich is not really easy when noone is actively checking. maybe some Flipdot or E-Ink display not needing power in standby.

Pots are a solution as well, yes. Even though i dont really like analog to adjust digital things. But the simplicity is definetly a reason for it.

Adjusting for the date automatically would be nice too, it shouldnt even be difficult since the RTC has a month output anyways so i dont even have to do the calculation myself. The downside only would be that.

The light sensing option i actually like a lot but i wonder if i can calibrate it presicely enough. In the morning and evening hours depending on the month the changes in brightness may vary a lot. Even the weather will make things difficult. Maybe ill first of all install a light data logger and check how reliable it would be that way.  Probably a combination of both will be best.

The main reason for all of this is when no one is home. or in summer on weekends when its just very nice to stay in bed instead of getting up and opening the door at 5am. It has to be closed at night because we previously had problems with foxes and even large birds of prey getting in and killing chicken. Also the door is large enough for our leonberger so in winter it is an issue of loosing heat.

I guess for now i will get it to run on rtc and fixed times to get the power supply working and then add adjustments later after doing light measurements.
 

Offline cowana

  • Frequent Contributor
  • **
  • Posts: 324
  • Country: gb
Re: Automatic chicken door time input (low power, simple)
« Reply #6 on: January 16, 2019, 02:08:21 pm »
Is there a reason not to use sunrise/sunset times?

If you have an RTC (and know your latitude/longitude), it's fairly trivial to calculate the time of sunrise and sunset. Pots could then be used for how much before/after these events happen that the door actuates.
 

Offline AmperTopic starter

  • Frequent Contributor
  • **
  • Posts: 286
  • Country: 00
Re: Automatic chicken door time input (low power, simple)
« Reply #7 on: January 16, 2019, 02:56:06 pm »
Yes, thats on my list of things to try as well. Im just still not sure if its good to keep using hard timing because i cant risk locking animals outside over night. They are more or less pets and not livestock, so it would be horrible to loose one while trying stuff or doing some sub optimal thing. The perfect solution would be to rfid tag all of them and close the door only when all are inside but i guess thats a bit much for now  ;D

Here is a video of the current setup just for a reference and maybe someone is interested in my way of doing it. Please ignore the dirt, its winter time and birds are ... messy ...

https://youtu.be/H2Bx83tGSnA
 

Offline NivagSwerdna

  • Super Contributor
  • ***
  • Posts: 2495
  • Country: gb
Re: Automatic chicken door time input (low power, simple)
« Reply #8 on: January 16, 2019, 03:06:13 pm »
FWIW....  I spent a while looking at the construction of my... https://www.flytesofancy.co.uk/chickenhouses/VSB-Automatic-Door-Opener.html

This is a commercial unit but has some interesting design decisions... firstly the sliding aluminum door works well although it is 'locked' by gravity only.

The VSB approach to door opening is that you use a light sensor and/or a timer... (I just use a timer).  The circuitry is very simple, basically just CMOS comparators and a few NORs attached to a motor with reed switch sensing for the open/closed positions.

In respect of opening times... In my experience you want to open some time AFTER dawn during spring time since Vixens will be out and about around Dawn when it is time to provide for their new cubs....

The standard commercial timer is this... https://www.flytesofancy.co.uk/chickenhouses/Digital-Battery-Timer-for-VSB-Door-Opener-Unit-BTVSB_D.html#SID=828

Again has some nice design features... e.g. LCD segments for open/close and lasts for 4 years on 2x AA.

(If you are a masochist you could also read some of my musings at https://www.eevblog.com/forum/projects/4-aa-cells-direct-to-pic/ )
 

Offline AmperTopic starter

  • Frequent Contributor
  • **
  • Posts: 286
  • Country: 00
Re: Automatic chicken door time input (low power, simple)
« Reply #9 on: January 16, 2019, 03:19:04 pm »
Oh wow, i didnt expect anyone here to have done something that similar :D Ill definetly have a look.

I chose to go with the pneumatics since the door was already done this way and i coulnd change the construction of the large 4*4 meter ones just for this. Also the cylinders were laying around looking for some application which meant i didnt have to order anything. The original setup was done in a day because my mother had to leave the house unattended for a few days without much time for preparations.

Since i now have a quite large 20W solar panel im actually thinking about using it for some other stuff too. Maybe put a 12V outlet near that can be hooked up to lead acids in gardening vehicles for saving them in winter. Or a AA battery charger. That way i can also do away with the LTC3105 and LTC3110 i wanted to use for the supercaps.

For the sake of adaptability i will stick with the 328 though and not go for hard logic. I might have applications outside of chicken keeping for this system and with a small LDo the power consumption is really low.

EDIT:

Here is a pic of a datalogger that could almost be used. Its very low standby power and can log strain gauges, 4-20mA industrial sensors, air pressure and temperature. This is where the chicken door parts of power supply could be implemented as well to make it completely off grid and mount it on the source of our hydro power plant to measure stuff in the forest. Atm its supplied with two lead acid blocks because the 20mA actually needs a bit of oompf compared to everything else. Not really winter cpaeable.



« Last Edit: January 16, 2019, 03:28:48 pm by Amper »
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 12855
Re: Automatic chicken door time input (low power, simple)
« Reply #10 on: January 16, 2019, 03:51:29 pm »
Yes, thats on my list of things to try as well. Im just still not sure if its good to keep using hard timing because i cant risk locking animals outside over night. They are more or less pets and not livestock, so it would be horrible to loose one while trying stuff or doing some sub optimal thing. The perfect solution would be to rfid tag all of them and close the door only when all are inside but i guess thats a bit much for now  ;D
RFID used as you describe would be a really *DUMB* idea.  If a fox gets one, the henhouse door wont close till that tag goes past the sensor, so at best the fox has free access, or at worst, if the fox swallowed the tag, it'll lock the fox in with the chooks!

OTOH a remote alarm in the house that goes off if the system hasn't logged in all the tags by door closing time could be worthwhile.     RFID bird rings are pretty cheap, but you'll need two sensors with a tunnel between them to make sure the chook goes past both so you can determine whether the chook is going in or out.

As for setting the door timer, consider a battery backed  RTC module mounted in a plug shell that can be taken up the house and programmed in comfort, to set its clock, and also set parameters stored in the RTC RAM for opening and closing times.  e.g. Your code could calculate sunrise and sunset times from the RTC calender then apply monthly offsets for open and close times stored in 24 bytes of RTC RAM.

Another option would be a weatherproof exterior button you could press to enable a Bluetooth module for the next five minutes (as leaving it on 24/7 would probably be too power-hungry), then use a custom app on your smartphone to change  the door settings.
 

Offline AmperTopic starter

  • Frequent Contributor
  • **
  • Posts: 286
  • Country: 00
Re: Automatic chicken door time input (low power, simple)
« Reply #11 on: January 16, 2019, 04:04:31 pm »
Mh, the fox stealing a tag is something i havent thought of xD Also yes, it would be difficult to implement. My idea would be to put the reader not on the door but to the ladder were they sleep. The downside obviously is if one decides to sleep somewhere else or sit on the eggs it wouldnt close. Those are the reasons why i decided not even to look at rfid as it would only produce more problems than it solves. 

An app or module would be a little overkill, its not that uncomfortable to stay in that place. I just want to reduce the effort to a minimum. I noticed from movement sensored ligts in and around the house. Some had really horrible settings and turned off after only seconds. Still i would rather be pissed off over several years and wave my arms in the air to get the light to turn on again than to just get a ladder and a screwdriver and adjust the stupid thing. Thats what id expect if setting new times is more work than just opening the lid and turn a knob. Just horrible laziness but thats how people work...

Also i really love machines that work without attending to them. Its absolutely facinating to have built something that does its job without any human interaction for years or even decades at a time. Just really satisfying.
 

Offline nsrmagazin

  • Regular Contributor
  • *
  • !
  • Posts: 156
  • Country: ru
Re: Automatic chicken door time input (low power, simple)
« Reply #12 on: January 19, 2019, 09:17:41 am »
Your option is good, but unnecessarily powerful. If these are pets that you care for, you should know that chickens are not from the smartest animals, they can't get back inside after more than a few meters of distance and when it begins to get dark they just snug somewhere and fall asleep.

You can try these options, i have not tested them so I don't know how well thye work.
https://electronicsforu.com/electronics-projects/hardware-diy/daytime-running-lights-controller

https://www.instructables.com/topics/How-do-I-make-an-automatic-door-openercloser-for-/

A solar cell might be a better option than a sensor, but they produce current, not voltage.
Hi all!
If you like the post, please press "thanks".
 

Offline AmperTopic starter

  • Frequent Contributor
  • **
  • Posts: 286
  • Country: 00
Re: Automatic chicken door time input (low power, simple)
« Reply #13 on: January 19, 2019, 06:50:44 pm »
Thanks for your concern ^^
The cylinders look huge but the pump behind them is using only 2W of power, no worries of crushing a chick. They have 200x200m of space to run free but so faar they have pretty much always come back, usually even before its dark.
 

Offline Doctorandus_P

  • Super Contributor
  • ***
  • Posts: 3342
  • Country: nl
Re: Automatic chicken door time input (low power, simple)
« Reply #14 on: January 19, 2019, 10:43:31 pm »
The predominant mechanisms for chicken scoop doors seems to be 2 cantilevers and a small winch.
The winch rope is connected to the canilevers which get unlocked if the winch starts:



For the timer you have a multitude of options.
There exists a sun up/down algorighm, just plug in where you are on this sphere but it has a bunch of sines and cosines.
Much simpler and good enough would be 2 tables with sun up / down times for the first of each month, with a piecewise lineairly interpolation.
Add a light sensor, with an algorithm that changes the open/close times at most most 10 minutes each day.

For more fancy algorithms you can monitor the actual behaviour of your chickens.
With a sensor like the VL53L0X you can measure if chickens are entering or leaving through the door and you can count them, and only open the door in the morning when the chickens want to get out (or anticipate half an hour earlier).

But that sensor might get dirty, maybe use 2 for redundancy?

You can also use a weight scale and put that near the door opening.
Put something above it, so do don't accidentally step on the scale yourself, which would ruin a 5kg or 10kg kitchen scale.
HX711 is an "arduino"-esque chip. Cheap and easy to interface.

With a search for "chicken scoop door" on youtube you can also find purely mechanical systems.
No electricity.
They work by using the pole the chickens sit on and a lever.
If all the chickens are sitting on their pole it is heavy enough to tip the balance and the door is closed.

With the electronic sensors it is probably a good idea to monitor the behaviour of the chickens for a few days.
If they walk (wobble) in and out of the door during the day, you can use that to auto callibrate your timing intervals.

If you want to go real fancy you should add redundancy. Use 2 uC's which check each other behaviour.
If you use an ESP8266 you can connect to WiFi and send an e-mail if a malfunction is detected.
(You can extend the range of WiFi with a Cantenna, but put it under an angle, so do don't irradiate your neighbours).

ESP8266 is fun to use, cheap also.
The "Wemos D1 Mini" boards are compatible with the arduino environment. I've written a small demo program with them and platformio in half an hour. But you have to be carefull with these. ESP8266 is 3V3 only and is easily damaged by overvoltage.
 

Offline soldar

  • Super Contributor
  • ***
  • Posts: 3158
  • Country: es
Re: Automatic chicken door time input (low power, simple)
« Reply #15 on: January 19, 2019, 11:03:39 pm »
Sunrise and sunset times can be easily approximated with a simple function but from one day to the next there can be a big difference in light if one day is clear and the other is heavily overcast. There can be an hour's difference in light conditions. If you want to get fancy you can combine ambient light, sunrise/set times, temperature, etc. to decide.

If you really want to use minimal electric power you could power it with compressed air from a bottle and just need a couple valves which would use close to nothing. You refill the bottle with compressed once or twice a month. This has the advantage of not destroying the chicken coop with a fire. Maybe an explosion but not a fire :)
All my posts are made with 100% recycled electrons and bare traces of grey matter.
 

Offline AmperTopic starter

  • Frequent Contributor
  • **
  • Posts: 286
  • Country: 00
Re: Automatic chicken door time input (low power, simple)
« Reply #16 on: January 19, 2019, 11:37:51 pm »
I have thought about making a guillotine door in the very beginning but its just not really doable in my place. Its just to large ( 40x50cm) because of our dog (leonberger, size and weight close to a human). Also while locking mechanics are simple im afraid of something getting stuck. Just a little dirt or some water making the wood swell will be enough to jam the thing completely. Then the limit switches wont help either, the winch motor will be pulling as hard as it can for as long as the power is there or in case of grid power it might get hot. This means without current monitoring and redundant limit switches there is no way. I want this thing to be maintainance free as much as possible, not checking for stuck wood pieces every few days. The mechanics have also been working with absolutely no problem for more than 500 days now, im quite happy with it. No limit switches that fail,  no string getting tangled. With a winch if the limit switch will fail the thing will wind up the other way and the door will stay open. If the String breaks in the wrong moment and i have a heavy locking door it will chop a chickens head off easily. My dad had chicken as well when he was a child and it was a guillotine style door. It was fixed by a string and some day he held it in his hand and slipped  off in the right time to have some tasty soup the next day. I dont want to be responsible for that.

The time calculating by table and functions is all well and dandy but only when you live on a perfect sphere. We have hills nearby, large trees, there is weather happening and many many other factors. As soldar said, its not that easy sadly. Combining many factors would be nice but to be honest i wouldnt be sure how to do that in a predictable fashion. I could either use simple logig "when brighter than y and time after x .... open door" but in that case i could just go with the one real variable light and ditch the rest of it. It would need some "intelligent" calculating and predicting but i think thats a bit to much work to implement and especially verify for such a small project. You can see in the video posted last how simple other people go about it. Im pretty sure he didnt even think about light threshholds and hysteresis like me, he just used "a light switch" and put two building timers behind it. Seems to work.

About sensors to monitor the animals im not sure how to do it and if its really possible. We have scratched that topic when talking about rfid. A time of flight sensor can only tell me if there is some animal standing in the doorway. How should it know in which direction it will hop? What about small birds flying in, what about two chicken in the doorway at the same  time. It would need a tunnel barely enough to fit one of them so its possible to determine exactly whats going on. Same applies to having a scale in the ground besides the heavy dog and water + dirt. Sadly not a practical solution. Weighing the ladder they sit on would imply that they weigh the exact same every day. We have roughly 10 of them so it comes down to a weight change of 10%. Assuming one is sitting outside and the other 9 have eaten a lot in the day, one will be locked out. Assuming one is sitting in the nest on the eggs, the door might not close all night.  Wifi and Bluetooth are cool but i really f***** hate IOT for security reasons. Our living room is right next to it  and if i do need to check manually anyways i can just look at the door or have some led light up if there is a failure thats detectable. Also the Power management would be completely out of the window at that time.
Sadly things are not as simple as just throwing sensors on the problems ^^

I have thought about storing compressed air a lot actually I really like the idea. Problem is if i will use high pressure like the usual 8-10 atmospheres of an air compressor it will be empty very quickly through even small leaks and a refill will mean my mother needs to get the compressor set up and refill ist and then put all the stuff away again. No Problem but a hassle if the alternative would be changing AA batteries every few months. Though one thing possible would be to store low pressure from the small pumps over the course of a day and refill it just by solar with no batteries. Saaaadly the biggest consumer of electricity in the current setup are actually the selenoids. They are industrial 24V types and even though they are the smallest usual size they use 6W of power each. For comparison the Pump needs only 2W while operating the door like seen in the video. Thats the reason why i will soon kick them out and use a second pump, one for each side of the actuator. A Servo valve could be a solution though, It can be build relyable with common RC servos and a festo ball valve. But sadly its not that much of an advantage once i have to modify the thing anyways.
 

Offline soldar

  • Super Contributor
  • ***
  • Posts: 3158
  • Country: es
Re: Automatic chicken door time input (low power, simple)
« Reply #17 on: January 20, 2019, 12:23:34 am »
Making the guillotine door reliable is very easy. Just use metal or plastic or whatever. If the coop is not too far from the house you can lead a nylon thread to your bedside and close the door manually before you go to sleep :)

You can install an IR CCTV security cam so you can see and count the chickens before closing the gate. :)

Calculating sunrise/sunset, altitude above horizon, etc is trivial for me knowing latitude and longitude but requires trig functions and you probably do not need such precision. Still an approximation is easy to implement and should be good enough. You can use only light but there is a small risk of it closing in the middle of the day if it gets very dark.
« Last Edit: January 20, 2019, 12:25:55 am by soldar »
All my posts are made with 100% recycled electrons and bare traces of grey matter.
 

Offline Doctorandus_P

  • Super Contributor
  • ***
  • Posts: 3342
  • Country: nl
Re: Automatic chicken door time input (low power, simple)
« Reply #18 on: January 20, 2019, 12:39:06 am »
It looks like you're in a defending prosition and in a mood to reject any possible solution, instead of thinking a bit of how these general solutions can be used to fix your particular problem.

For example, the sunset / sunrize algorithm is easily found on the web.
If you're not content with a montly table for piece wise interpolation, use weekly piece wise interpolation.
If you don't want to use WiFi for problem identification, use a bloody blinking led if you're nearby.

Why would the guillotine door be prone to error? Yeah sure, if the mechanical part is executed poorly, (Wood that bends when it's wet etc), but when done properly it can easily be very reliable, and it is cheap to build. Problems with the string can also be compensated for in a multitude of ways. You can add an encoder to the motor, test wire tension or simply put the string in a loop so it can pull both ways.

If you're even a half decent engineer you can make a shaky bit of hardware work reliably with some inventive thought.

I'm glad for you your mechanical stuff works reliable, which is not much of a surprise when using industrial quaility air cylinders, but you probably had those lying around somewhere and they are probably too expensive to be a general solution for many other people.

 

Offline AmperTopic starter

  • Frequent Contributor
  • **
  • Posts: 286
  • Country: 00
Re: Automatic chicken door time input (low power, simple)
« Reply #19 on: January 20, 2019, 01:41:47 am »
Hi!


My problem is very specific and i have put quite a lot of thinking into it. Im just not interested in solutions that will make the problem more difficult than it already is. So far it was literally a one day build with stuff i had laying around at my parents house. I like simple solutions much more than complicated mechanisms and tons of sensors just because its a simple problem that doesnt need them. Im Certainly able to do engineering better than you think i can, im in power electronics making kW sized bldc controllers, building small jet engines (not the tin can kind but actual working ones) and drones ("before it was cool" beginning in 2008 when there was no commertial parts availlable at all). Im very comfortable with both mechanical and electrical engineering but that doesnt mean that i like to over complicate things. The title of this thread ends on "(low power, simple)" and that is actually more difficult to achieve than you may think. I dont really see why i should start studying and statistically analyzing chicken behavior to train mm wave sensors, add wifi and webcams to close a stupid piece of wood that just needs to shut and open at two set times a day. If i wanted that i could just hang some raspberry with a webcan there, build an app and control it from the other side of the planet but thats just not what im looking for. The question also never was about mechanics so i just dont get why you had to start telling me how to fix something that is already working perfectly where id need to invest a day to rebuild the entire thing to get null benefit.

Sorry to be rude but actually it was a bit offending to be assumed some noob just becuase i dont like overcomplicated solutions for simple problems. Your solutions surely would work but they are obvious and not new to me. Im looking for something better than my current ideas that will not make the thing more complex to operate and maintain, wont need a mechanical rebuild and doesnt draw any power requiring external sources especially grid power and a working router nearby.
//endrant

@soldar
The Problem is that i cant fit a guillotine there, the large door to the outside in which the small is fitted is not something im allowed to hack up or bolt much things to. A Slider would need to go up to one meter where there is other stuff in the way and no wood to fit pulleys and motors. If i had built an entire coop from scratch i probably would have gone that way. Also its already the basement of our house, so if i were home i would not even need a string to operate it :D Its just reeeeeally comfortable to stay in bed in the morning and have it open without waking up in 5. Also as sad before, the initial reason to build it was absence of anyone for a few days at a time or when my mother has to work in winter and its already dark for a few hours before shes home.
« Last Edit: January 20, 2019, 01:43:23 am by Amper »
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 12855
Re: Automatic chicken door time input (low power, simple)
« Reply #20 on: January 20, 2019, 02:53:56 am »
Wasting a whole air cylinder for the deadbolt does strike me as a bit excessive, but if that's what you've got, then why not?  Its certainly better to have a well proven mechanism, and 16 months of successful operation qualifies.  I would recommend adding some sort of 'trapped chicken' sensor on the edge of the door or doorway that stops and reverses the door if there's any obstruction while its closing before it reaches the fully closed position.   A dowel mounted between the levers of two lever arm microswitches such that the vertical edge of the door just clears it when closing might be suitable, though as the door has a raised threshold, you should probably put a sensor for the bottom edge as well.

As it isn't an outbuilding there's no point in trying to economise on power consumption past what's simple and easy.  There's mains power available not too far away so simply float a SLA  using a traditional linear supply for long life and reliability to power it all and concentrate on improving the  algorithm for the door open/close times and the UI for adjusting it.   Any electrical system with stored energy is a potential fire risk, but a suitably fused low voltage one is  a minimal risk due to the low energies involved and the greatly reduced risk of insulation breakdown.

On the UI side of things, why not move the Arduino down to a reasonably accessible position and fit it with a RTC module, a LCD shield and some buttons to emulate the operation of the mains timer that your users are already familiar with?

None of the chicken sensor ideas appeal to me apart from individual RFID leg rings.   That + two readers inside and outside of the door just far enough apart that they don't interfere with each other, so for any specific bird, if the inside sensor was the last to see the tag, you know that bird is in, and similarly for the outside sensor and out.   However, as I mentioned earlier, doing anything except raising an alarm if one is missing at closing time is counter-productive.  You still need to close the door to safeguard the other birds, and certainly don't want to open the door again during the night for a fox with the tag in its stomach.
« Last Edit: January 20, 2019, 03:00:45 am by Ian.M »
 

Offline AmperTopic starter

  • Frequent Contributor
  • **
  • Posts: 286
  • Country: 00
Re: Automatic chicken door time input (low power, simple)
« Reply #21 on: January 20, 2019, 01:54:56 pm »
Yep, the second cylinder is excessive, i would not have done it if i dint have a dozend laying around with no use anyways. Im pretty lucky to have a good source of free "scrap" like that so it was no concern to overdoo it in that case. Also this way i didnt have to make any mechanics like deadbolts or latches, just put the cylinder there with a few more screws. It also made the controls simpler the sequence of locking and unlocking is done by a single pneumatic momentary switch on the door, when pressed the locking cylinder is activated, when not pressed (open door) only the moving cylinder is supplied so they can be operated like a single one. Also no cables and plugs that require soldering in the cold and dirty barn, polyurethane tube is cheap and is replaced, shortened or extended in a matter of a minute or two with no tools required, it will also survive being pinched in the large door or ripped out by accident. The trapped chicken sensor is not really necessary as i only supply roughly 500mBar wich translates to around 15N in the cylinders used. After having the geometry of the linkage there is no risk at all of hurting any animal. If i used high pressure supply id just add a pressure regulator (thanks scrapheap of my university :-+) and limit the force that way.

economizing power mostly is just a wish of mine, it just feels wrong to have something plugged in all day without doing anything. Also as said before im a bit paranoid about anything grid related. Cheap chinese switch mode supplies are actually the number one cause of house fires in my country and i didnt have good experience. I have Industrial 24V supplies but they are overkill and have quite a lot of standby power.  The next socket is almost 10m away and i would have to run ducting over the wall and ceiling to reach it, so while its possible and im doing it that way at the moment im just not happy with this situation. A small cap bank of some few hundred joules to survive a few days with no sun would be ideal. Its low voltage contained in a housing, fused, cant leak, wont freeze and should last a few decades without degrading.

One idea you just gave me by "simulating" the old UI is actually to go back to the simple way of using pots. The old one is mechanical, so its similar and thinking about it, it has incerements of 15 minutes. The atmega will have roughly 90s of resolution when i spread 24h over its entire range, so thats plenty fine enough for my application. Previously i thought for good resolution id need four pots, one for minutes and hours of each set point but i dint even bother estimating if one would be sufficient.
« Last Edit: January 20, 2019, 01:56:44 pm by Amper »
 

Offline tpowell1830

  • Frequent Contributor
  • **
  • Posts: 863
  • Country: us
  • Peacefully retired from industry, active in life
Re: Automatic chicken door time input (low power, simple)
« Reply #22 on: January 20, 2019, 07:06:23 pm »
Ok, so you want simple, got it. You could set your timer up to go for 12 hours then open the door or if solar panel sees sunlight. The start timer could be a simple limit switch when the door closes. The test is to see if there is sunlight on your solar panel (connect the panel with a schottky diode to the caps or battery), take your 'sunlight' voltaage reading on anode side of schottky, for reading from the solar panel when it starts charging. If it sees sunlight, open the door and reset the timer to start when door closes again when it is dark. You can adjust the 12 hour timer to whatever it is in your latitude for night time hours (or adjust twice a year).

Hope this helps...
PEACE===>T
 

Offline cdev

  • Super Contributor
  • ***
  • !
  • Posts: 7350
  • Country: 00
Re: Automatic chicken door time input (low power, simple)
« Reply #23 on: January 20, 2019, 07:19:49 pm »
You could use Raspberry Pi "deep learning" based object recognition software to identify and count the various animals,as well as keep track of the time, actual brightness, etc. You could use a body of photos of your actual chickens, as well as photos from Google Images of foxes, hawks, dogs, as well as permitted humans, and others, to train it.

Then you might be able to use that data to decide when to close or open the door or raise an alarm, or even blink flash tubes. It could also send an SMS to you and other family members to tell them if any of your known chickens were missing from the coop, or if any recognized or unrecognized animals or humans, even, had been seen, along with photos of them.

Note: as my post was originally making the same suggestions as had been suggested earlier, I edited it.



« Last Edit: January 20, 2019, 09:39:58 pm by cdev »
"What the large print giveth, the small print taketh away."
 

Offline AmperTopic starter

  • Frequent Contributor
  • **
  • Posts: 286
  • Country: 00
Re: Automatic chicken door time input (low power, simple)
« Reply #24 on: January 20, 2019, 08:17:48 pm »
Guys really, i appreciate you giving me advice but have you read even a bit of what has been written previously ?
I really dont want to offend because you are all really nice and stuff but we have been talking about rtc, time calculating and light sensing all day long now and you suggest it to me like no one has ever thought about it before? i dont expect anyone to read through all of the posts but you could just go "CTRL-F" and search for "RTC" before posting if you havent read the old posts.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf