So, after lurking around in the shadows for years I've finally gotten round to making my first step-by-step instructable. *yay*
A little background as to how this whole idea came about.
Back in 2009, I needed some bend sensors for a sign language translation glove I was making for fun, and the commercial ones that just came out were over my budget considering I needed at least 10.
Then I came across plusea's DIY bend sensors on Instructables.
It was what I was looking for but I had one small problem. Well, a few problems actually. (Not with the 'ible of course)
All the different instructables required the use of neoprene, or at least conductive thread and conductive fabric.
I could get the anti static bags locally, but getting the above items would mean the total bill (after shipping and currency exchange rates and tax) would consist of mostly that, and not the cost of the items.
So I decided to see if I could just experiment with the conductive anti static bag(although in all honesty I tried matching it with a whole bunch of other stuff; like carbon paper). It took 2 weeks of playing around during my free time before I finally had a decent build. (Still works to date! )
So for all of you who has a tight budget or like me, can't get easy access to items in the states, this is for you.
Step 1: Materials and Tools
Aside from the anti static bags, you should have the rest lying around or easily make your own wires.
â Anti Static Bags 10x15cm ( I used Vermason Conductive Bags) element14/ farnell order code: 522740
â Cable Tie (20 - 25cm is great)
â Masking Tape (We have them in 3 sizes here. But I found the 2.4cm and 1.1cm to be great. We'll need both)
â Jumper Wires (I'm using ones in 20cm length)
â Pencil. I would not recommend mechanical pencils as it's too sharp and it might damage the material while marking out the border. (true story)
â Pen Knife
â Wire Stripper
Step 2: Preparation
IMHO, The preparation part is the one that takes up the most amount of time. The making is actually a lot faster once you get the hang of it.
Okay, loads of tips to share here.
Preparing the Conductive Bags
The 10*15cm size bags are great as you can make use of the dimension itself and just cut (mostly) length wise to get the pieces.
Please note, you'll have to trim off the edges (just the little bit of edge!!) along the 15cm side. I strongly recommend leaving cutting off the bottom of the bag till last, so you can use it as a guide and cut 2 sheets of the conductive bag at the same time.
Check out the photos for an illustrated view of this.
Tip: It really helps to have a stencil for cutting out consistent rectangles for the anti static bags.
What I did was draw the rectangles with a thin black border in the exact sizing and got it printed on card stock paper.
Cut on the border line with a pen knife and lay it on the conductive bags length wise, and use a pencil to draw the lines using the stencil as guide.
To Do: Cut 2 pieces of 0.8cm by 15cm, and 1 piece of 1.7cm by 15cm.
IMPORTANT! In the event that you accidentally:
- Stretch/Pull it
- Spill stuff on it
- Damage it with the pencil (remember the true story warning earlier?)
- ...or any other stuff that causes it to not look nice and perfect..
Well.. Do another one.
Preparing the Jumper Wires
These ready made jumper wires are great. Cut them into half and we'll have 2x 10cm connectors and we can use to make one bend sensor.
If you're making your own, follow likewise =)
1. Measure 5cm of the wire and strip it. Twist / Twine the multi-core strands so they're easier to handle.
2. Make a loop back down to the base where the insulation starts, and twist the wires together a little so that it stays there.
3. You should now have a nice loop.
4. Do the same for all.
Warning: DO NOT solder/ tin/add flux to the wires. This affects the resistance value later on. Just leave it in its *natural* state.
Preparing the Masking Tape
Take the thin masking tape (1.1cm in width), measure 17cm and cut.
Put it aside on the edge of the table and do another one. You'll need 2 of this.
Take the thicker masking tape (2.4cm in width), measure 19cm and cut.
Put it aside. You'll need just 1 of this.
Step 3: The Making
Slowly and steadily..
Using the thinner masking tape (1.1cm) with the sticky side facing up, Place the conductive bag piece that we just cut, right in the middle of it. Make sure there's a border of sticky tape all around. Smooth it out.
The conductive bag piece should have the nice black side facing up.
IMPORTANT! Any printed sides should be faced down on the sticky side.
Take one of the jumper wire connectors and place it slightly off-center onto the edge as shown.
The exposed loop wire should be kept within the black conductive piece. (No peeking out on the sides!!!)
Allow a 0.5cm of insulated wire part to be within the black piece as well.
Do the same for the other piece.
Take the large conductive bag piece that we cut just now (the one that is 1.7cm in width), and fold it in half, lengthwise.
IMPORTANT! Any printed sides should be inside, leaving the completely black surface on the outside.
Lengthwise, align the 2 thin pieces and match the sticky border together.
Place the large piece that we just folded into half into the sandwich.
Now we can close off the whole thing.
IMPORTANT! Make sure nothing is peeking out or invading into the sticky border's personal space! Re-align and nudge things into place as you're closing the sandwich if you have to!
You should now have something that looks like the right-most illustration.
Step 4: Reinforcements Have Arrived.
Anyway, the sensor in its current state is too flimsy, and because masking tape will fold rather than bend nicely, we'll need to reinforce it with a cable tie so that the cable tie provides it with a nice bend.
01. Take the thicker masking tape piece and with the sticky side up, place the cable tie right in the middle of it as shown.
*Smooth side facing up*
02. Trim off the excess cable tie that is sticking out.
03. Place the sensor on top of the cable tie, right smack in the middle.
04. Fold the sticky edges up of the thicker masking tape onto the sensor.
05. You'll notice a gap in the middle. (Yeah, I just made that a step of its own)
06. Take the roll of thin (1.1cm) masking tape, and cover it up the gap nicely. Leave a bit excess to fold down to the back.
07. Near the jumper wire connectors, 1cm from the edge, fold down (towards the back) at an angle as shown in the illustration.
08. Slip a shrink tube (1.5cm in length, 1.1cm in width before shrinking) that covers the 1cm where you just folded and leave the 0.5cm for the wire connectors.
09. Shrink the tubing using a soldering iron or a lighter. (Please be careful when doing this! <insert usual disclaimer here>)
I personally prefer using the lighter because it's quick and even.
And.. You're done!
Now to test it.
Step 5: Interfacing It to a Microcontoller
I'm going to be using a BCore100 Microcontroller to test the bend sensor.
You can get them here: http://shop.aiscube.com/Microcontrollers/BlazingCore/BlazingCore100-Development-Kit
However, before connecting it to the BCore100 ADC pins, we'll need to have a voltage divider circuit.
The BCore100 is a 3.3V system with a 10bit resolution ADC. So I'm using the resistor values as shown in the image for a 3.3V version. If you're using a 5.0V system, I have provided the values as well.
Connect the voltage divider and bend sensor as shown to the BCore100's ADC pin 17.
We'll do a really quick check in the debug window for the values.
Open Sonata IDE, Create a new Project, and Inside the module Code1, copy and paste the following.
Public Const BendSensorPin As Integer = 17
Public BS1 As integer
PUBLIC SUB MAIN()
BS1 = GetADC(BendSensorPin)
BS1 = GetADC(BendSensorPin)
'Convert the Integer Value of the Sensor to String,
'and send it back to the PC
Press F5 to download. (I'm assuming that you have already given the Sonata IDE the COM number that the download key is using, if you're not sure, check here)
Once downloaded, you should see values like the ones in the photo (Look at the right most yellow pane).
For a better view, check out the next step for a Visualized U.I view that I did on an OLED screen, with a video of the Bend Sensor Flexing.
Step 6: OLED User Interface: Bend Sensor Flex Visualization
There's a low cost BCore PIC32 BASIC 2.8" TFT Touchscreen Platform version of the OLED platform now going on pre-order for SGD$99. (That makes it about US$79, with free worldwide shipping) Pre-order ends 16th June 2013, Kits start shipping end July 2013. http://shop.aiscube.com/Microcontrollers/BCore-PIC32/BCore-PIC32-BASIC-2.8-TFT-Graphics-Development-Kit
I wrote a little Progress Bar library since I needed different progress bars for a whole bunch of various projects. It's not perfect, but serves well enough for whatever I need it for.
You can download the entire project code I used here: http://www.mediafire.com/?gfx65kjlokb24oo
The code is extremely easy to understand. Most of it is initializing the Progress Bar dimensions and position, then performing a limit check on the value of the Sensor, and then sending the value to the library to draw it to the OLED screen.
As you can see, I scaled it to a 0 - 100% value range.
Thanks for reading!
Let me know what you guys think =)