Connecting pressure sensor to arduino


I want to do a project where I connect this sensor PN7001 - Drucksensor mit Display - ifm electronic or a similar pressure or temperature sensor to an arduino. Firstly, is this possible? If so, how do I connect it?
I also want the values read to be viewed remotely from an android device using a Phpoc shield or some other Wifi module.

I appreciate any answers or better ideas to do it.


The sensor appears to have 2 digital outputs and an IO-Link serial interface

From their web site :

output Switching signal; IO-Link; (Configurable)
Number of digital outputs 2
output function Normally open / normally closed; (Programmable)

The digital pins and serial interface could be connected to an Arduino but you will need to know what the IO-Link provides and in what format.

What exactly do you want to use the sensor for ?

Hey Bob

The project is for a CNC machine since the sensor is inside the machine and cannot be seen during runtime. I would like to connect a module between the cable and the sensor so that the values can be seen remotely from a device. Comprende?



Yes, but do you have any details of the data and format of that data provided by IO-Link ? Without it you will get nowhere ?

To start with, what baud rate does it run at ?

Okay, I understand what you are asking for.

the transfer type is COM2 with baud rate of 38400 bps
minimum process cycle speed is 2.3ms
process data analog is 1
process data binary is 2

Programming of the output function
Hno = hysteresis / normally open
Hnc = hysteresis / normally closed
Fno = window function / normally
Fnc = window function / normally
Hno = hysteresis / normally open
Hnc = hysteresis / normally closed
Fno = window function / normally
Fnc = window function / normally
dESI = diagnostic function (normally

Have you got any more details on programming the device and the format of the data that it outputs ?

What happens if you write a sketch that uses SoftSerial to communicate with the sensor at 38400 baud and print what you receive to the Serial monitor ?

Hey I'm sorry. I'm pretty new to this as you can see. I'm not even sure how to connect it to an arduino board let alone program it. I don't know the answer to your question. How do I find it?

Thanks :slight_smile:

Start with the basics.

If you have an Arduino then try out the examples in the IDE to get a feel of how to program it.

If you don't yet have an Arduino then I suggest that you get a Uno as your first board.
Do you have any programming or electronics experience ?

Yeah I know to code basics in C++ and python but haven't really used arduino much. I'll look into it. Thanks. If you can tell me what steps I should take for this project, that would be nice.

The Arduino is programmed in C++ so you will have a good start.

As for connecting the pressure sensor to the Arduino, do you know what signal levels the sensor outputs ? Is is TTL (5V) or RS232 (-12V to 12V) ? If it is the latter then you will need a to convert it to TTL in order that the Arduino can read it. If it is TTL then I will give you a small sketch to test it out.

Yes, it's TTL.

Yes, it’s TTL.

That’s good news.

Which Arduino board have you got ?

Connect the serial output from the sensor to pins 2 and 3 of the Arduino board. Tx from the sensor to pin 2, Rx from the sensor to pin 3.

Copy this program into the IDE and upload it

#include <SoftwareSerial.h> //software UART library

SoftwareSerial pSensor(2, 3); //create an instance of SS named pSensor.  Pin 2 is Rx, pin 3 is Tx

void setup()
  Serial.begin(115200); //start hardware serial interface
  pSensor.begin(38400); //start the sensor interface

void loop()
  if (pSensor.available())  //if data is available from the sensor
    Serial.print(; //read data from sensor and print it to Serial monitor

Open the Serial monitor in the IDE and set the baud rate to 115200

Do you see anything in the monitor window ?

It is quite possible that you won’t as more setup of the sensor is likely to be needed, but it is worth a try.