Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
External appliances control
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
madchaz
l33t
l33t


Joined: 01 Jul 2003
Posts: 993
Location: Quebec, Canada

PostPosted: Thu Mar 27, 2008 6:07 pm    Post subject: External appliances control Reply with quote

This is, currently, just an idea of something I would like to try. I am right now seeing how much it would cost and if it is practical :)

Here is what I would like to do. I would like to control certain things from my home server. (Currently, a Dual CPU P2 233Mhz with 512Mgs of ram and 2 VMs running in it)

The first thing I would like to do is a simple doorbell. Basically, from a single external button, launch the playing of a sound file specific to the door bell rung. Eventually, I would like to be able to control other things, such as basic switches (lights, applicance, etc).

Besides the obvious (wire, etc), what hardware would I need? I am thinking a control board that connect to either printer or serial port, maybe USB. While I do have electronic background, I have never worked with one of those. Are there any that are linux compatible?

Help would be most welcome.

Thanks
_________________
Someone asked me once if I suffered from mental illness. I told him I enjoyed every second of it.
www.madchaz.com A small candle of a website. As my lab specs on it.
Back to top
View user's profile Send private message
flybynite
l33t
l33t


Joined: 06 Dec 2002
Posts: 620

PostPosted: Thu Mar 27, 2008 8:50 pm    Post subject: Reply with quote

It can be done :-) The question is whether you would like to build your own interface and software or not.

Check out http://misterhouse.sourceforge.net/ to get started with ideas. There are many more control programs and interfaces out there.
Back to top
View user's profile Send private message
madchaz
l33t
l33t


Joined: 01 Jul 2003
Posts: 993
Location: Quebec, Canada

PostPosted: Thu Mar 27, 2008 11:13 pm    Post subject: Reply with quote

My goal is as cheap as possible. I do not mind having to build the interface and program the whole thing if needed. I'm on sick leave right now, so all I have is time. Not sure where to start however. What I would need is something I can plugin and connect sensors and relays to. Either already made or some plans.
_________________
Someone asked me once if I suffered from mental illness. I told him I enjoyed every second of it.
www.madchaz.com A small candle of a website. As my lab specs on it.
Back to top
View user's profile Send private message
Scratalacha
Tux's lil' helper
Tux's lil' helper


Joined: 24 Feb 2004
Posts: 127

PostPosted: Fri Mar 28, 2008 11:45 am    Post subject: Reply with quote

While you can buy I/O expanders (which is the name of what you are looking for in terms of hardware) that will fit in your PCI slot, they are fairly expensive $100-$500 depending on the number of ports. If you were looking for a cheap way to do it, there are many I/O expanders which interface through I2C which can be easily added to a system. In fact, many motherboards have debug ports on the motherboard where a header could fit to get access to the I2C bus directly on your host machine. As for the actual I/O expander itself: http://www.micrel.com/page.do?page=product-info/products/mic74.shtml is an example. The datasheet should provide you with at least an idea of what hardware related work would be needed. Luckly I2C is a fairly simple interface and forgiving in most cases (just don't conflict with the IC2 addresses used by your RAM modules or you'll have a little trouble booting ;-0). With a little research on getting access to I2C on your controlling system and some datasheet reading, this shouldn't be too hard to do!

Edit: Don't forget that to control appliances, you would need this to drive some sort of relay, probably a solid state relay. You can build your own solid state relay for not terribly much if you're so inclined but it requires a bit more know-how and experience with AC circuits. Buying a solid state relay would cost you more but would be safer in the long run most likely.
_________________
Anime ate my computer
Back to top
View user's profile Send private message
madchaz
l33t
l33t


Joined: 01 Jul 2003
Posts: 993
Location: Quebec, Canada

PostPosted: Fri Mar 28, 2008 11:17 pm    Post subject: Reply with quote

I have done some very minor CPU work and lots of electronic classes behind my belt. If I need to do it with transistors or logic gate chips, it's nothing to scare me. Worst, I will get a new protoboard and do it. Further down, I will want to control relays on main electricity for things like lights, but that is way down the road. I will read up on that link tomorow. Hockey game on tonight.

Saguenay will demonish Quebec I tell you!!! Go SAGS GO!

I wonder if the college here might have some old control boards ...

Edit: I had a quick look at the provided link. I'm surprised at how much of it made sence. Been over 10 years since I touched this stuff and it still made (almost) perfect sence. That looks like it might do the trick. With my hands how they are, not sure I want to mess around with the MB, but I might be able to work from such a chip down to the serial port. Also made me ask myself what the best port to use would be.

How easy are each (usb, parallel, serial) to access directly in linux?
_________________
Someone asked me once if I suffered from mental illness. I told him I enjoyed every second of it.
www.madchaz.com A small candle of a website. As my lab specs on it.
Back to top
View user's profile Send private message
Logge
Tux's lil' helper
Tux's lil' helper


Joined: 09 Jul 2004
Posts: 131
Location: Sweden

PostPosted: Tue Apr 15, 2008 8:54 am    Post subject: Reply with quote

Hey!!

How's your project doing?

You should take a look at the Velleman k8055 or k8061. They're based on the USB protocol.
I know that there is a c/c++ library to be used under linux to access the k8055.
I am currently having my own project writing a program using that library to control a software timer for water chute.
The good thing is that the library follows the function structure in the dll that velleman provides.
I don't think it should be too hard to modify that code to fit the k8061.

Regards
Oskar
_________________
I never stop to amaze about the advanced features of the human body's simplicity
Back to top
View user's profile Send private message
ilm2
n00b
n00b


Joined: 18 Dec 2006
Posts: 35

PostPosted: Tue Apr 15, 2008 11:01 am    Post subject: Reply with quote

We are trying to do the same thing. But instead of using the k8055 or k8061 we want to use k8000 from Velleman (parallel port).
official site says it is optical isolated from the pc. which I think means no damage to the pc. as far as i see the usb alternatives don't have that.

There are 2 ways to drive this thing (and other k8xxx too i think) on linux:
- linux kernel has direct support (parport driver)
- libk8000, which is a 3rd party rewrite of the original library

as far as I can see libk8000 is easier and all I need.
I also found something better, client-server based software/protocol with pluggable interfaces for different I/O devices (including a module for k8000). Can't remember the name though. So my plan is to have a server in the basement with the k8000 connected to the eletrical closet (If that's the right name in English, you know the thing with the fuses).
Ideally, I'd like to have a client somewhere in the living room with touchscreen showing a diagram of the house. Meaning you can switch lights with one touch :D We will see where i get ;)

Edit: One thing I'm wondering about is feedback to the PC. What if I switch on the light manually. Would the k8000 (basically relais (switch) driving light switches in the basement) detect that ? I'd very much appreciate some more informatino about this. As I'm not really familiar with electricity/electronics
Back to top
View user's profile Send private message
Akkara
Administrator
Administrator


Joined: 28 Mar 2006
Posts: 6702
Location: &akkara

PostPosted: Tue Apr 15, 2008 11:21 am    Post subject: Reply with quote

Roomie has been enjoying working with the arduino stuff ( http://www.arduino.cc/ ; http://en.wikipedia.org/wiki/Arduino ). Models are available that communicates via USB or serial.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum