Air Cylinder Position Sensors

by Ben N on February 13, 2015

The latest excitement on the Star Trek Doors project is that I just got two Bimba 18″ air cylinders in the mail from an eBay purchase. The cylinders have a built-in position sensor with a 3-pin M8 connector right on the end.

I was able to look up some information on the cylinders to find out which pins do what, and then I was able to run voltage and ground to it and get a signal back out. The sensor is essentially a linear potentiometer, with the pneumatic rod acting as the wiper. I didn’t have the correct connector to go to the cylinder, but I was able to get three wires to connect okay just by holding them on with some thin heat-shrink tube.

I first tested the position sensor by sending 12V DC to it, and then checking what came out of the signal pin. To my surprise, it was a nice linear 0-12V! Hmmmm, very interesting. I next sent it 5V DC instead, and checked the signal. Sure enough, I got anywhere from 0-5V!

Whats very exciting about that is that an Arduino Uno uses 5V as sort of its main system voltage, and the analog input pins on it are designed to read, you guessed it, 0-5V!

I opened an Arduino tutorial on potentiometers and started playing around with the code. In the tutorial, you are supposed to turn a potentiometer, and an LED blinks faster or slower depending on the input from the potentiometer. Instead, I could now make the LED blink rate change depending on whether I pushed or pulled on the rod of the air cylinder.

I also used code from another tutorial to display a text output that would display the raw sensor data – in this case a number from 0-1023. From there, I could play with a few IF – THEN statements to display some text such as “Door is Mostly Open”.

I further modified the code and a few wires on the breadboard to be able to turn a pair of LEDs on and off as an indicator of the cylinder being all the way open or closed. It worked great! On the final version of the STAR TREK DOORS, I should be able to use this sensor information as a safety. For example, I would have the Arduino check the door position a moment after it should have closed – if the sensor shows that the door ISN’T closed, the the code would quickly open the door again, because somebody’s foot is probably stuck in it!

I may also be able to use the position sensor to more easily cushion the end of the travel of the door. For example, the Arduino could read the sensor and STOP pushing air into the cylinder when it is most of the way open, letting air pressure drop off and inertia carry the door a bit slower for the last few inches.

In related news, I’m also changing my original idea for the air valves. So far, I’ve been using a 5-port/2-position air valve. This single valve lets you easily drive an air cylinder BOTH directions. However, the air always pressurizes the cylinder, no matter which direction. For safety, the doors should NOT be pressurized when closed so that a person COULD manually slide it open if needed. To do that, a pair of 3-Port/2-Position valves would work. One valve would only control air to OPEN the air cylinders and the other would only control air to CLOSE the cylinders.When neither is activated, the door would be depressurized so that it could easily be manually opened or closed.

Also, there is potential to use the pair of valves to quickly and accurately stop the movement of the doors (so that there isn’t a hard slam at the end of movement) by activating the second valve when the first is near the end of travel.

Using a position feedback sensor adds all sorts of possibilities to this project.

Stay tuned for more, or visit the overall project page for the STAR TREK DOORS.


{ 1 trackback }

STAR TREK DOOR Continues | Milwaukee Makerspace
December 3, 2015 at 1:05 pm

{ 0 comments… add one now }

Leave a Comment

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Previous post:

Next post: