Maker Pro
Maker Pro

LabView Alternative for an Automated System to Drive Steppers andTake Measurements of the DUT.

S

sms

Here's what we want to do:
1. Move a platform on an X-Y-Z motion, with three steppers, a specific
amount

2. Make some measurements (voltage, temperature, current) on the device
under test and save those measurements and the position to a file.

3. Go to 1.

There's plenty of low cost CNC stepper boards and software to do the
positioning, but the software doesn't really have an opportunity for
feedback other than some limit switches.

I've used an Arduino board to read in analog values but I need a way to
combine driving the steppers and recording the measurements.

I could do a LabView setup but by the time I buy the software, chassis,
and stepper board it will be $10,000.

Since the steppers need only DIR, STEP, and ENABLE, I suppose I could
write an Arduino program that did everything. However the accuracy of
the Arduino A/Ds leave something to be desired and I haven't found an
Arduino Shield with better A/Ds.

Is there any good alternative to LabView that doesn't cost as much?
 
J

Joerg

sms said:
Here's what we want to do:
1. Move a platform on an X-Y-Z motion, with three steppers, a specific
amount

2. Make some measurements (voltage, temperature, current) on the device
under test and save those measurements and the position to a file.

3. Go to 1.

There's plenty of low cost CNC stepper boards and software to do the
positioning, but the software doesn't really have an opportunity for
feedback other than some limit switches.

I've used an Arduino board to read in analog values but I need a way to
combine driving the steppers and recording the measurements.

I could do a LabView setup but by the time I buy the software, chassis,
and stepper board it will be $10,000.

Since the steppers need only DIR, STEP, and ENABLE, I suppose I could
write an Arduino program that did everything. However the accuracy of
the Arduino A/Ds leave something to be desired and I haven't found an
Arduino Shield with better A/Ds.

Is there any good alternative to LabView that doesn't cost as much?


Yes, there is:

http://labjack.com/u3

Comes with the Express version of this:

http://azeotech.com/daqfactory.php

DAQFactory Express is also free if you don't by a Labjack but it might
be difficult to cobble together a driver for the Arduino. For the
Labjack there already is one which saves a lot of work. There is also a
forum on both sites in case you get hardcore stuck.
 
S

sms

I remember being asked to fix something like that to move a camera for special effects,
driven by a TRS80 programmed in Forth by someone, rack full of cards, things get smaller these days.
I would occasionally step all by itself... interference pickup by the Intel PIOs.
So there are catches...

The Raspberry Pi (of which I have four) is not a particularly good
platform for embedded control. Even with the Gert Board you only get 10
bit A to D converters.

The Arduino is better, and their are stepper routines for Arduino
already available. But again, you're limited to 10 bit A to D converters.

Now that someone pointed me toward Labjack, I find that there are
several options for inexpensive DAQ boards with the precision I need (12
bit A/D converters are fine).
 
S

sms

Well I disagree with that.
It runs a full Linux and has all the I/O you need, plus native HDMI, ethernet,
and USB, plus PAL composite out.
I have used it so far in several projects,
as PIC programmer,
as FPGA programmer
As digital TV transmitter
as satellite tracker,
and the usual HD media playing of course.

The analog devices we are reading have 0-10VDC outputs, so I would
prefer an A/D that can take up to a 10V input which the Labjack U3-HV
and U6 can do. With the Arduino, I used a voltage divider to keep the
level at 5V or less, but I would prefer not to have a voltage divider
because of tolerance and accuracy issues. The RPi has no A/D so it means
an expansion board. With the Gert board for the Raspberry Pi, which I
have, you get only 10 bit A/D converters.

I need 11-12 bit A/D accuracy, 10 bit isn't quite enough and greater
than 12 bit will be meaningless.

I did initially plan to use the Raspberry Pi for this project, but the
more I dug into it it became clear that the amount of additional
hardware necessary made it a poor choice. The GPIO pins are not 5V
tolerant so that means level translators for all of the pins used as
inputs. There is no A/D. The Gert board didn't solve everything because
the A/D isn't good enough for this project. You can use an HDMI monitor
and a USB keyboard and mouse with the RPi, but this is actually more
cumbersome than using a cheap laptop (unless you use the Motorola
Lapdock, which I have been doing).

