# Photo resistor and electro-magnet

Discussion in 'General Electronics Discussion' started by AnnB, Mar 30, 2015.

1. ### AnnB

3
1
Mar 30, 2015
Hi,

My daughter is supposed to identify a problem and then create something to solve it. She identified that if we are not home when it gets dark, our chicken coop remains open putting the chickens at risk for a predator attack.

Her solution is to build an electro-magnet that will hold the door open as long as it's light outside. When it gets dark, in theory, the electrical supply would be cut, the magnet would no longer be magnetic, allowing the door to drop closed (it is hinged on the top) and lock shut with a cabinet latch. It would have to be manually opened in the morning.

Her plan is to use a battery, maybe 9 volt, to create the magnent. I am not sure if that battery is strong enough or not. The door is built from 1/2 plywood and is approximately 12" x 8". We thought maybe a photo resistor could be wired in, between the battery and the magnet and that would cut the power supply when it gets dark.

Does this sound feasible? I have no idea what kind or size of photo resistor we would need.

Any thoughts on her project? Thanks!

2. ### (*steve*)¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥdModerator

25,482
2,830
Jan 21, 2010
One problem will be that if you use a small battery to power an electromagnet, the battery will run out way before darkness falls.

Another problem is that a light dependent resistor can't be used to switch power the way you suggest.

What you need to do is have some form of momentary action to release the door. Perhaps you could use a solenoid to open a latch?

You will also need to consider what level of darkness is dark, and how you will stop the device from repeatedly triggering all night.

192
32
Nov 25, 2014
davenn and hevans1944 like this.
4. ### AnnB

3
1
Mar 30, 2015
Thanks for you replies. We're going to give ADRT's suggestion a try!

5. ### Colin Mitchell

1,417
313
Aug 31, 2014
That's a bad circuit. You just want a pulse to activate the electromagnet.

6. ### (*steve*)¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥdModerator

25,482
2,830
Jan 21, 2010
Colin, you may have missed the last part of that message.

192
32
Nov 25, 2014
Sorry, trying to make it simple yet effective. If you see something that's not right let me know.

Jason

8. ### AnnB

3
1
Mar 30, 2015
Just an update. We abandoned the electromagnet idea. We ended up using an door lock actuary out of an old Suburban, The actuator held the chicken door up. It was wired to a 12 volt timer then to a car battery. When the time opened the flow of electricity, the actuator fired and pulled back allowing the door to slam shut and latch using a cabinet latch. It was very simple and accomplished the task beautifully. Thanks for all your input!