How to control stepper motor over 150m long wire?

Hello! I'm big noob here, but I need help.

My request is rather simple. I have to control 3 stepper motors (or maybe 6 if it's not to complicated) over 150m long wire (I have 2 twisted pairs at my disposal). So, all I need is something to control their speed. I don't need individual control over each motor, but I have to be able to change their speed and direction at once. Now, 150m is a lot, so I was thinking to use RS485 protocol to control them. However, I need to know what I would need in order to do this. If you think that there are easier solutions to this problem than Arduino and/or RS485, please suggest one.

Thanks so much!

eluminer

Tell us what hardware you are planning to have at each end.

Have you tried anything yet? If so with what result?

...R

With 2 twisted pair (4 wires), how many wires does your stepping motor have?
You will probably need to send all the power needed across the 150m wires. Or, maybe put your arduino near the stepping motor with a power supply, or battery.
Maybe a bit more detail and requirements would help us.
Is the stepping motor running 90% of the day, or 2%
If it is not secret, what is the application?
We are here to help, the more we know, the more/faster we can help.

Thanks for the quick reply guys.

Here is some more info. I'm planning to build a pipe inspection robot for a very specific application (for one specific tube). Now, it must have camera and it has to be able to go forward and reverse at relatively slow speed. I've choose stepper motors because they have biggest torque per size which is very important. Robot must fit in 100mm (diameter) tube as well as pulling 150m worth of cat5 cable. Because of its design and pipe configuration it doesn't need steering or anything else. I do believe that this would work with simple brushed motor as well, but I would like to use steppers.

I've already decided to use RS485 for camera control and video. So, I'll use cat5 cable. One twisted pair for controlling the PTZ (Pan/Tilt/Zoom) camera and second for receiving video. I could buy specific display for this, but I'll decided to go with laptop due to lowest cost (I have one :D).

So, in cat5 cable are 4 twisted pairs, so I've left with two now. I was wondering what is the easiest way to control the robot back and forward over wire (that long). That's all I need. The best way would be control via computer, but buying a simple joystick or something wouldn't be a problem. I was thinking :D, if there is a way to control PTZ cameras via RS485 (where you basically control servo motors which turn the camera), why wouldn't be possible to control couple of motors for drive.

I would carry LiPo battery on board, so no power will be transferred through cat5 cable (it's a bit too long for that).

I didn't buy anything yet because I'm still researching this.

Thanks!

Ok,

  1. Is the cable "4 twisted pairs" or "2 twisted pairs"? Eight wires, or 4 wires?
  2. You will have an onboard battery. With some charging through the wires? How long does this have to run on that battery?
  3. Give a break down of what the wires go to?

With information at hand, I would say you should send voltage through the wires to charge/supplement the battery.
Have a processor on the end of the wire, that can sleep if the power on the battery gets to low, then wake up and start moving again.

I assume, that when the device is directed to reverse, someone will pull on the wires to help it come out. As well as when it is going in, someone will push the wires to help it move forward. ( or is this all done without human assistance ?)
I won't even ask yet what medium this is running through!

If you have multiple pairs (presumably 4 pairs) you could consider sending data fully isolated to the power supplies (which means ignore the "connect the grounds" in my signoff).
You could then power your setup by having both wires of pair 1 at VCC, and both wires of another pair at GND.
As you might know, RS 485 sends data by inverting levels between the two wires.
It doesn't matter if you have some offset between 2 pairs, as long as both wires of a single pair are at the same level when idle.
If you do this, you'd best try to keep a constant current, to prevent accidental data errors caused by pulses.
This way you should be able to charge your batteries while in use, extending the range of your device.

I'd ditch the idea of using stepper motors unless you absolutely need them. For what it sounds like you are doing, you wouldn't need them (plain DC motors for the wheels, and servos for the pan/tilt would work just fine for your application).

As far as control, since you have battery on-board, and the distance isn't that great, just use plain 10/100 ethernet - yes, I know that the standard is 100 meters max, but I bet you could go longer (try it, see what happens) - or just add an ethernet extender device.

You would still use the PC as the controlling interface.

Video would be via a network-capable camera (plenty of options there - including ruggedized PTZ systems if you don't mind the money).

Control of the robot could be any number of ways - as an idea:

  1. Use a Raspberry Pi on-board the robot for the ethernet interface
  2. Add a small switch so you can connect up the camera
  3. Connect Arduino(s) (likely as standalone controllers) to the Pi to control your motors, servos, lights, etc.

You could substitute the Pi with a hacked router (OpenWRT or the like); controlling the Arduino via the TTL serial interface...

...or you could use a Nano-ITX board on the robot as the main controller.

Of course, this reduces the role of the Arduino, but the end-result may be more reliable (though RS-485 is a good standard, too), it would be easily expandable, and it would be instantly network capable (stick the entire control system on a webserver running on the larger controller on the robot, and your control system becomes a web browser - plug-n-play operation).

Although you didn't say I presume you are planning to have an Arduino as part of the robot in the pipe and the robot will be self contained, i.e. it will have it's own power from batteries and it won't need power over the signal cables and it will only operate for a shortish period of time well within the capacity of the onboard battery. I also presume you will have something outside the pipe to tell the robot to go forwards or backwards - that might be a PC or it might simply be a 3-way switch - Rev-off-Fwd.

If these assumptions are wrong please tell us the correct version.

Cat5 cable is pretty heavy and inflexible. How much does 150m weigh? I suspect you will need a powerful robot to pull that cable - and that means a large-capacity battery. If the pipe has bends in it I suspect you may find that it won't work.

I assume, if you are inspecting the pipe, that there is a possibility of obstructions that could be a problem for your robot. If the pipe is known to be clean it probably wouldn't need inspections.

What about using multiplexed communication (a bit like wireless, but over a wire) and using a thin flexible wire? Perhaps there could be a reel of wire on the robot so there would be no need for the wire to slide within the pipe. As someone else said the wire could be pulled out by the operator when the robot needs to reverse.

What about using wireless comms? If it's a plastic pipe the "receiver/controller" could probably be moved along outside the pipe? It might still be worth having a fine wire as a backup recovery mechanism. (A dirty pipe without a robot would be much better than a dirty pipe with a stuck robot :))

...R

WOW, great response. Thanks!

First of all, let me explain what exactly do I do. I work in cable industry and we have so called CV (continuous vulcanisation) tubes. That is where you put insulation on bare wire. Now, every once in a while some insulation material is stuck to the inside of the tube and it becomes hard as an rock (500C is in there). Then it starts to damage the cable that scrapes on this which is not good, of course. We have to be able to locate this problem so that we can se where and what is causing damage to the cables. Now, brand new pipe robot costs over 10000$ which is way to much for couple of looks inside those tubes (once per month max). Now, since this tube has a shape of catenary, has almost same diameter all the way, doesn't have bends, it's basically clean (except those couple bumps which I'm looking for), so no water, dirt or other nasty environment, it's relatively short (150m, although I only have to go in about 60-80m) I though that this can be done much cheaper than 10000$. I was thinking under 2000$ (not including PC of course). Industrial pipe robots cost that much because they can go into tubes of various diameters, vertical, through bends, in water/mud/what not, further that 150m, work 24/7 etc. So, when I remove all those things, I think this can be done for under 2000$.

Design would be very similar to this:

So, what I need now is a way to control those 3 drive motors, get a video from CCTV camera and control PTZ.

@jackwp

  1. 4 twisted pairs, 8 wires
  2. I didn't plan any charging. Well, around 15 mins would be great (driving, paning/tilting, camera and LED's)
  3. Well, here is what I thought. One pair from PTZ camera to PTZ joystick for controlling PTZ. That is basically plug and play solution. Second pair for video. So, two baluns, one on each side of the cable. On control end some specific RS485 capable monitor or laptop with RS458-USB converter. Again, plug and play. So, now I left with 4 wires (2 pairs) which I thought could use for control somehow.

I was thinking about having external power through 2 pairs (so, 2 for VCC and 2 for ground), but I'm not sure about it. 150m is a lot, and simple small LiPo should be better solution.

Yes, one person will be helping with wire. He will push the wire in the tube and pull it out (as much as possible). Also, I was thinking about using Kevlar strip to pul the robot out if necessary. Kevlar is light and very very strong and I might have some at my disposal. :smiley:

@MAS3
Good idea with charging, but I don't think it will be necessary.

@cr0sh
Yes, DC motors would probably work fine.
Ethernet would probably work, because as I said, I actually only need to go in about 60-80m, 100 max (second part of CV tube is for cooling the cable and we never have problem there).
Thanks for the suggestions, I will look into that.

@Robin2

All assumptions are right! PC would be great for control, but 3-way switch is an option as well. Although, I would like to have linear control over motors as oppose to ON-OFF.
150m = around 4kg - however, CV tube is going down (about 18 degrees) so robot shouldn't have much trouble with that. We can pull it out backwards.

Wireless is not an option because this is completely metal, grounded, tube. Also, it's not completely straight so antenna at the entrance wouldn't work either. Otherwise I would already do that using my RC equipment :stuck_out_tongue:

Yeah, robot stuck in a tube is not an option either. :smiley:

My biggest problem is that I don't know much about programming microcontrollers. So, complicated solutions where I need to program a lot is not an option. However, if there is a solution that involves Arduino, but there already is complete code which I just have to put on, I shouldn't have a problem doing this.

So, the pipe robots job, is to give you a visual video of the inside of the pipe. It will not try to clean the problem?
You want to know where in the pipe the robot is? How do you plan to do that?

Maybe I missed something, but I don't see why you even need an Arduino. Update me.

If you build the sort of triangular device like in your picture you probably only need power on one wheel. The other wheels would be sprung to exert a force to give the powered wheel grip.

It is VERY easy to control the speed and direction of a standard DC motor with an Arduino - much much easier than controlling stepper motors. My first thought would be to use an off-the-shelf geared motor - but, another thought is to drive the power wheel by friction on the tyre surface in order to keep the motor nearer to the centre of the tube where it is widest, and to avoid the need for a "transmission". The gear ratio would have to take account of the "gearing" between the drive shaft and the tyre.

Then, again, if all you need to do is drive a motor maybe you could just provide the motor power through the cable and have no electronics on the "robot". A higher voltage, low current motor would be better in view of the cable length. It may be worth having a separate twin conductor power cable? You could make a PWM motor controller around a 555 timer chip, a power transistor a potentiometer and a dpdt switch.

...R

Well worth tracking down some flexible cable with 4 twisted pairs or even ribbon cable wired

GND
S-
S+
GND
S2-
S2+
GND
...

or similar (for signal pairs S, S2). Ribbon cable can be spooled which might be handy.

eluminer:
WOW, great response. Thanks!

First of all, let me explain what exactly do I do. I work in cable industry and we have so called CV (continuous vulcanisation) tubes. That is where you put insulation on bare wire. Now, every once in a while some insulation material is stuck to the inside of the tube and it becomes hard as an rock (500C is in there). Then it starts to damage the cable that scrapes on this which is not good, of course. We have to be able to locate this problem so that we can se where and what is causing damage to the cables. Now, brand new pipe robot costs over 10000$ which is way to much for couple of looks inside those tubes (once per month max). Now, since this tube has a shape of catenary, has almost same diameter all the way, doesn't have bends, it's basically clean (except those couple bumps which I'm looking for), so no water, dirt or other nasty environment, it's relatively short (150m, although I only have to go in about 60-80m) I though that this can be done much cheaper than 10000$. I was thinking under 2000$ (not including PC of course). Industrial pipe robots cost that much because they can go into tubes of various diameters, vertical, through bends, in water/mud/what not, further that 150m, work 24/7 etc. So, when I remove all those things, I think this can be done for under 2000$.

I think you should do as the other say - go for full ethernet solution - particularly if you are staying under the 100m mark

Put an ethernet controlled Arduino at the robot end and a small DC motor.

Make sure you use stranded ethernet cable and it will be fine to roll up on a spool as it comes back out of the tube.

Use a tether cable of some description - kevlar would be excellent

If you are only running fast ethernet (100M) or even 10M then you have 2 pairs of cable free that you could use to push upto 48v down (as in Power Over Ethernet)

Craig

Craig

Craig

KISS.

Camera on the end of a pole.

10 of these sets,
http://www.toolbox.co.uk/kingfisher-12-piece-drain-rod-3172-150042?utm_source=GoogleBase&utm_medium=GB&utm_campaign=GoogleBase&gclid=CO7ut7nKoLkCFcLHtAodyyUAwQ

and a cheap Ethernet camera,
http://www.lightinthebox.com/hd-2-0-mp-bullet-ip-camera-4-9mm-36pcs-8-led-ir-40m-motion-detection-privacy-mask-etc_p606945.html

USD 500, done deal.

It's a good point, but it would get tedious assembling the rods and, unless it's very tiny, you'd still need a little wheeled cart to mount the camera, and you'd still need the cable. So might as well motorise the cart and not bother with the drain rods. It only needs to go back and forth so should be cheap and simple.

you could keep the rods part assembled , lengths of 3 m
off the shelf camera / software and a 100 m ethernet cable

that sort of camera is strong enough just to be taped onto the end of the rods if needed.
and if you number the rods, you know how far in the camera is,
and you could even fit a scraper to the thing to clean the pipe,

If you are already using RS485 for the video camera, then I see no reason not to use RS485 for the motor control as well. Use a RS485 receiver at the robot end, feeding the RxD input of the Arduino or other microcontroller. Then you can can use some simple software commands to translate serial input to commands for a stepper motor or DC motor. A stepper motor is probably easier, because then the whole system can be open-loop; but a DC motor would probably give you longer battery life.

drjiohnsmith:
you could keep the rods part assembled , lengths of 3 m
off the shelf camera / software and a 100 m ethernet cable

that sort of camera is strong enough just to be taped onto the end of the rods if needed.
and if you number the rods, you know how far in the camera is,
and you could even fit a scraper to the thing to clean the pipe,

Hmm... If it were me, I'd do the motorised cart. At the end of the day it'll be less effort.

motor cart certainly much more fun,

but if I was new to Arduino, and it was my job on line for a prompt reliable system,
I'd have to think

Some more info and answers.

Robot should only find and locate the problem. There is no robot that could clean this. This is usualy cleaned using 210 bar water pumps, so.... It must find this (visualy) and determine how far in the pipe is that. I thought I could do this using marks on cable. So, robot is as far in as cable is, right?

I'm kinda leaning towards power over wire solution. I want to keep robot as simple as possible because it has to be quite small. So, maybe high voltage low current motors over 2 pairs would be good solution. Have to try it.

Solution with poles.... well, I don't like that. After all, biggest expense here is the camera, so motorized cart is not that big of a problem.

@dc42
Can you suggest what should I use to control dc motors (or steppers) via RS485. What kind of microcontrollers, input devices and how all this should be connected.

Thanks!