Hi Folks
The range node is linear, does a non-linear conversion node exist?
Hi Folks
The range node is linear, does a non-linear conversion node exist?
I don't know of one. Have you searched the flows website?
What sort of non-linear are you looking for?
New to the site, did a search and did not find anything. The range node is linear and my device exhibits non- linear characteristics. Am using a voltage divider to monitor 0-30 volts DC that is being monitor to 0-5 volts DC. Need to take sample points to determine control points.
So, if I understand, you need to take readings at different points of time. But the readings will be from 0 to 5 because of the voltage divider. Now the actual value will be between 0 and 30.
So each reading is at a point in time, for example at t!
the reading might be 1 and at t2
the reading is 4.7 and at t3
the reading is 2.1
If you set the range node so that the input is 0 to 5 and the output is 0 to 30, the `each separate readings will be ranged to the corresponding reading in the range 0 to 30.
The overall range of readings may not be linear but they should be scaled appropriately.
Give it a try and see what you end up with.
Thanks
If calibrated at say 9 VDC and voltage increases, it is not linear as the voltage increases by several volts.
If calibrated at say 28 VDC and voltage decreases, it not linear as the voltage decreases by several volts.
Have experimented with changing values in the range node, without success.
When you say "If calibrated at say 9 VDC" and "If calibrated at say 28 VDC" what are you calibrating?
Is the supply voltage constant or can that change (run down)?
Note: I'm not a math major, but it sems that you are asking if there is a node that will figure out the formular for your non linear situation.
I use 9 volt batteries for voltage source. With the range node set 0-5 v in and 0-30 v out I connect a digital volt meter to the battery. Then use the trimmer pot to adjust the dashboard readout to match the digital meter reading.
When I increase the voltage to 27-28 v the reading on the digital meter do not match the display by several volts.
Seems like non-linear behavior.
If I repeat the calibration at a higher voltage 27-28 the digital meter matches the dashboard. When the voltage is reduced, the digital meter on the power source begins to be different from the dashboard reading.
Thanks
Which action did you select in the range node ?
This node will linearly scale the received value. By default, the result is not constrained to the range defined in the node.
Scale and limit to target range means that the result will never be outside the range specified within the target range.
Scale and wrap within the target range means that the result will be wrapped within the target range.
Do you mean that your voltage divider is not giving a linear representation of the original voltage?
I have experimented with all 3 mode without success. Thanks
Yes, nicely stated.
The voltage divider is not giving a linear representation of the input voltage (0-30 vDC) on the output voltage (0-5 vDC).
How are you measuring the voltage and then sending that value to node-red?
Show us the circuit you have used.
I am using a multi-meter at the battery.
I am using a DAQCplate.
Input voltage > voltage divider > DAQCplate – analog input > Raspberry Pi 4B > Node-Red > Node-Red Dashboard
Mapping range node for 0-5 input and 0-30 output
I wanted to see the circuit of the voltage divider.
1 megohm is much too large. Change then to 10k, or if the 3 mA load on the 30 volt is too large, then 100k would probably be ok.
[Edit] Though personally I would use fixed resistors (possibly 1.8k and 10k) and do the calibration in node-red.
Thanks, I have some 100K pot on order.
Hi Colin
Install a 100K trimmer pot today and still see non-linear behavior.
Source Voltage - Dashboard reading (through PI-Plate)
09.4 - 09.4 (calibrate here – measured voltage adjusted to equal displayed voltage)
18.7 - 18.9
28.2 - 24.6
Seems like creating equation in a node may be a solution. Use the three data points create a processing equation.
Thanks
Not sure what your 9v source is. But if it’s one of those small batteries they have a significant internal resistance that can affect measurement.