DAQ and signal generation project

Thread Starter

finne

Joined Jul 29, 2013
12
Hello! I've thought about building my own DAQ and signal generation hardware and software. It's probably hell and alot of work but I've thought about how expensive National Instruments equipment and Labview are so I thought I'd attempt to make an open source version. But much simpler of course. If I fail, which I probably will, then I've surely learned alot anyway.

First of all I'm thinking about what computer-hardware interface to use. USB would probably be simple, the regular parallell port wouldn't reach the speeds necessary I think. But microchip (I have some experience of PIC programming) don't seem to offer any equipment and help in USB 3.0 development. That would be awesome since that speed would definately be nice to have right from the start instead of building on usb 2.0 and then wanting to add speed later. Anyone know if microhip plan to release USB 3 demo boards sometime soon? Otherwise PCI-E is an option but I suspect thats not an easy one.

Software-wise I'm not thinking of making a new labview but rather som type of system where inputs can be connected to functions which the user can edit and connect to eachother. Like the icons in Labview but without the graphics.

Both oscilloscope-functionality and signal generation should be there. And at as high frequencies as possible of course ;)

Am I asking the right questions here? I'm sure there are lots of more stuff I should think about before doing anything.

Of course cost is a priority. USB 2 will do if anything else would make the components cost more than say 300$.
 

MrChips

Joined Oct 2, 2009
30,824
If I fail, which I probably will, ...
What kind of attitude is that?

Firstly, define your objectives with specifications.
You want to output a signal:

Frequency range?
Number of samples per second?
Voltage range?
Resolution or number of bits?

Do the same thing if you want to digitize an incoming signal.

USB is only one interfacing mechanism. Don't get hung up on USB alone.
 

Thread Starter

finne

Joined Jul 29, 2013
12
Ok. Well I have a physics background and this would mostly be intended for impedance spectroscopy. The study of how the impedance of an electrical system varies with input frequency. Depending on what the electrical system is (battery, fuel cell etc) you want to study different frequencies. So I have no actual boundaries. Also depending on initial results from one frequncy interval you might draw the conclusion that you need to look at other frequencies. It's research, you never know what you'll find :)

But anyway, ofc I realise you need boundaries for practical reasons. And economical too. Looking at some low end generators they can do a few MHz, so something like that. I guess only the upper limit is an issue. Also no need for special functions, only sinusodial waves. 4 bits resolution, 16 steps in amplitude, is more than enough. So 1 Mzh generation means reading 10 Megasamples/sec would be appropriate right?

Frequency: few hertz - 1 Mhz
Analog read speed: 10 MSamples/sec (10*4 = 40 MBit/sec)
Voltage range: 0-12 volts
Resolution: 4 bits

I'm mostly concerned about the analog reading. This thing from NI

http://sine.ni.com/nips/cds/view/p/lang/sv/nid/201987

reads at only 48 kS/s (14*48 = 672 kBit/sec) but still costs 400$. Maybe it's because it has 8 inputs though. Regarding that I think I want something like 2 analog inputs and outputs. However it might be enough to be able to use any three of them at one time.

Also for EIS (electrical impedance spectroscopy) you're not really interested in anything but the phase shift caused by the electrical system. Is there a way to get a value of the phase shift without really measuring and doing math on both input and output signal? Like a chip that just takes signals on pin 1 and 2 and ouputs the phase shift directly. I'm actually only asking out of curiosity, that could be an acceptable solution for EIS specifically but I still want to do the whole thing.

Using all 4 channels would mean 4*40 = 160 Mbit/s and USB 2 has an "effective throughput" of 280 Mbit/s. So that would do if I'm not mistaken. But there could of course be simpler/better interface alternatives.
 
Last edited:

MrChips

Joined Oct 2, 2009
30,824
You're in luck. I have done EIT (Electrical Impedance Tomography) which is almost the same thing as EIS.

4-bit resolution will not get you anywhere. Aim for at least 12 bits.

For the DAC, 12-bits +/- 12V 10Ms/s is reasonable, any arbitrary waveform.

12-bit 50Ms/s ADC is doable.

You don't really need USB. You don't need USB to generate or receive the data stream in real-time. You can use USB or any form of communication interface to control the DAQ system. Design the DAQ as a stand alone system that generates and detects the desired waveforms. The USB is only used to command and receive the stored data.

Phase detection is crucial in EIS and EIT. You either need lock-in detection or you have to ensure that the DAC and ADC are phase locked.

With what I am doing now I would recommend looking at the STM32F4DISCOVERY experimental board that uses the STM32F407 mcu. This chip has the capabilities to do what you want to do.
 

Thread Starter

finne

Joined Jul 29, 2013
12
You're in luck. I have done EIT (Electrical Impedance Tomography) which is almost the same thing as EIS.

With what I am doing now I would recommend looking at the STM32F4DISCOVERY experimental board that uses the STM32F407 mcu. This chip has the capabilities to do what you want to do.
Great! Can you program that chip in C and are there free compilers/IDE:s available?

Good to know there are cheaper options to NI. But I woud learn alot from this kind of project I think.
 
Top