I can just get by with the Labjack U3-HV, if I leave the four steppers
enabled all the time. I thought about just writing to one stepper at a
time and using the enable pin for each so I could share the direction
and step and even limit pins, but my experience is that when the motor
is enabled there is some slight movement in the X-Y-Z table and it's
better to leave them enabled all the time. I could use some extra logic
to get around that issue to prevent the step pulses from reaching the
motor except when that specific motor is enabled.

U3-HV

All four stepper motors are always enabled. Direction, Step, and Limit
signals are not multiplexed.

INPUT
OR U3-HV
DEVICE FUNCTION OUTPUT PIN
------- -------- ------ ----
Motor X Direction Output EIO0
Motor X Step Output EIO1
Motor X Limit Input FIO4

Motor Y Direction Output EIO2
Motor Y Step Output EIO3
Motor Y Limit Input FIO5

Motor Z Direction Output EIO4
Motor Z Step Output EIO5
Motor Z Limit Input FIO6

Motor S Direction Output EIO6
Motor S Step Output EIO7

Analog 1 A/D Input FIO0
Analog 2 A/D Input FIO1
Analog 3 A/D Input FIO2
Analog 4 A/D Input FIO3

SPI Input Input CIO0
SPI Output Output CIO1
SPI CLK Output CIO2
SPI CS Output CIO3

Unused FIO7
 
K

Klaus Kragelund

Well I disagree with that.

It runs a full Linux and has all the I/O you need, plus native HDMI, ethernet,

and USB, plus PAL composite out.

I have used it so far in several projects,

as PIC programmer,

as FPGA programmer

As digital TV transmitter

as satellite tracker,

and the usual HD media playing of course.



I do not like Arduino, the whole hype about it,

and the way it is programmed (C++ is a crime against hukmanity).

Arduino is more for complete idiots,

Raspberry Pi is for the real men.



BTW see my reply of plugging in a cheap USB soundcard module for 16 bit ADC.



I dunno about gert-board, but if you want pre-cooked hardware you should really

use either standard stuff (like that USB stick)



Also have spectrum analyser, frequeny counter etc working on the Pi, dump1090-

air traffic, and of course the no parts FM transmitter,

use one as signal generator 160 kHz to 250 MHz, etc etc.



Arduino is dead.

Well, that's your opinion, popular demand tells otherwise ;-)

The arduino is great for small projects, for the less experienced user. Goes for as low as 15USD and you don't need external USB thingie to quantize analog signals, that comes free. It draws a lot less power and does not need a Flash card as the Pi does.

Regards

Klaus
 
S

sms

Well, that's your opinion, popular demand tells otherwise ;-)

The arduino is great for small projects, for the less experienced user. Goes for as low as 15USD and you don't need external USB thingie to quantize analog signals, that comes free. It draws a lot less power and does not need a Flash card as the Pi does.

That's true. The big advantage of the Arduino is for projects where you
need to control stuff and read in TTL level inputs and analog inputs.
You don't need level converters. You don't need separate A/D converters.
There are extensive libraries available for stuff like steppers and
communications.

Now you can use a Raspberry Pi to control an Arduino. That's becoming
popular. So you run Linux on the RPi and it talks to the Arduino.
 
K

Klaus Kragelund

That's true. The big advantage of the Arduino is for projects where you

need to control stuff and read in TTL level inputs and analog inputs.

You don't need level converters. You don't need separate A/D converters.

There are extensive libraries available for stuff like steppers and

communications.



Now you can use a Raspberry Pi to control an Arduino. That's becoming

popular. So you run Linux on the RPi and it talks to the Arduino.

Another issue is the power consumption. The Pi takes up to 5W, the Arduino maximum 0.1W. A Pi is not suited for a battery operated application, the Arduino can be used for that.

Running the controller 24/7, the Pi would cost 14USD in utility costs per year (Danish prices), the Arduino close to nothing. Heating reduction duringwinter period due to the dissipation has not been taken into account.

Cheers

Klaus
 
S

sms

Another issue is the power consumption. The Pi takes up to 5W, the Arduino maximum 0.1W. A Pi is not suited for a battery operated application, the Arduino can be used for that.

Running the controller 24/7, the Pi would cost 14USD in utility costs per year (Danish prices), the Arduino close to nothing. Heating reduction during winter period due to the dissipation has not been taken into account.

The Raspberry Pi also has power issues that can reduce some people to tears.

At our Raspberry Pi Meet-Up, I'd say that around 50% of the problems
that newbies have relate to power issues. I finally put up a simple web
site to refer them to. <http://nordicgroup.us/rpi/power/>
 
Here's what we want to do:

1. Move a platform on an X-Y-Z motion, with three steppers, a specific

amount



2. Make some measurements (voltage, temperature, current) on the device

under test and save those measurements and the position to a file.



3. Go to 1.



There's plenty of low cost CNC stepper boards and software to do the

positioning, but the software doesn't really have an opportunity for

feedback other than some limit switches.



I've used an Arduino board to read in analog values but I need a way to

combine driving the steppers and recording the measurements.



I could do a LabView setup but by the time I buy the software, chassis,

and stepper board it will be $10,000.



Since the steppers need only DIR, STEP, and ENABLE, I suppose I could

write an Arduino program that did everything. However the accuracy of

the Arduino A/Ds leave something to be desired and I haven't found an

Arduino Shield with better A/Ds.



Is there any good alternative to LabView that doesn't cost as much?

You could use LabView but it is not wise to close a loop around the PC which is a non-deterministic system. You would need a compact rio to be sure of exact timing.
 
S

sms

Look up voltage divider.

Doesn't matter, the RPi has no A/D converters. I did use a voltage
divider on the Arduino to get the voltage down to proper levels (the A/D
has input levels of 0 to 5V).
That goes for the 3.3V to 5 V logic level interfacing to chips via GPIO too.

Are you guys form an other planet??????

I think what "we guys" prefer is a solution that doesn't require a load
of extra components that increase the cost and complexity beyond that of
a proper solution. By the time you buy a Raspberry Pi, an A/D board,
power supply, level translators, and put the whole thing together you've
spent far more than buying something like a $120 U3-HV. There's no
upside in cobbling together a sub-optimal solution when it costs more
money and ends up being a kludge.
 
K

Klaus Kragelund

On a sunny day (Sun, 11 Aug 2013 13:18:26 -0700 (PDT)) it happened Klaus


<[email protected]>:






Popular demand supported Hitler too.

Very good defence of your argument, somebody walked on water a couple of thousand years ago, who cares?
Great, a Microchip PIC 18F14K22 does all that too, and costs about 2$

http://panteltje.com/panteltje/pic/index.html



http://panteltje.com/panteltje/pic/scope_pic/
Yes, but you don't get a no-nonsense development environment to get quickly started
Did you not forget all the shields you need to buy to do ANYTHING useful with it?

No, but does the Pi have analog input? No
Does the Arduino have analog input? Yes
Do we then need a shield? Yes, for both, but more for the Pi

You have done some nice and somewhat impressing project, that you have presented here during the last couple of months. But, think about it, are you not deeper into the Pi than the regular person that you are trying to convince to use the Pi?

I like the Pi, have used it only superficially I must say. But I also like the Arduino, the PSOC, the STM32, the.......

From my point of view you need to select whatever gets you there with least effort and with good performance. Using a Pi to control a stepper is not my first choice for such an application.

Cheers

Klaus
 
K

Klaus Kragelund

On a sunny day (Mon, 12 Aug 2013 01:53:09 -0700 (PDT)) it happened Klaus


<[email protected]>:


I like the Pi, have used it only superficially I must say. But I also like the Arduino, the PSOC, the STM32, the.......

From my point of view you need to select whatever gets you there with least effort and with good performance. Using a Pi to
control a stepper is not my first choice for such an application.

y

This is precidsley the p[oint, and here we 100% agree.



But Pi was brouyght on the market asa LEARNING device (project?).



That is why I reffered to teh Arduino as pree-cooked food...

You can find lots of things that already work for it.



For me every new processor, device, chip, board, is a learning project.

But I get instant aversion against Arduino (and some of its users) possibly

because of the C++ virus, but also because it is overkill for simple

applications, and not practical for more complex ones.

I see arduino as pre-cooked solution for some some category of people.



Almost anything arduino can do, I can do with a PIC for 2$.



But I cannot possibly port my PC C code to an arduino,

or even develop on it.

At this moment I am connected with ssh -Y to a Raspberry and editing and compiling

some software to drive some hardware:






Resonances...

:)

Nice turn at 55 seconds :)

But yes, you need some mechanical damping (or SW ramp programmed to slow the steps)

Cheers

Klaus
 
K

Klaus Kragelund

On a sunny day (Mon, 12 Aug 2013 05:34:03 -0700 (PDT)) it happened Klaus


<[email protected]>:






The idea is that (with 180 degrees servos) if you go past due north or south,

