11-20-2012 12:21 AM
Hey everybody, thanks in advance for your help on this. I have an inductive proximity sensor that I'd like to read as a digital input signal on my USB 6008 DAQ. It takes 12V power and has about a 1.5V drop, so the resultant signal when the sensor is activated is about 10.5V.
I thought I could use a simple voltage divider to lower the voltage and input it as a digital signal. Now the sensor will read 0.4V low and 4.9V high, which seems like it would work great. But when I plug it into my digital input on my DAQ, my low voltage jumps over 3V, reading a constant high whether the sensor is activated or not. Anybody know why it is pulling my voltage up and how I can fix it?
Thanks again!
11-20-2012 01:17 AM
This is due to the onboard 4.7k pull-up resistor of the USB-6008. See page 18 of the datasheet for more details.
You can redesign your dividor by taking this resistor in account but I would use an optocoupler (for example PC817).
11-20-2012 01:58 AM
Hi,
Reading your post I think your sensor a 2-wire device ? Can you confirm this.
Kees
11-20-2012 11:02 AM
is your 12v source mutually grounded together with the daq? sounds like your daq is loading the voltage divider, thus changing the voltages you are seeing....
i would use a voltage comparator(VSS tied to your 12v source) to interface with your daq. connect the comparator ouput open collector to a pullup resistor connected to your daq 5vdc. set your input voltage reference to 6v, assuming that your sensor switching is 12v and gnd(off and on). voltage signals above 6v ouputs daq 5vdc, thus less than would sink to daq GND(all sources mutually tied).
11-20-2012 12:03 PM
Do you have to use a digital line? Analog will take that voltage, and presents a higher impedance without the pullup resistor that the DI's have. Use the coerce/in-range to turn it into a boolean in software.
11-20-2012 03:11 PM
Thanks everyone for the tips!
JB: I will try recalculating my voltage divider and give it a shot. But it seems like the impedance of my signal is going to be an issue.
KC: It's a single line signal.
Apoc: You got a little over my head, but it seems like what you're suggesting is very close to the solution I think may work. Which is to wire in an op amp before the DAQ. Which as I understand it, basically acts as a poor mans voltage comparator. My question is, how do I decide which op amp to pick? The only equation I've been able to find is V=Ao(V+ - V-). But I can't find Ao spec'd on any op amps at my local radioshack. Do I just need to look harder for this spec? Or am I misunderstanding your suggestion?
11-20-2012 03:59 PM
something like this....
11-20-2012 11:23 PM
Apok,
Any simpler solutions? I'm really not much of an electronics person and am rather overwhelmed by your circuit (although I'm sure it seems very straightforward to you). Thanks for your help.
11-20-2012 11:30 PM
JB,
Thanks for the info. I really don't know how to appoach redesigning my voltage divider with the pull up resistor connected the the 5V signal though. I'd really appreciate any help you can give me on that.
I also like the optocoupler idea. But I'm a little confused by your suggestion of the PC817. Keep in mind I've never used one before. But when I pulled the datasheet up, I couldn't find anywhere that showed that it would accept a 10.5V input and it indicated that it had a 6V output. Am I way off on this?
11-21-2012 01:47 AM
Sorry, I read your answers only now.
As you can see below, the circuitry with an optocoupler is really basic. If needed, add a capacitor (eg 220nF) between pins 1 and 2 of the optocoupler to filter the output of the sensor.
Obviously, the used Px.x of the USB-6008 must be configured as a DI with the default open collector mode.
The main advantage of this solution is the galvanic separation provided by the optocoupler.
Connected like this, the optocoupler acts like an inverter so don't be surprised to get a low level when the output of the sensor is high.
Don't hesitate to answer if you need further help.