Automatic Chicken Door Opener

BrendanP

Senior Member
"....We will help on preventing GST, DUTY, TARIFFS, TAXES for buyers by a lowering value and gifts declaration..."

You have to laugh at those Chinese, that's a criminal offence in most countries. And a offence in the UK, Au and the US for you to ask the seller to do it for you too. Its called a conspiracy.

Imports into Au under $1K au don't attract any GST.
 

Andrew Cowan

Senior Member
Imports into the UK over £18 have 15% tax and a £8 handling charge. It may be highly illegal, but it makes buying from china very good value!

Anyway, staying on topic - a PIR sensor seems like a good idea to see other animals - they are generally pretty reliable.
 

tiiiim

Member
I do like to PIR idea too - I've just opened up the one we had in the chicken run previously, and a quick cursory glance leaves me very baffled: I cannot for the life of me work out where the voltage is stepped down: there's a relay, a fuse, an inductor or two, loads of capacitors and even more (what look like) zener diodes (zener diodes can't step down voltage, can they?) I'll put a pic up if anyone wants to try and guess where the AC is switched to DC and down to 20V (I assume it's 20V, as that's what the relay is rated at, although it's only a guess as I have no other info...).

Current thinking is to use upgrade the original 08M, use multiple LDRs averaging over a length of time to stop flashlights/cunning foxes/lightening and use a PIR/IR setup to detect other movement during the night and prohibit the dor from opening in the morning until the 'threat' has been verified by a human.

This doesn't take into account full moon nights, although hopefully using clever algorithms which know when the door was last closed will alleviate this problem.

More info about the sensor pic: The PIR sensor is attached to a 100W floodlight. The sensitivity of the PIR can be changed (using one of the pots towards the top of the board) in addition to the time of day in which it becomes active (the other pot, and the small LDR above the PIR sensor). I've found data sheets for the relay (blue box), so that's no problem. The blue and brown cables in the bottom left are straight from the wall socket (so input 240VAC), whilst the white cable is output from the board to the 100W light.
 

Attachments

Last edited:

RBoD

New Member
I feel the fox is not well represented on this forum discussion! Lots of talk about educating chickens to do all sorts of tricks, including jumping on pressure mats and flicking switches. But what about the fox? My childhood stories told me about how smart the fox was, outwitting all other animals...and all the poor fox has been able to do here is carry a torch and being snared and electrocuted...:eek:
 

BrendanP

Senior Member
GASSED!, not electrocuted.

No,no snared and gassed, GASSED!, not electrocuted.

Its war on the fox here.

http://www.theage.com.au/national/foxstop-urges-hunters-to-shoot-for-loot-20090618-clzc.html

I was living in the high country a few years ago, one evening I was sitting by the fire getting primed on rum and glanced at the full lenght window on the wall. There was a fox standing there looking through the glass at me. And this was with a 60kg bull mastiff great dane cross bitch tied up on the other side of the house that loved killing foxes,cats,kangaroos etc. So what ever you do with your chickens Tim be careful of the foxes will get them. They're smart animals and will continually test your defences.
 
Last edited:

Dippy

Moderator
In fact, foxes are so smart that they're reading this Forum and will have learnt their fate and how to avoid it.
 

Tim036

Member
AFAIK, that is the one that MFB referred to, in his original post.

I bought mine from Morrisons.

e
I'll get one this week, rip it apart and publish here my version of mods to +5v output. Or is a 1 Amp relay contacts more universal ?

:)

Tim
 

hippy

Ex-Staff (retired)
I do like to PIR idea too - I've just opened up the one we had in the chicken run previously, and a quick cursory glance leaves me very baffled: I cannot for the life of me work out where the voltage is stepped down:
That large capacitor on the left suggest to me it could be using a transformerless power supply. The capacitor ( due to impedance ) works as a large resistor at 50Hz, and in conjunction with diodes and zeners drops the mains directly to a low voltage.
 

Dippy

Moderator
Ah the ghastly el-cheapo-nastio brown board...

I agree with Hippy, so fiddling with this circuit live requires extra caution!!!!

I would strongly suggest that you take care with this circuit.
I don't know how the relay is connected.
If the switched-contacts are isolated then use them as a switch and don't connect power lines.

But I would avoid 'hacking' into circuit for a tap-off to any PICAXE circuit.

A simple Cap based transformerless circuit can be connected in two basic ways:
1. The circuit 'ground' (reference) can be Live.
2. Or it can be neutral.
It is NOT isolated like a transformer.

If you connect a PICAXE circuit to this and then plug in your download cable to PC then you could have a nasty moment.

I had a very similar thing with a mains Evaluation board + PC Interface recently. No warnings on documentation, but as I am a cycnical old git I used RCD trips... thank goodness, otherwise there would have been a BANG!

I ended up making my own PIC+OptoIsolator PCB.

What I'm trying to say is: when there is no isolation then take GREAT care.

Also, if the circuit is using el-cheapo re+zener then be aware of power limitations and regulation if attempting to use this to power a supplementary PCB.

With care/skill you can connect a low power PCB without problem but any line to Earth (or PC Ground) could be nasty.
 

hippy

Ex-Staff (retired)
Reputable self-contained mains-powered PIR-and-lamp units should be completely safe, double-insulated, and conform to international standards. When used in configurations other than intended or when modified they may not be, and can be downright dangerous, destructive or deadly. The "Danger of electrocution. No user serviceable parts" sticker is, for potential hackers, shorthand for "Don't even think about it" !

When hacking PIR's it makes far more sense to modify 12V or battery powered units and switch mains if needs be using relays etc following recommended and best practice.
 

Dippy

Moderator
"It may be highly illegal, but it makes buying from china very good value!"

- does this mean that half the Forum are involved in complicity in crime? ;)
 

