Basics for Controlling 12 stepper motors using VB

Hi everyone!

My problem is that I need to control the position of 12 inkjet heads of an industrial printer. Each one needs to be in a precise and steady-fix position during printing. The are mounted on straight rails every one parallel to each other and they only need to be moved when the format of the printing changes. So, speed is not an issue. It's a calibration operation. Right now they are set manually and that is a time consuming task that most of the times needs lots of re-adjustments. My idea is to connect each head to a screw-nut assy like in a CNC machine, and control position of all of them using stepper motors. Also I'm installing a vision OCR system to check robustness of the variable data printed, so it would be great to use the vision data to calibrate real time the paper feeder guide vanes in cases where the paper starts drfiting away, of course using a 13th or 14th motor... Now: -Speed is not an issue, as long as they don't spin that slow, -All moving at the same time, well, that would be fancy, but no, is not an issue, -High torque? not at all, they are pretty light weight, -Precision?, 3mm screw thread would make 0.01mm using 300 pulses per revolution. -Closed loop, encoders? I don't know if stepper motors return info about tracking error, but would be really desirable, -Control, I need to embed the control in a VB code. -Positions, I need to save many different recipes. -Availabiity of hardware is a little issue, I live in Argentina and I might think the stocks are not as big as they are in USA or Europe. But here is an ebay-alike web site, very popular that sells Arduino components, among other electronic stores. Just fyi: http://listado.mercadolibre.com.ar/arduino

OK, I never used Arduino, so I decided to search the web about the basics but it's so vast that I'm kinda lost. I read a couple of threads here and they are all about particular errors that don't help me much, despite they suddenly end with no happy ending..hahaha. I also read about RUMBA that could control 6 motors, and also about STMicro L6740 that can perform memorized instructions as well as read current and stop in case of blockage... So, here is my question: Where to begin? What would be the whole kit to do the job? Can it be done by means of RAMPS? Many thanks in advance!

Franco

First question - What level are your micro and electro-mechanical skills?
You’ll need a fair dose of both to see this through.

Second - think about this in separate development projects - which you have already expressed.

The threaded worm-drive seems like a good idea - if the movement during printing won’t affect the steppers / linkages and wiring.

Steppers normally don’t have feedback, but there are several ways you can implement that. In your case - in two dimensions: The linear ‘worm’ position, and the rotational/angular ‘shaft’ position.

Look into optical, hall-effect and other limit sensors - but must be good to the positioning accuracy you’re after (a simple microswitch may not give you .001 inch repeatably)

The general idea of using an Arduino or similar to drive the steppers is OK.
You may clock them all at once, or more likely select and drive a few at a time with some simple ‘routing’ of the drive signals to the stepper power drivers.

The VB code is outside the scope of this forum - but if it was my project, I’d write that up (separately) with all the jazzy screen, storage and UI elements needed) - then send the stepper data over to the Arduino to do the local work.

You’d need to define your serial protocol to talk VB-to-Arduino (and back if needed).
Remember to report limits, jams etc if the steppers don’t deliver what’s required!

Sounds interesting - keep us posted!

Have a look at Stepper Motor Basics and Simple Stepper Code

Start by writing an Arduino program to control a single stepper motor and the corresponding VB program to send instructions to the Arduino.

You may also be interested in Planning and Implementing a Program

...R

lastchancename: First question - What level are your micro and electro-mechanical skills? You'll need a fair dose of both to see this through.

First above all...Thanks for the reply. I'm a senior electromechanical engineer, my experience is mainly in industrial robot integration, artificial vision, electromechanical solutions as well as CAD design. I've developed robot grippers and machines using this worms and linear bearings, so this is covered. Also lot of experience in professional racing cars, so MoTeC data aquisition is also an asset. So, if you mean microcontrollers, not that much, I try to avoid developing already developed industrial grade commercial solutions. But, in this case, cost and simpleness calls my attention strongly. Electromechanical skills is not a problem, this is where I feel more confident.

lastchancename: Second - think about this in separate development projects - which you have already expressed.

The threaded worm-drive seems like a good idea - if the movement during printing won't affect the steppers / linkages and wiring.

The threaded worm solution is an alternative to the pulley-belt system, and I admit I've not considered it yet. I like the worm because it's simpler and more robust. For sure it is more expensive. The only movement during printing is the conveyor belt below the inkjet heads, wich remain static, as each prints only a 0.5" wide band. All togheter, side by side, print the whole page. The motors would be in a lateral side of the conveyor, and will only move in format change. Machine is stopped.

lastchancename: Steppers normally don't have feedback, but there are several ways you can implement that. In your case - in two dimensions: The linear 'worm' position, and the rotational/angular 'shaft' position.

Look into optical, hall-effect and other limit sensors - but must be good to the positioning accuracy you're after (a simple microswitch may not give you .001 inch repeatably)

Is it possible to close the loop? (PID..?) Are the Arduino ready to read analog (lineal pot) or digital inputs (absolut encoder) and apply the signal to a control loop? Are they fast enough to process and control real time? In fact depending on the precision and quality of the mechanical guides and worms, and aided with a blockage/overcurrent sensing driver one could dispense with the sensors, due to smooth and predictable movements of the masses. Do you think STMicro L6470 is recommendable? I may look for substitutes because it's not available in Argentina..

lastchancename: The general idea of using an Arduino or similar to drive the steppers is OK. You may clock them all at once, or more likely select and drive a few at a time with some simple 'routing' of the drive signals to the stepper power drivers.

What do you mean clock all at once? or by routing the drive signals? I may say that there is no need to move them all at once. It's a calibration procedure so it usually takes long, but from manual to one motor at a time automatically, there a bunch of improvement.

lastchancename: The VB code is outside the scope of this forum - but if it was my project, I'd write that up (separately) with all the jazzy screen, storage and UI elements needed) - then send the stepper data over to the Arduino to do the local work.

You'd need to define your serial protocol to talk VB-to-Arduino (and back if needed). Remember to report limits, jams etc if the steppers don't deliver what's required!

Sounds interesting - keep us posted!

OK, after reading Robin2 texts I realized that I need, as properly recommended, to start eating the elephant by small bites. I will figure out how to control a single motor with the simpler scheme available (which I still don't know) and keep up you up with the advances. I'd also wish know what system can be scalable to a RUMBA board for instance, so I can control the 12 motors afterwards, and not to realize later that all I learned is only useful to this specific board or that specific driver.

Robin2: Have a look at Stepper Motor Basics and Simple Stepper Code

Start by writing an Arduino program to control a single stepper motor and the corresponding VB program to send instructions to the Arduino.

You may also be interested in Planning and Implementing a Program

...R

Robin, thanks for the recommendations. More than useful. I'll get my hands to work.

I was looking at your original requirements, and thought about another recent post.

Since your print heads aren't moving (other than for cal), it may be worth looking at low cost linear actuators (like Firgelli), which have a simple R/C servo interface option.

Driving those would be a lot easier than tracking multiple steppers and feedback... Worth checking..

lastchancename: I was looking at your original requirements, and thought about another recent post.

Since your print heads aren't moving (other than for cal), it may be worth looking at low cost linear actuators (like Firgelli), which have a simple R/C servo interface option.

Driving those would be a lot easier than tracking multiple steppers and feedback... Worth checking..

Really nice devices, and inexpensive too, but actually the web width is 12", and Firgellis are up to 8". Do you know another brand? With regards to tracking multiples steppers is not necessary to move them all at the same time, neither 2 at the same time!