HELP Automatic 24h feeder with stepper motor

Hello averyone,

i am new guy here on forum. In past i bought arduino for astronomy project, but i didnt finish it. So now i am left with arduino and stepper motor.
I was thinking to make 25kg plastic barrel full of corn and i would like to feed animals lets say at 19:00 each day. I was thinking this motor should rotate 2-5 seconds so the corn will fly around on floor and after 5 sec it will stop. Mayby you have some idea better than mine? I was thinking to feed 1-3kg per day of corn at specific time.

Can anyone please help me with programing? I have 0 knowledge of programing arduino. Do you think stepper can do the job or i would need servo ?

I have:
Arduino duemilanove Compatible B75814
35BYJ412B 12VDC 120om LEILI CHANGZHOU CHINA stepper motor

and other things i am posting my picture

Thank you


I suggest You feef Your animals Yourself. From a close relative being a farmer I know that the social aspect of human contact is positivr for the health of animals.

I dont want to debate whats good whats wrong. I will be away few days and there is no possibility to get another persone to feed them. So only option it this one till i am back.

Thank you

i would not try flinging corn as a method of measurement. Use a drum with correct size gap for the amount of corn you intend to feed and then rotate 360 degrees slowly for each feed. Have the hopper above the drum. You could pot multiple containers and only rotate a fraction relating to 360/Number of containers but you need adequate dead space to prevent leakage.

your project consists of 2 different parts.
mechanical and electrical.

The stepper requires a power supply and a stepper driver. Lots to learn to get any efficiency out of them.
typically, a chopper driver in the hobby world cannot take more than 24Volts.
A stepper does not get into it's power range until you provide 10 times the nameplate voltage. in that range, the stepper will get HOT. steppers waste a lot of power as they are always powered.

but, that does not mean it cannot do a lot of work, only need to compensate with mechanical advantage.
gears, pulleys, etc.

if you take a 5 gallon bucket and drill two holes and put a section of pipe all the way through the bucket.
cut a section of of that pipe at least a full pipe diameter, larger might be better.

you could push a plunger through and any feed in that pipe would fall out the far end.
pull the plunger back and all the feed in the pipe would fall out the near end.
your task is to figure our how to make a plunger.

if you cut a hole under the pipe, so that when you rotated the pipe, the hole in the pipe and the hole in the bottom of the bucket were aligned, you would be able to drop some quantity each rotation. That quantity would be pretty consistent.
you could adjust the chamber in the pipe to gain consistency.

lots of ways to do this, but it all depends on what you can come up with

A very common way of doing this is with an Archimedes screw. Look it up. Little tricky to make yourself though.


assume the arduino is powered 24 hours a day and will not suffer a power loss.
assume the Arudino internal clock will loose(gain) a minute a day
your time will change by 7 minutes in the week. no problems even if you use for 2 months !

there is a simple way to count time, well, lots of ways,
but you can count to 24 hours, then run your motors and dispense the food.

you would load the sketch and have the program start a minute later to give you time to sit back.
that means that every time you apply power, it will start a minute after.
so, when you are ready, at the time typically go feed your livestock, you would just turn on the power.
then go watch it do it's thing.
the next day, when it is time, you go watch to make sure.
confidence in the system and you can worry if you left the iron or the coffee pot on while you are away.

A very common way of doing this is with an Archimedes screw. Look it up. Little tricky to make yourself though.

take the bucket
put the pipe across the the bottom, out one side.
garden auger on a battery drill in the pipe


you only need to put the hole in the pipe near the side of the bucket and the auger would push out as it spun. pmagowan your idea is brilliant !
you could use the stepper to push the button on the drill. LOL

multiple buckets. put one on top of the other, screw the bottom of one to the lid of the other.
put in a large ( as possible ) hole to let the food go through.

I want to make one of these just for fun !

Looks like the drill will be a loose fit in a PVC pipe.
You can use a cap on the far end to let the shaft come through and some shaft collars so the screw action does not move the drill out.

think see-saw.... tipping bucket......

the feed comes out and fills the tipping bucket on the see-saw.
the weight then tilts and the food falls out to the feeding dish below.
you count the number of times the bucket tips.
each tip would be very accurate as to weight and you could adjust weights.
if you stop adding on the tip, then food would not sit in the bucket till the next feeding.
you could put a trap door on the pipe to stop air or critters from getting in

Could call it the Rube Robinson or Heath Goldburg device.
Get it to work and Bob's your uncle !

If you want to scatter it you just need the corn to fall on a spinning centrifugal disc with a few fins on it. You could have this dished and weight monitored to double check the exact amount of corn but the screw should be reasonably accurate.

What RPM are thinking about (the 35BYJ412B won't go more than about 15 RPM)? What is the other motor with 4 white wires?

I would use a second motor for scattering. You could arrange a gear system and a spring loaded flinging arm to scatter the corn with only the stepper motor as power but it would be very Heath Robinson and in a shed environment prone to breaking

I am away now, but this stepper (white) is Mitsumi , M42sp-6TG, 10 om