From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Switch Hardware and Software

cancel
Showing results for 
Search instead for 
Did you mean: 

Making own relay board connected via USB

Hi, I going to do my first big project in LabView. I need 3 relays, 1 input (temperature) and maybe 1 pwm. I look after oficial relay boards, but its too expensive for me. So I want build my own relay card controlled by some microchip. Or if you can recomend me some cheap relay board, it would be great (something like this http://www.selfcontrol.cz/re3usba.htm or on ebay http://www.ebay.com/sch/i.html?_sacat=0&_nkw=relay+card+usb )

 

thanks 

0 Kudos
Message 1 of 8
(9,868 Views)

Did you run into our C Series 4 SPST relay module?  There's a USB version that fits your needs. 
If you're looking for a homebrew approach, then you might look into a microcontroller, some transistors and some SPST relays. 

-John Sullivan
Problem Solver
0 Kudos
Message 2 of 8
(9,860 Views)

Hi it looks good but its cost almost my month sallary 🙂

I think about microcontroler, but I need set times, delays, make some output so I prefer Labview. 

0 Kudos
Message 3 of 8
(9,855 Views)

LabVIEW is able to receive and generate data over the RS-232 serial port of your computer.  Instead of using a microcontroller, you could use a simple serial to parallel converter and have each of the parallel output pins control the base of a transistor that then controls the coil of your relay.  You'll need to make sure your serial to parallel converter only updates once you've shifted all the bits in... this would require a counter on the clock to commit the output every N clock cycles (N is the number of bits in the shifter). 

 

If that is too difficult, you can still use the RS-232 port and then program LabVIEW to interface with a microcontroller that then controls the relays...

-John Sullivan
Problem Solver
0 Kudos
Message 4 of 8
(9,851 Views)

How about using an Arduino and a relay shield. You can then use LIFA (LabVIEW Interface for Arduino?) to process your data. Sparkfun has a package that included a Arduino with LabVIEW student edition pretty cheap. A relay shield is about 20$ US. There are tons of support for Arduino and lots of examples. Since you probably have LabVIEW already you probably just need a Arduino and relay shield.

Now Using LabVIEW 2019SP1 and TestStand 2019
0 Kudos
Message 5 of 8
(9,841 Views)

thanks GovBob, thats what I needed. Its very cheap and seems very easy to program

0 Kudos
Message 6 of 8
(9,834 Views)

I'm glad you like the idea. I just want to make sure you or any other folks that read this thread understand that LIFA will not program the Atmel chip on the Arduino. To program the chip you will still need to write a "sketch". But like I stated earlier there are a ton of examples at the Arduino website and others. Enjoy your project.

Now Using LabVIEW 2019SP1 and TestStand 2019
0 Kudos
Message 7 of 8
(9,829 Views)

so I try arduino and works well, but Im afraid of is labview is the rigt software for my program, can someone tell me is this things are possible in labview:

  • main thing is that i put from 3-30 steps in each step I define motor(on/off), heating(on/off), atc. is there way that I can manage number steps (I want 5 steps program, so labview shows me just 5 inputs)
  • save some values into file and reopen it
  • recording temeperatures, times, on/off state of motor/heater into file/image
  • some learning system (I need heat water to 62C but there is some thermal inertia of heating element, so the first time I can cook manualy and program will learn values when it should stop)
  •  simulating
  • gradient of heating (1C/minute)
  • compiling program into exe file compatibile on every computer

OR

 

I thinking about programing it in some Objective-C or something like that, but I have no expirience, can you recomend me some easy to lern object language?

 

thanks very much 

0 Kudos
Message 8 of 8
(9,790 Views)