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

Here's what we want to do:

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

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

  2. 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?

Reply to
sms
Loading thread data ...

Yes, there is:

formatting link

Comes with the Express version of this:

formatting link

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.

--
Regards, Joerg 

http://www.analogconsultants.com/
Reply to
Joerg

Works great with Python, too. And linux!

--
Mikko
Reply to
Mikko Syrjalahti

Perfect, thanks for that information.

Reply to
sms

On a sunny day (Sat, 10 Aug 2013 13:40:27 -0700) it happened sms wrote in :

Sorry I do not see where 'labview' comes in and have no experience with that. At this moment in time I wouls use the cheap steppers if you already have those and get a Raspberry Pi. IF you can program in C, and do some simple board design, add some ADC, digital I/O is already there, and use libforms (xforms) GUI developer utility to write the C code for your GUI, to put some meters if must be. Stick in a WiFi USB stick, and no problem with wires IF you have the power already. Send data to anywhare in the world..And control from anywhere. Of couse RasPi can do the servo stepping too, but you need to be able to write the code. Less than 100$ plus maybe an evening coding. Depends how much you charge for coding per bit if you want to beat that Labview. And how fast or slow you are of course, and how many tries before it works.

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...

Reply to
Jan Panteltje

On a sunny day (Sat, 10 Aug 2013 13:40:27 -0700) it happened sms wrote in :

PS when using Raspi you can add audio input by sticking in a cheap USB audio card. Will be recognized automatically. That makes for 16 bits AC, but if you needed DC you could chop it with a CMOS switch (74HT4053 ?) against ground... CMOS switch driven from GPIO header. Not sure how many usable bits you would have left, but /dev/dsp should give some usable data. Anybody nows a cheaper way? Of course you need to be able to program for Unix / Linux else END OF THE WORLD. ;-)

Reply to
Jan Panteltje

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).

Reply to
sms

On a sunny day (Sun, 11 Aug 2013 10:18:59 -0700) it happened sms wrote in :

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.

Reply to
Jan Panteltje

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

Reply to
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.

Regards

Klaus

Reply to
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.

Reply to
sms

or special effects,

, things get smaller these days.

e Intel PIOs.

thernet,

t ADC.

ld really

ump1090-

Goes for as low as 15USD and you don't need external USB thingie to quanti ze analog signals, that comes free. It draws a lot less power and does not need a Flash card as the Pi does.

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 Ar duino can be used for that.

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

Cheers

Klaus

Reply to
Klaus Kragelund

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.

Reply to
sms

I did a very similar thing - positioning stage & opto sensor to profile an expanded laser beam.

I used a little uC - use your Arduino. I just opened a terminal program on the PC & fed the position & measurements in ASCII, saved as a .csv file and then used Excel to process. Worked well, cheap & cheerful.

Reply to
Gonadicus

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.

Reply to
gyansorova

On a sunny day (Sun, 11 Aug 2013 14:05:29 -0700) it happened sms wrote in :

No need for that horrible C++:

formatting link
formatting link

Seems overkill. Just drive a PIC with it:

formatting link
formatting link

Reply to
Jan Panteltje

On a sunny day (Sun, 11 Aug 2013 15:25:40 -0700 (PDT)) it happened Klaus Kragelund wrote in :

Very limited application filed, I use one to control a model airplane, the motor uses many amps, the Pi is hardly noticed.

Now think a car, who careds about the 1/2 amp if you have in car HD video. The monitor takes more.

It can also be used as bullet shooted from a large cannon, Jules Verne .. maybe to the moon, there is alredy some debris thre...

Yes that is an important aspect. Actually I measured my PI, and it was about 350 mA at 5 V.

Reply to
Jan Panteltje

On a sunny day (Sun, 11 Aug 2013 15:32:49 -0700) it happened sms wrote in :

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

I am an old bee.

I finally put up a simple web

Great :-)

Reply to
Jan Panteltje

On a sunny day (Sun, 11 Aug 2013 12:22:23 -0700) it happened sms wrote in :

Look up voltage divider.

That goes for the 3.3V to 5 V logic level interfacing to chips via GPIO too.

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

Reply to
Jan Panteltje

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).

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.

Reply to
sms

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.