Custom Sensor: Potentiometer

Some sensors operate by verying their electrical resistance.  Examples include light level meters and wind direction sensors.

Here is how to connect an example potentiometer to the mPort:

In this example, the pontiometer has a maximum resistance of 20 KOhms.  A voltage divider is used to get the resulting voltage across the analog inputs down to the 2 volt maximum of the mPort.

Here is an example custom sensor definition:

"Potentiometer" : {
"desc" : "20KOhm potentiometer",
"analog" : true,
"rj45_v1" : true,
"tblock_v1" : true,
"do_volt0" : 5,
"rep_analog" : 1,
"default_tag" : "r",
"analog_tag" : "r",
"conversion" : "xyz*10000",
"unit" : "Ohms",
"precision" : 0

Change the tag, units and conversion to match your sensor (mph, lux, ...)

Powered by Zendesk