Wrong voltage on Analog Input - SodaqOne

  • SodaqOne Version 2 ** SodaqOne Universal Tracker v2 - 4.6.0 **

  • Web dashboard

  • Analog voltage level is wrong in the dashboard. Please see attached snapshot.
    When I tried to serial output the voltage variable which is being sent to Cayenne, its value is 4340. Not sure how cayenne translates from 4340 to -221.36

  • On the gateway side, this is the hex payload value.
    01 88 09 e1 17 03 32 9b ff fb b4 02 02 9f 50 03 67 01 68
    (Analog Input for voltage is 02 02 9f 50)

Please guide in this regard.

@croczey can you look into this?


Hi @adeel.yasin

So, it seems like the gps and temperature data is working properly, so let’s isolate the bytes related to the analog input.

That is:

02 02 9f 50

02 => Channel 2
02 => Analog Input

9f50 => Hex Value

According to the LPP docs, the data resolution for an analog input is 0.01 signed

When converted from a signed hex value to a decimal value, 9f50 becomes -22136. Then, taking into account the 0.01 data resolution, this becomes -221.36.

To send 4340, you would need to send a hex value of 69f500 this decodes to a decimal value of 434000 and then, taking 0.01 resolution into account, you would get 4340. However, LPP only provides a 2 byte buffer for analog input values.

My suggestion for you is this:

I’m assuming the value 4340 is millivolts, not volts. So, you can divide your variable by 1000 before sending to cayenne. The dashboard will then show a value in volts, rather that millivolts. The value would be 4.34. Your payload would look like this: 02 02 01 b2

I hope this helps!

Let me know if you have any further questions.



1 Like

Thanks Carmin.

It works as you suggested. Happy to have such a good customer support. Regards, Adeel.

1 Like