Introduction: How to Make a Simple Controller That You Can Use With LabVIEW
In my last instructable "DIY Makey Makey using a WF32 and LabVIEW" I give step by step instructions detailing how I use a WF32 and LabVIEW to recreate some of the basic functionality Makey Makey. While I was making this instructable I started to see the potential of using this type of device with LabVIEW, you would be able to quickly create a physical interface for a VI. I decided to try and create a simple controller for my mouse and keyboard control VI using a piece of cardboard and copper tape. In this Instructable, I will walk you through the steps of making the circuit and the controller. I have also included a basic LabVIEW VI that will make it each to allow this type of controller to act as inputs for any VI. For more Instructables like this one check out my "DIY Makey Makey collection".
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Materials
Step 2: Controller Setup
First start by drawing 12 evenly spaced lines at the top, this is where each of the gator clips will attach. Next, cut out 12 pieces of copper tape that you can use as buttons for your controller. Then use them to set up an outline for your controller. Once you have your button placement down out the path from the 12 lines at top to each of the buttons. Use a dotted line in areas where you are having to cross over one button to get to another.
Next, wrap 12 shorts strips of copper tape around the top at each of the points that you marked earlier. Then use the tape to outline all the wires that cross over buttons.
Next, use electrical tape to cover the copper tape in all the areas that it crossed over another button. Then outline all the rest of your lines with copper tape. Then begin to tape across your controller with electrical tape starting at the bottom and moving up.
Next, tape across your controller with electrical tape starting at the bottom and moving up. once some part of a buttons copper tape has been covered by electrical tape place more copper tape in it's place on top of the electrical tape.
Finally you will be able to attach all of your buttons and connect your gator clips.
Step 3: Circuit Set-up
First, connect the 3.3V pin on the WF32 to the positive bus on one side of your breadboard and then connect the negative bus on the same side to the ground(GND) pin. Next use header pins to attach 12 gator clips to your breadboard on the opposite side of your breadboard.
Next, run two 1MΩ resistors in series from each of the gator clip connections to the voltage bus. Then, connect each strip connected to a gator clip to an analog input on the WF32. Finally, use a grounding strap to connect ground yourself by connecting it to the ground bus.
Finally, use a grounding strap to connect ground yourself by connecting it to the ground bus.
This circuit works as a voltage divider (simple drawing shown at the bottom of the picture above), with one of the resistors (R1) being the two 1MΩ resistors in series and the second resistor(R2) is the resistance of your body. The Switch shown above is closed when you complete the circuit. Let's say you hooked the gator clip to a banana, when you touch the banana you are closing the switch and lowering the voltage read by the analog in of the WF32(Vo). In the next ste,p I will show you how to detect when a button has been pressed using this change in voltage.
Step 4: How to Use
When you touch one of the buttons while watching the wristband the voltage read by its analog channel will drop significantly. By setting a threshold voltage to 2.5 volts you will be able to tell when the button one of the buttons has been pressed. There are many uses for this circuit, in one of my other Instructables "DIY Makey Makey using a WF32 and LabVIEW" I use LabVIEW to allow this circuit to control my computers keyboard and mouse. The code below is a simplified version. You can add this code to any VI and then replace boolean controls on the front panel with one of these 12 local variables.
In the LabVIEW code above I use an analog read to get the voltage values from each of the analog inputs on the WF32. I then check to see if the Volage is less than a certain threshold value. On the front panel, I set my threshold value to 2.5. This is because I know that when I touch the button and complete the circuit the value will drop below 2.5, the boolean output value will then become true.
Step 5: The End
Thank you for reading my instructable, if you are interested in making this project yourself but don't have the right supplies you can purchase the LabVIEW physical computing kit with chipKIT WF32. This kit includes a copy of LabVIEW 2014 home edition, a WF32, and everything you will need to run LINX 3.0 and start making projects. Also make sure to check out the Makey Makey, which is sure to provide hours of entertainment. Please comment with any questions or comments you may have. For more Instructables like this one check out my "DIY Makey Makey collection".