Monday, February 6, 2012

Arduino Controlled Pneumatic Servo

For an upcoming project I needed a pneumatic ram with a closed loop control system so I could position it accurately. Didn't have the budget for an off the shelf solution, so I bodged one together with an ardunio, a couple air solenoid valves, and a pair of potentiometers.

How it works is one potentiometer is the target while the other is mounted to the ram. The arduino code compares the two, figures out the direction that the ram needs to move to match them up, it then cycles the solenoid valves on and off accordingly. Once the values match, it turns both valves on, more or less locking the ram in place. The target pot can also be replaced with any analog input.

For the rest of the hardware I am using a pair of clippard mouse valves and an arduino UNO. The valves work well, 10ms response time and very low power consumption you need a transistor and diode to hook them up to the Arduino, look up the solenoid tutorial. The ram is a double acting one. Also It works best if you have an adjustable inline flow restrictor on the incoming air stream. It allows you to fine tune the rate of fill so the servo is less twitchy.

The big secret on this was to mount a wheel onto the knob of one potentiometer, this wheel has a string wrapped around it that is tied to the end of the ram. When the ram extends, it pulls the string, spins the pot and tada you now have the rams position. You need a second string with a spring attached to roll the wheel back and keep everything taut. To work out the diameter of the wheel just take your rams stroke and multiply by PI to get your radius. Keep in mind that your pot might not turn 360 degrees, mine was 270 so factor that into your calculations. Best to make it a bit oversize anyway, worst case is that you lose some resolution if its too large, if its too small the ram will destroy the pot or break the string when it runs out of room. In this case the wheel is made of birch plywood, with a groove turned into it on the lathe to guide the string.

Circuit diagram and breadboard:

I drew these up with Fritzing, which is an awesome open source electrical diagram program. (I have no connections to the project, just a happy downloader)

Pneumatic servo Arduino code:

Friday, February 3, 2012

Curved Slot Cam Plate

Prototype of a mechanism for an upcoming project. I think I am going to use it as a locker mechanism for a wooden box.