then rotate and flip the antenna the other way to pick up the signal.

That should happen as fast as possible (Houston: we have loss of signal..)








Been testing, a lot of the wiggle seems to come from the nylon gears + shaft in the servos I am using.

So you are using a servo, but with a gear added to that or with a gear thatis built-in?

If its built-in (reads the position on the slow axis), you have little control of the way the servo reaches the position. If it reads the position directly on the motor, then you can add lead-in and lead-out slope reduction, so the ressonances does not get triggered so much.

When you are tracking, you only need very slow movement, I guess?

Cheers

Klaus
 
S

sms

On 8/12/2013 1:53 AM, Klaus Kragelund wrote:

No, but does the Pi have analog input? No
Does the Arduino have analog input? Yes
Do we then need a shield? Yes, for both, but more for the Pi

You have done some nice and somewhat impressing project, that you have presented here during the last couple of months. But, think about it, are you not deeper into the Pi than the regular person that you are trying to convince to use the Pi?

LOL, I am very much into the Pi. I presently have four of the Raspberry
Pi boards going, and I am very active in the local RPi community. But
that does not make the RPi the answer to every question!

There's a good article at
<http://makezine.com/2013/04/15/arduino-uno-vs-beaglebone-vs-raspberry-pi/>.
"For applications that interface to external sensors we recommend the
Arduino and the BeagleBone." That's the bottom line. To use external
sensors with the RPi requires a lot of additional components that are
already included on the BeagleBone and Arduino.

Actually the BeagleBone Black may be a good solution as well, as it has
12 bit A/D converters, and would require only a voltage divider (maximum
input voltage on the A/D converters is 1.8V) and level translators for
the GPIO. It lacks some of the problems inherent with the Raspberry Pi,
has internal Flash for the OS, and has a wider variety of add-on boards
(which is somewhat surprising considering that it's newer). TI looked at
the functionality that was missing from the RPi and put some of it on
the BeagleBone boards. The BeagleBone Black is also much faster than the
RPi or the Arduino.
 
S

sms

I like the Pi, have used it only superficially I must say. But I also like the Arduino, the PSOC, the STM32, the.......

From my point of view you need to select whatever gets you there with least effort and with good performance. Using a Pi to
control a stepper is not my first choice for such an application.
y
This is precidsley the p[oint, and here we 100% agree.

But Pi was brouyght on the market asa LEARNING device (project?).

That's the point. It was brought to the market as a tool for learning
programming, not as a device to replace embedded processors in consumer
or industrial equipment, for which it is still far too expensive, and
for which it lacks the necessary functionality. The Arduino is also far
too expensive to replace embedded processors, but it's purpose was to
enable the user to learn how to control external devices.

"The Arduinos <sic> strength is I/O control while the Raspberry Pi is
more a processing device that has the GPIO pins for I/O."

The upcoming Udoo board combines the processing power of the RPi and the
I/O capabilities of the Arduino Due and has 12 bit A/D converters. Not
yet available. They raised far more money in crowd funding than they had
expected and are not taking any more orders until they can fulfill all
the orders from backers (>3000 boards ordered).

<http://www.kickstarter.com/projects/435742530/udoo-android-linux-arduino-in-a-tiny-single-board>
 
S

sms

I think that is only the cheap Chinese counterft power suplies.

And you would think wrong.

First of all, there is no official Raspberry Pi power supply, so
"counterfeit" is meaningless. Second, Probably 99.9% of power supplies
with a Micro-USB connector come from China. Third, the problem with the
Raspberry Pi power stems from a poorly written specification and bad
suggestions as to what to use.

The issue is that a Micro-USB was not designed to provide so much power.
By the time you add some expansion boards, and power some USB devices,
you can need several amps of current.

The Raspberry Pi's power distribution is especially poorly designed.
They improved it somewhat in removing polyfuses F1 & F2, though this
really didn't fix much since F3 is still 1.1A. If they increased the
value of F3 so the Raspberry Pi could power expansion boards, more power
hungry USB devices, HDMI to VGA converters, etc., they'd need to change
the power and ground planes.

The Adafruit supply <https://www.adafruit.com/products/501> is one good
solution since it puts out 5.25V at 1.1A. But you're probably better off
with _one_ higher current supply that can also power a USB hub, an HDMI
to VGA converter if necessary, by adding some extra cables and
connectors to the power cord to split up the available power.
 
Top