LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using USB 6501 to read magnetic sensor

Hello,

I am trying to run a program to control a set of pneumatic actuators. On each of the actuators is a magnetic sensor which takes a 5V DC input and will output either 5V or 0V depending on whether the actuator is open/close. I am using the sensor with # CPS9H-AP-A  and whose dataset is here http://www.automationdirect.com/static/specs/nitracylposswitch.pdf. I want to be able to read the sensor voltage with the USB 6501 to know when the actuators have opened/closed. Right now I using the example daqmx programs/ measurement & automation to see if the sensors can be correctly read. What I noticed first was when reading the floating pins the outputs were always high. I think it is mentioned in the datasheet that the pins will be high unless connected so I am pretty sure this is not a problem. I am also able to ground a pin and see it go low on the M&A. The problem arises when I connect the input pin to the output of the sensors (which is either 5V or 0V). When the sensor's output is low and I connect the input of the 6501 to the sensors output, the input pin appears to be trying to remain at logic high. This causes the output of the sensor to rise to between 3-4.5 V. If I disconnect the input pin the sensor's output goes back to 0V. The problem appears to be that the input remain is acting almost like an output pin and I can't really figure out why (it is set to input). The ground pin on the 6501 is also connected to the ground of the power supply. Any insight or need for more clarification would be greatly appreciated

0 Kudos
Message 1 of 13
(3,122 Views)

Look at page 14 of the USB-6501 User Guide. It shows a 4700 ohm resistor to +5 V from each input. This is probably what is causing your problem. When I tried your link to the sensor, I was not successful. So I do not know what the sensor drive capability is.

 

Lynn

0 Kudos
Message 2 of 13
(3,111 Views)

it appears that your logic level from your sensor 0v is not a GND level. connect the output to a pull down resistor to daq GND.

0 Kudos
Message 3 of 13
(3,109 Views)

Sorry about the link its from this site. http://www.automationdirect.com/adc/Shopping/Catalog/Pneumatic_Components/Pneumatic_Cylinder_Positio... and datasheet is on right hand side. I will try adding a resistor and see if that fixes it. 

 

Thanks

Jason

 

 

0 Kudos
Message 4 of 13
(3,101 Views)

Jason,

 

That link works. For the CPS9H-AP-A you will definitely need a pull down resistor. The CPS9H-AN-A would probably work without one.

 

Lynn

0 Kudos
Message 5 of 13
(3,085 Views)

Hello again,

So I got it to work by using a 100 ohm pull down resistor. Is this resistance too low as it will draw too much current? I tried with 5k,15k and the voltage dropped by half on a low output.

0 Kudos
Message 6 of 13
(3,051 Views)

That will draw 50 mA when pulled to +5 V.  If I recall the specs on the sensor, it could handle 200 mA.  So that should be OK.

 

Lynn

0 Kudos
Message 7 of 13
(3,048 Views)

So this is kind different from the original topic, but I didn't want to make a new post for what is probably a simple question. I am also using my 6501 as an output device to a darlington array. However, I am only seeing ~2.5V on a logic high at the pin of the darlington array. When I disconnect the 6501 from the darlington the logic high goes to 5V. Any idea on the cause of this? The darlington and usb 6501 gnds are all connected to chassis gnd. 

0 Kudos
Message 8 of 13
(2,999 Views)

Unless the darlington array has a series resistor at the input, you are loading the output line with two diodes in series to ground.  So 2.5 V is about as high as you can get it without damaging something.

 

Lynn

0 Kudos
Message 9 of 13
(2,978 Views)

Thanks for replying,

How should I go about choosing a resistor value.

0 Kudos
Message 10 of 13
(2,972 Views)