DIY Raspberry PI Tank Monitor Project

Discussion in 'Equipment / DIY / Reviews' started by Rob, Jun 5, 2012.

  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Users Viewing Thread (Users: 0, Guests: 0)

  1. leaky john

    leaky john Member

    Messages:
    8
    Ratings:
    +2
    Country:
    United Kingdom
    State:
    london
    just quick update i tested the serial and everything seem to be working fine :)

    think it might need calibrating (still in the storage solutions (4 pH)) ? as output readings 6.xxx pH +- 0.01 fluctuations

    am quite please atm as i not released the magic smokes from within it :)
  2. leaky john

    leaky john Member

    Messages:
    8
    Ratings:
    +2
    Country:
    United Kingdom
    State:
    london

    i will give it a go and report back later

    thanks
  3. leaky john

    leaky john Member

    Messages:
    8
    Ratings:
    +2
    Country:
    United Kingdom
    State:
    london
    @saltychris

    quick note - that the R does not work and throw an error so i substituted it for the hex value of R using 0x52

    i ran the script and the output is :-

    None
    [254, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
    None
    [254, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]

    repeating same lines

    Am still grappling and trying different python commands stuff

    I tried this

    print bus.write_byte(0x63,0x52)

    time.sleep(1)

    print bus.read_i2c_block_data(0x63,0x52,7)

    output is :-

    None
    [254, 128, 0, 0, 0, 0, 0]
    None
    [254, 128, 0, 0, 0, 0, 0]

    repeating lines

    But you are right that i have got "pending message" code 254 issue to overcome

    Am sure it is something so simple we (me especially) will be kicking ourselves lol

    I still waiting for a reply from atlas to see if they have recovered from laughing at my coding skillz :D

    thanks
    Last edited: Apr 9, 2015
  4. leaky john

    leaky john Member

    Messages:
    8
    Ratings:
    +2
    Country:
    United Kingdom
    State:
    london
    just a quick update on the nice people at Atlas Scientific they have released new sample code :D

    it is for the stamps which have the I2C enabled, I can now connect all my probes directly to the raspberrypi GPIO pins.

    https://www.atlas-scientific.com/_files/code/pi_i2c_sample_code.pdf

    It work great so far and solved all my previously mentioned I2C issues here. All i need to do now is write my own python script to extend it further.
    • Like Like x 2
  5. scottme

    scottme Member

    Messages:
    36
    Ratings:
    +16
    Country:
    Australia
    State:
    NSW
    Hi all,

    i was looking at this project and I came across some additional data acquisition gear that looks quite interesting:

    www.phidgets.com

    The gear looks quite nice. All usb connectors so no mucking around with breadboards etc. There are a wide range of peripherals (servos, IR sensors, motion sensors etc) and acrylic enclosures for all boards. Cost is OK.

    Also thinking maybe using an intel NUC or Vensmile mini PC as combined home entertainment / tank monitor solution maybe running windows. Considerably more expensive than the PI though.

    And then there's Fishbit....

    Many thanks for your efforts so far! :cool:
    • Like Like x 1
  6. Sjnelle

    Sjnelle Member

    Messages:
    1
    Ratings:
    +0
    Country:
    Other
    State:
    Netherlands
    Nice project.
    I'am using this project for my Raspbery.
    Does anyone has a script example for the atlas i2c probes.

    Because in uart mode I have strange characters.
  7. Rob

    Rob Member

    Messages:
    874
    Ratings:
    +700
    Country:
    Australia
    State:
    Victoria
    Hi @Sjnelle

    See the code manager section of fantastic forum http://thereefuge.com/developers/

    There is a bash script which reads the values. This script simply sends and receives from the serial port. This script is still working and was developed before Atlas posted up their Python versions and the newer probes being able to do I2C.

    At least it is stable when connected to the serial port. From memory I request data twice as sometimes I ahd to wake up the device. In the example code there is a mutliplexer which switches the serial port between multiple sensors.
  8. scottme

    scottme Member

    Messages:
    36
    Ratings:
    +16
    Country:
    Australia
    State:
    NSW
    My tank monitor board is up and running:

    https://freeboard.io/board/VvyZx_

    The Ph values are a little suspect and need further calibration.

    I am using a cheap Arduino UNO clone with a cheap Yun clone shield (Geetech).

    Sensors are:
    - 2 x PCSensor 3.5mm One-wire temp sensors
    - DHT22 ambient temp and humidity
    - BMP180 ambient temp and pressure.
    - Phidgets PH/ORP board with the basic Phidgets BNC Ph probe.

    I am sending the data to Xively and the Freeboard dash hooks off that data.

    At the moment, it's a functional rough prototype. I need to get a couple of Arduino screw shields and I have an LCD shield ready to sit on top, plus some nice indicator LEDs. I'd also like to add a i2c camera at some point and maybe some controls. I am starting to experiment with having optional digital pot controls for my MarsAqua LEDs controlled by my Arduino.

    I'll post some pics when it's in a presentable state,

    What I like is that it's quite scalable in terms of adding new sensors. If I run out of ins and outs, I can always use a MEGA or DUE. Plus it runs on a 12v DC power and I could easily set it up with solar power and a battery.
    • Like Like x 1
  9. mcclown

    mcclown Member

    Messages:
    45
    Ratings:
    +20
    Country:
    Australia
    State:
    NSW
    Just got my raspberry pi, can't wait to start one of these projects....just need a tank to be up and running next ;-)

    What do people use as water level sensors? I'm trying to find something that is safe for saltwater tanks?
  10. Sam Parker

    Sam Parker Moderator

    Messages:
    4,837
    Ratings:
    +4,578
    Country:
    Australia
    State:
    Victoria
    basic float switches, they run on eBay for like $1 each :)
  11. MagicJ

    MagicJ Moderator

    Messages:
    10,032
    Ratings:
    +5,710
    Country:
    Australia
    State:
    Tasmania
    There are electronic resistive sensors available but I am not sure on how they would respond to long term immersion in salt water.

    I prefer, like Sam, just the basic float switches - they work well and are pretty much indestructible.
    • Like Like x 2
  12. MagicJ

    MagicJ Moderator

    Messages:
    10,032
    Ratings:
    +5,710
    Country:
    Australia
    State:
    Tasmania
  13. AlexS

    AlexS Member

    Messages:
    1
    Ratings:
    +0
    Country:
    Australia
    State:
    NSW
    There's a few different ways to measure it - each with different pros/cons:
    - Tapes / wires - These look a good solution but still expensive. The vegetronix aqua plumb looked like the most robust of these i found. Benefits here is you have a single sensor (or potentially 2 as a backup) and don't need to 'hard code' their heights. These are expensive though, and you'll need an arduino / rpi to use

    - Ultrasonic distance sensor : These are a little more complicated to get working - and in my experience arent reliable enough to use to set a sump height (the values bounce around too much). This would be good if it worked, as again, you don't need to preset the locations of the switches

    - Simple float switch - simple to implement, cheap but you'll need one for every height you want to measure (e.g. i have low, high and topoff). Can become a wire-management issue.

    - Optical liquid sensor - like the Tunze units. These are coming down now - you can get them for ~$20 from ebay. Same pro's / cons as float switches, but a little more expensive, and in theory, more robust as there's no moving parts/
  14. mcclown

    mcclown Member

    Messages:
    45
    Ratings:
    +20
    Country:
    Australia
    State:
    NSW
    @AlexS & @MagicJ thanks for the suggestions. I've been working away on other parts of the an aquarium controller, over the last few weeks, but haven't really figured out what I want to do for water levels monitoring yet. I'll have to add a new post to my tank journal to track that part of the project soon.
    • Like Like x 1
  15. Clownfishy

    Clownfishy Member

    Messages:
    98
    Ratings:
    +16
    Country:
    United Kingdom
    State:
    Gloucestershire
  16. mcclown

    mcclown Member

    Messages:
    45
    Ratings:
    +20
    Country:
    Australia
    State:
    NSW
    @Clownfishy I've got it on a list of potential parts but I haven't made the decision to pick up one yet.

    I've put some code up on Github, for what I've been working on but it's still early days: AutoReef
  17. Clownfishy

    Clownfishy Member

    Messages:
    98
    Ratings:
    +16
    Country:
    United Kingdom
    State:
    Gloucestershire
    Thanks for the reply, I think this is what we have all been waiting for and am going to build and document an idiots guide so anyone can at last just plug a couple of boards together\ download some software and start to monitor their aquarium. I will keep you updated on the progress.
    • Like Like x 1

Share This Page