How do I convert the DrDaq sensor values under Linux?

Post general discussions on using our drivers to write your own software here
Post Reply
Guest

How do I convert the DrDaq sensor values under Linux?

Post by Guest » Mon Aug 09, 2004 2:07 pm

Hi,
I have sucesfully managed to compile the DrDaq Linux driver and can run the ddtest program. When I select option C to write continous data I get entries such as this:

Code: Select all

  
  965  996   4    0    0  -47  997-32768-32768 4036   99
  965 1006   12   0    0  -57  997-32768-32768 4210   99
  965 1000   8    0    0  -42  997-32768-32768 4036   99


If I select option A to show the measurements as the ADC counts rather than the measurement values then I get:

Code: Select all

 4016 2084   12    8 4000 3320 4092 4008 3996 4004 2040
 4020 2084    8    8 4008 3348 4092 4000 4000 3996 2040
 4020 1992    8    8 4012 3380 4092 4004 3996 3996 2040


I have been able to determine that the 3rd column is Sound and the 6th is Light as these values change when I make some noise or cover the light sensor. However, these values seem to be meaningless in their current form either as ADC counts or as scaled values.

Is there anyway to convert these to degrees C, dB, etc? Could you also tell which channel is connected to which sensor, as they don't seem to correspond with what is written in the DrDaq user manual (e.g. it says that light is channel)

Ultimatly I want to write my own C program to log sensor values into a database and possibly make the sensor readings available on the network.

Guest

Post by Guest » Thu Aug 12, 2004 10:00 am

Please can somebody help me? I've been pouring over the source code for a couple of days now and I still cant figure out how to get the driver to return meaningful values for the sensors.

E.g. According to the user manual the light sensors is supposed to return values between 0 and 100, but I'm getting values anywhere between -60 and 700 when ddtest is set to return measurement values and im getting values between 500 and 3000 when ddtest is set to return adc counts.

Guest

Post by Guest » Fri Aug 13, 2004 3:22 pm

I have now finally managed to convert the ADC count readings for light, sound and temperature into real meaningful values by examaning the methods from drdaqscl.c and rewritting them into my own program.

I have written a simple C program that flashes the LED and then takes 40 readings once a second from the sensors. I have made this code available at http://www.uk-dave.com/files/drdaq.c for anyone else who has been struggeling like me.

The output from my program is:

Code: Select all

Opening printer port 0... OK
Flashing LED... OK
Reading sensors...
        Unknown Unknown Sound   Unknown Unknown Light   Unknown Unknown Unknown Unknown Temp
  0:       4092    2064 55.00dB       8    4008 44.80      4092    4000    3996    4004 24.70C
  1:       4024    2028 55.00dB       8    4008 45.20      4092    4000    3996    3996 24.70C
  2:       4020    2096 55.00dB       8    4004 44.70      4092    4000    4008    4012 24.70C
  3:       4024    2020 55.00dB       8    4008 44.70      4092    4012    4000    4008 24.70C

masterman

woth is your linux version

Post by masterman » Wed Mar 22, 2006 3:56 pm

Please , can you write a linuk version thet you use?

thanks

Sarah

Post by Sarah » Fri Mar 24, 2006 11:54 am

Hi

Unfortunately we no longer actively support Linux. We have some old Linux drivers and files which can be used and we still supply these but we are unable to support them, update them or write new ones.

Best Regards

masterman

Post by masterman » Thu Mar 30, 2006 11:32 am

thanks for replay,

but what is the kernel version.

I have compailed drdaq driver (version 3000) and kernel 2.6.8.1 on debian,and function as:

- the led function fine

- the digital output function fine

- but if select C in di test file (ddtest) the output is:

-1000 550 0 0 604-32768 0-32768-32768 0 0
-1000 550 0 0 604-32768 0-32768-32768 0 0
-1000 550 0 0 604-32768 0-32768-32768 0 0
-1000 550 0 0 604-32768 0-32768-32768 0 0
-1000 550 0 0 604-32768 0-32768-32768 0 0

ALso if I switch in ADC values, the output is:

0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0


So, I request your configuration.

Thanks in advance.

masterman

please help me

Post by masterman » Tue Apr 11, 2006 1:02 pm

What is the linux distribution that you hae installed????

thanks

Sarah

Post by Sarah » Tue Apr 11, 2006 2:20 pm

Hi

Unfortunately we are unable to help with Linux enquiries. The examples we provide were written on RedHat (version 6 I believe) but this is all I know I'm afraid. The person who wrote them is no longer with the company so we are unable to update them or provide support for them.

Best Regards

Post Reply