LinuxQuestions.org
Visit the LQ Articles and Editorials section
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 03-14-2009, 06:00 PM   #1
vbsaltydog
Member
 
Registered: Nov 2005
Distribution: CentOS
Posts: 141

Rep: Reputation: 15
create small linux box for environment monitoring?


I am thinking of creating a small hardware device based on linux that can read input from potentiometer probes and then control AC devices based on the input values. Does anyone know if this is doable with a knowledge of linux, perl, php but no knowledge of electronic circuits and resistors and such? I was thinking of modifying a wrt54g or similar hardware with a light linux distro like openwrt to read the I/O from the probes and then use shell scripts to produce audible alarms and control AC devices based on the probe input values. Any help is appreciated.
 
Old 03-14-2009, 06:32 PM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 11,758

Rep: Reputation: 719Reputation: 719Reputation: 719Reputation: 719Reputation: 719Reputation: 719Reputation: 719
Not really. I do not know the hardware details of a WRT54G but you will need some type of circuit to interface your potentiometer probes to regular I/O. You would need an analog to digital converter which is unlikely to be a part of the router.

If you provide more details on what type of the probes and AC devices you are trying to control we might be able to suggest other hardware that is more suitable.

misterhouse is a home automation application written in perl that you might want to take a look at. Of course you can search the web and find lots of information.

Last edited by michaelk; 03-14-2009 at 06:35 PM.
 
Old 03-14-2009, 06:57 PM   #3
vbsaltydog
Member
 
Registered: Nov 2005
Distribution: CentOS
Posts: 141

Original Poster
Rep: Reputation: 15
Thanks. I was thinking of a serial port for the I/O interface (forgot the wrt54g doesn't have serial). I can add an analog --> digital converter if needed but would a driver need to be written for the kernel for the converter? I am hoping for something where I can read the voltage from the I/O probe into a system variable and then write scripts to perform actions based on the system variable value for the input voltage.

I also need this to go into a small hardware profile (low cost hardware) vs. a home automation solution that requires a dedicated PC.

I am trying to read aquarium environmental parameters (ph, temp, calcium, etc.) and then control devices like heaters, chillers, fans, lights, etc. based on the input values. I know there are devices made to do this but I am trying to build my own controlling device with linux.

Thanks for the help.
 
Old 03-15-2009, 06:35 AM   #4
mohannad
LQ Newbie
 
Registered: May 2005
Location: jordan
Distribution: Slackware 14.1
Posts: 22

Rep: Reputation: 16
You could use a PIC micro controller to do Analog to Digital conversions, and send these values to the wrt54g via the serial port (many PICs have RS-232 support).
 
Old 03-15-2009, 09:46 AM   #5
vbsaltydog
Member
 
Registered: Nov 2005
Distribution: CentOS
Posts: 141

Original Poster
Rep: Reputation: 15
Thanks for the suggestions. I found a project that uses busybox linux and owfs (one wire file system) to read one wire devices like sensors and allows access to the devices. For anybody interested, the project can be found at: http://bytality.com/wrrc/
 
Old 03-15-2009, 10:35 AM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 11,758

Rep: Reputation: 719Reputation: 719Reputation: 719Reputation: 719Reputation: 719Reputation: 719Reputation: 719
I have read that WRT54Gs do have a TTL serial port header on the circuit board. However, you can not attach real world devices to a serial port. So you need something to read voltage data, turn on lights, pumps etc and be able to communicate via RS232. I've seen various RS232 analog and relay boards on the web like www.controlanything.com but a bit pricy.

There are many different microcontroller options as suggested but with little electronics knowledge this may not be a real option. Depending on the design the WRT54G may be eliminated altogether.

There are lots of single board computers that can run linux with ADCs and other output capabilities etc but again probably do not fall within your budget. http://www.embeddedarm.com/
 
Old 03-15-2009, 10:55 AM   #7
michaelk
Moderator
 
Registered: Aug 2002
Posts: 11,758

Rep: Reputation: 719Reputation: 719Reputation: 719Reputation: 719Reputation: 719Reputation: 719Reputation: 719
Good find, makes my previous post worthless... I completely forgot about 1 wire sensors. Then again you did say you had no real electronics knowledge.

I might hesitate a little with using X10 for any critical functions. The control signals travel over the AC power lines and therefore line noise from computers etc could prevent proper operation. There are several types of powerline control technologies but IMHO would stick to relays for your application.

Be sure to let us know how your project progresses.

Last edited by michaelk; 03-15-2009 at 11:09 AM.
 
Old 03-15-2009, 11:36 AM   #8
vbsaltydog
Member
 
Registered: Nov 2005
Distribution: CentOS
Posts: 141

Original Poster
Rep: Reputation: 15
Yes. I have used x10 technology in the past and IMHO it is worthless, at best.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
recomendations for small linux box sir-lancealot Linux - Hardware 1 11-20-2007 04:58 PM
linux from a floppy on a VERY small box sycamorex Linux - General 5 04-04-2007 03:06 PM
LXer: Environment and security monitoring with Linux LXer Syndicated Linux News 0 02-02-2007 07:54 PM
Very Strange MySQL Problem...works fine on small box, terrible on big box DukeLeto Linux - Software 2 01-01-2007 08:14 AM
Small linux box Fredde87 Linux - Hardware 1 08-21-2005 04:14 AM


All times are GMT -5. The time now is 02:45 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration