Reef Central Online Community

Go Back   Reef Central Online Community > General Interest Forums > Do It Yourself
Blogs FAQ Calendar

Notices

User Tag List

Reply
Thread Tools
Unread 01/15/2005, 09:38 AM   #26
BeanAnimal
Registered Member
 
Join Date: Feb 2003
Location: Pittsburgh
Posts: 20,772
Maybe we are making this to hard. A CT gives of a secondary voltage directly proportional to the current drawn through the primary. Why not just use a CT and a ADC to measure current draw. The urrent to voltage relationship is nearly linear isnt it? The IC and OEM devices were are looking at contain tons of logic and/or software to calculate true RMS and Reactive power loads as well as billing and time based calculations. They are also designed to be highly accurate for billing purposes... not to mention tamoper proof. We just want a simple "meter" for nothing more than eye candy and a quick indication that devices are working within parameters. WE don't need to sort out reactive and real power issues, as we are not trying to use this for billing.

A 1 wire ADC would suffice. Something like the DS2450

I just ordered $200 worth of transistors for an AMP...soI am outa the game for a few weeks. Still need a 1.5 kVA toroid and a billion uF worth of filter caps..... so I am broke!

Bean


BeanAnimal is offline   Reply With Quote
Unread 01/19/2005, 06:24 PM   #27
aka_BigRed
Registered Member
 
aka_BigRed's Avatar
 
Join Date: Mar 2004
Location: St. Paul, MN
Posts: 162
I should be getting my WRT54G sooner than expected. It UPS says it'll be here tomorrow but I give it until friday (1/22/05) if they need a signature.

My first goal will be hacking the OS to make it accessible. That'll be a hurdle for me since I'm just installing Cygwin on my PC to play with linux for the first time.

Onece I get it I'll try to start playing with the setup to see exactly how we can build the web front-end using the httpd-mini and CGI scripting.

barebottoms has some great starter info up over at www.bytality.com/wrrc/


aka_BigRed is offline   Reply With Quote
Unread 01/19/2005, 08:56 PM   #28
BeanAnimal
Registered Member
 
Join Date: Feb 2003
Location: Pittsburgh
Posts: 20,772
I am getting sucked in.... just started my uC project and my huge amp project and now a this? Did I mention I am building a kick *** regulated bench supply.... and that I hate linux....now I am going to have to learn to use it and remember how to program in C

is there plans to build a gui for this thing? .... I am gettin sucked in. geeze

Bean


BeanAnimal is offline   Reply With Quote
Unread 01/19/2005, 09:12 PM   #29
BeanAnimal
Registered Member
 
Join Date: Feb 2003
Location: Pittsburgh
Posts: 20,772
a totaly insulated capacitive water level meter.


http://hawthorn.csse.monash.edu.au/~...s/watersensor/


BeanAnimal is offline   Reply With Quote
Unread 01/19/2005, 11:16 PM   #30
barebottoms
Registered Member
 
barebottoms's Avatar
 
Join Date: Aug 2002
Posts: 1,204
I've played with the firmware some the last few days, I should one that all you have to do is upload to the router and it will give you telnet access and the owfs software.

One of the problems is that I'm running low on flash without stripping any of the original Linksys code.

To deal with this, I've made the firmware auto mount nfs for now so you can always load additional programs via NFS.

Long term, I hope to get rid of one of the httpd servers so get some more space back.

Bean,

With bigreddastud's help, I should be able to do web page configurations. I can put a MicroGUI as a package, but I'm not sure what that will really give you at this point other than a Fancy X-Term.

I'm not really doing any work in C, which is good because I'm really rusty. Most the work is via the canned packages, I'm just writing shell scripts and cross compiling other code at this point.

Slowly getting there. I have a few sample scripts on the Wiki site, the majority of the work is just that, shell scripts.

Nice link for the cap sensor. I'll have to look at it in more detail and figure out cost. The QProx sensor is only $4, but I need to look into what support parts it needs. Unless someone knows off hand. I think the QT113 is the part number.


__________________
--------------------------------------------
Point, Click, #FF0000 House = Free Reef Controller Project
barebottoms is offline   Reply With Quote
Unread 01/19/2005, 11:19 PM   #31
BeanAnimal
Registered Member
 
Join Date: Feb 2003
Location: Pittsburgh
Posts: 20,772
Okay after an evening of research...

the qt300 chip from qprox ($4) is a capacitance to digital converter. This thing has a 1 wire uart built in! The "capacitor" can be to plastic rods held close togher and the depth of the sump (or whatever level needs measured).
Sorry if you guys already figured this out.


