a/d voltage voltage record with sound card

This is the place for any magazine-related discussions that don't fit in any of the column discussion boards below.
Post Reply
Tinkerer
Posts: 21
Joined: Sat Jan 08, 2005 1:01 am
Location: Pennsylvania
Contact:

a/d voltage voltage record with sound card

Post by Tinkerer » Thu Jan 13, 2005 4:03 pm

Is it not-too difficult to use my sound card as an a/d to record voltage? Is there existing software? What kind of voltage and current will the input tollerate before going poof? Can a Basic Stamp or PIC perform such a feat? I know most have a/d converters.<p>I simply need to measure time and voltage. I'd like to get an output that looks something like:<p>time voltage
0001 .01
0002 .01
0003 .01
0004 .02
0005 .03
0006 .07
|
1000 .01<p>with the units being whatever is appropriate, microsecond/millivolts or whatever.

User avatar
philba
Posts: 2050
Joined: Tue Nov 30, 2004 1:01 am
Location: Seattle
Contact:

Re: a/d voltage voltage record with sound card

Post by philba » Fri Jan 14, 2005 12:28 pm

I'm not an expert on this sort of thing but I believe that the sound card input typically has poor low frequency response and is AC coupled.

Tinkerer
Posts: 21
Joined: Sat Jan 08, 2005 1:01 am
Location: Pennsylvania
Contact:

Re: a/d voltage voltage record with sound card

Post by Tinkerer » Fri Jan 14, 2005 2:06 pm

Thanks for telling me! I might have really gone nuts trying to read a DC input. I see no reason why AC voltage wouldn't work in my application- but I did need to know it's the only thing that would in the soundcard! As for response anything in the audible range will work.<p>I still need to know how to read that input.

terri
Posts: 404
Joined: Sun Nov 07, 2004 1:01 am
Location: colorado
Contact:

Re: a/d voltage voltage record with sound card

Post by terri » Fri Jan 14, 2005 4:03 pm

Radio Shack has (or had) a DVM which plugs into the PC serial port to yield data like you want for every range of the meter. This is a sample of the data log output for one second intervals of the phone line on-hook voltage. At the time I was monitoring for spikes on the line which were messing up my modem:<p>09:39:26 AM -46.6V
09:39:27 AM -46.6V
09:39:28 AM -46.6V
09:39:29 AM -46.6V
09:39:30 AM -46.6V
09:39:31 AM -46.6V
09:39:32 AM -44.2V
09:39:33 AM -46.6V
09:39:34 AM -46.6V
09:39:35 AM -46.6V
09:39:36 AM -46.6V<p>(There happened to be no spikes in this 10-second interval.)<p>Sampling time is fairly flexible with their software, and it puts up a pretty graph of the meter measurements over time. The data log is storable, and the graph is printable. However, the minimum sample rate is one per second.<p>Also, if you can convert the varying voltage to a varying resistance (via transistors) between 0 and about 100,000 ohms, you can apply this to one axis of the the game port on your machine and get 256 bit resolution. This is a fairly well-known practice and they call it "the poor man's data acquisition card," and merely makes use of the built-in joystick A/D converters for the game port. These convert the resistances of the rheostats in the joystick to 256 bit position data for the gaming software.<p>[ January 14, 2005: Message edited by: terri ]</p>
terri wd0edw

User avatar
philba
Posts: 2050
Joined: Tue Nov 30, 2004 1:01 am
Location: Seattle
Contact:

Re: a/d voltage voltage record with sound card

Post by philba » Fri Jan 14, 2005 5:25 pm

I think you might be able to hack the sound card to bypass the capacitors to DC couple.<p>A number of less expensive DMMs have serial output. I've thought about getting one but don't *really* need it. Did it catch your spike?

Tinkerer
Posts: 21
Joined: Sat Jan 08, 2005 1:01 am
Location: Pennsylvania
Contact:

Re: a/d voltage voltage record with sound card

Post by Tinkerer » Fri Jan 14, 2005 5:48 pm

Interesting but one per second ain't even close. I need much faster sampling, at least 100 per millisecond.<p>"the poor man's data acquisition card" might work. 256 should be enough. I'll do some surfing to see if I can get more detail.

