Hubduino support for Maxbotix sensors

@ogiewon, it appears that the distance sensor support for Hubduino is very specific to those cheap distance sensors that you can get for like $1 each. I have this sensor which is made for harsh environments:

I use it for monitoring the headspace in my septic system, using the MySensors.org stuff. It has a number of options for measurement, I'm using the RS-232 option right now. I need to replace the sensor though, as the echo cancellation or something on this sensor is not working properly and it's giving some erroneous readings right now.

My question is, what would it take to get something like this working with Hubduino once I get a new sensor or get this one fixed?

$292 for a range sensor?!?! WOW!

That said, after looking at the datasheet for the sensor, it should work with the existing voltage library. It's just outputting a standard analog signal. The only thing you would want to be sure of is to use the 3.3v to power the sensor as the Analog pin on the NodeMCU or Wemos d1 mini is only 3.3v compliant. Not 5v.

I paid about $130 when I bought it, they must have raised their prices.

How would a long cable run affect the analog voltage reading? I'm connecting to it with shielded direct bury cat-6, and the run is probably 60ft.

If you're talking 24 gauge copper conductor....at 60 feet for 3.3v and 65mA (according to the datasheet), you're talking a voltage drop of around 0.2V. So, that shouldn't be a problem.

What kind of system was this sensor actually designed for. Anything you hack together with Hubduino isn't going to be nearly as accurate as that.

It's just hooked up to an arduino nano with an NRFwhatever radio board on it to get the data to a MySensors gateway that I built with an ESP8266. Data is going to an RS-232 board hooked to the TTL pins on the nano. It wasn't designed for any particular system. However, I'm guessing that the RS-232 gives greater accuracy than the analog voltage monitoring would. It sends a distance reading every second in ASCII with 1mm resolution.

Realistically, I probably don't need 1mm accuracy. But, I do need accuracy within a half inch or so because even if the level isn't overflowing, I can still tell when my drain field is slow or backed up. Any headspace less than 686mm for more than 30 mins indicates that my drain field is slow for whatever reason. Before I had the risers sealed properly in the tanks, the level would rise about an inch per hour when it rained heavy. Even though that doesn't happen anymore (yet), a lot of rain can waterlog my drain field and the tank can back up. Cleaning up sewage water in the house is not an enjoyable experience.

As far as remediation when I get an alert, it usually results in me getting someone out to pump the tanks. They hold 2500 gallons total, so it takes a couple of weeks for them to fill back up which gives a waterlogged drain field time to recover. If it's been dry and backs up, that means it's slow for another reason, so I pour about 5 gallons of calcium tripolysulfate down the drain field to aerate the hardpan and that fixes it for a couple of years.

I never thought I'd actually WANT city water/sewer, but I've changed my mind on this. Dealing with this is a PITA.

Yeah....analog signal is NEVER going to get you that kind of accuracy. What about modifying your existing setup to report that to HE via the makerAPI? you can have a virtual device that can be modified via a simple webcall to report a sensor output.

I could, but my MySensors gateway recently stopped working properly, and it requires a controller. My controller is currently the Vera, and I'm trying to get rid of it. The only good thing there is that the data is all available via an HTTP GET to port 3480. Here are other options for controllers:

If there's a generic sensor type in Hubduino that I can use to create custom attributes and pass data into, I can easily repurpose my existing code to pull in the sensor data and then just pass it. I'll have to swap out my nano with an ESPxx device though since it doesn't have wifi. I have about 50 arduinos laying around though, so I'm pretty sure I can dig one up. (whenever I need one, I just order like 10 of them from aliexpress since they are so cheap).

In any case, I don't really feel like continuing to use MySensors. The mesh networking stuff with the NRF radios is pretty neat, but I've had a lot of devices just stop working for whatever reason. Could be hardware issues, since a reflash doesn't seem to fix them. Plus, I don't want to have to worry about keeping both a controller and a gateway running.

If you've got code running on an Arduino Nano that can communicate with your existing device, then we can work together to get your level sensor working with Hubitat.

I would probably recommend you buy an Arduino MEGA + W5500 Ethernet2 Shield, assuming you can get a Cat5 network connection to the location where the MCU will be situated.

The reason I suggest an Arduino is that your RS232 device is probably communicating at TTL (5v) levels, not the 3.3V of an ESP8266 or ESP32.

Share some more details of the wiring and current components. That will help with a new design.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.