How do I control motor for moving an object.

Hello!

For my school project we need to move an object (like 5KG). It has to move forward and backward.
Our teachers recommended, we use a tile floor as 'sensors'. So when you step on it, the aluminium between it will make contact and send information the arduino. (like a button)
At the ceiling of our engine we make a dolly-like slider. So the engine will turn 1 pulley and the pulley moves the object. There is a cord between the pulleys and that cord wil move while the pulley turns.

They also recommended we use an engine of a bore. (it can turn left and right round)
So... we're just students who aren't really developed in arduino and coding. So if someone has some great advice or code that would be amazing.

I looked at your video of the people in the park. It seems like an ambitious project for a beginner.

I can't relate the video to your description

At the ceiling of our engine we make a dolly-like slider. So the engine will turn 1 pulley and the pulley moves the object. There is a cord between the pulleys and that cord wil move while the pulley turns.

Perhaps you can draw a diagram of what you have in mind and post a photo of it - not bigger than 1280x960.

I don't know what you mean by

an engine of a bore

. Perhaps you mean a motor from a battery powered drill? Or (if I am right) do you mean to use the complete drill to take advantage of its reducton gearing.

...R

We won't be using an engine of a drill anymore.

And right now I am using this code for my program:

// plaatsbepaling motor
#define RELAIS_PIN 13
// plaatsbepaling van de buttons
#define knopje1 10
#define knopje2 11
#define knopje3 9
#define knopje4 3
#define knopje5 2

int motorDoel = 0;
int buttonDoel = 0;

void setup() {
pinMode(RELAIS_PIN, OUTPUT);
digitalWrite(RELAIS_PIN, HIGH);
pinMode(knopje1, INPUT);
pinMode(knopje2, INPUT);
pinMode(knopje3, INPUT);
pinMode(knopje4, INPUT);
pinMode(knopje5, INPUT);
Serial.begin(9600);
}

void loop(){

if (knopje1State == HIGH) {
motorDoel = 1;
}

if (knopje2State == HIGH) {
motorDoel = 2;
}

if (knopje3State == HIGH) {
motorDoel = 3;
}

if (knopje4State == HIGH) {
motorDoel = 4;
}

if (knopje5State == HIGH) {
motorDoel = 5;
}
checkDoel();

Serial.print("motorDoel =");
Serial.println(motorDoel);

delay(100);
}

void checkDoel(){

switch (motorDoel){

case 1:
moveForward();
}
digitalWrite(RELAIS_PIN, LOW);
Serial.println(" knop ingedrukt! ");
break;
}
}

void moveForward(){

digitalWrite(RELAIS_PIN, HIGH);
}

I am using 10 buttons (in total, now I only use 5), but I can't connect them to the engine. They don't even react when i push them.
How can I connect 10 buttons on 1 led (for example). The led will be replaced by a Relay.

Can anyone help me?

Marjooxx:
We won't be using an engine of a drill anymore.

That doesn't help with my first question.

...R

There are two ways of controlling a DC motor that I know of. The easier of the two is with relays or a relay module. The problem with this method is while it can go forward and backward it has only three speeds; forward, backward, and stopped. You can find relay modules that you can easily control with an arduino on amazon. You need two relays for each DC motor.

The more complex and versatile method is with an h-bridge. This has at least four transistors. Low current ones can be bought online, but to get much to move you would likely need to make your own or spend a lot of money. It is easy to burn out the transistors with a short, but if you are careful and start with low voltage you should be alright. The problem is I have yet to get an h-bridge to work well that I have made myself.

Arduino motor shields may work but max out at around 2 amps.