mc349
Posts: 43
Joined: Fri Jan 06, 2012 5:05 pm

Re: Would the PI be able to control something like this? (USB Relay board)

Sun Apr 22, 2012 10:08 pm

I've seen this sort of thing advertised on on the web:

http://denkovi.com/product/31/.....ver-1.html

It says it appears to a PC as a standard COM port and you write commands to control the relays. I assume that would be the same for the PI?

Would the PI be able to interface with this easily?  I assume you'd need a linux driver for the USB Com port and then a simple client to send the commands to the COM port itself.

Obviously you'd need to supply the board with a separate 12V feed to power the relays.

I realise the PI has a set of GPIO pins, but is using the USB inerface for control work also a viable possibility?

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 13589
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: Would the PI be able to control something like this? (USB Relay board)

Sun Apr 22, 2012 10:21 pm

mc349 said:


I"ve seen this sort of thing advertised on on the web:

http://denkovi.com/product/31/.....ver-1.html

It says it appears to a PC as a standard COM port and you write commands to control the relays. I assume that would be the same for the PI?

Would the PI be able to interface with this easily?  I assume you"d need a linux driver for the USB Com port and then a simple client to send the commands to the COM port itself.

Obviously you"d need to supply the board with a separate 12V feed to power the relays.

I realise the PI has a set of GPIO pins, but is using the USB inerface for control work also a viable possibility?


Yes, its also a viable solution, if you do not mind the cost, and the slight delays induced by sending commands over a serial port USB connection to a microcontroller. These delays are probably insignificant compared to the switching speed of the relays.

I'm not sure such a solution would be acceptable in an industrial control design though.

Mattylad
Posts: 98
Joined: Tue Jan 17, 2012 9:59 pm

Re: Would the PI be able to control something like this? (USB Relay board)

Sun Apr 22, 2012 11:09 pm

Youd be better off getting something like this http://www.ebay.co.uk/itm/8-Ch.....4601afdd9c and interfacing to that out of the GPIO.

It would be far cheaper.

Chris.Rowland
Posts: 239
Joined: Thu Jan 12, 2012 5:45 pm

Re: Would the PI be able to control something like this? (USB Relay board)

Mon Apr 23, 2012 7:35 am

That board seems to have a 5V input, the Pi GPIO pins are 3V3.

Velleman do some useful USB I/O boards and kits that may be worth a look. K8055 rings a bell.

Mattylad
Posts: 98
Joined: Tue Jan 17, 2012 9:59 pm

Re: Would the PI be able to control something like this? (USB Relay board)

Mon Apr 23, 2012 9:29 am

Hence me saying "and interfacing to that"

IMO it would be far cheaper to do that and use another board than spending $91+ on it.

Chris.Rowland
Posts: 239
Joined: Thu Jan 12, 2012 5:45 pm

Re: Would the PI be able to control something like this? (USB Relay board)

Mon Apr 23, 2012 9:53 am

I think it's worth stressing the 3V3 nature of the GPIO, it's easy to imagine people frying their Pi, and connecting a few wires could be thought of as an interface.

The Velleman kit is £20:

http://www.amazon.co.uk/USB-ex.....038;sr=8-1

There's a Linux interface:

http://libk8055.sourceforge.net/

I've not used this exact one but the Velleman kits I've bought seem to be good value.

Mattylad
Posts: 98
Joined: Tue Jan 17, 2012 9:59 pm

Re: Would the PI be able to control something like this? (USB Relay board)

Mon Apr 23, 2012 10:58 am

While the velleman kits are good they are not doing what the OP asked for, to be able to control relays.

So a relay board at £10 and a fivers worth of interfacing to it is IMO a far better hobbyists solution. In fact the relay board could always be modified to take 3v3 instead at its inputs.

User avatar
Lob0426
Posts: 2198
Joined: Fri Aug 05, 2011 4:30 pm
Location: Susanville CA.
Contact: Website

Re: Would the PI be able to control something like this? (USB Relay board)

Mon Apr 23, 2012 4:55 pm

Linux has support for USB to serial built into the kernel. So no real problem there. The problem may be finding software to talk to the board. There are several Linux programs that may work.
512MB version 2.0 as WordPress Server
Motorola Lapdock with Pi2B
Modded Rev 1.0 with pin headers at USB

http://rich1.dyndns.tv/
(RS)Allied ships old stock to reward its Customers for long wait!

mc349
Posts: 43
Joined: Fri Jan 06, 2012 5:05 pm

Re: Would the PI be able to control something like this? (USB Relay board)

Mon Apr 23, 2012 5:34 pm

Lob0426 said:


Linux has support for USB to serial built into the kernel. So no real problem there. The problem may be finding software to talk to the board. There are several Linux programs that may work.


Thanks for all the help & suggestions.  I can handle the software side of things I think (as long as I've got a driver that's working), it's simple in linux to write data to a serial port.

It's the electronic side of things that has me more worried.  If it works it looks like the $90 board I linked to would just plug into the PI and no further soldering / circuit design would be needed on that end of things.  All the connections look like screw connections.  I'm interested in controlling lights/ heating pumps / motors, general home automation type things.  so speed of switching (speed of USB serial interface) wouldn't be a concern,  I'm not trying to steer a rocket or anything.

I might buy one of their smaller (cheaper) USB boards to see if I can get it working and then upgrade to the larger one (more channels+ higher amperage capacity) later on.

I'm still patiently waiting for my slice of PI to arrive in any case...

Mattylad
Posts: 98
Joined: Tue Jan 17, 2012 9:59 pm

Re: Would the PI be able to control something like this? (USB Relay board)

Mon Apr 23, 2012 7:51 pm

