Go Down

Topic: HOW TO MAP AN ON-PRESSURE SENSOR 0-10 BAR, USING UNO AND 220 OHM RESISTOR. (Read 80 times) previous topic - next topic


The sensor is used in a refrigeration plant (small one), when I connect wires it was already charged.

analog input value is 240 min, 320 max. Wika sensor 0-10 bar.

Code: [Select]

int sensorValue = 0;

int analogPin = A1;

int pressure = 0;

float voltage;

void setup() {

sensorValue = analogRead(analogPin); // the system is on pressure, so this is an initial pressure

voltage =sensorValue*(4.4/1023);

pressure = (voltage - 0.88)*10/(4.4 - 0,88); // I am using voltage to convert than analog values

Pressure values are not changing reasonable, they are way small which don't correspond to R134a table

Note: I cant get minimum analog values at 0 bar and I cant simulate 10 bar.


Code: [Select]

pressure = (voltage - 0.88)*10/(4.4 - 0,88);
  Are commas and periods interchangeable?

Go Up