Analogue input

More
04 Feb 2012 01:21 #17373 by davidmp
Analogue input was created by davidmp
Hello all,

I have the need to monitor analogue signals coming from gas flow meters in CNCLinux and have searched on how to do this but in vain. Is there a HAL component that can do this? I was hoping to use the microphone input as an ADC and the headphone outputs as DAC because I only need two signals.
Has anyone done this? My parallel port is completely full and I have a mini-ITX system so not a lot of expansion space.

Thanks

davidmp

Please Log in or Create an account to join the conversation.

More
04 Feb 2012 04:55 #17377 by cmorley
Replied by cmorley on topic Re:Analogue input
Interesting idea. Do you know of any projects on the web doing this hopefully ope source ones with code samples?

Please Log in or Create an account to join the conversation.

More
04 Feb 2012 07:03 #17379 by andypugh
Replied by andypugh on topic Re:Analogue input
davidmp wrote:

I was hoping to use the microphone input as an ADC and the headphone outputs as DAC


I had a quick look at this a while ago, but couldn't figure out how to do it in a generic way.
There is a driver for the motherboard speaker (hal_speaker) but that is not what you need.
There might be some clues here:
wiki.osdev.org/Sound

Please Log in or Create an account to join the conversation.

More
04 Feb 2012 07:11 #17380 by andypugh
Replied by andypugh on topic Re:Analogue input
davidmp wrote:

I have the need to monitor analogue signals coming from gas flow meters in CNCLinux and have searched on how to do this but in vain.


I think you can do this with a USB device and hal_input, if you don't need realtime.
One possible option for the USB hardware is a pokeys: www.poscope.com/pokeys56u

I can think of a way to do it with only the parport (and PWM to voltage conversion) but 2 channels of inputs + 2 outputs would be a minimum of 5 parport pins.

Please Log in or Create an account to join the conversation.

More
04 Feb 2012 08:41 #17385 by cncbasher
Replied by cncbasher on topic Re:Analogue input
perhaps an arduino connected via usb

Please Log in or Create an account to join the conversation.

More
04 Feb 2012 09:19 #17387 by andypugh
Replied by andypugh on topic Re:Analogue input
andypugh wrote:

There might be some clues here:
wiki.osdev.org/Sound


This looks more relevant:
tldp.org/LDP/lpg/node84.html
And seems to indicate that ioctl() is the way to get low-level access

Please Log in or Create an account to join the conversation.

More
05 Feb 2012 00:27 #17409 by jmelson
Replied by jmelson on topic Re:Analogue input
andypugh wrote:

andypugh wrote:

There might be some clues here:
wiki.osdev.org/Sound


This looks more relevant:
tldp.org/LDP/lpg/node84.html
And seems to indicate that ioctl() is the way to get low-level access

I think sound cards are AC coupled, so won't work for slowly-changing inputs.
ioctl() only permits a privileged program to gain access to I/O registers.
The wav interface to the sound card moves blocks of raw samples in and
out, not a single sample a a time.

Jon

Please Log in or Create an account to join the conversation.

More
05 Feb 2012 03:55 #17411 by skunkworks
Replied by skunkworks on topic Re:Analogue input
I am using an arduino to measure spindle temp and offset z automagically..

I followed these examples..

emergent.unpythonic.net/01198594294

works very well so far

electronicsam.com/images/KandT/testing/S...on%20HM2-Servo-1.png

sam

Please Log in or Create an account to join the conversation.

More
05 Feb 2012 18:47 #17440 by cmorley
Replied by cmorley on topic Re:Analogue input
DIY oscilloscope using a sound card.
It seems 0 -.05 volts would be safe but others have used up to aprox 5 volts (but an AC current not DC)
They recommend a voltage divider to keep voltage to a reasonable number.
If you had an old sound card hanging around might be interesting project ....

www.micahcarrick.com/pc-sound-card-oscilloscope-linux.html
www.yann.com/en/diy-turn-your-gnulinux-c...cope-29/09/2010.html

Please Log in or Create an account to join the conversation.

More
07 Feb 2012 01:47 #17477 by davidmp
Replied by davidmp on topic Re:Analogue input
Thank you every body for your replies. I didn't know the audio inputs were AC coupled. This will make it not work for my purposes so...
Does anybody have any ideas for a small DAQ that can be read through the RS232 or Ethernet ports and display values on AXIS?

Thanks

Please Log in or Create an account to join the conversation.

Time to create page: 0.111 seconds
Powered by Kunena Forum