Our online shopping is experiencing intermittent service disruptions.

Support teams are actively working on the resolution.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Data Acquisition through Headphone

Good afternoon,

   I have a digital hygrometer that is designed to output data through a headphone port on the unit and into an RS-232 (9-pin) port.  I don't have this particular type of cable laying around and the manufacturer's software isn't LabVIEW-compatible anyway.  My goal is to acquire the data with LabVIEW using a headphone cable and the headphone port on my laptop.  The audio acquisition VIs can "see" the data but obviously can't interpret it as temperature and humidity.  Here are the specs regarding data output supplied by the manufacturer:

Baud Rate: 1200bps

Data bit: 7

Stop bit: 1

Parity: none

Format: Txxx.xC:Hxx.x% cr 1f

 

Any suggestions on how to interpret this data through the headphone port would be appreciated, and thank you for your time.

0 Kudos
Message 1 of 11
(3,485 Views)
Those specs are for the serial port. Connect your instrument to the laptop's serial port. If youn don't have a serial port, get a UB-RS-232 adapter for it. You can then use the VISA functions to read and interpret the data. See the shipping examples for serial communication.
Message 2 of 11
(3,483 Views)

What you have is probably not intended to go into a headphone port on your laptop.  It probably uses a stereo headphone jack on the device, but it is still an RS-232 serial port.  A stereo headphone jack or plug has 3 connection points, a tip and 2 rings.  One of these is probably ground, one is transmit, one is receive.  Do you have a manual for this device? Does the manufacturer's website show whether you can purchase the cable?

 

If you have a manual that shows the connections, you could make your own cable by connecting a stereo plug to a DB9F connector  You just need to know which parts of the plug are receive, transmit, and ground and connect them to the appropriate pins of the DB9F connector.

 

Once you have done that, you will still need the manual to show you what commands you need to communicate with the instrument.  Does it just output the data continuously?  Do you need to send it a special command character to prompt it to send the data?  Once you know that, you would use the VISA read and write commands to communicate with it.  There are several examples in the example finder about serial communication.

Message 3 of 11
(3,458 Views)

Totally off the topic here, but thanks Ravens Fan.

 

I have used the terms Tip and Ring for years now without really "getting it". But your description of a stereo jack has just crystalised everything. Bravo!!!

Message 4 of 11
(3,437 Views)

Actually, I remember someone asking about this a few years ago.  The phono jack was used for serial communication.  I'll search for it.

 

R

 

Message 5 of 11
(3,428 Views)

Found the thread.  Actually Raven's Fan provided the answer, here.

It was for a pyrometer.  Basic concept of using the stereo-plug should be the same (3-wires <left-right-ground>).

 

You'll have to ignore my response in that thread.. 

 

R

Message Edited by JoeLabView on 09-08-2008 08:56 AM
Message 6 of 11
(3,423 Views)

You definitely need the original cable or a detailed description of it (Manual??). 

If your sensor has it's own power supply , it might be Rx , Tx and GND (PIN 2,3,5 of DB9) 

BUT if the sensor is supplied by the serial port ( my guess)  you will have Rx (2), RTS(7) (or DTR(4) or both via diodes) and GND (5) .  And you need to turn on these statuslines by software to get your sensor supplied and continuously readings.

 

I have also seen open collector outputs that needed an pullup resistor (10k) from Rx  to DTR to run properly .  

 

Message Edited by Henrik Volkers on 09-08-2008 03:04 PM
Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


Message 7 of 11
(3,420 Views)

JoeLabView wrote:

Found the thread.  Actually Raven's Fan provided the answer, here.

It was for a pyrometer.  Basic concept of using the stereo-plug should be the same (3-wires <left-right-ground>).

 

You'll have to ignore my response in that thread.. 

 

R

Message Edited by JoeLabView on 09-08-2008 08:56 AM

How come I don't remember that message thread and it was only a few months ago? Smiley Very Happy

 

As its been said, you'll need a manual to see how the connector is wired, which is Rx, Tx, and ground.  I know such cables exist because I have a couple of blood glucose meters that use a stereo phono plug for connction with the meter.  One has a DB9 on the other end.  I think the other has a DB25, which meant I needed a DB25/DB9 adapter to connect to my PC to dowload values.  You may want to look at one of those companies to see if they supply cables.  One is Acucheck Complete, the other is One Touch Profile.  Of course you'd have to check that the wiring connections on the phono plug end match what they need to be for your device.  But once you've checked out all of that, the easiest answer is to just get a stereo plug extension cable, cut it in half and solder up the 3 wires to the appropriate pins on a DB9F connector. 

Message 8 of 11
(3,393 Views)

Ravens Fan wrote:

How come I don't remember that message thread and it was only a few months ago? Smiley Very Happy


I'm surprised I remembered it...  I don't even remember what I had for dinner last night..  😮

 

LOL!

Message 9 of 11
(3,379 Views)

I'll try to get ahold of more information from the manufacturer but the only information I've got now is what I posted in the original message.  Right now I've got it passing through a 3.5mm audio-USB adapter and the VISA driver wizard is only recognizing the adapter instead of the actual unit.  Most of the testing returns a BFFF003A error about configuration issues, which I don't know how to fix. 

 

This is proving quite complicated to me.

0 Kudos
Message 10 of 11
(3,331 Views)