Go Down

Topic: How would one do this project? (Read 1 time) previous topic - next topic

FHUGO

Hello, I am new to all this and I thought this would be the best place to have my query answered. I would like to have two motors when one motor is turned a certain degree it sends this information over the internet to a replica motor and that motor does the same and vice versa. What would be required to do this?

Cheers


Peter_n

You could use a Wifi or a Ethernet Shield to let two Arduino boards communicate over internet.

How is the first motor turned ? Using an Arduino ? or with something else.
It is possible to attach a rotary encoder to the first motor ? What accuracy would you like for the degrees ?

You also need a motor driver (the hardware to make the motor run) between the Arduino board and the motor.

And you need to make the Arduino board visible on the internet, that means you have to open a port in the router.

FHUGO

Hi the first motor would be turned by hand like a dial and then the second motor would copy. then the second motor could be turned and the first will copy. Yes an encoder can be attached to each motor. It would need to be on standby when the motor has no signal to dive so that any manual rotation of the shaft is transmitted as a command to the other motor.

Robin2

#3
Oct 27, 2014, 09:04 am Last Edit: Oct 27, 2014, 09:07 am by Robin2
This is not going to be a simple project. I suggest you think, first, about using the two motors the way you describe both connected to the same Arduino board. (I will mention the communication between Arduinos in a moment).

In many ways the easiest motors to use would be stepper motors - but they would also need encoders. Reading the encoder on one motor could be used to send the number of steps to the other motor. Even with this arrangement there are complications. Unless you use absolute encoders you will not know where the motor actually is. If the "master" motor is powered up you may not be able to turn it by hand. If it is not powered up it may not hold position.

You could use DC motors with encoders but the software to position them accurately will be much more complicated.

Even if you sort out those issues, when you put the motors on two separate Arduinos you will add in the complications from the time it takes for data to pass from one to the other.

Have you considered using a potentiometer to identify the position which is then sent to both motors? In that case maybe you could use servos which are by far the easiest positionable motors to work with.

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

Peter_n

So both sides are equal: An Arduino board with Ethernet or Wifi and a motor driver and a motor with encoder on both sides.

What happens if both motors are turned at the same time ?

An encoder has to be initialized to a certain position at power on. It doesn't know the angle when the Arduino is turned on. Is that a problem ? Or do you want to know the absolute angle at all times ?

(While I was typing this, Robin2 replied. I agree with everything he wrote. It is not a simple project).

FHUGO

At the moment I'm just thinking about it as an idea, no plan of action yet. IF we put exact positioning aside as a first step I think if the master motor turns at any position 10 degrees for example the slave motor will turn 10 degrees from wherever it currently is positioned. Could a sequential system be coded for so a motor can only be manually turned once it is no longer receiving a signal but no interruption so trying to manually rotate a active motor will be met with resistance?

Peter_n

Yes, but it depends on the motor.

A stepper motor can do that. Without power, it is just a shaft without resistance and with power it has some resistance. But without power, it might not keep its position and with power it might still be very weak.
Perhaps a stepper motor with a gear can still be turned and has more resistance.

A normal DC brushed motor (like the motors in toys) can be set free running (no power) or with a little resistance (wires shortcut).

Do you want to motor to actually do something, like drive something ? Or only rotate to a certain degree/position/angle ? Like the motorized volume knobs.

If it is only the rotation angle, you can use two motorized volume knobs and interface them with an Arduino.

Robin2

At the moment I'm just thinking about it as an idea,
I don't get the impression that you read Reply #3 and thought about it carefully. I'm not going to waste time repeating it.

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

FHUGO

They do not need to drive anything in particular. potential use like a servo for push or pull or lift and lower. A servo would work very well but for the manual movement it does have a bit too much resistance. I would want it to be fairly smooth. Could you explain further the motorized volume knobs? are they essentially  a motor and encoder?

Peter_n

I don't know how motorized volume knobs work, perhaps just a motor and a potentiometer.
Looking at some pictures, some have a simple DC motor, others have a stepper motor.
Search on Ebay for : motorized volume control
For 15 dollars you can buy a module.

Adafruit has servo motors with feedback : http://www.adafruit.com/product/1404

But when you turn it, you have to rotate all the gears inside. That is a certain amount of resistance indeed.

https://www.youtube.com/watch?v=D8BLIr4w2JQ


I prefer to start a project as soon as possible and learn along the way. So I suggest to buy both the servo with feedback and the modules from Ebay. Perhaps they both are fine, perhaps you want better quality after all.

Go Up