User avatar
philba
Posts: 2050
Joined: Tue Nov 30, 2004 1:01 am
Location: Seattle
Contact:

Re: a/d voltage voltage record with sound card

Post by philba » Fri Jan 14, 2005 8:21 pm

100 K Samples/Sec rate. Uh, not likely with the sound cards. I think the turtle beach stuff will do 48Khz, not sure what CL and others is capable of but given that 48K is the highest common audio rate, I'd be surprised if anything in a standard PC goes above that.<p>To get there, you'll probably need to get a data acquisition board. Probably the cheapest 100K samples/Sec is around $200. Typical "low cost" products are in the 300-400 range. You might be able to pick something up cheaper on ebay.<p>I suppose you could build a data acquisition system but that is a reasonably significant undertaking.

Tinkerer
Posts: 21
Joined: Sat Jan 08, 2005 1:01 am
Location: Pennsylvania
Contact:

Re: a/d voltage voltage record with sound card

Post by Tinkerer » Sat Jan 15, 2005 6:13 am

I used 1 too many zeros! I think I only need 10khz sample, not 100 like I said in previous post. 48khz is plenty.<p>It looks like there are lots of small da boxes on the market for under $100 designed to work with BASIC and either a serial or parallel port. I'll check those out.

Tinkerer
Posts: 21
Joined: Sat Jan 08, 2005 1:01 am
Location: Pennsylvania
Contact:

Re: a/d voltage voltage record with sound card

Post by Tinkerer » Sat Jan 15, 2005 7:44 am

I've got it! Check this out:
http://www.picotech.com/low-cost-data-loggers.html<p>It's a printer port ADC that requires no power, have software and drivers for any language you could want including basic, and costs under $200! It can even feed data straight into Excel! IT'S PERFECT! They have quite a line of ADCs. Has anyone here used them?

terri
Posts: 404
Joined: Sun Nov 07, 2004 1:01 am
Location: colorado
Contact:

Re: a/d voltage voltage record with sound card

Post by terri » Sat Jan 15, 2005 4:38 pm

Great! I was about to dig out my old stuff on using the game port when I read your message. (At the time, I was using a microwave oven temp probe to measure and log temps --worked great.)<p>By the way, I goofed when I said 256-bit resolution on the game port A/D converter. Of course, I meant 8-bit resolution. Duh.
terri wd0edw

terri
Posts: 404
Joined: Sun Nov 07, 2004 1:01 am
Location: colorado
Contact:

Re: a/d voltage voltage record with sound card

Post by terri » Sun Jan 16, 2005 12:14 am

Philba:<p>(1) "Did it catch your spike?"<p>Yes, I found spikes. I'm still not sure if these were what was shutting down my modem, even though the 'phone lines out here are pretty flaky. <p>The shutdwns were related to time of inactivity, but were not due to timeouts on the modem pool and not due to timeout parameters on my system. Clicking "Work Offline" did not help. The timeout period was random, but was always greater that about fifteen minutes and less than 1/2 hour, according to the modem log.<p>So I did a temporary fix by writing a program to autmatically ping my ISP every ten minutes and let it run in the background to maintain the connexion. This, pending completion of the investigation of what the source of the timeout is in the first place. But the problem is on the back burner for now.<p>(2) "I've thought about getting (a data logging meter) but don't *really* need it." <p>I tend to follow the theory: "I'd rather have it and not need it than need it and not have it" with respect to guns, cameras, women, and meters.<p>[ January 16, 2005: Message edited by: terri ]</p>
terri wd0edw

Tinkerer
Posts: 21
Joined: Sat Jan 08, 2005 1:01 am
Location: Pennsylvania
Contact:

Re: a/d voltage voltage record with sound card

Post by Tinkerer » Sun Jan 16, 2005 6:36 am

That Pico ACD uses 0-5v input just like the joystick port. I'm betting they are pretty similar internally. In either case I have to make my instrument have that output.<p>The Pico has great software which is alone makes it worth the purchase. But I have a joystick port now- no $ outlay. If I can read the joystick port with BASIC and get that time/voltage output I need why spend any money at all? Soooooo I'd still like to see your joystick reading info. How do I read it with a BASIC program, interface info, and such.

Post Reply

Who is online

Users browsing this forum: No registered users and 33 guests