• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1430
  • Last Modified:

Looking for a device to control 12v relays (USB Preferred)

I have had great success asking problematic questions here on Experts Exchange so now I will try my luck at a general knowledge question.  I will start off by asking what I am looking for as far as the hardware goes.  Then I will explain what I intend to do with it further down the road.  500 points to the reply that makes me go AAHAAAHHH!!

What I'm looking for: A USB (for ease of connection and less hassle with emulating a serial port) device to trigger 12v relays.  I'm not concerned with a logic controller (not real sure if thats the correct term or not).  I just basically need something I can switch the relays on with.  I have 12 - 15 in mind.  I would also need to be able to control it remotely somehow.  I would think Telnet, FTP, http, etc would suffice and be pretty common.  WiFi would be ideal, although then I  have the problem of buying additional hardware for my phone (explain in the WHY section of this post).  For my situation Linux drivers would be preferred, and possibly required based on how I interface it with the system.  I have very little knowledge on these devices and is why I have posted here.

Now the WHY to help you better understand me.  For starters, this will not be hooked up to a PC.  I am hoping to use my XBOX as it's controller in my pickup truck.  It is possible to run Linux on my XBOX, but there are individuals who can port Windows software/drivers to XBOX.  Linux drivers would eliminate that step.  I have quite a few things in my truck that are run from 12v switches (door poppers, suspension valves, actuators, air pumps, etc) that I'd like to control remotely.  My phone is pretty high tech (Samsung i700) and I can connect to the net, FTP, http, etc from that.   Or maybe WiFi the 2 devices together. The ultimate goal is to be able to control the many 12v devices in my truck with a few taps of my phone.  Also without a "PC", although the XBOX is just a PC changed into a gaming console (and back into a PC in my case).

Thoughts? Suggestions? Questions?

Very basic info on my truck can be found here: http://www.blazinlow.com/s10blazed/johntruck.htm
0
s10blazed
Asked:
s10blazed
1 Solution
 
CallandorCommented:
For things you can do with cars and trucks and how to integrate with PC-like devices, I recommend this site: http://www.mp3car.com/  You may find that someone has figured out how to do what you want.
0
 
rudy_baggaCommented:
Sound like an ambitious project.  There are several vendors of USB based devices for both Digital and Analog I/O.   Take a look at  National Instruments  www.ni.com. Specifically the NI-6501 USB DIO device at $95 is about the lowest cost USB I/O device you are going to find. http://sine.ni.com/nips/cds/view/p/lang/en/nid/201630.   It has 24 TTL I/O lines that can be used to control the relays.  You will need to find 12 Volt relays that  can accept a TTL level input or you can look into some of NI's external relay products.  They advertise Linux compatibility but I have never tried it.  I've used lots of NI's Windows stuff though and it is definitely top notch.    
0
 
s10blazedAuthor Commented:
What is a TTL level input?  Also the difference between digital and analog I/O in this case? As I said, I am not familiar with these types of hardware at all. I've used a data logger that had a few similar features but it was part of a kit for a water monitoring system and it was basically hook up part A to part B... not much knowledge required there.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
J-A-LCommented:
If you want to control relays from a computer... either solid state or mechanical, take a look at this company. I've used their products before.

http://www.measurementcomputing.com

http://www.measurementcomputing.com/cbicatalog/directory.asp?dept%5Fid=243&top%5Fid=25&dept%5Fname=Digital&mscssid=CCRV3MR3HNGB8KXFWKG8WPS0FJPQ3GUC

You buy racks of solid state relays which can control piles of high-power equipment... really depends on the modules you get on the racks.  It comes with an API so you can develop any type of software you want for these.

Jeff
at yourtechonline.com

0
 
rudy_baggaCommented:
TTL stands for "transistor transistor logic", although you rarely hear it called that anymore.  It basically means that the pin will output logic levels of either 0 or 5 volts.  

As JAL points out, Measurement Computing also has a USB solution PMD1024LS at $99 but Measurement Computing was just acquired by NI on April 27.  My guess is that the MCC's competing product line  will soon be phased out.  

Regarding the difference between analog and digital...   Digital signals can be used to control individual relays such as you described to turn various items on or off.   For example you might want to be able to turn the headlights ON or OFF.  In this case, by digital signal, I am referring to a discrete wire that can either be set High (5V) or Low (0V).    Analog control is generally used in situations where a setting within a range is required.  Let say that you could control ride height by varying the pressure in a hydraulic cylinder.  In this case a continuous range of 0 to 5V might be needed to set the pressure in the cylinder.  Analog control most often uses some form of feedback mechanism in order to achieve accuracy and stability.  I suspect that such closed loop servo control is beyond the scope of your project.

Since you are using a hacked Xbox as the basis for your project I have to assume that budget is a big issue.   As you can see, the available USB devices and the associated relays (the SSR series stuff has been around for decades and is available from a variety of sources) are designed and marketed to the industrial user. as such, they can get expensive.  

0
 
