How to use an industrial hall effect sensor with arduino

For this project i connect an hall effect sensor with an arduino uno.

A sensor with hall effect is a sensor used for detection of magnetic field so we can say is a magnetic sensor(mine is used on a pneumatic cylinder to detect the position of the cylinder). Actually at the base is made from a semiconductor plate with an dc current throught it and when its aplied an magnetic field appear a voltage.

hall effect

Because mine is a industrial sensor it has attached a 3 pin m8 male connector(1-Vcc 3-GND 4-Signal) and is a pnp model so it,s acting like a normal closed contact(it also exist an npn model-which is like a normal open contact).

M8 connectors

For connection with arduinowe must know the operating voltage of the sensor, in my case is between 3.8 to 30 Vdc so i can connect it direct to arduino 5Volts pin. When a magnetic field is applied near it, on pin those 5 Volts will disspaear becase is acting like a normal close contact.

hall sensor

Because on signal pin we have 5 V i use a schematic like when i use a button and the program from examples of the arduino software.

arduino and sensor connection

And of course a small video:


Related posts

Leave a Comment

Show Buttons
Hide Buttons