NI Home
Cart Cart | Help
Hello Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI
You are here: 
NI Home > NI Developer Zone > NI Discussion Forums


Reply
Member
petr b
Posts: 4
0 Kudos

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 

Active Participant
Now_With_Underscores
Posts: 345
0 Kudos

Re: Making own relay board connected via USB

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 S
National Instruments
Analog Engineer
Member
petr b
Posts: 4
0 Kudos

Re: Making own relay board connected via USB

Hi it looks good but its cost almost my month sallary :smileyhappy:

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

Active Participant
Now_With_Underscores
Posts: 345
0 Kudos

Re: Making own relay board connected via USB

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 S
National Instruments
Analog Engineer
Active Participant
GovBob
Posts: 606
0 Kudos

Re: Making own relay board connected via USB

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.

Using LabVIEW 2010SP1 and TestStand 4.5
Member
petr b
Posts: 4
0 Kudos

Re: Making own relay board connected via USB

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

Active Participant
GovBob
Posts: 606
0 Kudos

Re: Making own relay board connected via USB

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.

Using LabVIEW 2010SP1 and TestStand 4.5
Member
petr b
Posts: 4
0 Kudos

Re: Making own relay board connected via USB

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 

By using this web site, you accept the Terms of Use for this web site. Please read these Terms of Use carefully before using any part of this site. Please go here for information on ni.com's copyright infringement policy.
My Profile | Privacy | Legal | Contact NI © 2011 National Instruments Corporation. All rights reserved.    |    E-Mail this Page E-Mail this Page