s10blazedAuthor Commented:
The NI USB I/O that rudy_bagga posted seems ideal.  If I have this right, it will allow me to send 5v OUTPUT to 24 different terminals on that terminal block? Looking at the diagram (http://www.ni.com/pdf/products/us/20054920301101dlr.pdf) it shows P#.#.  Would this be each connection point? If so, I could 22 of them and 2 +5v.  I see it also can use those connection points as inputs? FOr example if I hooked a switch to a door pin and it send x volts to the input, it could trigger another output and have that controlling a siren as a make shift alarm? It does say it works with Linux too.  That is looking awful tempting.
0
 
s10blazedAuthor Commented:
Budget is not a main concern here.  $300 is about the most I want to spend but the $100 one is looking nice.  The only thing I would see as not meeting my demands is the ability to control it remotely.  I haven't been able to determine whether or not that software has the ability to do so.  Does anyone have any insight on that?
0
 
rudy_baggaCommented:
The P#.#  refers to port number and pin number.  The 24 digital I/O lines are arranged in three 8 bit ports.  So, for example, P1.7 means port 1, pin 7.    The two pins that you see labeled "+5v" are at a constant 5V.  These are commonly used to provide power to sensors etc that require it or simply wired to an LED (through a resister, of course) to indicate that the device is active.

Each pin can be designated as either an input or an output, but not both simultaneously.  This is done through a configuration utility. Yes, it is possible (and quite common) to  monitor the state of a digital input and use it to initiate some other system function.

Regarding the remote control...  Sorry but I don't have any experience doing this under Linux.  NI has software development environments available that would make this a piece of cake but they will run you around $2000 to obtain a license for them.
0
 
s10blazedAuthor Commented:
So on the NI-6501 is claiming 24 I/O's but I only count 22 ports? Are they counting those constant +5v as two ports? Either way, I have that part down. The +5v would be a perfect remote turn on signal for my amplifiers.  I assume its pulling that voltage from the USB host and that would be the XBOX.  When the XBOX is on, I'd like my amps on... so that works out perfect as I was just going to hop a signal from the DVD-ROM... ADDED BONUS! :)

I understand each port can only act as input/output at one given time.  I was thinking as an example, that connecting a signal from the door pin to P1.1 (input) would trigger P1.2 (output) to trigger an alarm and/or lights.  This is a simple example, but i foresee much potential with that.

Now these software development environements... you say its a peice of cake but do you have a background in programming? It's been quite some time since my VB and C++ classes so I am fairly sure I am rusty with coding.  Not to mention I hate doing it.  But theoretically, if I got the software, would I have to write the program to connect it remotely? I can control my xbox media functions remotely through a web based interface it provides.  I'd like to do something similar with the NI-6501if i could.  Is it possible to control them remotely through Windows? Pocket PC by chance?? (long shot in the dark since it can run on the XBOX as well as my phone)

I had a PC in my truck before as my media center and it was quite a hassle.  The boot time and cumbersome mousing methods available made it a poor option as the primary multimedia device.  It's just not a good idea to be clicking away trying to find the song you want in the play list while trying to drive...  worst come to worst I have plenty of old PCs that would work as a controller for this device.  It would also be more cost effective for my wifi as I already have that equipment. ($100 for the xbox wifi adapter too!!)

I wish I could find a used NI-6501 on eBay! I do plan on buying one sometime in the next couple months once I start going gun-ho on my interior.
0
 
rudy_baggaCommented:
P0.0 - P0.7  =  8 lines
P1.0 - P1.7 = 8 lines
P2.0 - P2.7 = 8 lines

Total = 24 lines

As for remote...

As you stated, the cell phone can operate as a webclient. i.e. it can browse the web.  What you need to do is somehow turn the XBox into a webserver.  To do this, you will need to find a software package that will allow you to develop a webserver that can also talk to the NI API for the USB 6501.   The car will need it's own connection to the internet so it will need it's own cellular account (recurring cost) or you could use wifi in which case you would be limited to operation near hotspots (possibly another recurring cost)Assuming you can do that, then you could browse to the car's website using the phone and then control the various functions.  Don't forget to implement security.  You wouldn't want others to browse to your car's website and start turning things on and off.

Perhaps a better solution would be to equip the Xbox with a Wifi adapter and connect to a PDA via AdHoc connection to create a private peer to peer connection. It's not quite as cool as using the cell phone, but it avoids the recurring costs of having to have a cellular account for the car.

What I was reffering to by NI's development environments is their LabVIEW product.  It can do all the necessary I/O and act as a webserver.  In addition, you can develop apps to download to a PDA. But... a single user license for the product is $2000 with an additional fee for the extension to develop apps for PDA.

0
 
s10blazedAuthor Commented:
So Labview has a webserver built in for remote access of it's options?  At least the Windows version?  The more I think about it, I will need to implement the WiFi for the XBOX.  If not to connect to the NI-6501, then to transfer new music to it. Half of my block is a hotspot due to the fact my family all share 1 internet connect over 4 houses. (we all live on the same block).  Also, my phone can be WiFi with an adapter for the SD slot. http://www.sandisk.com/retail/256mb-wifi-sd.asp.  I think I have my game plan down now.  I will get the WiFi for my phone/xbox along with the USB-6501.  That will put me close to my $300 mark and I'll also have a neat WiFi adapter for my phone.  

As for the software, thats a bit tougher.  I wonder if they would donate a license to me, in exchange for advertisement? I plan to attend a variety of truck/car shows once it's complete (actually even while it's a WIP I attend...) and it shows a new, unique way to use their products.  I'm no computer genius, but I fair quite well in learning about them.  It will be awesome once I get this project under way.  

I thank you, rudy_bagga.  You have been a great help and answered all my questions promptly.  Another great addition to EE.  500 points for you!
0

Featured Post

Sign your company up to try the MB 660 headset now

Take control and stay focused in noisy open office environments with the MB 660. By reducing background noise, you can revitalize your office and improve concentration.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now