BeanAnimal is offline   Reply With Quote
Unread 01/31/2005, 01:41 PM   #32
barebottoms
Registered Member
 
barebottoms's Avatar
 
Join Date: Aug 2002
Posts: 1,204
Some updates.

There is a company making ready made Interfaces as a Kit or as a complete unit for the WRT54G now.

I've been testing a PAR/LUX meter and it works pretty good. Side note, anybody know of any type of Scalar references for these things? It is basically a PhotoDiode connected to a DS2438 and I get a current output.

I have a firmware available that you can put on the Linksys with the linux shell enabled, some mods to busy box. pesudo rc system and a auto mount NFS for development. Even tested it on Windows.

I really can not believe how easy OWFS is making everything. Even doing memory writes to EEPROM, all I have to do is
echo "DEADBEEF" > page.3
No CRC calculations or weird headers to figure out.


barebottoms is offline   Reply With Quote
Unread 01/31/2005, 06:17 PM   #33
gabe21804
Registered Member
 
Join Date: Dec 2004
Location: Salisbury, Md
Posts: 219
Is there a 1-wire i/o board out there can monitor analog inputs (i.e. regular probes that most of us are using now). I'm in the process of designing a plc controlled reef controller, but this sorta caught my eye. I know theres a few 1-wire i/o cards with digital inputs floating around, but I couldn't find one with analog inputs.


__________________
Gabe

Current Tank Info: None Currently. Planning Phase of 350G Mixed Reef.
gabe21804 is offline   Reply With Quote
Unread 01/31/2005, 06:42 PM   #34
barebottoms
Registered Member
 
barebottoms's Avatar
 
Join Date: Aug 2002
Posts: 1,204
I'm going to use the HVAC monitor from
Hobby Boards:

http://www.hobby-boards.com/1wireboa...c_monitor.html

It's a Quad A/D based on a DS2450.


barebottoms is offline   Reply With Quote
Unread 02/02/2005, 12:45 PM   #35
barebottoms
Registered Member
 
barebottoms's Avatar
 
Join Date: Aug 2002
Posts: 1,204
Waiting on probes, so I thought I'd play with different sensors and get performance data. Keep in mind everything is called from a shell script, and I really beat up the system by making it call each request (include system time, etc) for every parameter I read.

Code:
 / $ cd /var/wrrc/
 wrrc $ time -v ./temp-1run.sh
Temp Sensors -----------------------------------------
     65.1875 10.1FBB4D000800 collected @ Feb-02-2005-10:42:29
     67.2125 10.AEB44D000800 collected @ Feb-02-2005-10:42:31
------------------------------------------------

DS2438 Devices photo/humidity ------------------------------
           0 current collected @ Feb-02-2005-10:42:32 -- 26.1A785B000000
           0 VAD collected @ Feb-02-2005-10:42:33 -- 26.1A785B000000
           0 VDD collected @ Feb-02-2005-10:42:34 -- 26.1A785B000000
         NAN  Humidity  collected @ Feb-02-2005-10:42:36 26.1A785B000000
          32 Temp collected @ Feb-02-2005-10:42:38 -- 26.1A785B000000
-------------------------------------------------

           2 current collected @ Feb-02-2005-10:42:39 -- 26.646D5B000000
        0.05 VAD collected @ Feb-02-2005-10:42:40 -- 26.646D5B000000
        4.89 VDD collected @ Feb-02-2005-10:42:41 -- 26.646D5B000000
    -23.8293  Humidity  collected @ Feb-02-2005-10:42:42 26.646D5B000000
        66.2 Temp collected @ Feb-02-2005-10:42:45 -- 26.646D5B000000
-------------------------------------------------

DS2450 Devices ph/orp/conductivity ------------------------------
   0.0690636 volt.A collected @ Feb-02-2005-10:42:46 -- 20.D6E703000000
   0.0665635 volt.B collected @ Feb-02-2005-10:42:47 -- 20.D6E703000000
   0.0704698 volt.C collected @ Feb-02-2005-10:42:48 -- 20.D6E703000000
   0.0695323 volt.D collected @ Feb-02-2005-10:42:49 -- 20.D6E703000000
   0.0387506 volt2.A collected @ Feb-02-2005-10:42:50 -- 20.D6E703000000
   0.0362506 volt2.B collected @ Feb-02-2005-10:42:51 -- 20.D6E703000000
   0.0345318 volt2.C collected @ Feb-02-2005-10:42:53 -- 20.D6E703000000
   0.0351568 volt2.D collected @ Feb-02-2005-10:42:54 -- 20.D6E703000000
