ADS1115 13digit output confusion

I have a ADS1115 hooked up - the node (blue dot) reads the correct voltage, 3.297v...but the debug outputs a 13 digit number - which I appear unable to alter by any mathematical or script means - Am I being stupid and missing something obvious?? I'm pushing this payload into a signalK-send-pathvalue node (all of which works OK). Any help would be greatly appreciated.

What node are you using to read the information? Full name please I.e. node-red-contribute-?/?/?

Hi Zenofmud

This is the one!

node-red-contrib-anolog-to-digital-converter-raspberry-pi 0.4.24

Thanks.

can you show us this (screenshot)

What have you tried and more importantly, what are you trying to achieve?

I have attached SS of problem..

I'm attempting to insert battery voltage data onto a signalk server aboard

a steel yacht.

that long number is the timestamp you inject.

If you click the number in the debug you will see they are actual date-time values.

Change your debug to show complete message.

image

then screenshot the output (expand all properties)

Hi Steve

Making a bit more sense now..thanks. I need the the voltage to be the payload for signalK (requiring a topic & payload).

use a change node to move the desired value from its current place to msg.payload.

There’s a great page in the docs that will explain how to use the debug panel to find the right path to any data item.

https://nodered.org/docs/user-guide/messages


Quick version - use the copy path button that appears when you hover over the item you want in the debug output & use a CHANGE node to copy it to msg.payload.

1 Like

Many thanks for your time & patience tonight...I will study the docs more closely and hopefully get my head around this. Age is catching up with me!

Much appreciated.

If you are struggling to get a feel for node-red, I recommend watching this playlist: Node-RED Essentials. The videos are done by the developers of node-red. They're nice & short and to the point. You will understand a whole lot more in about 1 hour. A small investment for a lot of gain.

It’s catching up on all of us :laughing: (how could I have 7 grandkids???)

1 Like

Had a good day on this...loads of reading (brain overheated a bit)..but thanks to your knowledgeable guidance now understand the principles a lot more...and managed to get the thing functioning!... :smiley:

Big respect.

1 Like

Hi

Made a lot of progress, but alas have another not-understanding, would appreciate some guidance:

Node Red gauge is oscillating between FSD & near 0 (ADS1115). Is there a way to avoid/dampen this?

Many thanks.

How about a switch node to check the value and only pass something above a certain number?

But the real question should be why are you getting the 0? I would create a test flow that was just working with the node reading the ADS1115 and displaying the value. Then look at the interval you are getting the readings.

  1. What is the device sending the readings?
  2. Is the device the sending the data going into a sleep mode and not waiting long enough before sending a reading?

The node is of a ADS1115....the instruction of which indicate the inject in connected 'in series' ....maybe causing a read delay.

Regards.

Let me backup.

  1. is the ADS1115 attached directly to the raspberry pie?
  2. how many samples per second have you set
  3. how often is the flow being triggered.

Look in chip ads1115 manual:

NOTE
Single-ended signal measurements, where VAINN = 0 V and VAINP = 0 V to +FS, only use
the positive code range from 0000h to 7FFFh. However, because of device offset, the
ADS111x can still output negative codes in case VAINP is close to 0 V.

Be sure to tag the nodes author with a

@authorname

if you looking for a help

for me it would be

@meeki007

I've pushed a update that formats the msg payload to a more user friendly object. I think it will break quite a few users filters for sorting out the voltage.

https://github.com/meeki007/node-red-contrib-anolog-to-digital-converter-raspberry-pi/issues/11

On Single-ended mode set value to 0 if value< 0.

Solved....Many thanks all for valuable advice.

Rookie error (Copy & Pasting nodes)...has 2 signalk-send-pathvalue nodes wired to the the same topic, one from a MCP3008 the other from the ADS1115 i.e. both on the same gauge via the signalk server,

Regards.

1 Like