QDS Driver

Making & changing hardware drivers in Acquisition Server
Post Reply
bernat
Posts: 2
Joined: Sat Oct 01, 2011 11:00 pm

QDS Driver

Post by bernat »

Hi,

I've already implemented the "QDS NFB 256" protocol, but to move on I should know few more things.

At the OpenEEG mailing list it was said this QDS protocol might be a good new standard for open hardware devices, since it accepts 16-bit data (instead of 10-bit like in the Modular P2 protocol). But the problem is that not all the devices have the same characteristics... There are 2 main parameters which change: the number of bits used, and the full scale voltage.

That's the reason I've added 2 new Spin Buttons to configure the driver: the number of bits and the full scale voltage. That's what you can see at the image.
OpenViBE+QDS.png
OpenViBE+QDS.png (91.31 KiB) Viewed 9236 times
The thing is: at the driver side we end up to have a vector of int32 called "m_vChannelBuffer" which are directly the number of bits when the QDS protocol is already parsed. But which is the voltage value the OpenViBE software takes for a single step? (i.e. the quantum)

e.g.:
0x0000 = 0uV
0x0001 = ?

Could you please answer it? I might look at the source code, but I don't really know where to start... hehe And I'd also like to hear what you think about it.

Summarizing, the idea is to configure the driver so that it can work with devices with different resolution and full scale voltages, but with the same protocol (the QDS). Using this implementation I would modify the "m_vChannelBuffer" data with the new value which represents the correct voltage. It would be great to know whether there is any global var to know that quantum voltage.

Thank you!
Bernat Albet

bernat
Posts: 2
Joined: Sat Oct 01, 2011 11:00 pm

Re: QDS Driver

Post by bernat »

Hi again,

I'm a bit confused... I've run some tests, and I've seen OpenViBE doesn't have voltage levels assigned to a quantum bit, am I wrong?

One test dealt about modifying the driver and filling the first channel with a uin32 dummy var which I incremented at each new packet received (a sawtooth signal). At the OpenViBE software I saw the data went from -512 to 512 when I used 10 bits (applying a mask to the dummy var of 0x03FF), but if I used 12 bits (masking the var with 0x0FFF), the data went from -512 to 3583.

My conclusion is that OpenViBE is only thought to deal with 10-bit data (to be self centered at 0). Then I guess it should be added a new processing box with the offset and gain to get the correct voltage, is that right? Well, if that's right the work I did with the full scale voltage and the resolution was done for nothing... hehe

Thank you,
Bernat Albet

lbonnet
Site Admin
Posts: 417
Joined: Wed Oct 07, 2009 12:11 pm

Re: QDS Driver

Post by lbonnet »

Hi Bernat and welcome on board !

I am sorry for the late reply, but your questions were a bit out of my area of expertise (I'm computer engineer, and I don't have much knowledge in electronic and acquisition hardware stuff).
I've seen OpenViBE doesn't have voltage levels assigned to a quantum bit, am I wrong?
I don't know. On my point of view, the driver fills the buffers with float 32 bits values and these values are given to the acquisition client. I never did further test, and never checked the voltage levels.
My conclusion is that OpenViBE is only thought to deal with 10-bit data (to be self centered at 0).
Your tests seemed to say so.

I didn't investigate this much, and I'm afraid I won't have enough time anytime soon to do it, I'm sorry...
If anyone else in the community is willing to help, please do so !

Laurent
Follow us on twitter >> openvibebci

Checkout my (old) blog for some OpenViBE tips & tricks : here !

yrenard
Site Admin
Posts: 645
Joined: Fri Sep 01, 2006 3:39 pm
Contact:

Re: QDS Driver

Post by yrenard »

Dear bernat, dear Laurent,

OpenViBE actually does not handle a physical unit with acquired data so far. Each driver is free to use whatever matches its needs. The Brain Products Brainamp driver for instance, has a scaling parameter included in its configuration dialog. By the way, you can use the full 32 bits floating point range if you need to (just remember it does not behave as integers would do :) )

Hope this helps and sorry for late reply too.
Regards,
Yann

Post Reply