Hey has anyone come across a device that can read a 0 - 10v output (say from a temp sensor, light sensor,etc) that integrates with ST? I’ve tried the MIMOlite and the Fibaro RGBW. The hub will enroll them but you can’t calibrate the device or change it’s settings to get it to display data. Any advise? thanks
What exactly are you trying to do?
I’m measuring atmospheric CO2 and PAR radiation. My sensors have analog 0 - 10v outputs and I wanted to convert the data to Z-wave to get it to the hub .It seemed like the MIMO or the RGBW would do it but I can’t seem to set them up through the ST hub.
Do you mean that you are trying to interface your device to a z-wave device, and replace the z-wave devices (for example) voltage output from another input? I haven’t cracked on eopen, but I would think the measured voltages would be quite low (e.g. from a light sensor to z-wave).
Have you measured the internal voltages of any of the existing z-wave devices as of yet?
I believe you are on the right track. Both the devices you tried should do what you want but the present device type ignores the 0-10v inputs. @twack would know better since he is the original author for both device types.
An Arduino Uno, a SmartThings Shield, a few resistors and a bit of editing of the example ST arduino code will get you what you’re trying to do. The Mimo or Fibaro won’t.
Google “measuring voltages with arduino”.
Hope this helps
I really want to use a photon to do this sometime, maybe consider that?
beckwith - yeah thats exactly the problem I ran into with both of them
twack - thanks for the advise, just ordered an Arduino starter kit and the shield. I guess I have to learn something now
bridaus - I’ll check it out. It’s further complicated by the fact that I’m using Grovestreams to collect and track data so the device has to integrate with them. The ST hub is working really well for that
Thanks for the help!
Awesome. Just know that if you’re gonna use the analog inputs on the duino to measure your voltage, it can only be 5vdc max. So your going to need a couple resistors to act as a voltage divider for your use case (0 to 10 vdc). Then just do the math on your output reporting.
The SmartThings Shield has numerous spare through holes so you can easily add the divider circuit onto it after you’ve prototyped on a bread board.
Keep us posted on your project.
Cool thanks for the info, gonna be a couple weeks but I’ll post when I make some progress
So @twack - What are the options for this now that we can’t get the shield? I have some hi accuracy outdoor temperature and humidity sensors (Vaisala) that output 0 - 10v or 4 - 20ma for their outputs. The temperature is -40 through 140, humidity is 0 - 100%. I come from a commercial/industrial HVAC background where 4 - 20 ma and 0 - 10v signals are common as are all the sensors that I can easily get my hands on. Is there anything out there that can convert those to z-wave yet? I feel it’s a huge gap between home automation and commercial/industrial which if bridged would open up companies like SmartThings to do a lot more then it currently does.
You can use my ST_Anything project to measure voltage via an Arduino or ESP8266.
I read through what you posted and I had looked at that project in the past. I also have some emails out to a couple manufactures checking if there is a “easy” 0 -10v to Z-wave device. The Fibaro RGBW lists as having 4 0 - 10v analog inputs so even though it is a lighting controller I’m wondering if I can jsut use those inputs for what I want. Waiting on their support people to get back to me…I’d just modify the DTH that @zcapr17 created and remove everything except the inputs section and add some preferences to do scaling within the app. At least in my head that’s what I would do if it can work like that. I’m worried about resolution on the Andruino as all my sensors are 0 -10v and I would have to half that down to 0 - 5 for the board which cuts my resolution in half. If I get nothing back from the companies I emailed then I may have to go the Andruino route.
Let’s analyze the 0-10v temperature sensors in a little more detail. Can you please explain what the temperature range is that corresponds to the 0-10v range? What model temperature sensors are these?
The Arduino UNO and MEGA support 0-5v, 10 bit analog inputs. Thus, the best an Arduino can due is to discern the difference in the input signal of ~5 millivolts (5,000mv/1024counts).
Most people simply use a temperature sensor that communicates to the Arduino/ESP8266 controllers via a digital communications protocol. The DHT22 and DS18B20 sensors are two such examples. This avoids the need for an analog to digital converter in the microcontroller.
I work in the industrial automation and control field. We typically use 16bit ADCs attached to high precision thermocouples exposed to extremely high temperatures (~500 to 1500 degress celsius.) The cost of this type of solution for home use is usually prohibitive.
My ST_Anything library does also support for a low-cost thermocouple module from Adafruit. Perhaps this is another option?
It would help to understand your use-case for these sensors.
I’m using a Vaisala HMS83 (http://www.vaisala.com/Vaisala%20Documents/Brochures%20and%20Datasheets/CEN-TIA-HMDW80-Datasheet-B211253EN.pdf). -40 to 140 F, 0 - 100% RH. It reads in 0.1* increments so I would have, based on my math, 1800 possible data points. I’ve used them with BACnet controllers but there doesn’t seem to be a BACNet MS/TP or IP to Z-Wave device out there that I’ve found otherwise I’d just do that. Plus I haven’t found anything that can read outside thats natively Z-Wave which supports the temps here which goes from -20F through 100*F.
I too work in automation, commercial and light industrial. Hence a $300 sensor for a home application. But it was free so I can’t argue. I have a lot of leftover sensors and stuff but no way read any of them and I don’t want a actual “commercial” head end…its fine for a office building but a PITA for a home user.
Like I said if there was a single controller that needed little to no programming that would bring in both as a 0 - 10v it might be worth it. If not then maybe I try to program a mega.
FYI - I talked to the people at Fibero aobut thier RGBW module which has 4 0-10v inputs on it. I asked them if I could use just the inputs to read another sensor and how the resolution was on it. This is what I got back:
“In this case RGBW module should be good for your usage. The inputs are mostly linear. You can set the maximum (100%) and minimum (0%) value for each channel of RGBW module. Device will sample the signal to 0.1V. The accuracy of the readings depends on the sensor (signal source).”
So my sensor has 1800 data points (180 degree range and is accurate to 0.1 degree). That unfortunately means my sensor can output in very small voltage changes. Example:
0.00v = -40
0.01v = -39.8
0.02v = -39.6
5.55v = 60
5.60v = 61
Which means the RGBW, sampling only every 0.1v, is going to skip huge chunks of the temperature range. More specifically I’m going to get a reading of every other whole degree with no accuracy in between.
So that controller is definitely out, at least for temperature. Just posting in case someone else needs this info (hopefully my analysis is correct). It would work perfectly for humidity though since my sensor is accurate to plus or minus 3% RH and has a 0 - 100% range. So for that a 0.1v sample would line up to a whole percentage for RH (don’t need fractions of RH). But for $60 for the RGBW its not worth it just for RH, for me at least.
So, an Arduino UNO or MEGA (10bit ADC) is capable of measuring 0v to 5v using a 10bit ADC, or 0 to 1023 counts.
5v / 1023 counts = 0.00488 volts/count, or ~5mv / count.
If you scale your 0v to 10v analog out down to 0v to 5v using a simple voltage divider, you’ll end up with
5v / 1800 temp readings = 0.00277 volts/tenth of a degree, or ~3mv / tenth of a degree
This means using an Arduino UNO or MEGA would get you very close, but not quite the 0.1 degree resolution the sensor is capable of.
Looking at the MKR1000 (12bit ADC or 4095 counts), let’s do the same math for a 0v to 3.3v analog signal.
3.3v / 4095 counts = 0.00080 volts/count, or ~0.8mv / count.
If you scale your 0v to 10v analog out down to 0v to 3.3v using a simple voltage divider, you’ll end up with
3.3v / 1800 temp readings = 0.00183 volts/tenth of a degree, or ~2mv / tenth of a degree
This means using an Arduino MKR1000 would easily get you the 0.1 degree resolution the sensor is capable of.
Of course all if this begs the question “Is 0.1 degree temperature measurement capability really required?” Most people are pretty happy with 1 degree capability. Also, SmartThings really does not handle temperatures in tenths of a degree, if I recall correctly. SmartThings may end up only showing integer degrees, in which case the UNO or MEGA would be fine. Actually, a NodeMCU ESP8266-12e also has a 10bit ADC which would probably be “good enough” although it has only 1 analog input pin.
Or, just use a DHT22 temperature/humidity sensor which just needs power, ground, and 1 digital pin.
Model DHT22 Specifications
Power supply 3.3-6V DC
Output signal digital signal via single-bus
Sensing element Polymer capacitor
Operating range humidity 0-100%RH; temperature -40~80Celsius
Accuracy humidity ±2%RH(Max ±5%RH); temperature <±0.5Celsius
Resolution or sensitivity humidity 0.1%RH; temperature 0.1Celsius
Repeatability humidity ±1%RH; temperature ±0.2Celsius
Humidity hysteresis ±0.3%RH
Long-term Stability ±0.5%RH/year
Sensing period Average: 2s
Interchangeability fully interchangeable
Dimensions small size 14185.5mm; big size 22285mm
Depending on the DTH I thought you could get the decimal…I could have sworn I’ve seen it before. Maybe not.
I’d like to use the sensor I have…it’s already mounted outside in a good spot and puts up with rain, snow, sunlight, etc without a issue. Sounds like the MKR1000 is the way to go, especially since it can do all the inputs I need (2 analog and a digital right now). I’ll work on it after I finish the Konnected project.
Thank-you for your help and insight.
The more I think about it the more you are right. 0.1 resolution isn’t going to matter that much considering the Uno or Mega would get 0.15 (0.2 rounded) resolution. Especially since my local Micro Center has the Mega on sale for $10. Just have to figure out how to Wifi enable it (little confused on that part).
Yes, adding WiFi to an UNO or MEGA is not as straightforward as it should be. As you can tell, I have tried using the ESP01 as a WiFi shield. And I have tried the Adafruit ATWINC1500 breakout board as well. Neither are 100% reliable. The NodeMCU ESP8266 seems to be much more reliable when it comes to WiFi. You could try one of those to see what type of resolution you’d get out of its 10bit ADC input. You can get 2 of them for about $18 on Amazon!