-
Well NOW it works :D a little better and a little longer. It's now a 30 minute sunrise and sunset period.
I had to recalculate a liner value in to a logarithmic equivelant.
To do this, I had use decibels. Value = 256 - (10^(x/20)*(256-1)).
where x = value in negative dB. As we know -3 db, is the half power point of 0 and -6 is half of -3 and -9 is half power of -6 and so on. The value 256 is how many steps there are in the DS2890.
Once I obtained my values (I used every -1.5 dB's) I then stuck these values into a lookup table stored in the EEPROM. Saves the PIC performing these complex calculations over and over again and wasting clock cycles.
Using every -1.5dB's created 31 steps so this turns pretty much well into 30 mintues. The cutoff value is -45dB's. This is where the calculated value equals 255. Then, it's lights off.
I know, I know. I can hear it already, my mates say the same, you propellor head! :book
BI, check you PM. There's some info there which will enable you to find some dimming ballasts for T8 light systems. :wink:
Cheers,
Col.
-
BN...what are you up too...can't believe your just sitting back and admiring your intelligent light switch :)
I will try and get some time to revamp my web page layout.....my layout is looking a bit old...havn't progressed any more measurements after my orp probe installation a couple of weeks ago. Spending most of my free time trying to plan the next aquarium....rob
-
Hi BI,
I'm busted!! I have been enjoying my dimming lights! :roll:
I've been rather flat out with work lately (on higher duties at the moment) but I have also somehow managed to get time to get a modchip into my PS2 :D
I'll be working on a midday cloud simulation for my system soon hopefully. I plan to customize it for each day of the week.
What do you think of this idea, dim the lights very low (or even off) and then flash a strobe to simulate lighting? Could even use the surround sound subwoofer for thunder! Yes, I am joking!! :lol: :lol: But it would be a cool effect. :D
The pH controller is up and going and working like a dream.
Cheers,
Col.
-
How cool is this ?...can now tell when my fish get fed and how much...all whilst away from home...Now when I travel I can see when and how much my fish are being fed ! Will be great on holidays and checking if my auto feeder is working OK
http://img.photobucket.com/albums/v3...y/cond1d-1.png
-
Very, Very Cool!
Whats happening though, is it the tetra bits affecting the ORP readings for a period?
And what caused the dip in the graph within an hour of the w/c - did you dose some ferts or something?
Once agin BI, impressive! 8-) 8-)
-
I've had my first hardware failure which is very disappointing....the 1wire DS9490R seems to have packed it in. Even when nothing is plugged into the adapter the NSLU2 does not see the adapter ID.
I have noticed I get a glitch about once every 2 weeks when sometimes I energise a solenoid valve, although I have tried lots of things to stop it (bar running a shielded cable) it still occasionally happened. Tonight I've lost my 1wire comms after a water change, so I'll have to invest in another usb->1wire converter. Beats me how a 24VDC power cable running next to my 1wire cable seems to be causing this. All my 24VDC solenoids have diodes across them and my pump has two capacitors between +/- to a ground stake to alleviate any noise. I'll order another adapter from thermodata as I doubt very much it is software and I hope its not the USB port of the NSLU2 :(
-
Got a new DS9490R from thermodata today plugged it in and its running again.
DIY-J my solenoid switching can causes one missed reading and a zero averaged with 3 other readings cause a spike down. Only needs to miss one reading and I get a spike. I will add some code such that if it does get an error (usually 0 value) I will hold the last value for 1 retry. Its something that happens maybe once every 2 weeks.
-
Well this thread had been dead for a while so I thought I'd give it a bounce and show an improved look and feel to my web interface....I now filter out any occasional data spikes and log any of these errors in a system messages window. I have also found the ability to overlay data on the trends and can pop up target with range bands with alarm info on a transparent overlay. Next enhancements over the coming months is to link a help / info system to each parameter and get a user interface to easily insert log information into the event lists. The last will be providing logs/report of water changes..I do have a great trend showing water changed on what day and accumulated water changed for the week...need to consolidate data into monthly event reports. Can't think of any more enhancements for the short term, any future idea's to extend functionality ?
http://img.photobucket.com/albums/v3...way/NewWeb.jpg
-
I have finally been able to spend some time on my NSLU2 over the weekend, and for the benefit of anyone else wanting to follow Bad Inferno's instructions you will need to do the following things.
>if you have trouble running things like rrdtool to create the database, preface the program name with /opt/bin/ as that's where they are located (example /opt/bin/rrdtool create /public/rrd/aqua_temp.rrd --start 1178926536 --step 300 DS:AT1:GAUGE:600:-10:100 DS:AT2:GAUGE:600:-10:100 RRA:AVERAGE:0.5:1:1440 RRA:AVERAGE:0.5:4:2160 RRA:AVERAGE:0.5:12:8760 RRA:MIN:0.5:288:1825 RRA:MAX:0.5:288:1825). That one had me confused for some time :lol:
> To get the bash shell working for Root user, follow the instructions on the bash page http://www.nslu2-linux.org/wiki/Optware/Bash to create the global .bashrc file. I also had to create a /root directory (user home directory) and create the .bashrc for root also.
> Have a good read of the beginners page for rrdtool here http://oss.oetiker.ch/rrdtool/tut/rrd-beginners.en.html
> owwrite & owread are in an additional package you need to install by typing "ipkg install owshell". :oops:
Bad Inferno, I'm having trouble with your example script to push data into rrdtool. I'm getting an error "expected 2 data source readings (got 1) from N:" I can't echo $TempAqua at the end of the script as you suggested as it tells me command TempAqua: command not found?
-
PM me your script...just highlight it the shell (hold left mouse button down and wipe over text (this copies it to the paste buffer) and then you can paste it into an email.....
Ooops forgot about owshell however cannot remember having to do anything to get bash working. Have you got gawk installed ?