I am a total newbe in arduino and start to make a remote reward controlled dog trainer.
After filling the reward feeder I want a step motor to rotate 1/10 turn each time I push a button.
I would appreciate some tips on how to solve this with an arduino.
My stepmotor is a 28BYJ-48.
anqas:
I would appreciate some tips on how to solve this with an arduino.
My stepmotor is a 28BYJ-48.
Have you written a simple program to make the stepper motor move? If not, that is the first thing to do. There are dozens of Forum Threads about 28BYJ-48 stepper motors and I'm sure there are also many other online tutorials.
The 28BYJ motor needs 2048 steps per revolution so 1/10th of a revolution would be about 205 steps. Ten jumps of 205 steps would be a little too much so do 8 jumps of 205 steps and 2 jumps of 204 steps.
Hi Railroader I will use this when I train agility and I can´t be in two places at the same time. If I send the dog to jump over agility obstacle or run true a tunnel I have to reward him exact when he is doing right and then I haw to reward him from distant.
And Robin2, I did not think of that maby I could have only 8 feeder make it 256 steps.
anqas:
And Robin2, I did not think of that maby I could have only 8 feeder make it 256 steps.
I don't think there is any need for each move to be the exact same number of steps. An error of 5 steps would only be about 1 degree. You just need to ensure that the total number of steps for a revolution is exact so that you don't get a long term error.
Hi again! I am working with this projekt read and looked on videos tutorial and come so far that tis program will start the feed sequence and stop there, but I get stuck, cant start the secuese of the motor with the button, so I will be grateful if someone could give me some good advice.
First select, use the autoformat in the IDE. Then mark, select, the entire code. Then click on the symbol up to the left in this window. It looks like </>.
The paste the code! Voila!
Thanks Railoader for info, and yes I have looked for examples and come so far that this code will drive the motor in the sequense I want, but I dont find some way to start the loop sequens with the button. The botton is wired with a pull down resistor.
Hi Pal! where is Your code tagged code? Maybe a sharp helper would step in.....
Your code for moving the stepper looks like nothing I've seen before.
If I haven't missed information I guess that You have tied the stepper directly to the Arduino. Correct?