Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - AndrewPratt

Pages: [1]
mc-Demo205 / Water temperatures
« on: December 14, 2017, 12:34:13 pm »
Thanks to Josh's help we've now deployed our Demo 205 with the thermistor outside our office here to see how well it stands up to winter temperatures. I've installed lithium batteries but am curious what other people's experience has been with these when left outside?

mc-Module / NTC Thermistor Demo
« on: December 11, 2017, 01:32:21 pm »
I am having a problem trying to get the Hackster thermistor demo working that is outlined here (

I ordered the same USP10972 thermistor and believe i have the wiring correct but the values I'm getting out fluctuate a lot and are never anywhere near valid. I also get a lot of not a number errors so there's obviously something wrong! The hackster description calls for a 100 ohm resistor but the one used in the image is a 10k...I've tried both but neither solves the issue.

Ultimately I want to get it working on the 120 and then port it to the 205 so that I can read water temp's outside under the ice.

Here's the code I'm using to push the data to Losant. I also have the onboard temp and battery being pushed as well but I've remove that from the code below to keep it on topic.

Class Thermistor
    Const USP10972_BETA As Integer = 3892
    Const USP10972_R25 As Integer = 10000 '10kOhm
    Const USP10972_DIVIDER_R1 As Integer = 10000 '10kOhm
    Shared USP10972 As NTCTermistor
    Shared Event Boot()
        USP10972_DIVIDER_ENABLE = False
        USP10972 = New NTCTermistor(USP10972_BETA, USP10972_R25)               
    End Event
    Shared Event measureTemperature() RaiseEvent Every 10 Seconds         
        Dim LosantTopic As String = "losant/deviceID/state"
        Dim losantPayload As Json = New Json
        USP10972_DIVIDER_ENABLE = True
        Dim thermistorResistance As Float = USP10972_DIVIDER_R1 * (1 / ((Device.BatteryVoltage().ToFloat/ USP10972_VOLTAGE.ToFloat) - 1))
        USP10972_DIVIDER_ENABLE = False
        Dim tempPstring As String = USP10972.TemperatureCFromResistance(thermistorResistance).ToString
        Dim tempPJson As Json = New Json
        tempPJson.Add("probeTemp", tempPstring)
        losantPayload.Add("data", tempPJson)
        Lplan.Publish(LosantTopic, losantPayload.ToListOfByte)       
    End Event
End Class

Pages: [1]