LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 11-11-2011, 02:41 PM   #1
peter576
Member
 
Registered: Nov 2009
Distribution: Debian 8 (64bit)
Posts: 32

Rep: Reputation: 0
Linux electric devices


hi,
how can I control electric devices with Linux?
I mean, for example turning on a lamp. Or controlling the light of the lamps.

Last edited by peter576; 11-11-2011 at 02:43 PM.
 
Old 11-11-2011, 03:16 PM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,704

Rep: Reputation: 5897Reputation: 5897Reputation: 5897Reputation: 5897Reputation: 5897Reputation: 5897Reputation: 5897Reputation: 5897Reputation: 5897Reputation: 5897Reputation: 5897
If you are an electronics hobbyist you could use the parallel port to control relays. I've only built stuff for a legacy hardware port. I've seen some sites where the have used a USB adapter to bit twiddle but have never actually tried it.

There are also special USB or serial interfaces to control switches and wall plugins. This is basically a software project since all the hardware can be purchased. These devices use protocols like X-10 and Insteon.

http://as6edriver.sourceforge.net/Pa...ing-howto.html
http://home.comcast.net/~ncherry/
 
1 members found this post helpful.
Old 11-11-2011, 03:18 PM   #3
angel115
Member
 
Registered: Jul 2005
Location: France / Ireland
Distribution: Debian mainly, and Ubuntu
Posts: 542

Rep: Reputation: 79
Hello,

The only thing I know is Freeduino
http://www.freeduino.org/
or Arduino
http://www.arduino.cc/
which are open hardware platform made to act with "real world"

But I'm curious of the answers of that post, I'm interested too actually.

Thank you posting this question,
Angel.
 
1 members found this post helpful.
Old 11-11-2011, 03:56 PM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Digital : The K8055 control board http://libk8055.sourceforge.net/
http://www.vellemanusa.com/products/...=enu&id=500349

https://www.google.com/webhp#sclient...w=1152&bih=715

And LQ Search, keyword = libk8055

.
 
Old 11-11-2011, 05:37 PM   #5
okcomputer44
Member
 
Registered: Jun 2008
Location: /home/laz
Distribution: CentOS/Debian
Posts: 246

Rep: Reputation: 53
Smile

Hi,

The cheapest and easiest way is to get a printer card (parallel port) from ebay.
That is cost about 5£ ( 8$ ) and you will get 8 port that you can easily switch on and off from any programs.
Like this one: http://www.ebay.co.uk/itm/PCI-IEEE-1...item43a1c7cfa1

If you want to control something like 220V AC you can get a solid state relay that can controll anything on the AC.
For example lamps, tv, anything on the AC 220V.

So the relay look like this: http://www.ebay.co.uk/itm/New-SSR-25...item35b561017f

Obviously you have to know how to connect them otherwise you can get killed by the electric shock, so be really carefull!!!
I used this kind of electronic kits for playing with lamps when I worked in a Theater as a lighter guy.

So the printer card has 8 output and can be triggered from a program. It has 5V output with usually 50mA or something current.
You can easily switch on LEDs or solid state relays too.

I used it ages ago on DOS system when the linux was not even around just yet
Anyway if you need more help with it just let me know.

I look around how to make some program to switch the outputs from terminal or from apache web server like php script or something.
Imagine that you can switch on the garden water tap from your mobile phone or open the garage door?
Cool init?

By the way there is the diagramm how to connect the leds: http://www.studentsharez.com/thread-1308857.html

Regards

Laz
 
1 members found this post helpful.
Old 11-11-2011, 07:34 PM   #6
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,985

Rep: Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626
I think the X10 had linux support for maybe 10 years or more.
 
Old 11-11-2011, 08:18 PM   #7
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,326
Blog Entries: 28

Rep: Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142
I found a hobbyist website full of links about Linux Home Automation ("home automation" or "building automation" is the buzzword for this sort of stuff):

http://home.comcast.net/~ncherry/

Last edited by frankbell; 11-11-2011 at 08:19 PM.
 
Old 11-12-2011, 07:42 AM   #8
okcomputer44
Member
 
Registered: Jun 2008
Location: /home/laz
Distribution: CentOS/Debian
Posts: 246

Rep: Reputation: 53
So I found this: http://www.ahmetozkurt.net/comporg/e...n2/inlinux.htm

This is explains how to switch on and off the ports and how to compile it with gcc.
If you get the actual code you can run it from Apache with php/cgi script.

As I remember you have to send out the data in hexa code.
For example if you want a running light effect like the Christmas tree you have to count one by one all the steps in hexadecimal.

This site explains how to light up leds one by one: http://www.codeproject.com/KB/vb/Por...eParallelPort1

Laz.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
electric sheep SIGTERM erklaerbaer Slackware 9 06-25-2009 03:54 PM
electric sheep Dimitime Slackware 6 11-26-2008 06:19 PM
Electric guitar questions pusrob General 19 12-01-2007 04:01 PM
What Is Your Electric Bill Like? xor General 2 05-08-2007 10:14 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 11:29 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration