Electronics > Beginners

Cheap DAQ DIY

(1/3) > >>

phiza:
Hello

Let's say I want to measure the output voltage vs the input voltage of a device (see blackbox.PNG).

Also we know that ideally we can caractherize the device behavior with a real-valued function of a real variable.
(in other words we're watching x and f(x) voltages as if we were watching real numbers)
So we can have f(x)=log(x) or f(x)=x^2 or f(x)=5*x and so on...

Also we know that the device isn't really perfect at the moment and we need to trim some potentiometers on the device to match (to approximate) perfectly this function.

What is the best method to achieve that?

I mean i can see for example the function with a 2-channel scope in XY mode and it's ok but i can't got really the numbers...
(maybe it's only me with a Rigol DS1052E but yeah I can store the csv data but I have to plug and unplug the USB stick every time I change something...NO!)

We can try to acquire data with an arduino but we can't read two input simultaneusly (1 ADC only, I've seen that the Portenta H7 have two but don't know more on that)

Another idea, the simplest to me but possibly can be the worst is to take one ADC to read the input x0 then the digital value sets an EEPROM in order to output from a DAC the desired voltage that is f(x0)
(those digital values were previously written to the EEPROM but we don't care about that)
Then this voltage is compared with the one caming from the output of the device (the blackbox) using an opamp (maybe you can approach different techniques at this point, don't matter)
Finally we read the difference in some way using an arduino or simply the scope.

I don't know, I have searched for DAQs online but seems a bit too expensive option to me, the ones that can read more input simultaneously starts from 1900 euros!
Also would be ideal to connect this acquiring process to scilab or others free numeric computing environment but maybe I'm asking too much for a cheap thing.

Please advise me! I'm sure that there is a better option but I can't figure it out, please let me sleep tonight :D
Cheers

ebastler:
Have you considered using one DAC to output the x value (under microprocessor control) and one ADC to read the f(x) value?

Also, computer sound cards have pretty good ADCs (at least two of them) and also DACs. There are various commercial and shareware programs around which turn your computer into an "audio analyzer". Important limitation: Most sound cards are not DC-coupled, hence can only generate and measure AC signals, typically from some 10 Hz upwards.

ledtester:

--- Quote from: phiza on May 17, 2022, 06:26:48 pm ---...
I mean i can see for example the function with a 2-channel scope in XY mode and it's ok but i can't got really the numbers...
(maybe it's only me with a Rigol DS1052E but yeah I can store the csv data but I have to plug and unplug the USB stick every time I change something...NO!)
...

--- End quote ---

You might try the Rigol's Ultrascope software which allows computer control of the scope:

https://beyondmeasure.rigoltech.com/acton/attachment/1579/f-0695/1/-/-/-/-/DS1000Z%20DS2000%20DS4000%20DS6000%20UltraScope%20Getting%20Started%20Guide.pdf

You can find Ultrascope for the DS1052E on this page in the Downloads section:

https://www.rigolna.com/products/digital-oscilloscopes/1000/

phiza:

--- Quote from: ebastler on May 17, 2022, 06:39:11 pm ---Have you considered using one DAC to output the x value (under microprocessor control) and one ADC to read the f(x) value?

Also, computer sound cards have pretty good ADCs (at least two of them) and also DACs. There are various commercial and shareware programs around which turn your computer into an "audio analyzer". Important limitation: Most sound cards are not DC-coupled, hence can only generate and measure AC signals, typically from some 10 Hz upwards.

--- End quote ---
Thanks!

Yes maybe it's the cleanest technique but we're going to lose the "simultaneous reading feature" this way and the input is not anymore in real domain because it can "only" assume values defined by DAC resolution.
Theorethically this may be a problem if you deal with non-linear fuctions because you can lose a lot of accuracy in key points. Instead with an EEPROM you can choose were to lose accuracy (kinda).

With less abstaction: I've maded some exponential converters with different approaches, a circuit that basically do f(x)=e^x and I need to see how closer I'm to the real one, turning trimmers at the same time.  :-/O


--- Quote from: ledtester on May 17, 2022, 07:22:11 pm ---
--- Quote from: phiza on May 17, 2022, 06:26:48 pm ---...
I mean i can see for example the function with a 2-channel scope in XY mode and it's ok but i can't got really the numbers...
(maybe it's only me with a Rigol DS1052E but yeah I can store the csv data but I have to plug and unplug the USB stick every time I change something...NO!)
...

--- End quote ---

You might try the Rigol's Ultrascope software which allows computer control of the scope:

https://beyondmeasure.rigoltech.com/acton/attachment/1579/f-0695/1/-/-/-/-/DS1000Z%20DS2000%20DS4000%20DS6000%20UltraScope%20Getting%20Started%20Guide.pdf

You can find Ultrascope for the DS1052E on this page in the Downloads section:

https://www.rigolna.com/products/digital-oscilloscopes/1000/


--- End quote ---

Yeah I've those two software currently installed, no way to acquire data from two channel remotely, only one at time and no way to stream data.
The only way to acquire 2-channel data is with a USB stick. Maybe that they simply lock those features on cheap models.

ebastler:

--- Quote from: phiza on May 17, 2022, 07:32:30 pm ---[...] but we're going to lose the "simultaneous reading feature" this way and the input is not anymore in real domain because it can "only" assume values defined by DAC resolution.
Theorethically this may be a problem if you deal with non-linear fuctions because you can lose a lot of accuracy in key points.
--- End quote ---

It might help if you disclose the precision (resolution) requirements...  ::)

Also, if "simultaneous reading" is important, I assume you want a defined response over a certain input frequency range, and are concerned about phase shifts? Again, what frequency range and hence time resolution are we talking about?

Depending on the required frequency range, using some analog signal generator (which I assume you have?) and a sound card to sample x and f(x) might still work?

Navigation

[0] Message Index

[#] Next page

There was an error while thanking
Thanking...
Go to full version