In the ST community there is a project using this type of sensor to a device with an external probe option. He drilled a hole and used a rubber grommet to eat it. Looked good so I thought I’d go that route. You might want to post you level of interest in that string, it sounds like a popular use case.
Iman, were you able to locate your device handler for the external temp gauge?
I’m going to do two of them, one for the freezer and another to monitor the lake water temperature.
Here is the DTH,
On the preference page of the Environment Sensor, you can enable the analog input. Then, specify TempProbe as handler.
The calculation on the following line may need to be adjusted. You may not need the -250 on the following formula.
float temp = ((((((zigbee.convertHexToInt(adc)*state.lastVdd)/0x1FFF)+0.025)*2) -1.25)/0.005) -250.0
AD8495 can be fitted by configurable reference voltage. I found a hard lesson that some vendor may have different refernce value. Once you got the board, we can try some experiment to find out.
You can power AD8495 from 5V or 3.3v. If you power it from 5V you may need to have voltage divider. The code currently assume that you will be powering from voltage divider. The reason for voltage divider is that using 5V, you can measure higher temperature. But, the MCU is can only measure up to 3.3V. The voltage divider will divide the output voltage to make it lower. The code above use 1/2 voltage divider. If you go this route, the ideal resistor value is 10k.
If you are fine with 3.3v, you can connect the output of AD8495 straight to the AI. Then, the code to calculate the temperature is
float temp = ((((((zigbee.convertHexToInt(adc)*state.lastVdd)/0x1FFF)+0.025)) -1.25)/0.005) -250.0
You just need not to multiple the voltage calculation by 2. Using 3.3V as power to AD8495 will simplify the wiring. It is just support less temperature range. Based on what you mentioned, you are not trying to measure extreme heat, I do not see that you need higher voltage. AD8495 can be powered up to ~18v for higher temperature support.
I have realized that since the Serial port feature has been introduced, I have do not have any example on how to use it.
Thanks to @douglaspitman for bringing up the topic, I write an Arduino sketch that read DS18B20 sensor and send the data through the Environment sensor.
I use a board named blue pill. It is based on STM32. Arduino has support for this board. I go with Arduino route since it is really easy to write the code that pull data from DS18B20 and send it over through the serial port. Arduino has so many library so that we can write simple code quickly.
I will upload the code on Arduino and DTH. I will avoid the detail instruction on this thread to keep it short. But, if you need more information, please do feel free to reach out. I will be happy to document them.
This is the rough image how all the component put together for testing. I am also testing how long I can wire the probe. I am able to get the wiring roughly around 15 feet. I use CAT-5 cable. I have suspicion that I can go much longer than 15 feet. I do not have cable longer than that. I am looking to get 100 feet cable to test if possible.
You can get DS18B20 sensor for less than $3, if you are not afraid of looking to the Chinese supplier. The blue pill boards can be purchased for less than $3. For total of less than $6, you can extend the sensor to include the probe. Here is the kicker, this is not the end of what you can do. If you notice the Arduino board above, we only use small number of pin in the board. There are plenty of other sensor that you can connect to the Arduino and expose it to the ST hub.
If you have something in mind to connect, please feel free to reach out.
@iharyadi I just received your environmental sensor I bought from you on EBay. Also does this need an external antenna, if so where does it go?
The current board does not need external Antenna. You may have my older model. At that time, I was trying out which configuration member here find suitable for them. It turn out external antenna module is very low in term of “want”. Most member here, prefer the antenna that is built in the PCB.
So to answer your question, please do not install any antenna. This module should work out of the box as is.
Is there a way to configure the reporting frequency, like to every minute of your module?
I’ve bought both the STM32 and the AD8495. If I don’t get to over my head I’d like to try and hook up a water level sensor to the stm32 as well as the DS18B20 temp probe, to read the lake water, and use the AD8495 and K sensor for the freezer. I’d like to ask for your help with the wiring once everything gets here this week.
This is the water level sensor I was looking at.
For standard Light, Temperature, Humidity, pressure, it will follow zigbee configuration. It can be configured to report data per minute.
For serial port, the interval should be controlled on the arduino side.
Let me know when the time come. Wiring should be ok.
Have you work on Arduino before? I have a extra STM32 bluepill + DS18D20. I can upload the sketch and send you one if you like. I could have send them together with your order but it is a bit late now. I do have extra if you want it. This way you do not have to deal with programming Arduino.
I’ll buy the parts and repeater from you, for the stm32 solution. I hadn’t ordered the repeater for this project yet only the components. Just let me know how you want it transacted.
Sorry, I did not answer this sooner. Don’t worry about the STM32 and DS18B20. I will give them to you for free. They do not cost that much. Just let me know when you are ready. I will ship them together with the repeater.
I was informed from a member here that Ebay will charge shipping on each sensor for international order. Meanwhile, I can easily combine shipping to one box easily up to 5 sensors.
If you are planing to purchase the sensor and ship it internationally through ebay, please send me PM on Ebay. I can refund your shipping cost for the sensors after the first one up to 5 sensors.
As last resort, If Ebay is not possible, please PM me here. I should be able to arrange something.
is there the possibility of connecting multiple ds18b20s ?
I believe so. Infact, DS18b20 can be connected serially. In this case, each ds18b20 need to be pre configure with different address.
Or you should be able to connect them on different pin.
I am looking for a replacement for an Aoetec 6. I really only care about the humidity sensor. I use SmartThings and WebCoRE.
The sensor come with Humidity reading as part of BME280 Bosch sensor.
Ok, is the external antenna a requirement?
The latest version come with PCB antenna only. You don’t need to add the external antenna.
I was going to do a video of this use case but wasn’t sure how to make it effective… I worked with Iman using one of his environmental sensors , an Arduino board (STM32 bluepill) and a DS18D20 Temperature sensor. I use this set up to tell me the temperature of the lake we live on (webcore, smartThings Alexa), It is set up to announce through Alexa at 7:30 in the morning and also when I ask alexa what the lake temperature is. I added 15 feet of wire to the sensor so it would reach the lake and installed the probe under my deck using 1" conduit going down into the lake to protect it from the extreme wave action. The Environmental probe and sensor are in a waterproof box that is thin enough for the signal to travel the 100 feet to the next hop.
Next is to add a sensor that will read the water depth, since we get flooding several times a year.
I would like to find a clear outdoor box so the Lux sensor will be useful.
Thank you for sharing. Let me know if I can help you with anything.