Go Down

Topic: Assistance request for motor control. (Read 1 time) previous topic - next topic


I had put this in the wrong forum and someone recommended this one.

I'm an old farmer and I do not know anything at all about electronics.  But I'm trying to learn.  My goal is to design and build an automatic livestock gate operator.  I have done some studying and some experimenting with my new Arduino Uno and I have successfully completed the first 4 instructional lessons.  I can blink all sorts of LEDs and change the timing to my heart's content.  :smiley-eek:

My request:
I would like to know if there is someone out there who would assist me in my quest to have an Arduino livestock gate controller.  Since my workload here at the farm is heavy at times and I'm a complete moron at this electronics stuff it may try your patience a bit.  Anybody up for it?

Here's my plan . . . (I already have the gate actuator design and have a proto built - now I need to control it)
1. Everything must be 12 VDC.  I will have solar power at installation locations.
2. I need to initiate gate movement by either timing or by amount of sunlight.
3. Gate travel controlled by timing only to eliminate the need for switches on the gate.



I would look into how to control relays using the Arduino; then you could wire up 12VDC relays (standard Bosch or what-have-you), and switch them on/off using the Arduino - here's the "standard" referenced PDF:


You can find other things on the playground, too - plus googling "Arduino Relay" will bring up a host of examples as well. Basically, if you can blink an LED, you can control a relay. Instead of an LED, you switch on/off a transistor, which controls a larger voltage/current that drives the coil of the relay. Remember to install the diode across the coil of the relay properly (otherwise, you'll burn out your transistor), as well as use a proper resistor between the Arduino's pin and the base of the transistor. You need to drive a relay like this because the pins on an Arduino can not supply enough current to actuate a relay directly, and the resistor is needed to prevent too much current from being drawn; basically, if you don't do it this way, you'll fry your Arduino.

There exist boards that you can buy on Ebay and elsewhere that have all of this already implemented (relay, transistor, diode, resistor, etc); whether the relay included would be up to the task of driving the gate actuator though (ie, contact current rating on relay vs current needs of the gate actuator), I don't know - you'll have to research this. If not, you could use the smaller relay to drive a larger one...

As far as control/software - for light level control, you could either monitor the voltage of the solar panel; better, though, would be to use a simple LDR (light dependent/sensistive resistor - also know as CdS - cadmium sulphide - cells), and monitor that via a voltage divider on one of the analog input pins of the Arduino, similar to the following:


For timing instead, you could do it all in software; whether that would be accurate enough over the long term or not, I don't know; otherwise, you would need to look into using some form of real-time clock system. There are shields and other devices that you can hook up to the Arduino, and send simple commands or such to set the time, and read back the current time.

Hope this helps, or at least gets you thinking in a good direction! Good luck!
I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.


This just ran through my little head how about RFIDs on each of the livestock?  Tagged they would be let through the gate if they approached the gate during the preset window.

Just some more or less random thoughts late at night,



Thanks crOsh - a couple of your statements left me with a puzzled look on my face  ;) but I'll learn the terminology very well this way.  I'll certainly look into the links you provided.

wwbrown - while having the livestock wear RF necklaces may be a bit more sophisticated than I want to get, it IS a great idea.  And one that will be stored in my memory for future application.  Thanks.

Go Up