LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Connecting reed switch and LED

Hi, I am currently usign cDAQ9172 device to monitor data on LabView. I have a NO reed switch (rated 30W) and an LED light (https://www.mcmaster.com/5339T11). I want the LED to light when my switch closes. I tried using NI 9205 card to detect the same. I could see the signals drop back and forth in NI when the switch opened and closed but I couldn't see the LED glow. They were connected in parallel. I used an external voltage source for the same (5V)

 

1. Is there any NI card that I could possibly use to achieve the same ?

 

2. I thought about connecting the LED and the switch in series with the power supply but I'm concerned I might blow the card up.

 

Any recommendations ??

Thanks in advance !

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

Please attach a drawing that shows how you have all of these components hooked up.

 

Also attach your VI since you say you want to monitor it in LabVIEW.

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

 

  1. How was the reed switch attached to the cDAQ?
    1. Assuming you used a DIO input, did you also use a pull up or pull down resistor or enable internal pull up?
  2. How was the LED connected to the cDAQ?
    1. Assuming you used a DIO output, did you use the proper current limit resistor in series with the LED?
    2. Did you connect the LED to VCC or Ground?
    3. Did you properly orientate the LED with respect to polarity?

 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 3 of 13
(3,092 Views)

I hooked my circuit in NI 9205. It is an analog input card. I could see the change in the 'switching state' although the voltage was very random. I used the NI 9205 like I would use it for a reference single ended transducer. I do not want to connect the NI 9205 in series with LED as I fear I might end up blowing it up. Please advise.

 

Also, see attached.

 

Thanks !

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

Hi sam,

 

I could see the change in the 'switching state' although the voltage was very random.

To measure a voltage signal you need to connect to two points in your circuit.

Your NI9205 is connected by only 1 wire. Did you read the manual of your NI9205 to know how to measure voltages?

 

I do not want to connect the NI 9205 in series with LED

Hint: Voltages usually are measured in parallel to the DUT…

(This is very basic eletrical measurements theory. Are you sure you're the right person for this task?)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 13
(3,059 Views)

@samkam786 wrote:

do not want to connect the NI 9205 in series with LED as I fear I might end up blowing it up.


I more am afraid you are going to blow up the NI-9205.

 

I think it's time for you to take a step back and maybe take an introductory electronics course.

 

LabVIEW is not just another programming language you can learn in by just coding. Since LabVIEW is designed to interact with real world devices. You really need to understand the concepts of electrical circuits and sensors, how to operate test equipment to safely and accurately measure common electrical parameters.

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 6 of 13
(3,046 Views)

Hi, thanks for your response. I am new to this and so I shall post my thoughts here and please correct me if any of it is wrong.

 

NI9205 has the ability to read RSE signals. So, the one wire was connected to NI 9205 with the impression that it would throw voltage when the switch is closed and that I'd be able to detect in LabVIEW.

 

While I understand the voltage is typically the same in a parallel circuit, I was worried about the current that would pass thru the circuit. If the LED light is connected, I do not want the current drawn thru the circuit (>1A) to blow the card up. 

 

Please correct me if I'm misunderstanding anything here. Any leads/alternative solutions are acceptable. thank you

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

Hi sam,

 

NI9205 has the ability to read RSE signals.

Yes. As is explained in the manual for the NI9205 module. With images showing how to connect the voltage signal.

Did you read that?

 

So, the one wire was connected to NI 9205 with the impression that it would throw voltage when the switch is closed and that I'd be able to detect in LabVIEW.

Why do you think so? Ever heard about electrics basics in school?

 

While I understand the voltage is typically the same in a parallel circuit, I was worried about the current that would pass thru the circuit. If the LED light is connected, I do not want the current drawn thru the circuit (>1A) to blow the card up.

Ever heard about Ohm's law? Did you read the manual for your NI9205? Did you learn about the input resistance of an input of the NI9205?

 

As said before: before doing any measurement with a programming language of your choice you NEED to understand the basics of the underlying physics! ("Electricity": Ohm's law, Kirchhoff's rules, …)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 13
(3,033 Views)

Okay. Will do. Could you provide alternative ideas? Alternative circuit/NI card that I could possibly use ?

 

Thanks. 

0 Kudos
Message 9 of 13
(3,029 Views)

Hi sam,

 

I think you can safely measure the voltage of the LED in your circuit with your NI9205.

Why do you think you need to use something else?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 10 of 13
(3,025 Views)