-----------------------------------------------------------

Repeating Loop

        Command being timed: "./temp-1run.sh"
        User time (seconds): 0.15
        System time (seconds): 0.85
        Percent of CPU this job got: 3%
        Elapsed (wall clock) time (h:mm:ss or m:ss): 0m 25.90s
        Average shared text size (kbytes): 0
        Average unshared data size (kbytes): 0
        Average stack size (kbytes): 0
        Average total size (kbytes): 0
        Maximum resident set size (kbytes): 0
        Average resident set size (kbytes): 0
        Major (requiring I/O) page faults: 2459
        Minor (reclaiming a frame) page faults: 1751
        Voluntary context switches: 0
        Involuntary context switches: 0
        Swaps: 0
        File system inputs: 0
        File system outputs: 0
        Socket messages sent: 0
        Socket messages received: 0
        Signals delivered: 0
        Page size (bytes): 4096
        Exit status: 0
 wrrc $
And here is the script under test

Code:
 wrrc $ cat temp-1run.sh
#!/bin/ash
DEVICEPATH="/var/1wire"

#while :
#do # while do
 echo "Temp Sensors -----------------------------------------"
 for i in 10.1FBB4D000800 10.AEB44D000800

 #WC_temp_tank #temp_tank temp_hood #temp_sump temp_hood
  do # for do
     #DEVICEID=`nvram get $i`
     DEVICEID="$i"
     TIME=`date +%b-%d-%Y-%H:%M:%S`
      cat $DEVICEPATH/uncached/$DEVICEID/temperature ; echo " $i collected @ $TI
ME"
  done # end for do
 echo "------------------------------------------------"
 echo " "

 # 26.1A785B000000 humidity
 # 26.646D5B000000 photo
 echo "DS2438 Devices photo/humidity ------------------------------"
 for i in 26.1A785B000000 26.646D5B000000
  do # for do
     TIME=`date +%b-%d-%Y-%H:%M:%S`
      cat $DEVICEPATH/uncached/$i/current ; echo " current collected @ $TIME --
$i"
     TIME=`date +%b-%d-%Y-%H:%M:%S`
     cat $DEVICEPATH/uncached/$i/VAD; echo " VAD collected @ $TIME -- $i"
     TIME=`date +%b-%d-%Y-%H:%M:%S`
     cat $DEVICEPATH/uncached/$i/VDD; echo " VDD collected @ $TIME -- $i"
     TIME=`date +%b-%d-%Y-%H:%M:%S`
     cat $DEVICEPATH/uncached/$i/humidity; echo "  Humidity  collected @ $TIME $
i"
     TIME=`date +%b-%d-%Y-%H:%M:%S`
     cat $DEVICEPATH/uncached/$i/temperature; echo " Temp collected @ $TIME -- $
i"
     echo "------------------------------------------------- "
     echo " "
 done # end for do

 # DS2450
  echo "DS2450 Devices ph/orp/conductivity ------------------------------"
 for i in 20.D6E703000000
  do # for do
      TIME=`date +%b-%d-%Y-%H:%M:%S`
      cat $DEVICEPATH/uncached/$i/volt.A; echo " volt.A collected @ $TIME -- $i"
      TIME=`date +%b-%d-%Y-%H:%M:%S`
      cat $DEVICEPATH/uncached/$i/volt.B; echo " volt.B collected @ $TIME -- $i"
      TIME=`date +%b-%d-%Y-%H:%M:%S`
      cat $DEVICEPATH/uncached/$i/volt.C; echo " volt.C collected @ $TIME -- $i"
      TIME=`date +%b-%d-%Y-%H:%M:%S`
      cat $DEVICEPATH/uncached/$i/volt.D; echo " volt.D collected @ $TIME -- $i"
      TIME=`date +%b-%d-%Y-%H:%M:%S`
      cat $DEVICEPATH/uncached/$i/volt2.A; echo " volt2.A collected @ $TIME -- $
i"
      TIME=`date +%b-%d-%Y-%H:%M:%S`
      cat $DEVICEPATH/uncached/$i/volt2.B; echo " volt2.B collected @ $TIME -- $
i"
      TIME=`date +%b-%d-%Y-%H:%M:%S`
      cat $DEVICEPATH/uncached/$i/volt2.C; echo " volt2.C collected @ $TIME -- $
i"
      TIME=`date +%b-%d-%Y-%H:%M:%S`
      cat $DEVICEPATH/uncached/$i/volt2.D; echo " volt2.D collected @ $TIME -- $