tiiiim

Member
That large capacitor on the left suggest to me it could be using a transformerless power supply. The capacitor ( due to impedance ) works as a large resistor at 50Hz, and in conjunction with diodes and zeners drops the mains directly to a low voltage.
Oh, never knew that. Every day's a school day! Looks like this one's not useful then, and I'll take the advice to use a battery powered one.

One this note (buying more stuff), is it worth getting the motor driver (darlington array chip), or is it better to use separate transistors and relays? What's been people's experience with this?
 

eclectic

Moderator
Oh, never knew that. Every day's a school day! Looks like this one's not useful then, and I'll take the advice to use a battery powered one.

One this note (buying more stuff), is it worth getting the motor driver (darlington array chip), or is it better to use separate transistors and relays? What's been people's experience with this?
What type of loads will you be driving?

Voltage / current etc

edit
Just re-read post #1.
You've already got a working system.
Do you need to change it?
 
Last edited:

tiiiim

Member
'Working' is a very big word.

The relays that I have aren't going to be good enough (just tested them today, and they're not as good as I hoped). As a result I'll need to get new relays, so I was just wondering if I should bother and just use the darlington chip instead.

But ignore that, as I think I'm getting confused between the motor driver chip (L293D) and the darlington array chip (ULN2803), and I'd probably have to get both. In addition, the motor I've currently got I'll be driving off 12V, which will definitely require a relay. So I'll stick with the relay system, as from post #1.

In answer, no I don't need to change anything from the original setup, as it should work. I'm open to improvements though, to make things more efficient or easier to troubleshoot which is why I ask! Changing things that don't actually need changing is kind of what I do - all in the hope of improving something, of course!
 

eclectic

Moderator
OK, fair enough.
It is more fun to alter things. :)

What's the motor rating?

What's the present circuit?

Some photo's please?

e
 

tiiiim

Member
Hmmm. Now, don't laugh. :eek: The motor I'm planning on using (and which I used with the old multiple relay system) is a family heirloom. It is actually from the fischer technik system from 1967 (ask my dad), from motor set 1, serial 30091. I've found a link to an image here (though it's in German): LINK. :D

You'll notice in that link that the set includes a long grey box - this is the battery holder: 3x C batteries, 1.5V each. Now, I know what you're thinking - that's only 4.5V, and I'm planning to use 12V. It honestly works, with no overheating or other problems - mostly because the motor is only on for a few seconds a day, and partly because (I think) the motors have a higher rating anyway. As for the actual rating, I don't know: the motor is inside a housing, which I'm not gonna pull apart (as I say, family heirloom!)(*). The reason I'm using this motor is that it has a highly configurable gearbox (see this link) which I can suit to my needs, and onto which I can easily just clip on a pulley system (no glueing, reaming etc required).

As far as the circuit goes, there isn't actually one made yet - the schematics in #1 where just the latest thinking. If you want to see photos of my previous multiple relay system I'll take a few, but not sure it would add anything!

(*)This is pure speculation, but the back of the motor has 'RE-36' imprinted. 36 probably refers to its outside diameter (36mm), and I know that Maxon Motors currently have and RE range of motors. A quick look at their catalogue shows 35mm motors still available rated at 90W, 15VDC. I doubt it's the same (90W @ 15VDC is ~6A draw!!!??!), but perhaps a start?
 
Last edited:

eclectic

Moderator
What a wonderful advert for FischerTechnik.

OK, can you measure the resistance of the motor?
Or, the current draw, under load?
If not, never mind.

Chances are, the ULN2003 could easily cope
with the very short-term demands.

Datasheet:
http://www.rev-ed.co.uk/docs/ULN2003A.pdf

See p.5, Figs 10/11

and Picaxe Manual 3, page 6.

e

PS.
Where do you get your 12volts from?
Wall-wart or battery?

I'm also thinking of treating your poor old motor
to a 6 volt diet, with altered gearing, or slowing down.
 

tiiiim

Member
The 12V is from a transformer (so wall-wart).

At 12V no load current=1.55A (hmm, OK that's a fair bit higher than I thought)
At 12V near-stall current=2.45A

Running at 6V won't be a problem (I don't think) - the speed of the motor isn't really a problem as I can change the gearing. I'll look into it...

Just wanted to say thanks to everyone who's chipped in so far - I've definitely got a lot to think about!!
 

Taniwha

Senior Member
I have just joined the forum and not really started any projects yet, but have enjoyed this string. My two cents worth would be to use a simple rotary encoder to determine door position. I have been playing with this idea for a while now and it is quite simple (and cheap), just count the holes in the top pulley as it rotates, when b0 = x the door is up when b0 = y the door is closed.
 

Jeremy Leach

Senior Member
Hi there, welcome aboard ;). The 'counting holes in pulley' idea sounds good, but I reckon it might need need some careful thought to make it reliable...

For instance if you just use one sensor to sense a 'hole' then I think you could easily get problems on the transition from hole to no-hole, and false counts (and then burnt-out motor or half-closed door etc !). The standard way round this is to use two sensors and 'gray coding' and code to determine the direction and count.

But maybe that's what you meant anyway by rotary encoder ?? (It's just that the most obvious solution would seem to be one sensor - LDR or photodiode etc - but many people here know it's not that simple and thought I'd point it out !)

However a better solution might be to use a magnet and a 'mercury-wetted' reed switch that has bounceless operation and eliminates all the fuss .... ?? Nice and simple I'd think.
 
Last edited:

BrendanP

Senior Member
Rather than the pulley system Tim have a look at a linear actuator. You can make one at home with the motor you have.
 

tiiiim

Member
Whilst I've used rotary encoders before, I'm not sure they'd be much use in this setting: the encoder will only tell me how many revolutions the motor (or whatever the encoder is attached to) has performed. Take this scenario:

  • Door begins to winch down.
  • For some reason, there is an obstruction in the doorway (lots of straw, a stick etc etc).
  • Door hits obstruction, and falls no further.
  • Motor continues its revolutions (just reeling out slack rope).
  • Motor stops after x number of counts, and thinks the door is closed. There would be no warning of the door not being closed.

An encoder would just make the motor THINK that the door has closed, when it may not have. Originally I was just going to turn the motor on and then wait (PAUSE) a predetermined amount of time (however long it takes for the door to close normally), before the motor switches off. Again, I'd never actually know if the door was closed.

If this wasn't the setup you meant, then apologies!! :D
 

tiiiim

Member
A linear actuator is definitely an option, and may alleviate the previous problem - the linear actuator may actually be strong enough to snap any sticks in the way. As I also said before, a linear actuator would create a self-locking system, as the door could not be forced open. It's something I'm considering!
 

slimplynth

Senior Member
I can't believe this website is free... you are, as a collective, by far the most helpful forum I've seen to date, cheers. I'd have written something down if I knew I was going to be making a speech... errr.. {slimplynth moves back to his chair :)}

The thanks for the frequent words of wisdom still stands though, cheers.
 

tiiiim

Member
Apologies for resurrecting a pretty old thread, but I thought I'd update you guys on some progress.

So I've been away for a long time. A long, long time to be honest, and have only managed to get things moving these past few days.

Because I haven't got much time before I go back to Uni, I've decided to simplify the design considerably - I've done away with the LDR's and the entire thing now runs on a mechanical timer (one of those you plug into your 240VAC sockets). I've completely changed the motor and I now have a linear actuator pushing and pulling the door (enabling self locking). The plus with the linear actuator is that it stops itself at full extension, meaning sensors aren't required at either end to detect door opened/closed (and the actuator travel is just the right distance for the hen house door). The negative is that it's an absolute brute, and could squash 25 chickens no problem!!

In terms of picaxe, it's embarrassingly simple. A digit is stored in EEPROM (of a 28X1 - way too much power, but there you go!!) describing the state of the door (open/closed etc). When the timer powers up the unit the picaxe checks the EEPROM for the current door state, then moves the linear actuator in the required direction. Serial messages are fired off to a separate indication unit powered by an 08M, providing visual feedback via LEDs. That's what's installed at the moment.

The plan is to use a PIR unit and another 08M to alert the control unit of intruders during the night and prohibit the door from opening in the morning until the area has been checked by a human. May even put a piezo sounder in there to scare the intruders away (anyone ever made a cat deterrent with a picaxe/piezo combo?).

With a 28X1 running the joint there's ample room for extension in the future, which is why I've kept it in there. Unfortunately, to use the LDR's I'd need a fair amount of time to test and calibrate the system (can only really do it once every 24 hours!), time which I don't have, so simple timer it is!!

Apologies for the lameness!!

(Pic attached!)

EDIT: Ignore all that: I finally went ahead and added the extras - I've posted to the Misc. finished projects with the details...
 

Attachments

Last edited:
Top