USB thing for test automation

Hardly. I use both the U6 and Arduino boards. For this specific application the Arduino was way too slow. Like you, I got the U6 up and running pretty quickly. It's when I started needed to do more complex things that the lack of documentation, as well as the speed limitations of the U6, began to become issues. I found a way around the bit-banging slowness of the GPIOs by using a counter timers and generating a high frequency stream of pulses and counting them, then stopping the stream, since there's no way to generate a specific number of high speed pulses. I tried DAQ Factory but the documentation and support was lacking. So now the programming is being done in Python, and not by me.

The relatively low output current of the Labjack pins can be a pain. An Arduino puts out 40mA, while a Labjack is much lower, requiring the use of buffers in many applications that the Arduino can be directly connected. A problem I ran into is that the load of an opto-isolator reduced the voltage of the Labjack output to a level where the counter could no longer count the pulses. I ended up fabricating a small interface board to go between the Labjack and the target device that added some buffers as well as aiding with all the cable management and power supply issues of the target device (an XYZ platform with three high-precision steppers (51,200 steps per revolution). Waiting for the boards to come back from the fabricator now.

I spend a lot of time fabricating cables to use the DA-15 and DC-37 jacks (bought a DA-15 and DC-37 M-M cables and cut them in half). But if you can get by with just the screw terminals that's great.

Don't automatically put down Arduino. There are a lot of applications where it's very appropriate to use. What I really like about the U6 is that the ADC is much better than what's on the Arduino (16 bits versus

10 bits even though 12 bits would have been enough for me, and 0-10V input range.

I think the Intel Galileo board is going to be very useful. It combines necessary features of both Arduino and Raspberry Pi. I'm no big fan of Intel, having worked for two competitors of them in the past, but they did a good job on that board.

Reply to
sms
Loading thread data ...

I don't automatically put it down. I tried it, and used it for a little while. I've done ATmega gizmos before, and the Arduino library is really quite nice--if somebody ported it to a real development environment, I might use it again.

The problem is the burn-and-crash development cycle. I mean, guys, you have a processor with in-circuit debug capability, you have free tools available, and you gratuitously return to the development model of a Z-80 circa 1979. Takes a lot of library to make me want to do that for long.

Dunno. I usually just build my own, but then my communications needs are relatively simple. If I needed TCP/IP or Zigbee or something, then one of those pre-built boards would save a lot of time and effort.

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs 
Principal Consultant 
ElectroOptical Innovations LLC 
Optics, Electro-optics, Photonics, Analog Electronics 

160 North State Road #203 
Briarcliff Manor NY 10510 

hobbs at electrooptical dot net 
http://electrooptical.net
Reply to
Phil Hobbs

Is this a one off, or would there be a number of them in something like a burn in jig?

Reply to
WangoTango

Just one initially. Maybe two more later, one for our customer and one for a contract assembler. And spares, of course.

I need to turn on/off, and fast pulse, four different LED banks, to push various amounts of light into the DUT. And measure its analog output. That's not complicated, except that PCs don't have nice parallel ports and ISA slots any more; everything is USB.

--

John Larkin                  Highland Technology Inc 
www.highlandtechnology.com   jlarkin at highlandtechnology dot com    

Precision electronic instrumentation 
Picosecond-resolution Digital Delay and Pulse generators 
Custom timing and laser controllers 
Photonics and fiberoptic TTL data links 
VME  analog, thermocouple, LVDT, synchro, tachometer 
Multichannel arbitrary waveform generators
Reply to
John Larkin

How fast is fast? Namely, pulse width and time between pulses. What i am asking is whether it can be done with dumb USB device or need local processing.

Reply to
edward.ming.lee

I need to measure sensitivity and rise/fall time at four different light levels,

10:1 steps of optical power. And calibrate that somehow. I can always add my own oscillator to pulse the LEDs for the rise/fall measurement, and just let the USB gadget gate it on and off. So something "serial ascii" controlled would be fine.

The detector device bandwith is 1 MHz, 350 ns rise and fall, so some simple LED driver would work fine, maybe a couple us width so the rise and fall wind up on the same screen without jitter.

I'm just learning a lot of this optical stuff. We do electrical measurements to parts per million, but optical power measurements are lucky to get within +-50%.

--

John Larkin                  Highland Technology Inc 
www.highlandtechnology.com   jlarkin at highlandtechnology dot com    

Precision electronic instrumentation 
Picosecond-resolution Digital Delay and Pulse generators 
Custom timing and laser controllers 
Photonics and fiberoptic TTL data links 
VME  analog, thermocouple, LVDT, synchro, tachometer 
Multichannel arbitrary waveform generators
Reply to
John Larkin

sh various

ot

ots any

am asking is whether it can be done with dumb USB device or need local proc essing.

levels,

my own

the USB

e fine.

I guess we can forward ASCII messages with the PC debug port, but programmi ng it directly would just be as simple. Once programmed, you can also run it without the PC, unless you really want to have the PC around.

le LED

up on

We can communicates at 256Kb/s or thousands of packet per second, but USB l atency is the limiting factor anyway.

nts to

+-50%.

We have something similar to what you need.

http://173.224.223.62/rf/remote.jpg

The interface board on the left has eight pins (header not show here, but c an be mounted). You can run it locally, or via RF.

If you build your side of the interface with a 8 pins (4x2) 0.1" header, i will bring you everything else necessary to run it. Will do house call for just this one time (will be in SF). You only pay for what you want to kee p: Interface modules, hard drives (with all the tools and source codes), et c.

// +----------------------------+ // | 3.3V | LED1 | LED4 | VOLT1 | View from pin side: // |----------------------------| Need 3.3V 50mA on Pin 1 // | LED2 | LED3 | | GND | Pin 6 can be LED or VOLT // +----------------------------+

// Pin2: F4 Pin3:B15 Pin4:B14 // Pin5: B13/ANA13 Pin6:B12/ANA12 Pin7: B11:ANA11

#define MSG_CMD_LED_ALLOC_4 1001 // allocate 4 LEDs #define MSG_CMD_LED_ALLOC_5 1002 // allocate 5 LEDs #define MSG_CMD_LED_ALLOC_6 1003 // allocate 6 LEDs #define MSG_CMD_LED_ON_1 1004 // turn LED 1 ON #define MSG_CMD_LED_OFF_1 1005 // turn LED 1 OFF #define MSG_CMD_LED_ON_2 1006 // turn LED 2 ON #define MSG_CMD_LED_OFF_2 1007 // turn LED 2 OFF #define MSG_CMD_LED_ON_3 1008 // turn LED 3 ON #define MSG_CMD_LED_OFF_3 1009 // turn LED 3 OFF #define MSG_CMD_LED_ON_4 1010 // turn LED 4 ON #define MSG_CMD_LED_OFF_4 1011 // turn LED 4 OFF #define MSG_CMD_LED_ON_5 1012 // turn LED 5 ON #define MSG_CMD_LED_OFF_5 1013 // turn LED 5 OFF #define MSG_CMD_LED_ON_6 1014 // turn LED 6 ON #define MSG_CMD_LED_OFF_6 1015 // turn LED 6 OFF #define MSG_RPT_VOLT_1 1016 // report voltage 1 #define MSG_RPT_VOLT_2 1017 // report voltage 2 #define MSG_RPT_VOLT_3 1018 // report voltage 3

// Device B AppCmd(MSG_CMD_LED_ALLOC_4); // Setup 4 LEDs and 2 VOLTs AppCmd(MSG_CMD_LED_ON_1); // Turn on LED 1 PutF(PORT_CONSOLE, "LED %d On", 1); // Display on PC if connected

// Device A PutC(PORT_F4, 1); // Turn on port pin F4

PutC(PORT_ADC_11, 1); // Turn on ADC AppRptArg1 = GetC(PORT_ADC_11) // Get ADC value

// Device B if(AppRpt() == MSG_RPT_VOLT_1) // Got VOLT message LedVoltage = AppRptArg1();

Device B has a 132x32 LCD display. What would you like to display? It can be upto 20 character of 4 lines in single mode or 10 characters of 2 lines in double mode. We can also put graphics on it.

// Device B LcdShow(1, "Simple LED demo"); strcpy(line, "1000000W"); for(i=0; i

Reply to
edward.ming.lee

The "fast pulse" is an issue I ran into with the Labjack U6. We are driving some stepper motors with integrated encoders. They are programmed to 51,200 steps per revolution. Bit banging the GPIOs on the U6 was far too slow.

We are now outputting a pulse stream, which the U6 has a command for, then counting the pulses and terminating the pulse stream when the limit is reached. It works fine but the U6 GPIOs could not drive the opto-isolater inside the stepper motor encoder directly so we needed a higher current buffer.

There are four stepper motors, but we are only moving one at a time. If you need to use counter/timers then you won't be able to do all four LED banks at the same time because there are only two counters. If you can get by with bit banging then it's no problem to use a Labjack.

You can still buy parallel port ExpressCard adapters which would let you use a parallel port. They are only $18. . But a USB parallel port is unlikely to work.

Many Thinkpads still have Expresscard slots.

Reply to
sms

If timing is not super-critical, we can easily do four software PWM. PIC32 can toggle pins upto 20M times per second. A reasonable software loop can easily do 100s of KHz. In fact, we were driving a transformer close to 1M Hz, but the coil can't react fast enough. The maximum efficiency is in th e low 100Ks, with a delay loop.

Reply to
edward.ming.lee

I remember using a card with an AMD 9513 timer for this exact purpose. You could not jump directly to full speed, but you could accelerate to it. Since acceleration has no "momentum", the PC software could adjust the velocity even if it is sometimes interrupted by other tasks.

I learned some other things from that job:

Those multi-pin circular "MIL" connectors are just terrible.

Machine shops are too loud (it's the compressed air they use to clean up- I'm sure at least 120 dB each time they squeezed the nozzle).

Tin-foil does indeed work well as add-on EMI shielding to cables. The job was a controller for a robot which deposited industrial diamonds onto grinding wheels in preparation for brazing. To get the diamonds to stick they charged a vibratory feeder to 10KV. I zapped myself a bunch of times from that thing... took out a line each time there was a discharge also, fixed with tranzorbs + resistors.

--
/*  jhallen@world.std.com AB1GO */                        /* Joseph H. Allen */ 
int a[1817];main(z,p,q,r){for(p=80;q+p-80;p-=2*a[p])for(z=9;z--;)q=3&(r=time(0) 
+r*57)/7,q=q?q-1?q-2?1-p%79?-1:0:p%79-77?1:0:p158?-79:0,q?!a[p+q*2 
]?a[p+=a[p+=q]=q]=q:0:0;for(;q++-1817;)printf(q%79?"%c":"%c\n"," #"[!a[q-1]]);}
Reply to
Joseph H Allen

I don't know if I can help, but we certainly do a lot of Virtual COM Port over USB devices, and I like simple string protocols. I have a little spare time and would be willing to lend a hand.

Reply to
WangoTango

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.