i"
     echo "----------------------------------------------------------- "
     echo " "
 done # end for do
echo "Repeating Loop "
echo " "
#done



barebottoms is offline   Reply With Quote
Unread 02/02/2005, 01:35 PM   #36
aka_BigRed
Registered Member
 
aka_BigRed's Avatar
 
Join Date: Mar 2004
Location: St. Paul, MN
Posts: 162
Quote:
User time (seconds): 0.15
System time (seconds): 0.85
Percent of CPU this job got: 3%
Elapsed (wall clock) time (h:mm:ss or m:ss): 0m 25.90s
Am I interpreting this correctly that even with the "taxing" system calls and a repearing loop, monitoring the 1-wire sensors is hardly keeping the CPU busy?


aka_BigRed is offline   Reply With Quote
Unread 02/02/2005, 01:38 PM   #37
barebottoms
Registered Member
 
barebottoms's Avatar
 
Join Date: Aug 2002
Posts: 1,204
That is correct. And as you know, the current firmware I'm playing with is still a fully functional router, with all the UPNP and routing stuff still running.


__________________
--------------------------------------------
Point, Click, #FF0000 House = Free Reef Controller Project
barebottoms is offline   Reply With Quote
Unread 02/03/2005, 03:24 AM   #38
barebottoms
Registered Member
 
barebottoms's Avatar
 
Join Date: Aug 2002
Posts: 1,204
Found a new Toy Store!!!
http://www.futurlec.com/TrainingBoardAccessories.shtml

I'm mainly interested in the Opto-AC series, but might be the other stuff might be useful for the other controller projects out there.


__________________
--------------------------------------------
Point, Click, #FF0000 House = Free Reef Controller Project
barebottoms is offline   Reply With Quote
Unread 02/03/2005, 10:33 PM   #39
Tommyc
Registered Member
 
Tommyc's Avatar
 
Join Date: Aug 2001
Location: SE Maryland
Posts: 414
and silly me thought this was an english speaking forum......


__________________
"Only two things will get you into an unrecoverable position faster than a computer -
firearms and tequila."
Tommyc is offline   Reply With Quote
Unread 02/04/2005, 05:22 PM   #40
barebottoms
Registered Member
 
barebottoms's Avatar
 
Join Date: Aug 2002
Posts: 1,204
The obligatory Screen Shot.
This is all running off the WRT54G router. Not another piece of $300 software connected to a client PC. I'm just pointing a browswer at the router.




barebottoms is offline   Reply With Quote
Unread 02/04/2005, 08:23 PM   #41
BeanAnimal
Registered Member
 
Join Date: Feb 2003
Location: Pittsburgh
Posts: 20,772
think ya need to change your Cs to Fs :P

Lookin good.


BeanAnimal is offline   Reply With Quote
Unread 02/04/2005, 08:23 PM   #42
BeanAnimal
Registered Member
 
Join Date: Feb 2003
Location: Pittsburgh
Posts: 20,772
Is the graph something you wrote?


BeanAnimal is offline   Reply With Quote
Unread 02/04/2005, 10:35 PM   #43
barebottoms
Registered Member
 
barebottoms's Avatar
 
Join Date: Aug 2002
Posts: 1,204
No, I'm not smart enough to write code like that. The database to store all the values is RRD, so it will never grow in size.

http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/

I've been trying to compile it for the router's processor, but wasn't successful. Christian Magnusson has been the cross compiling master. He wrote the poller to grab the temperature sensors off the 1 wire network to put in the rrd database.

http://owfs.sourceforge.net/WRT54G.html

I'll expand the poller as soon as his code makes it to the cvs server to grab the A/D's too.


barebottoms is offline   Reply With Quote
Unread 02/11/2005, 01:42 PM   #44
barebottoms
Registered Member
 
barebottoms's Avatar
 
Join Date: Aug 2002
Posts: 1,204
Shamless bump.

I really can use help with the following:

HTTP Upload method via cgi. Shell script, proccgi or harsel would be ideal. But since I know nothing about HTTP upload just general theory would help.

Graphics. Fish/Reef Themed Stuff.
On / Off States
Temperature
ph
Time
Orp
Whatever else might be cool to show on a status page.

I've moved to OpenWRT as a base firmware now. This gives me the ability to use "packages" for updates. I will release a new firmware with the base system as soon as I can figure out the HTTP upload to have a web interface for firmware upgrade. Any program upgrades can be handled by the package manager.

Eye Candy: (btw the poller has been updated to do more than just temperature now, and supports templates)




