Barometric Sensors

Hello,
I would like to add a barometric sensor to my TXv4 and record air pressure using OEM. I wondered if I could simply add another 1-wire sensor to the green plugs used for DS18B20 temp sensors. A quick search showed this product:

Would it work? Can I simply add more 1-wire sensors and record their parameters? Would it need configuration?

Has anyone added a barometric senor to the OEM system? What is the quick easy way to do this?

Thanks
Matt

I’m a bit concerned that it needs 5 V to operate, so although it’s easy enough to feed it 5 V, you’ll have a problem with the bus I/O pin on the processor, which is limited to VDD + 0.3 V (i.e. 3.6 V). Although it says it can handle ±50 mA, I don’t think I’d risk it. I can’t quite figure out how to limit the current into the processor pin when the bus is high and at the same time not foul up the bus timing and voltage levels when the controller (the V4) is sending data.

Unless you can find a 1-wire level translator (@dBC might know?), I think you really need to look for a sensor that will run off 3.3 V.

If you can solve this, what I know you’ll also need to do is modify the sketch in your V4 to accept the address of your sensor, because at present it rejects all but Maxim DS18B20s.

The bus supply voltage can be different from the bus data voltage. Slaves only ever pull the bus data signal low, they never drive it high. So the voltage seen by the input pin on the master will be determined by what voltage the master pulls that signal to with its strongish pull-up resistor.

And probably add a bunch of code to read its registers as well. I can’t find any detail on that but I’m guessing it doesn’t pretend to be a ds18b20, so probably has a completely different bunch of registers that will need talking to.

1 Like

[My excuse is it was late when I wrote that - so there’s going to be a chunk of reverse engineering to do if the information isn’t available.]

Another quick search shows a handful of inexpensive I²C sensors - it might be more practical to add one of those to something like one of the low-powered but Wi-Fi RPi family, and send the data directly into the LAN.

Alternatively, the emonTx4 has a “raw” analogue input pin available - intended for use with the heat pump monitor. A sensor with a 0 - 1 V output (or which can be divided down to that) is another possibility - and I think Trystan has a function to read the pin.