Please Recommend: Nonprofit looking to monitor temperature and water usage via IMP

I am a complete IMP noob, I do a lot of programming (including Javascript), so the Squirrel coding looks possible for me, the electronics I fear as I haven’t tinkered in years. Not trying to be a total leech, but would like to avoid obviously bad decisions that will cost me money since I’m funding the whole thing. This would be my first IMP project.

Problem Statement: I am trying to help a non-profit (a church) address the following problems 1) people using the facilities, adjust the thermostats in several zones, and leave them at the “occupied” settings when they leave. 2) after the facilities are used, people often leave the sinks, toilets or baptismal water running or dripping. All of these generate unnecessary waste for days until noticed (usually on Sunday).

Objective: Setup an IMP (or similar) low-cost to periodically detect the temperatures in 5 different zones (which are each controlled by different thermostats), and also monitor for running water (possibly even a motion sensor). I want to validate my plan of attack with the experts in this community, so that I don’t waste money on things that wouldn’t work, or could be done easier or cheaper.

Plan Strategy: Wakeup an IMP every so often (or possibly on water pulse or motion), count water pulses for a short period (s/b 0) [each water pulse will be 0.01 gallon], measure temperatures - send to Agent (hourly).
At Agent, evaluate Time-Of-Day, Day-Of-Week and look for out of bound situation (excluding certain combinations of weekday and time where usage is expected).
If out-of-bounds is detected during 2 adjacent time periods, notify steward via text. Limit text message frequency per day.
The church has WPA secured wireless available with great signal in about 50% of the building where 90% of the sensors would be.

Plan Parts:
2-IMP (dev one for me + one for church),

  • 2-Amber breakout boards as the concept of printing boards scares my electronics noob.
  • Multiple one-wire temp sensors (leaning DS1820) located in each zone
  • I guess probably I2C>1-wire bridge? DS2482 ( by hugo)
  • Passive Water sensor, with comparator circuit connected to one Digital pin on IMP to count water pulses.
  • 250-500 foot of telephone or ethernet twisted pair wiring for remote sensors
  • Currently unknown motion sensor, possibly door sensor would work here (simply that someone has used a door recently might be adequate).

References I am planning to use atm:
a. Reading a Neptune Water Meter:
b. using passive water sensor:
c. Reading multiple One-Wire temperature sensors:

Any suggestions which might make my project successful would be appreciated.

oh my! sorry for what a long read that is. :’(

No apology necessary. We like verbosity when it also contains specificity. :slight_smile: For my part, I’ll say this (shamelessly), I am working somewhat obsessively on some Imp module breakout designs and shield that will be for sale in a soon to be open online store, so if you do want to use the Imp module, I’ll have some nice breakouts available in the coming months. Nothing wrong with Amber though, I have a number of them running around my house, and its a fairly easy board to hand solder.

Long wire runs may get you in trouble, though twisted pair should be your best bet. You might want to just consider an Imp at each location. April and the card on Digikey is only $35. Might be cheaper than twisted pair if you have to buy it.


I see your point, I believe each run would be max 30 feet, but wow ethernet cable costs more than I realize (nvm ends and crimper). One benefit is I could focus on doing one thing properly on each IMP (well 5 tempIMPs could essentially be identical).

One novice question, would multiple IMPs easily communicate back to a single Agent for consolidation and decisions?

Probably seems like overkill, but it seems like interfacing a motion sensor and single temp thermistor at each zone might be a novice-friendly approach. If you happen to have a breakout that eases final implementation for temp + motion (or temp+door sensor switch) – I might be interested :smiley:

Each Imp talks to its own agent, but that doesn’t meant that agents can’t talk to each other, and have one “master” agent if you will. Collecting room temperature and motion sensing are pretty simple… there are a number or example projects posted for that.

I am considering making a bluetooth board, and I believe Electric Imp is making a reference design. Sensor boards with bluetooth would connect make to an Imp board with bluetooth, and the Imp would then make the internet connection.

Also, if you want to use twisted pair, maybe you can find someone who is replacing old CAT5 network cable and get some for free. Anyone moving to 5e or 6 is probably throwing out lots of 5 or older.

This sounds like a pretty interesting one. I think the simplicity of an imp at each location. There are cheaper options but they may come with more complication and a longer learning curve. Your experience with Javascript will help a lot.

If for some reason you do need Ethernet cable I suggest

the length of your message is perfect.

When you talk of passive water sensor are you thinking of something that connects to outside of the pipe? If so these aren’t cheap @mlseim is you goto man for this sort thing. If there’s a friendly plummer you could fit a simple flow switch or better still a water meter which could be used to verify the churches bill from water company.

30 feet is possible with 5V onewire on good cable, but probaly not 4x30feet in a star configuration, so you either need more than 1 DS2485 or a analog switch and multiple pullups.

A dual or multiple imp solution may turn out to be cheaper.

I just ordered a prototype run of a board that uses imp002 and ds2485 to make a basic node solution, it has 8 3pin molex headers on it, to connect hobby standard ds18b20 probes to it, however they are usually 3-5meters at most, since after that you need better cable (twisted), you can ofcause crimp your own molex header onto a better cable and solder+mold/heatshrink the end yourself.

If the board works out, ill publish the eagle files, it will probaly be another week before I know.

@controlCloud. Check out the Hall-Effect sensor I link in the post, and I was planning on going the route of where the sensor is simply touching the outside of the flow housing and picking up the internal flow magnets provided by the meter itself. I do need to make sure it works equally well for me. I looked at buying a flow meter, but they are somewhat expensive and would require a plumber to install - so last resort for me.

@MORA. I may need to find the person who was saying they had that same sensor on 20M of cable, maybe they only had a 1-2 sensors.

I am kind of leaning towards multiple IMPs now, because I’m such a novice it might help me to build/test. I’m having trouble finding an example of a “Master Agent” which could then consolidate all the separate agent streams into something useful.

Minimum 3 IMPs (for simplicity this might become 5):
1-Water+Temp+Motion (not sure on this because only 1 wake pin)
4-Motion+Temp (1 per zone)

The only chance for consolidation might be the upstairs where 1 motion and 3 temp would adequately cover 3 zones, if I can overcome the fact that each temp sensor would need 20-30 feet of cable.

Hopefully, the logic should be easier, basically tracking when we no longer have movement in the building, we’d want the temperatures to be heading into the “away” zone, and no water running.

Does this seem reasonable to run each IMP+PIR off of battery? Or should I plan to locate wall power for each?

@controlCloud. btw thanks for the link to the flow sensor, I think I was looking at more industrial/precision versions ($60-$300), and the one you provided will be adequate to determine ON/OFF.

Will run the specs past a friendly plumber to see if there is any potential issue. I see the device is 5V so will make a note on that as well.

Thanks all for the kind help, I think I have most all my initial questions answered, and I need to order a few parts to tinker with while I work out the code and final parts list.

I will also probably move to simpler temperature sensors (thermistor) or something where there are working reference designs and code, since I won’t be doing a starfish of sensors and trying to cram everything on a single IMP.

Will post an update when I have made some tangible progress, or just helpful bumps I hit along the way during the project.

What would be good is a i2c over cat 5 solution.

I even suggested it to a manufacturer!