Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

How control a relay using the ni usb 6008?

I'm doing my final work in the university, my subject is a sistemy to control the power factor, and using a relay to turn on and off a capacitors. I have a relay that is turn on with 12Vcc, but I know that the ni usb 6008 digital output just provide 2V to 5V and 0.6mA. How can I do to incrise this voltage to turn on tha relay? Is the digital output voltage of the card AC or DC ? If this AC could I use a transistor to incrise the voltage? If this DC could I use a operational amplifier to incrise the voltage? How could I do to incrise a digital signal

 

Or any one can give me any idea to control that realy.

 

I will use a capacitor bank that has 7 capacitors, 1,2,4,5,8,12,20 uF each.  how could I do the vi to control the switching of this capacitors? First I want to correct the power factor of the single phase circuit. I will put a inductor in this circuit, 11ohms and 0.19H and correct the power factor of this load. The vi have to calculate the capacitor to add to circuit.

I have a multimeter that send the electrical features of the load to the computer, like V, I, S, P,Q and F.P. then i will send this number to labview.

 

Thanks for the help and sorry for my english.

0 Kudos
Message 1 of 17
(10,887 Views)

Without doing your homework for you, consider using an opto-isolator to control the relay.

0 Kudos
Message 2 of 17
(10,869 Views)

thank you for the reply tom sedlack. I've talked with my teacher and he said me to use a opto-isolator like you are saing to me next I put a transistor working like a switch with a 12Vcc supply hook up to the emitter because the transistor is a pnp and the relay hook up on the colector, but the problem is i don't know how this thing(the opto-isolator with a triac) work. My opto-isolator is a opto-triac. I think it will work this way i said above. Some one could explain me how this work?

 

Sorry for the ignorance.

0 Kudos
Message 3 of 17
(10,864 Views)

The opto-isolators work as a light controlled switch.  The 6008 with a current limiting resistor can control the LED inside the opto-isolator.  There is an example of driving a LED inthe 6008 manual.  The light from the LED  turns the switch (either triac or transistor) on and off.  If your relay has an AC coil, then use the triac version.  If it has a DC coil, then use the transistor version.

 

I only use DC relays due to the type of circuits I need to design.  I connect DC+ to one side of the relay coil.  I connect the collector of the opto-isolator to the other side of the relay coil.  I connect the emitter of the opto-isolator to ground.  The LED light acts on the base junction of the opto-isolator transistor.  Also, if using a DC relay, make sure you connect a diode across the relay (anode to ground, cathode to DC+) to disapate the voltage generated by the relay coil when power is removed (back EMF). 

0 Kudos
Message 4 of 17
(10,849 Views)

@Tom:

Do I really need a current limiting resistor?

 

Currently I've connected an opto-isolator directly to an digital output (and digital ground) ... and it works.

 

 

@Filipe:

If you need opto isolators for DIN rail you can easily use this search:

http://eshop.phoenixcontact.com/phoenix/searchNavigation.do?action=searchassist

Select "INTERFACE Select" at the bottom, then "Switch" and then select input and output signal (the output signal is switched).

 

0 Kudos
Message 5 of 17
(10,838 Views)

It may work but it's really not sound engineering practice.  If you look at page 21 of the 6008/6009 User Guide (Found Here), I use example 1 under the "Digital I/O Circuitry" section.  The 6008 only has open collector (Open-Drain) outputs.  You would need a limiting resistor is this configuration.  If you are using the configuration of example 2, the 6008 does not have active drive circuitry.  You are using the 4.7K pull-up resistor inside the 6008 to drive the LED.     

0 Kudos
Message 6 of 17
(10,835 Views)

Tom, you are right. When you use IC opto isolators (example picture), then you have to build a circuit with resistor etc.

 

Actually I use opto isolators for DIN rail (example). Then you do not need any resistors etc. You can directly connect the digital output to this "device".

0 Kudos
Message 7 of 17
(10,823 Views)

but the opto-isolator works just on AC voltage?

0 Kudos
Message 8 of 17
(10,815 Views)

> but the opto-isolator works just on AC voltage?

 

No, it works with DC. The NI digital outputs have also DC.

TTL always works with DC. TTL is a kind of circuit with 0..0.8V = LOW and 2.2..5V = HIGH.

 

An opto isolator has an input which switches the output. The opto isolator I have linked above has a 5V TTL input and switches an output where 5..48VDC/100mA is allowed (note that an opto isolator output is no source!). There are also opto isolators for other voltages/currents and also for switching AC.

If you use IC opto isolators you are more flexible with the requested input/output values, but you have to include resistors in your circuit as Tom mentioned.

0 Kudos
Message 9 of 17
(10,812 Views)

what i am tring to do is that circuit on the link. I'm using a opto-isolator MOC 3022, a transistor BC558 and a relay with a 400 ohms and 12Vcc and 30mA. I'm certain there are many things wrong on that circut but i don't know where. On the input of the opto-isolator i want to put the 5V digital output of the ni usb 6008 and on the output of the opto-isolator i want to put the transistor base and the transistor wil control the relé. When the transistor is in saturation the relay will switch. I think so.

0 Kudos
Message 10 of 17
(10,802 Views)