Tuesday, December 20, 2016

Upgrading the sensor pods...

The power supply, leak detector, and alarm box has been working well for the past few months, but I'm kind of unhappy with the sensor arrays. While they work well enough, they consume a lot of space for the amount of inputs they have (two one-wire channels of one input each, plus single contact input.) As I needed three, they take up a good portion of the wall where they are mounted. Add that to the relatively weak output (1mW) in an area with a lot of metal and water, and you get Good, but not Great performance.

How to replace these? Well, there are several options. I considered a number of single-board computers, but settled on a device designed more for industrial environments as a PLC. The CAI WebControl unit offers a lot of functionality in a small package - 10baseT Ethernet, 8 channels of 1-wire input (DS1820-style,) 10V analog inputs, Digital I/O and I2C/SPI capability. It has a pretty wide range of input voltages, so it runs off my battery charger setup with no issues (at ~13.6VDC.)

It has a simple programming language that resembles assembly, so if you have any familiarity with ladder logic or any kind of logical programming language, it shouldn't be an issue. As an example, a program I wrote for testing, which sends an I/O summary every hour at 45 past:


     TSTEQ CM 45 RAM1


     EMAIL EM1
     DELAY 120000

In the program:

Test if CM (Minute) is equal to 45 and store in RAM1
If yes (branch if not zero) go to the email function sub
Loop it forever

Tellme subroutine:

Email using the parameters specified in EM1
Wait 120000 1/1000 of a seconds (2 minutes, so we don't loop back and send another email)
Return to the main program

Right now, I just have a single DS18B20 and an HIH4000-001 humidity sensor connected to the board, which is wirelessly connected to my network via a repurposed WRT54GL running DD-WRT and acting as a wireless bridge. Total current draw for the board at 13.6V is about 110mA, with the wireless bridge consuming another 220mA.

Something of note regarding this board: Older variants of the WebControl used a linear regulator, which got HOT quickly. This one has (what appears to be) a simple switcher, which doesn't get anywhere near as warm, and offers a wider input range. It's supposed to run at 5V, but the lowest I could get reliable operation is 6V.

I'm looking forward to replacing everything and adding yet more sensors to the system!

Wow that's a terrible picture!