Introduction: SMART SIP&PUFF CONTROLLER PLUS
THIS INSTRUCTABLE IS COMPRISED OF THREE PROJECTS DESIGNED TO WORK TOGETHER!
Each of the Projects, which we will call Phases, can be built and used independently.
Phase 1 is The Smart Sip&Puff Controller which elegantly controls Phase 2 and 3 with the Shortest and Lightest Sips and Puffs on a straw. We'll get into that shortly...
NOTE: If you skip Phase 1, you would either need some way of generating RC type Servo Pulses to drive Phase 2 and 3, or substitute a DC motor and alternative drive circuitry and possibly Limit Switches.
OVERVIEW OF THE THREE PHASES OF THE SYSTEM PRESENTED
FIRSTLY, Phase 1 gives a whole new "Reason for Living" to my original Sip & Puff Switch design! We'll build a complete Stand-Alone Smart Controller with new and greatly optimized code that builders will find easy to adapt to their own projects with just a few minor changes.
This Phase of the design, as outlined in this Instructable, is COMPLETE and "Ready to Go", with the possible exception of cutting the User Panel slightly different for another version of the LCD-Button Shield which you may be inclined to select. I have included code for both the DFRobot and SparkFun Shields, along with instructions (in the code) for how to make changes for other versions of the shield.
NEXT, in Phase 2 we'll design and add something REALLY COOL for the Sip & Puff Controller to do: A Motorized "Lazy Susan" style Turntable that can be put through its paces with short Sips and Puffs against a straw. This phase of the project was inspired by a recent commercial which depicted an armless artist painting while manipulating the paintbrush in her mouth. This phase of this Instructable is also ready to go with the possible exception of adapting a few dimensions to a different Servo and Servo Arm which you might be inclined to select, and adjusting the Hole Sizes in the Top Plate to accommodate the Cups, Bowls, and Plates you care to use.
LASTLY (not considering your wildest imaginations), in Phase 3 we'll design and present a project I call THE SLIDE WEDGE that gives Another Dimension of Movement to the Turntable project we just talked about. The Slide Wedge is designed to move the Turntable (Phase 2) Up and Closer to the user and is controlled with slightly Longer Sips and Puffs on the same Straw that controls rotations of the Turntable. This final phase of the system is now also complete. You can go with the design "as is" or perhaps make a few modifications and improvements yourself. All that remains is finding or fabricating a suitable Wedge Pulley similar to the one modeled here and attaching it to the Servo Arm. A 3D Printer would solve that problem nicely! I'll explain that later, but for now...
Let's jump right into PHASE ONE...
Step 1: PHASE 1 IS THE SMART SIP & PUFF CONTROLLER
This brand-new design adds the very cool DFRobot (or similar) LCD-Button Shield to an Arduino MEGA2650 to make implementing just about any project you can think of a breeze, with computing power, pins, memory, etc. to spare. The Code provides for setting up operational parameters via Button Presses and a Menu displayed on the built-in LCD.
The Controller is designed to make it easy for you to reconfigure, reprogram, and adapt to a vast variety of projects, limited only by your imagination!
One possible enhancement may be to substitute a Pressure Transducer for the Vacuum/Pressure Sensing Switches used in this build so you can add another dimension of control for the user. This design needs only to discern between Short Sips and Puffs (less than .6 seconds) and Longer Sips and Puffs (greater than .6 seconds) to provide the functionality of the system presented.
We'll talk a little more about building this thing in the next Section...
PARTS LIST FOR PHASE ONE - THE SMART SIP & PUFF CONTROLLER MODLE
1EA Enclosure (Hammond 1591DSBK Project Box) Digi-Key: 377-1165ND
1EA Arduino (brand) MEGA2560 (Amazon is good for this)
2EA DesignFlex PSF102 Series Pressure/Vacuum Switches, Part Number: 7882-700. I purchased my switches through WorldMagnetics: PSF-102 Series Switches(231-946-3800) for about $18 each.
1EA LCD-Button Shield (Mouser: DFROBOT 426-DFR0009) (or equivalent, requiring Panel and Code changes)
1EA 1/16 X 10-32 Barbed Tube Fitting (McMaster-Carr (www.McMaster.com) : 2974K123 10/Pkg $4.21)
1EA 1/16 Barbed Y-Fitting (McMaster 2974K391 10/Pkg $7.10) 2FT 1/16" ID X 3/16" OD Tygon Tubing, available from McMaster-Carr under their Part Number: 5466K31, for $1.09 per foot
4EA 1/16" X 10-32 Barbed Tube Fittings, available from McMaster-Carr under their Part Number: 2974K123, for $4.21 per package of 10.
1EA 3/8" X 2-1/4" Polycarbonate Rod, or equivalent, (for the Mouthpiece). Look at McMaster-Carr's Part Number 8571K13 at $1.82 per foot.
Step 2: PHASE ONE BUILD - THE SMART SIP & PUFF CONTROLLER MODULE
*** PREPARING THE LCD-BUTTON SHIELD...
THE GOOD:
The LCD-Button Shield provides a great inexpensive User Interface that is super easy to code for. The 16X2 LCD has just enough room to implement creative Menu and User Interaction displays. Five buttons are provided (in addition to a Reset Button) logically laid out in an UP-DOWN-LEFT-RIGHT-SELECT Pattern.
THE BAD:
The Connectors and Pins on top of the PCBA are taller than the Display Bezel making it much harder to bring the Display up through the top of the Project Box.
THE UGLY:
OK, maybe not all as bad as that, but you will either need to unsolder the Pins AND Connectors that rise above the Display Bezel, or do as I did and Cut (the pins) and Grind (the connector) down a level very near the top of the Backlight Control Potentiometer. Use a Buffing Wheel to grind the Connector so you don't bend contact pieces into each other. Be sure to clean and check it thoroughly for shorts!
*** WIRING THE ARDUINO/LCD-BUTTON SHIELD
There's really not that much to do here. The Main Thing is that we do NOT want to power the Servos from power Regulated by the Arduino. You will find that you can often control a single Servo that does not experience heavy loads with no problem, but two servos or heavy loads will almost always cause major Glitches and Resets of the Arduino if powered after the onboard Voltage Regulator. Power the Servos directly from the external Power Supply and just be sure to tie all the Grounds together!
We'll refer to the Code later to define the actual Pins used for the SIP and PUFF Inputs, and for theOutputs to the Servos. NOT SHOWN: Add a Connector inside the Enclosure to the wires that leave the box and go out to the Servos and other External Devices. Also not shown: additional wiring (and eventually some electrical components) to add Phase 3 to the project. Patience, my dear!
*** MAKING THE MOUTHPIECE
Aside from some mechanism for holding the mouthpiece in a suitable position for the user, the Mouthpiece is the only part of Phase One you will need to fabricate from scratch. Grooves turned into the Polycarbonate tube provide a little grip for the users' lips of teeth. Drill a .159 hole all the way through the 3/8" X (approximately) 2-1/4" tube and thread about a 1/4 inch of one end with a 10-32 Tap. Images in this section depict one solution for holding the Mouthpiece. Other solutions might include a flexible holder attached to the users' chair or (my favorite) to their hat.
*** THE SIP & PUFF CONTROLLER ENCLOSURE
Me thinks this is the one step of this phase that will give you "some" caution: Cutting the Top and End Panels of the Enclosure should be given much care in order to create a nice looking end product. A Picture in this section gives exact dimensions for all the holes needed to implement a real Arduino MEGA2560 with a DFRobot LCD-Button Shield mounted above it. Note that dimensions for the Top of the box are referenced to the inside of the walls of the box as these were most critical to fitting the PCBA Assembly and aligning the Display and Buttons to the holes.
All that remains is perhaps to Label the Buttons: SELECT, LEFT, UP, DOWN, and RIGHT, and to cut a piece of Closed-Cell Styrofoam of size suitable to press the Electronics up against the inside of the Top Panel. The Cutout for the Display will confine the X and Y Orientation of the PCBAs.
Step 3: THE SIP & PUFF CONTROLLED "LAZY SUSAN" STYLE TURNTABLE
WHERE, WHEN, WHAT, AND WHY...
So... There I was, sitting in my "grandpa's rocker" one recent night when a commercial came on, the message of which was, "Don't let anyone tell you that you are limited by your physical, psychological, mental, or any other, station in life". One of the segments depicted an armless women sitting in her wheelchair, painting on an easel while manipulating the paintbrush in her mouth. With this image, the lights immediately came on in my head...
I thought..., This persons' endeavor might be made much more productive if she had an easier and more convenient way to access her brushes, paints, mixing plates, rinse water, etc. My Turntable design was instantly born in my mind. And..., lo and behold, Instructables.com was giving me a great incentive to expedite the realization of my design in the form of an ASSISTIVE TECH Contest. And with that said, here we go...
GRAND SCHEME...
There's not too much to say about the basic Lazy Susan concept itself. In my design as presented, there are 10 stations around the perimeter of the Top Plate and a place to constrain a bowl suitable for (as an example) Water-Color Rinse Water in the middle. Users may want to make the Top plate larger with more stations; easily accommodated with the sturdy hardware and code provided in this design. Users may also care to adjust the size and positions of the various holes to accommodate their particular needs and/or choices in cups, plates, and bowls. I'll leave that up to you!
Unique to this Lazy Susan is that it is rotated by a HiTec HS-785HB Winch Servo that is controlled by the Smart Sip & Puff Controller Module described in Phase One of this Instructable. The powerful Winch Servo specified makes Approximately SIX rotations when commanded between 800 and 2200 uSecs (RC PWM) Servo Pulses. Don't worry if you know little about that stuff... the Code (and the Arduino) will do it all for you! The benefit of having Six Rotations to work with is the ability to go around several times before needing to make nearly a full rotation to go from, say, Station #10 back to Station #1 in a 10 Station design. BTW, the code is easily modified to implement any number of Stations and is currently set to manage 60 (~6 Rotations X 10 Stations).
The pictures in this section will give you a clear idea of the Basic Configuration of this project. In the next section we'll dig deeper into the actual construction of this phase of the project. After that, we'll take a good look at the program code the Arduino operates on, and give you a clue as to PHASE THREE of this project, which will then be revealed and defined in the last section.
This Step concludes with the following PARTS LIST for the Turntable:
1EA HiTec HS-785HB Winch Servo
1EA Servo Horn that matches the Splines of the Servo Selected
The Servo is the most expensive component in the entire system, available on Amazon for ~$42. There are other less expensive choices which may not provide three rotations and may require some code changes.
1EA Corrosion Resistant Turntable (Bearing) - McMaster-Carr P/N 6031K210 $7.76
1EA Deck Plate: can be made from material of your choice. Mine is .5 thick Plywood.See Drawings for Details
1EA Base: Plate can be made from material of your choice. See Drawings for Details
2EA Servo Support Blocks. See Drawings for Details
4EA Turntable Support Posts. See Drawings for Details
NOTE: I GIVE YOU MCMASTER-CARR PART NUMBERS FOR REFERENCE ONLY...
6EA MMC# 90011A194 8 X .5 Slotted Round-Head Wood Screws
- Attach Bearing and Servo Horn to Top Plate
4EA MMC# 91772A190 8-32 X .25 PHP Screw - Attach Servo to Servo Support Blocks
4EA MMC# 91772A827 10-32 X .375 PHP Screw - Attach Bearing to Support Posts
4EA MMC# 91771A833 10-32 X 1 FHP Screw - Attach Support Posts to Base Plate
Step 4: LET'S TEAR THIS "LAZY SUSAN" THING APART (and Put It Back Together Again)!
I am Including Detail Drawings for Each Part of This Design... You should feel free to make modifications or adjustments to suit your particular needs, keeping in mind the following Important Points:
1. The Servo Shaft must line up nearly perfectly with the Center of the Top Plate. This requirement is mitigated somewhat if you take care to mount the Servo to the Servo Plate with the Rubber Mounts provided with the Servo.
2. The Servo Support Blocks must be of correct length to allow the Servo to be stationed into the Servo Horn which is permanently attached to the underside of the Top Plate.
3. The Bearing Support Posts must be of sufficient length to allow the Servo to fit under the Top Plate.
NOT SHOWN IN THE DETAIL DRAWING: A Recessed Area on the Upper Surface of the Top Plate to constrain a Bowl such as shown in the other pics, or perhaps another object altogether.
SPEAKING OF DETAIL DAWINGS...
IN ADDITION TO DRAWING FILES AT THE TOP OF FOLLOWING STEPS...
FIND .STEP FILES FOR THE FABRICATED PARTS HERE (Cut&Paste to Browser without the Quote marks):
"DisabledAdventurers.com/SIPNPUFF/SPTT-STEP-FILES.ZIP"
Step 5: CALL THE DOCTOR STAT... HE'S CODING!
FIND THE COMPLETE CODE HERE (Cut&Paste to Browser without the Quote marks):
"DisabledAdventurers.com/SIPNPUFF/SPTT-DRIVER.ino" Current Rev: 191204.
Be sure to place the .ino file in a Folder called: "SPTT-DRIVER".
MEANWHILE, LET'S SEE IF I CAN PRESENT A BIT OF IT HERE TO GET YOU STARTED...
(An hour and a half later...)
Well, it turns out putting highly Formatted Code directly in an Instructable isn't all that easy, so let's go this route:
The 2 Code Snippets in this section show the #includes, #defines, and Global Variables & Assignments. They are provided here mostly to assure you that the CODE uses Meaningful Variable Names and is FULLY Commented.
I included a portion of the Arduino MEGA2650 Schematic and some Annotation to highlight the Pins specified in the Code for this project. You can certainly select different pins... Just be sure that the Servo Driver Pins are PWM Capable and ALL Pins are still available and accessible with the LCD-Button Shield in place.
Any questions? There are a LOT of Answers in the Comments!
Step 6: I WANT TO GET CLOSER TO YOU!
That would be the Turntable talking!
OK, I've kept you waiting long enough...
I now present Phase Three of this Project - another function easily controlled by the Smart Sip & Puff Controller right along with the Rotations of the Turntable... I call this THE SLIDE WEDGE!
BUT FIRST...
The Code I have provided operates all three Phases of this project:
The LCD-Button Shield Buttons are used to Configure the system parameters (Station Positions for both the Turntable and the Slide Wedge, and Servo Speeds) and can be used to operate both project Phases 2 and 3 in lieu of the Sip & Puff Inputs as well. Speaking of which...
Short Sips (.1 to .6 seconds) will cause the Turntable (Phase 2) to rotate a certain amount (defined by you) in one direction (also defined by you, default is CW, 1 Station), and Short Puffs will cause it to rotate in the opposite direction.
Long Puffs (.6 seconds or greater) will cause the Slide Wedge (Phase 3) to move the Turntable Down and Away from you, while Long Sips will cause it to move the Turntable Up (~5.75 inches) and Closer (~14 inches) to you (explaining the Title of this Section).
I'll conclude this Step with the following PARTS LIST for both Assemblies of the Slide Wedge:
1EA HITEC HS-785HB Winch Servo
1EA Pull-Type Solenoid (Magnetic Sensors P/N S-18-100)
1EA SPDT Relay - (SparkFun P/N G5LE $1.95)
1EA Wedge Servo Combination Horn/Pulley with 1.5" Diameter
1EA Wedge Base
2EA Wedge Base Side
1EA Wedge Top
2EA Wedge Top Side
2EA Wedge Guide Rail
1EA Lower Wedge Stop
1EA Solenoid Extension
ONCE AGAIN, I GIVE YOU MCMASTER-CARR PART NUMBERS FOR REFERENCE ONLY...
4EA MMC# 1714A300 Cabinet Drawer Roller - The Slider Top Assembly Rolls on These
1EA MMC# 90145A567 .25 X 5 Steel Dowel Pin - To Stabilize the Radial Axis of the Pulley Wheel
1EA MMC# 92313A537 1/4-20 X .5 Set Screw - To Secure that Dowel in Place
12EA MMC# 91772A829 10-32 X .5 PHP Screws - To Hold the Servo and Wedge Guide Rails in Place
2EA MMC# 90313A107 #10 X 1 Washer - Same as Above
8EA MMC# 91771A194 8-32 X .5 FHP Screws - To Secure Drawer Rollers
3EA MMC# 91772A829 10-32 X .5 PHP Screw - To Secure Lower Wedge Stop
4EA MMC# 91772A537 1/4-20 X .5 PHP Screws - To Secure the Solenoid Bracket & Rope Bracket
10EA MMC# 96877A633 10-32 X 1.5 FHP Screw - To Secure Wedge Base to Wedge Base Sides
6EA MMC# 91771A542 1/4-20 X 1 FHP Screw - to Secure Wedge Top to Wedge Top Sides
Step 7: THE SLIDE WEDGE BASE ASSEMBLY
In the previous Step I presented the Complete Slide Wedge Assembly. We'll now attack this thing in TWO parts...
In this Phase (3), the Slide Wedge Base Assembly does all the work: It pulls the Slider Top Section Up and Lets it back down as commanded by the Smart Sip&Puff Controller. When the Slider is in the UP Position it is held there by a Solenoid Pin so the Servo can "Relax" a bit in a "No Load" condition.
When the Base Assembly is commanded to lower the Slider, it Pulls it up a little to unload the Solenoid Pin, Retracts the Solenoid (Actually the Arduino does this by activating a Relay that is driving the Solenoid), and then proceeds to Lower the Slider. At the end of the Lowering Operation, the Relay is deactivated allowing the Solenoid to extend back to its own Relaxed State (up).
Note that the Slider has a mechanism for "Riding Over" the Solenoid Pin on the way Up and pushing it down automatically. Once the Slider has reached the top and "cleared" the Pin, the Solenoid Pin is Clear to pop back up and catch the Slider as it is lowered to Rest against the Pin.
Not discussed yet is that you can simply attach the Relay to the Solenoid Bracket with a good VHB (very high bond) Double-Sided Tape. McMaster.com is a good place to find some. Another alternative is to tuck the Relay inside of the Smart Sip&Puff Controller box so you need only to run wires out to the Solenoid.
The Schematic included in this Section defines how the Relay and Solenoid are wired into the system.
Step 8: SLIDER TOP ASSEMBLY
PHEW, WE'RE FINALLY ON THE HOME STRETCH!!!
IF YOU'VE ENJOYED IT SO FAR, PLEASE VOTE IN THE ASSISTIVE TECH CONTEST!
Aside from Configuring the System and setting Parameters in the Control Program, the Slider Top Assembly is the last Piece of the Puzzle. Thankfully, there's not all that much to it...
The critical part is the placement of the Slider Rope & Solenoid Catch Plate. You will notice that the bottom edge has a slight Slope to it that allows it to Push the Solenoid Pin Down automatically as the Plate rides over it. Otherwise, the Code would have to Retract the Pin as the Slider Top Assembly was being pulled to the top of the ramp and then Release the Pin so the Slider can "Rest" against it.
CONFIGURING??? WE DON'T NEED NO STINKIN' CONFIGURING!!!!
Oh, if only that were true, we'd be done right here... Let's just do it and get out'a here...
We'll do the TURNTABLE first...
In the Code, I have already broken the 3 Revolutions of the Winch Servo into 60 Preset Stations (spaced at 24 uSecs apart for One Station per step) and set Station 29 as the Starting Station as well as the Station to go to when the User tries to go Below the first one or Above the Last one.
What's left for you? You can customize the Position of Each of the 60 Stations to your liking.
At the Smart Sip&Puff Controller Panel, press the (Select) Button to Enter the Menu System.
The Display will look something like this:
TT I:29 POS:1496
INDX:L|R ADJ:U|D
This is telling you that the Turntable is at Position Index: 29 and that Position is 1496 uSecs.
Per the menu: Press the (Left) or (Right) Button to walk through the Indexes.
Press (Up) or (Down) to Adjust the Value for the selected Index.
You can hold the button to quickly "roll" up or down through the valid values.
Press (Select) again when you are ready to move on to the next parameter.
There is a SPEED VALUE for both the Turntable and the Slide Wedge. Be careful not to make them too fast!
After the last parameter, you have the option to press (Up) or (Down) to Save your changes. (Select) cancels.
THE SLIDE WEDGE
First off, we need to tie the Rope between the Slide Wedge Pulley and Solenoid Catch Plate. Use the Smart Controller to command the Servo to the DOWN Position. Set the Rope Length such that the Slide Wedge is Resting at the bottom of the ramp when the Rope is fully extended. Your DOWN Position is thus Set mechanically, but can be adjusted in the Menu.
Now, using the Smart Controller, find the Setting that will Pull the Slide Wedge Top assembly all the way up the ramp and Overhanging just a bit. That will be your Slide Wedge UP Position.
Finally, use the Smart Controller to find the Setting that allows the Slide Wedge Top Assembly to Rest against the Extended Solenoid Pin. That will be your REST Position.
AS WITH THE TURNTABLE...
At the Smart Sip&Puff Controller Panel, press the (Select) Button to Enter the Menu System.
The Display will look something like this:
SW DN:2200 Noting that Larger numbers Lower the Slider
L|R|U|D SEL=EXIT
This is telling you that the Slide Wedge is in the Down Position (Index) and that Position is 2200 uSecs.
As clued by the menu: Press the (Left) or (Right) Button to move between the Down, Rest, and Up Indexes.
Press the (Up) and (Down) Buttons to adjust the Values for the selected Index.
You can hold the button to quickly "roll" the Value up or down. Press (Select) again to move on to the next parameter and eventually to Save your changes.
POSSIBLE CHANGES & ENHANCEMENTS (I'll update the list as they are realized)
Currently, I have ideas for the following Possible Enhancements to this project:
1. (mentioned earlier) Substitute a Pressure Transducer for the Pressure/Vacuum Switches to add another dimension to the control made possible by the Smart Sip&Puff Controller. The design presented here would not benefit from this change.
2. Use Stepper Motors or DC Geared Motors, instead of Servos for one or both of Phase 2 (Turntable) and Phase 3 (Slide Wedge). Caveat: You might need to add Limit Switches to the Slide Wedge.
THAT'S ALL FOLKS! I hope you have enjoyed this Instructable, and I hope I may see that some have built it for a friend or family member who enjoys activities that would benefit from it.
ONCE AGAIN, PLEASE VOTE IN THE ASSISTIVE TECH CONTEST IF YOU THINK IT'S WORTHY!