In that case try the velleman USB board mentioned http://www.maplin.co.uk/usb-ex.....oard-42857 (they do an assembled one too) AND a relay board then, the USB board will be useful for other things including sensor inputs but I would also get a relay board for local switching to then control larger local relays and contactors.

When you have something working please come back and let us know how you got on with it.

Mattylad
Posts: 98
Joined: Tue Jan 17, 2012 9:59 pm

Re: Would the PI be able to control something like this? (USB Relay board)

Mon Apr 23, 2012 7:52 pm

P.S. the USB boards do not appear to have relay outputs on.

Andre_P
Posts: 241
Joined: Sun Aug 28, 2011 7:57 am

Re: Would the PI be able to control something like this? (USB Relay board)

Mon Apr 23, 2012 8:48 pm

Personally if I was going to control a relay I"d use the GPIO, use an opto isolator with a darlington output and ensure the coil had a fly back diode. If you are feeling über clean then a snubber circuit on the contact output to reduce the possibility of arcing.
You could use the Gert Board and the driver.
Good Luck

Mattylad
Posts: 98
Joined: Tue Jan 17, 2012 9:59 pm

Re: Would the PI be able to control something like this? (USB Relay board)

Mon Apr 23, 2012 9:04 pm

Me too but it appears the OP wants a simple purchasable solution, for home automation some inputs would also be useful.

mredeker
Posts: 8
Joined: Tue Jan 31, 2012 12:54 pm

Re: Would the PI be able to control something like this? (USB Relay board)

Tue Apr 24, 2012 8:19 am

Maybe openremote.org will be a solution, if Java is running fine on the Pi and the RXTX lib can be compiled.

OpenRemote is strongly looking into using the Pi as a low cost 24/7 controller box for home automation.

Unfortunately we are still waiting on our first delivery.

User avatar
gordon@drogon.net
Posts: 2023
Joined: Tue Feb 07, 2012 2:14 pm
Location: Devon, UK
Contact: Website Twitter

Re: Would the PI be able to control something like this? (USB Relay board)

Tue Apr 24, 2012 10:33 am

mc349 said:


I"ve seen this sort of thing advertised on on the web:

http://denkovi.com/product/31/.....ver-1.html

It says it appears to a PC as a standard COM port and you write commands to control the relays. I assume that would be the same for the PI?

Would the PI be able to interface with this easily?  I assume you"d need a linux driver for the USB Com port and then a simple client to send the commands to the COM port itself.

Obviously you"d need to supply the board with a separate 12V feed to power the relays.

I realise the PI has a set of GPIO pins, but is using the USB inerface for control work also a viable possibility?


Yes. These sort of things should work just fine – if you write your own serial handler which is relatively easy to do. I've used several USB power switchers in the past, none on the Pi (yet), but there's no real magic about them.

Quick edit - if the commands you sent to it are text commands, then you can experiment and test it with minicom - which is a decent serial terminal program for Linux. I use it for a lot of serial testing myself - mostly via usb serial devices like modems, GPSs and Arduinos!

Gordon
--
Gordons projects: https://projects.drogon.net/

mc349
Posts: 43
Joined: Fri Jan 06, 2012 5:05 pm

Re: Would the PI be able to control something like this? (USB Relay board)

Tue Apr 24, 2012 8:40 pm

Andre_P said:


Personally if I was going to control a relay I"d use the GPIO, use an opto isolator with a darlington output and ensure the coil had a fly back diode. If you are feeling über clean then a snubber circuit on the contact output to reduce the possibility of arcing.
You could use the Gert Board and the driver.
Good Luck


Now you're just showing off!    I do need to learn all this stuff.  :-)

Mattylad
Posts: 98
Joined: Tue Jan 17, 2012 9:59 pm

Re: Would the PI be able to control something like this? (USB Relay board)

Tue Apr 24, 2012 8:42 pm

MC, what is it that you actually want to control with this?

What responses do you expect from sensors etc?

pmk
Posts: 21
Joined: Wed Jun 20, 2012 5:27 pm

Re: Would the PI be able to control something like this? (U

Wed Jun 20, 2012 5:36 pm

I am going to look into 1-wire to do interfacing and sensing. You can get some of the 1-wire components as 'samples' too.

The vallemen kit also looks good.

User avatar
yoctopuce
Posts: 22
Joined: Sat Mar 03, 2012 11:27 pm
Contact: Website

Re: Would the PI be able to control something like this? (U

Sun Oct 07, 2012 6:14 am

You may want to have a look here:

http://www.yoctopuce.com/EN/products/us ... octo-relay

USB, no driver needed, API available in most common programming languages, you even can use a PI to drive it.

You can have a look at the competition too : http://www.phidgets.com/
We produce USB controllers, USB sensors as well as embedded USB hubs for DIY projects

learn4fun
Posts: 4
Joined: Thu Oct 31, 2013 5:38 am

Re: Would the PI be able to control something like this? (U

Thu Oct 31, 2013 5:53 am

Hello

it is pretty simple to control USB Relais Cards using Raspberry PI. I got one of those boards from denkovi. It provides 2 Relays and is 5V powered via USB.

Here is the link to the source : https://github.com/df3xc/libftdinet

The solution is useful for C, C++ and C# programming. But the Basic operations (set the FTDI device into bit bang mode, read and set the Relais are available in other programming languages too. Just search the Internet)

Refer to the wiki on the project page for installation instructions.

About the source code:
Drivers from FTDI did not work for me,hence I used the open source driver libftdi.
Power of two function included (as .NET math operations give surprising results on hardfloat ARM Linux)


Kind regards

Return to “General discussion”