10-01-2010 04:15 PM
Hi Everyone,
So I am sure this will be a simple problem and I just haven't understood something along the way, however I am currently struggling and would really appreciate the help.
We have a USB-6210 connected to a laptop and two inductive proximity switches, each powered by a separate 9v battery. The purpose of these switches is to help us identify the position of a cog as it rotates. One switch will trigger at the top of a rotation and the second at the bottom. The second switch is similar, however it gives us 60 individual positions around the cog instead of just two (each position representing 6 degrees of rotation). Ideally we would like the voltage being displayed on screen to reflect whether the switch is on (showing 9v) or off (showing 0v).
The problem I am having is that I just cannot figure out the correct wiring configuration. I am currently going for an NRSE signal with the +terminal of the battery connected to AI14 and the -terminal connected to AISENSE (with a 100k resistor between AINSENSE and AIGND). In this configuration I see the voltage spike as it should and then it will take around 15 seconds to return to zero.
I really do hope this is just me missing the obvious and someone can help me solve this frustrating problem.
Kind Regards,
Karl.
10-01-2010 05:13 PM
For now are you just connecting the battery to and from the DAQ inputs right now with no switch?
If so, that is probably normal to take so long to ramp down since you have caharged up the front end input circuitry of the card.
If this happens with your switches, what make and model number are they?
-AK2DM
10-01-2010 05:35 PM
Hi,
Yes i've brought the equipment home from work for the weekend and to take it back to basics I left the switches there. So to mimic the action of the switch opening and closing I have been completing the circuit manually be touching cables.
I believe this is is the proximity sensor that we are using -> http://mt.rsdelivers.com/product/telemecanique/xs508b1pam8/inductif-sensor-xs508b1pam8/6097347.aspx
Thanks for the help.
10-04-2010 04:14 AM
Hi Again,
I have tried this morning with one of the switches in situ and low and behold I am seeing the same problem.
All I am wanting to do is reflect when a switch is either on or off (9v or 0v), and from there I can do everything in LabView that I need.
Has anyone used a setup similar to this with success before? If so, please would you be able to talk me through your setups as I am running short on time.
Many thanks again.
Karl.
10-04-2010 09:34 AM
Dear Karl,
The issue you are seeing is certainly indicative of a wiring issue. But, from what you have decribed, you are wiring correctly. Could I please ask you to review the attached wiring table (which has been plucked from National Instruments Field Wiring Guide). Portable, battery powerred devices are generally regarded as floating source. So I would suggest using "Referenced Single Ended". This prevents the need for the external resisters.
Also, could I ask if you have tried using differencial? If you can spare the additional analogue input line requirement, differencial has far greater noise immunity.
Lastly, could I ask why you are using analogue input at all? Could you use a smaller battery (5V) and measure the input as a digital signal? Admittedly, I do not know the switching hardware, so I do not what the power requirements actually are. But its a thought!!
Hope this has been useful,
Best wishes,
10-04-2010 09:56 AM
One probably issue is that when you open the switch, you're not actually driving to 0V, you are just floating the input. As a result, discharging the charge from the 9V is going to take a while, since there isn't anywhere for the charge to go.
Currently, your setup looks like this (the terminals are set up for a differential measurement, but the same principle applies)
When the switch is open, your positive terminal isn't driven anywhere, so it's not going to go to 0V very quickly (it may never make it there, measure unconnected channels and you'll see them usually float to either positive or negative full scale depending on how the charge builds up)
You should try one of these options:
Use a Single Pole, Double Thrown (SPDT) relay, which connects to one of two terminals, instead of just connecting or disconnecting:
This way, when the relay disconnects from the 9V signal, it's driven straight to ground (and thus 0V)
Or, if you can't choose your relays, use a bias resistor:
This will require you to choose a resistor value such that the current and impedance of the system is acceptable. This will still be a bit slow to discharge, but not as slow as floating the channel.
Hope this helps, let me know if my explanation isn't clear.
Regards,
10-04-2010 11:00 AM
Thank you all for the replies.
I believe I have finally sorted the problem. And it was indeed a simple solution that I missed earlier by not reading things properly.
I have added an additional 100k resistor between AI1 and AIGND as shown in the image above, and from initial testing the wave is much "squarer". I should be able to get started on my coding now.
Once again thank you all for the help, you were invaluable. I'm sure I'll be back at some point in the future with a more taxing query though.
Many Thanks.
Karl.