Im working on a project trying to read the pressure value from an Allen Bradley Pressure Transmitter 836P-D2NFGB20PA-D4 Ser.A enter image description here

However the pin configuration that comes on the description along with the schematics its way different that the one i used before

enter image description here

And the circuit im using is like this one, on the top its the circuit from the pressure documentation, and the bot one it the one im wiring on my Arduino Uno.

However on arduino im reading a constant value of 230 that does not increase nor decrease when i apply pressure to mi sensor even when the lcd on my sensor displays the correct psi value.

enter image description here

#include <LiquidCrystal.h> //libreria
int V0 = 3;
int RS= 4;
int E = 5;

int D4 = 6;
int D5 = 7;
int D6 = 8;
int D7 = 9;
LiquidCrystal lcd(RS, E, D4, D5, D6, D7); //Indicar los pins de la interfaz

//Variables globales
int SensorPin= 0; //Variable del pin de entrada del sensor
int indice; //posicion del array de textos
int presion; //variable para almacenar el valor obtenido del sensor(0 a 1023)
int outputValue = 0;
int state = 0;
int prv_state = -1;

#define ARRAYTXT 4 //Numero de textos a escribir

void setup() {
  // put your setup code here, to run once:

analogWrite(V0, 50);

//lcd.begin(16, 2);
//lcd.begin(Cols, Rows);

void loop() {

 //Configuramos un comando de textos
  String textos[ARRAYTXT] = {"Baja presion", "Presion normal", "Alta presion", "Apagar Maquina"};

  presion = analogRead(SensorPin); //obtenemos datos del sensor
    outputValue = map(presion, 175, 1023, 0, 367);

//Indicamos los textos que se definieron en el comando texto al principio("Baja presion" = 0)
  if(outputValue < 50){
    indice = 0;
  } else{
    if(outputValue >=50 && outputValue < 100){
      indice = 1;
      if(outputValue >=100 && outputValue < 200){
        indice = 2;
        if(outputValue >=200 && outputValue < 350){
          indice= 3;
  //lcd.clear(); // se borran pantallas
  //lcd.setCursor(0, 0); //Escribimos en la fila de abajo
  Serial.print("PRESION: "); // escribimos mensaje en el lcd
  Serial.println(" PSI");
  //lcd.setCursor(0, 1); //Escribimos en la fila de abajo
  Serial.println(textos[indice]); // Indicamos que imprima los indices   
  //Serial.print("Psi ");
  delay(200); //Tiempo para repetir el mensaje(1 segundo) 
  • Try disconnecting pin 4. – Edgar Bonet Jan 9 at 16:14
  • I tried disconnecting the pin4 (OUT) and there is no difference, the serial port on arduino ide is -75psi or 270psi but it does not increment or decrement. – Jorge_Garza Jan 9 at 17:03
  • pin 4 appears to be a voltage output ... disconnect the current loop (pin 2) .... or put a resistor between pin 2 and pin 4 and measure the voltage across the resistor – jsotola Jan 9 at 17:16
  • Here is a similar situation, at the very least it has useful information for you. Search for "reading-4-to-20ma-pressure-sensor-using-uno" here at stackexchange. – Wendall Jan 9 at 18:24

Your drawing is different from the drawing in the wiring diagram of that sensor: the resistor has to be connected right like the "4-20mA"-block in the drawing, (-) goes to ground. Measure the voltage directly at pin 2. When reading the sensor's analog signal you can probably leave pin 4 floating.

  • I changed the "4-20mA" block for a 250k ohm resistor and measured the current just before the resistor and it still 0 – Jorge_Garza Jan 9 at 22:04
  • 250k or 250? And where is "before" the resistor? – Sim Son Jan 9 at 22:47
  • My mistake, 250ohms, still no change at all, the votlage on pin2 (suposedly the output for 4-20ma) its constantly 3v – Jorge_Garza Jan 10 at 20:29
  • 3V corresponds to a current of 12mA and in the comment above you wrote that you measured 0mA...? – Sim Son Jan 10 at 21:14
  • 1
    So you must be doing sth wrong or didn‘t tell us everything – Sim Son Jan 10 at 21:16

I think this is the connection you want. Leave out the OUT connection completely and use a 250 ohm resistor (the datasheet says < 0.5 kiloohm).enter image description here

  • Ive already tried that conection however the pin 3 (gnd) causes that when my psi its over the overlimit of the sensor in this case 110 psi (maximun capacity of the pressure switch is 200) short circuits and reset – Jorge_Garza Jan 10 at 20:28
  • Using a smaller resistor value might help. Note that, as you reach the pressure limit, the voltage across the resistor will reach 250 ohm * 20 mA = 5 V. If the voltage at pin A0 becomes larger than 5 V, this might cause problems with Arduino, including potentially a reset. – Kavka Jan 10 at 20:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.