barebottoms is offline   Reply With Quote
Unread 02/11/2005, 03:12 PM   #45
aka_BigRed
Registered Member
 
aka_BigRed's Avatar
 
Join Date: Mar 2004
Location: St. Paul, MN
Posts: 162
It's pretty easy to get the file to the cgi script itself. Using procCgi, we can get it into a $FORM_firmware variable, but what linux command will write a environmental var's contents to a file? (cat ? )

Can you use cat with non ascii file types? Also will that write it correctly and not add any funky file headers or bits to the firmware you are uploading?

Here's a very simple HTML page to upload the file on the browser side. Then from within the receiving CGI shell script you would have to write it from the $FORM_firmware .

PHP Code:
<form action="/cgi-bin/firmwareUpload.cgi" method="post">
<
dl>
  <
dtChoose Firmware File: <dd> <input type="file" name="firmware"  size="50">
</
dl>
<
input type="submit" value="Submit">
</
form



aka_BigRed is offline   Reply With Quote
Unread 02/11/2005, 03:40 PM   #46
barebottoms
Registered Member
 
barebottoms's Avatar
 
Join Date: Aug 2002
Posts: 1,204
That's close. The $FORM_filename stored the filename I was trying to upload rather than the actual binary itself.

I wonder if we need to mess with mime encoding the file and then write it back out.


barebottoms is offline   Reply With Quote
Unread 02/13/2005, 03:13 PM   #47
barebottoms
Registered Member
 
barebottoms's Avatar
 
Join Date: Aug 2002
Posts: 1,204
OpenWRT Based firmware release 0.0000001 the Eric Cartman Vs. Kenny don't let it die release.

In moving to OpenWRT, there is now a Journaled File System on Flash. I can take advantage of ipkg (a package manager) to release software updates. This means that if there are no major OS level bugs, all software can be just updated to the flash file system.

I built the base firmware with what I think is needed for a base system. Hopefully we do not have to do firmware upgrades any more. Includes a sendmail MTA for notifications.

I also hacked up 2 different Web Administration interfaces to provide package management via web interface and firmware upgrade. Most other functionalites in the interfaces should work as well, but I haven't tested them.

Very good reasons why I shouldn't work on Web Interfaces:





I'm waiting on the new poller logger which is very powerful. Once I get that, a WRRC package with web interface to configure the poller will be released.

I wonder if I will have it in time to call it "My bloody Valentine"?

*note.. joke.. it's the name of a band.


barebottoms is offline   Reply With Quote
Unread 02/14/2005, 06:24 PM   #48
barebottoms
Registered Member
 
barebottoms's Avatar
 
Join Date: Aug 2002
Posts: 1,204
New logger package available.

Just install with the package manager web interface.

It will log any sensor on the 1 Wire network and graph them.
Web pages are "templateable" so you can make it purtier. I stuck with the defaults cause I don't know that less than great than stuff.




barebottoms is offline   Reply With Quote
Unread 03/29/2005, 11:41 PM   #49
barebottoms
Registered Member
 
barebottoms's Avatar
 
Join Date: Aug 2002
Posts: 1,204
Bumpity Bumpity Doo.

X10 control is working now I'm using WISH

http://wish.sf.net
with a Powerlinc II serial on the router on serial port 0

Example of the powerful scripting language

Code:
temp=`cat /var/1wire/10.200244555/temp`
if [ $temp < 85 ]
 echo 1 > /dev/x10/m1
fi



__________________
--------------------------------------------
Point, Click, #FF0000 House = Free Reef Controller Project
barebottoms is offline   Reply With Quote
Unread 03/30/2005, 07:43 PM   #50
barebottoms
Registered Member
 
barebottoms's Avatar
 
Join Date: Aug 2002
Posts: 1,204
Played with X10 control on Wish a little bit today. Wish is a pretty cool X10 program. You can even do Event Detection on the X10 bus and use it to trigger an action.

I've put up some sample notes:
http://bytality.com/wrrc/index.cfm?doc=Wish_X10

Includes on that emails you when a X10 module is turned off (can be on as well or both conditions).


__________________
--------------------------------------------
Point, Click, #FF0000 House = Free Reef Controller Project
barebottoms is offline   Reply With Quote
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 On
HTML code is On



All times are GMT -6. The time now is 12:22 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Powered by Searchlight © 2024 Axivo Inc.
Use of this web site is subject to the terms and conditions described in the user agreement.
Reef CentralTM Reef Central, LLC. Copyright ©1999-2022
User Alert System provided by Advanced User Tagging v3.3.0 (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.