So my granddad has chickens that lay eggs (duh), but he needs to get up early to open the trapdoor to let them out on grass and at the end of the day close the trapdoor.
I've came with an idea of using arduino nano/mini pro to automate that. He already has wires with pulleys that when you pull the wire, the doors opens and when you let it go it closes, and some old windshield wiper DC motor.
So my idea is to buy 2 relay module (to steer the motor both directions) and the nano/micro.
I've thought of 2 types of steering this kind of thing:
limiting switches or time based
I have few micro switches from old mouses that could be used to limit the opening/closing
or see how long it takes to open / close the door.
In use:
at let's say 6:00 arduino turns on 1st relay to open the door then turn off the relay, then waits to 20:00 to open 2nd relay to close the door and the cycle repeats everyday.
Would it be that simple? Is that a good idea? He liked it when I told him about it, and I'd like to get some more experience with relays. I'd need help with programming this kind of thing.
Few extras that I though of:
7 segment display, showing 9-0% (mapped from 100% to 0%) of the opening percentage (it's hard to see the trapdoor from inside)
Manual override - when you'd need to force to open/close the door without being it on time. Could be a button or a 3 throw switch. When used it would have to remember what was before to not to try to open it again or when used with limiting switches, check which one is pressed.
Oxmaster:
So my granddad has chickens that lay eggs (duh),
no duh in there home chicken eggs are good.
So my idea is to buy 2 relay module (to steer the motor both directions) and the nano/micro.
I've thought of 2 types of steering this kind of thing:
limiting switches or time based
I have few micro switches from old mouses that could be used to limit the opening/closing
or see how long it takes to open / close the door.
In use:
at let's say 6:00 arduino turns on 1st relay to open the door then turn off the relay, then waits to 20:00 to open 2nd relay to close the door and the cycle repeats everyday.
Would it be that simple?
Yes!
Is that a good idea?
I have no Idea all good inventions seem to have dark consequences , but who cares?
He liked it when I told him about it, and I'd like to get some more experience with relays. I'd need help with programming this kind of thing.
Yup, here is the right place. It may cost you time to learn or money to pay someone who already learned. Your pick. I'd choose first.
Few extras that I though of:
...
Now you-re picky. Just kidding. These are extras. A big extra is to have video real time stream on youtube with door opening and chickens & rooster (I hope they have one) coming out greeting the morning sunshine. But yeah, these are cherries on the cake.
Oxmaster:
I've thought of 2 types of steering this kind of thing:
limiting switches or time based
I have few micro switches from old mouses that could be used to limit the opening/closing
or see how long it takes to open / close the door.
(Micro) switches could be very unreliable outside.
If you use them, use them normally closed (opening at the endstop).
Reed switches, as used in alarm systems, are reliable.
A third way could be to detect motor current going up at the endstop.
Leo..
Instead of relays use L298N, enhance the micro switches with timing (so either the time runs out or the trap door is detected by switch). 1 button to manually open/close, 1 green LED (to show that the program is runing) and 1 red (blinking every 10 secs or so to show that the motor is not in use), to power the nano I have charger 7V, 200mA should be enough for 2 20mA leds.
I got some details about the DC motor, it's from around 1980 Syrena car, supposedly it's 12V I've measured the ohms of the motor and it showed 4ohms so 12V/4ohm = 3Amps (didn't try to run in and test the current it self, so don't know the stall current). L298N can supply up to 2Amps so that's a problem.
Suggest you stick to the relays - a normal wiper motor takes 5-10A easily - and a static masurment with an ohmeter doesn't tell you much. I'd expect 1 ohm or less.
a static masurment with an ohmeter doesn't tell you much.
Wrong.
An accurate measurement of the winding resistance tells you the stall current of a brushed DC motor, which is extremely important to know.
The 4 Ohm value you measured should be verified by measuring the resistance while slowly rotating the motor shaft. Take the lowest reading, as intermittent contact resistance will lead to higher values.
The stall current is (motor power supply voltage)/(winding resistance) and the motor will draw this value every time it starts up. The motor driver must be able to handle this, and the L298 will NOT handle 2 amperes for more than a few microseconds. Pololu sells a great range of modern motor drivers, some handing up to 30 A.
I suggested the ohmeter reading is potentially unreliable, as brush contact resistance is variable. 4 ohms seems very high for such a motor - I've measured quite a few - are the brushes badly worn or the commutator dirty? I bet it's a scavenged part from an old car, not a new one! I know farmers !