Hello,
first of all: congrat for the community great job, really interesting stuff !
I built a natural swimming pool (yes, with laguna, frog and other little animals ...) and I plan to use my raspberry to setup a remote temperature monitor for the water, and maybe a consumption monitor for the pump. The idea is to log water temperature over months, in order to prevent for algae ...
For the water temperature, do you think the kit (http://shop.openenergymonitor.com/emontx-temperature-node/) could be used for that ? It seems to be waterproof, but what about staying under water 365 days/year ? Also, I will need to protect the EmonTX in a box against hot sun and snow in winter. Do you now some waterproof boxes ?
Sincereley,
David
Re: Pool temperature monitor
Encapsulated DS18B20 temperature sensor looks to me to be waterproof, but you could check with the shop. If they don't pick this up, PM Trystan Lea or Glyn Hudson. You can probably negotiate the encapsulated sensor in place of the on-board one in the kit, if you ask nicely.
You cannot of course put the box and transmitter under water - the r.f. will struggle to get out. Most suppliers do a range of IP65 enclosures, e.g. http://spiratronics.com/pcb-hardware-and-enclosures/project-cases/ip-rat...
Re: Pool temperature monitor
I am in a process of doing the same, to start measuring pool temperature and also heater consumption. Yes its very good to have water resitant sensor but I would never put that to hang inside the pool for three reasons: 1) water gets eventually in as water resistant sensors are not intended to be used underwater. 2) if the measurement electronics is mains powered there is always a risk for s shock in case of a fault. 3) estethically hanging wires are not really appreciatwd and generate a tangling risk for children etc. My preferred installation is inside the filtration housing with a proper brass sensor pocket. This way the water temp is measured in a point of constant flow near the pump allowing also the current consumption being measured. Most likely will take the needed 5v from pump control electronics and install CT to the power input cable and just run the ds18b20 cable out from the pool electronics control box to have a watertight installation.
Re: Pool temperature monitor
Thanks Robert, I will ask Trystan/Glyn. Also thank for the url for cases.
Any hint to help me choose between 433 Mhz vs 868 Mhz ?
David
Re: Pool temperature monitor
sorry I found a post : http://openenergymonitor.org/emon/node/502 on that question
Re: Pool temperature monitor
Hello Petrick,
right ! My first intent was to hide the EmonTX box with stones (this is a natural pool, so with lot of stones nearby), but it is better to put the system near the filtration, that's a really good idea !
You mention a "brass sensor pocket", is the DS18b20 already delivered with such thing ?
Re: Pool temperature monitor
Any plumbing supplier should do thermopockets, does not need to be so long but tip in the flow more or less. Threads make it easy to install to a plastics cabinet into a hole with a bit smaller than threaed diameter ... and just with some pvc glue or silicone it makes a watertight seal. The 18b20 sensor goes inside.
http://www.mkwheatingcontrols.co.uk/advanced_search_result.php?keywords=Brass+pocket&x=0&y=0
Re: Pool temperature monitor
Here is a similar project that what I am working with. The YHDC TA12L CT saturation current is still to be tested. I used 100 Ohm burden sensor with it and it seems to work just fine with calibration value 19.6. 1-wire sensor is water resistant model as you can see from the picture.
Attached preliminary script for it, should be fully compatible with emontx too (even I used jeenode as happened to have one).
Re: Pool temperature monitor
wow ! Thanks for the information, I still need to dig a bit for the system that I have in mind, but I will probably give it a try in the next weeks ...
thanks,
David
Re: Pool temperature monitor
You could always use a thermistor based temperature sensor.
I use flying lead thermistors with a potted end in cold water storage tanks. You just need to weigh the sensor down at the end or it tends to want to float.
The alternative is to have a thermistor based immersion sensor mounted on a float. You wouldn't need a pocket for it. Pockets are only used in pipe work so you can remove the sensor.
Re: Pool temperature monitor
stuntmonkey, is the view about not needing a pocket based on an experience or a point of a view ? My personal expererience with diving and underwater electronics suggest that waterproof sensors lifetime expectance underwater is very short increasing need for service.
Re: Pool temperature monitor
You can buy thermistors as just a bead if you search around but I buy them packaged as a room sensor, immersion sensor, duct sensor, outside air sensor etc.
The immersion sensor is already pre-packaged in a metal probe with a plastic head which is waterproof. If you power the node via a battery you could enclose everything in the plastic head of the sensor.
http://www.sontay.com/products/temperature/temperature-sensors-and-pockets
From memory the potted flying lead sensors have a stainless steel end.
Below is a picture of a long duct sensor I have hooked up to a JeeNode. Its identical to the immersion sensor but about twice the length.
https://www.dropbox.com/sc/wbi6zwlu9q7aqe7/0Fd9ZhGkfq
Re: Pool temperature monitor
Hello,
it has been a while since I can find time to continue ... (too much work ;) )
However, now, everything is built and seems ok. The emontx send correct temperature values to the raspberry and the nice emoncs do the rest.
However, I am a bit surprised by the RFM12b, 868 Mhz (or maybe I do not get it right) : I initially wanted to place the emontx near the pool and the raspberry inside the house, about 15 meters away max, but I can get no signal. I manage to have a reliable connection only when I position the raspberry at the first floor with the window open. When it is closed: no signal. I am a bit surprised because I read that distance around 100m could be reach and I did not think that a simple window can change reception.
I used the emontx_lowpower_temperature.ino from the github. I only change the time_between_readings to be 1.5 min.
Any hints ?
thanks,
David
Re: Pool temperature monitor
Do you have efficient Low E windows? If so they can have a metal coating that blocks radio waves.
Re: Pool temperature monitor
no ... I tried at another place, and tried to orient the antenna in a better way. It seems to work more or less ... With a 1.5 min update, I manage to have about 1 measure every 10-15 min ...
Re: Pool temperature monitor
You could slow the data rate for the link. The rate is set (in the emonTx) with a low-level statement similar to this:
rfm_write(0xC606); // approx 49.2 Kbps, as used by emonTx
You will need to look at the RFM12B data sheet to work out the number to write knowing the rate you want (generally the slower you transmit, the more it reduces the bandwidth and increases the range), and of course you'll need to do the same thing with the RFM12B at the receiving end.
Do you think you might not have two 868 MHz modules? There's a photo showing the difference between a 433 MHz and an 868 MHz module in RFM12B - Part 1 - Hardware Overview
Re: Pool temperature monitor
Hi Petrik. I read your sketch for Arduino and I have one question for you. In description in your sketch you have calibration 20, but calculate is 5A / 0.005A(5mA) / 100ohm(burden resistor) = 10. Why do you have in loop calibration 19.6? I don't understand that. Thanks for your answer. Dan
Re: Pool temperature monitor
Thanks for your advices.
I tried to set the data rate to 9.579kbps with : rf12_control(0xC623); //Data Rate = 9.579kbps
in the emontx_lowpower_temperature.ino file but I do not know in which file to change this value on the raspberry/emoncms. Maybe somewhere in /var/www/emoncms/Modules/raspberrypi ?
Re: Pool temperature monitor
quick update : it seems related to the elevation of the emontx. The connexion is bad when it is to close to the ground...
Strange behavior in the emoncms : I updated it (git pull) and recreate the database (to remove old values), but now, my "input" tab shows about 30 different nodes with numerous "name" in each, while I only have one emontx (node=18). Anyone experienced similar thing ?
Re: Pool temperature monitor
If you have the two ends of the radio link set to different data rates, then the receiver cannot properly interpret the data and you are seeing rubbish. It is exactly the same thing as when the emonTx serial port is set to one baud rate and the Arduino serial window is set to another. You'll need a Raspberry Pi expert to tell you where to set it in there. You could try searching likely looking files for the text string "0xC606", or this page: http://wiki.openenergymonitor.org/index.php?title=RFM12Pi_V2 might give you some clues.
MartinR has in the past suggested 0xC657 for 3.8918 kbps.
Re: Pool temperature monitor
Hello,
I still havent find how to change on the rfm12pi side ...
However, I think (not sure) that my still increasing numbers of nodes in the emoncms (more than 30000 !) could come from the upgrade I did : I follow the steps : http://wiki.openenergymonitor.org/index.php?title=RFM12Pi_V2#Upgrading_R...
and this strange crazy number of inputs seems to be related to this firmware upgrade. Maybe I did something wrong ?
Re: Pool temperature monitor
Hi,
I think Robert is right, if you look at the source code for the firmware you uploaded to the rfm12pi (https://github.com/mharizanov/RFM2Pi/blob/master/firmware/RF12_Demo_atme... ) at line 233 you have
rf12_control(0xC049);
You will probably have to change that to the same value you used in your transmitter sketch, compile it and upload it following the procedure described in the page you linked ... Please be aware that it is just an educated guess :)
Re: Pool temperature monitor
No, it's not that line - the hex value must be C6xx. "C0xx" is a low battery & clock divider command.
I think you'll need to add a similar line but using the same constant as you use in your emonTx:
rf12_control(0xC657);
How to obtain the last 2 digits is on Page 17 of the Hope RFM12B data sheet: 4. Data Rate Command.
(Thanks for the source file reference, madmatt.)
dsarrut:
You're not saying whether you have different rates at each end. If you have, you cannot come to any conclusions about another fault because that alone will turn the data stream into rubbish. If you have gone back and the same data rate is the same at both ends, then you need to check what you did to upgrade.
Re: Pool temperature monitor
Robert: I used the same rate at each end.
I tried to add a line with rf12_control, and upload to the raspberry (I compile with arduino and upload the hex file), but no luck yet ... I will continue next time ...
Re: Pool temperature monitor
If there is a lot of noise (other transmissions in air) then 1.5min may be too long interval, sometimes in here it takes 2-3 transmissions to get through as a lot of other transmissions on 868mhz area too.
maybe there is an overflow error in the emontx script that has been modified so that something overflows to "node" variable space. my pool monitor script has been working now for few months so that can be tried too if there is an error. distance is 15m through 3-4 brick walls in between tx and rfm12pi, for my rfm12pi i have an external 868mhz antenna with magnetic base just to be sure.
(the calibration value was based on different ct and different burden - but at the end i ended up using normal ct as the wire was too thick for this kind of smaller ct)
Re: Pool temperature monitor
Hello !
back from vacation, I tried to setup again the emontx + temp sensor. I set the interval to 10sec. The distance between emontx and the raspberry is about 20m, but the emontx is very close to the ground. Here are the results :
1 - the "node" variable space is still growing in the emoncms interface, with tens of "fake" nodes. Even if I delete them, they reappear with seconds/minutes later.
2 - the temperature is sometimes correct but sometimes not, with random values (105 C, -40, or change in temperature of more than few tenth of degree), making the daily monitoring unusable
I don't know what to do now ... Maybe adding an external antenna could help ?
I also tried to change the datarate with rf12_control on the rfm12pi, but when I compile the RF12_Demo_atmega328.ino and upload on the pi (using avrdude -v -c arduino -p ATMEGA328P -P /dev/ttyAMA0 -b 38400 -U flash:w:Rf12_Demo_atmega328.cpp.hex) it does not work anymore : I probably do not know how to proceed ...
Any hints ?
David
Re: Pool temperature monitor
Regarding the unsuccessful trial to change the data rate : I probably did not select the correct board type into arduino in order to obtain the .hx from the corrected RF12_Demo_atmega328.ino ... Is it Arduino Nano ATMega328 ?
Re: Pool temperature monitor
There may be something wrong with the code or even noise on same band ?
I have around 15 meters from pool with 3 thick concrete walls in between and no issues except these odd collisions using script posted here and rfm12pi.
The temperature odd reading is most likely the way how 1-wire is implemented and fails sometimes to read the sensor.
Re: Pool temperature monitor
Probably late for you, but the answer is no.
http://wiki.openenergymonitor.org/index.php?title=RFM12Pi_V2#Modified_Op...