Download this article in .PDF format
This file type includes high resolution graphics and schematics when applicable.

Pneumatic cylinders carry many advantages in terms of relatively low first cost, application simplicity, and durability. To integrate a pneumatic cylinder into an automated system, electrical signals must be supplied to the controller indicating the position status of the cylinders. Toward that end, pneumatic cylinder manufacturers, machine builders, and end users have developed a number of ways to detect extension or retraction of a pneumatic cylinder and provide an electrical signal to the control system.

Position-Sensing Techniques

One position-sensing technique is to install external electromechanical limit switches or inductive proximity switches that detect metal targets on the moving parts of the machine. The disadvantages of this approach include the cost and complexity of the brackets and associated hardware, the difficulty of making adjustments, and the increased physical size of the overall assembly. Another problem is that the external hardware is prone to damage and misalignment from everyday incidental contact or impact.

A more popular and widely used method is to attach magnetically actuated switches or sensors to the sides of the cylinder, or into a slot extruded into the body of the cylinder. Magnetic-field sensors detect a magnet mounted in the moving piston through the aluminum wall of the cylinder. In most applications, magnetic sensors provide end-of-stroke detection in either direction; however, installation of multiple sensors along the length of a cylinder allows detection of several discrete positions.

Two different types of cylinder magnets are commonly used with magnetic field sensors. The first—and probably the most widespread—is the axially magnetized magnet, which is ideal for actuating most reed switches. When viewed from the side, this magnet has the north and south poles next to each other in the axial plane.

The other common cylinder magnet is radially magnetized, which works well with Hall-effect sensors. Instead of the north and south poles next to each other, one is the inner diameter and the other is the outer diameter. The Hall-effect sensor only looks for a magnetic pole; it does not matter if it is north or south.

Magnetic Sensor Types

The simplest magnetic field sensor is the reed switch. This device consists of two flattened ferromagnetic nickel and iron reed elements, enclosed in a hermetically sealed glass tube. The glass tube is evacuated to a high vacuum to minimize contact arcing. As an axially aligned magnet approaches, the reed elements attract the magnetic flux lines and draw together by magnetic force, thus completing an electrical circuit. The magnet must have a strong enough Gauss rating, usually in excess of 50 Gauss, to overcome the return force, i.e., spring memory, of the reed elements.

Reed switches—The benefits of reed switches are that they are low-cost, they require no standby power, and they can function with both ac and dc electrical loads. However, reed switches are relatively slow to operate, and therefore may not respond fast enough for some high-speed applications. Since they are mechanical devices with moving parts, they have a finite number of operating cycles before they eventually fail. Switching high-current electrical loads can further cut into their life expectancy. In addition, low-cost reed switches can sometimes deliver multiple switching points as the twin lobes of certain magnets pass by. Lastly, reed switches installed in high shock and vibration applications may exhibit contact bounce or even become physically damaged. In many automated factories, reed switches are a major source of unplanned downtime. In plants with hundreds of reed switches, failures can occur almost hourly and represent a continuous maintenance headache, not to mention lost productivity.


Hall-effect sensors—Hall-effect sensors are solid-state electronic devices. They consist of a voltage amplifier and a comparator circuit that drives a switching output. In a Hall-effect sensor, a steady dc current passes through the thin Hall-effect chip. The distribution of electrons across the element is uniform and the current moves in a straight line, with no potential difference generated at the outputs (located on the sides of the chip). As a radially oriented magnet approaches, the magnetic field is perpendicular to the current flow through the Hall element.  The presence of the perpendicular magnet pushes the electrons out of their straight-line path and toward one side of the chip. The imbalance of electron charge thus creates a potential voltage across the Hall-effect element. The small micro-voltage that is created is proportional to the strength of the magnetic field. Once the voltage amplitude generated across the chip has satisfied the threshold level of a comparator circuit, the sensor output switches on.


Because Hall-effect sensors are electronic devices, they have no moving parts. Unlike a reed switch, their response time is not dependent on magnetic force overcoming mechanical inertia. They operate faster and are more resistant to shock and vibration.

It might seem like an easy solution to simply replace reed switches with Hall-effect sensors. The problem is that the magnetic field orientation of a cylinder designed for reed switches may be axial, whereas the orientation for a Hall-effect sensor is radial. The result? There is a chance that a Hall-effect sensor will not operate properly when activated by an axially oriented magnet. Another concern is that Hall-effect sensors typically have rather low sensitivity, such that the magnetic field strength must be in the 30-60 Gauss range. Finally, some inexpensive Hall-effect sensors are susceptible to double switching, which occurs because the sensor will detect both poles of the magnet, not simply one or the other.

Anisotropic magnetoresistive sensors—Another type of solid-state magnetic field sensor is the anisotropic magnetoresistive (AMR) variety. The operating principle of AMR sensors is simple: the sensor element undergoes a change in resistance when a magnetic field is present, changing the flow of a bias current running through the sensing element. A comparator circuit detects the change in current and switches the output of the sensor. Compared to Hall-effect sensing technology, which generates a tiny microvolt-level signal, the AMR element responds with a more robust 3% to 4% change in bias current. This results in more noise immunity and less susceptibility to false tripping.


Typically, AMR sensors are about 200 times more responsive than Hall-effect sensors for a given magnetic field strength. The practical magnetic field strength required to operate an AMR sensor can be as low as 15 Gauss. Improvements in AMR technology now allow these sensors to detect both axially and radially magnetized magnets.


In addition to the ruggedness benefits of solid-state construction, the AMR sensors offer better noise immunity, smaller physical size, and lower mechanical hysteresis (the difference in switch point when approaching the sensor from opposite directions). Manufacturers of high-quality AMR sensors incorporate additional output protection circuits to improve overall electrical robustness, such as overload protection, short-circuit protection, and reverse-connection protection. Unlike Hall-effect sensors, there are no double switching points, because the higher sensitivity of the magnetoresistive sensor allows it to remain in the on state as the low-strength portion of the magnetic field passes under the sensor. Hall-effect sensors, being less sensitive, will often drop out when they see a weaker portion of a magnetic field located between two stronger areas, then switch on again when the field strength increases.


Leading manufacturers of AMR sensors have developed weld field immune versions that can operate reliably in ac welding fields as strong as 200kA/m with no false signals or electrical damage. Many of these welding sensors are available with metallic housings to further guard against hot weld spatter that would melt into a plastic-bodied sensor.


Giant magnetoresistive sensors—The most up-to-date magnetic field sensing technology is called giant magnetoresistive (GMR). Compared to AMR technology, GMR sensors have an even more robust reaction to the presence of a magnetic field, at least 10%.



Due to their high sensitivity, less physical chip material is required to construct a practical GMR magnetic field sensor, so GMR sensors can be packaged in much smaller housings for applications such as short-stroke cylinders, very small-bore cylinders, or miniature pneumatic grippers. Better-quality sensor manufacturers of GMR sensors also add advanced output protection circuits such as overload protection, short-circuit protection, and reverse-connection protection.


Sorting It Out

Over the years, many users have abandoned the use of reed switches due to their failure rate and have utilized mechanical or inductive sensors to detect pneumatic cylinder position. AMR and GMR sensors are smaller, faster, and easy to integrate and are much more reliable; however, they must overcome the stigma left by their predecessors.  With the vast improvements in sensor technology, AMR and GMR sensors should now be considered the primary solution for detecting cylinder position.

Jack Moermond is marketing manager, object detection, at Balluff Inc., Florence, Ky. For more information on magnetoresistive sensors, visit

Download this article in .PDF format
This file type includes high resolution graphics and schematics when applicable.