loading

This instructable is for a weight sensing bag. It helps people who carry a lot in their bags and improves on scales by providing constant ambient feedback and an automatic warning alert for excess weight. 

How it works

It works by using a force sensitive resistor to measure how much the strap is pressing on the wearer's shoulder, and using the value to control how fast LEDs pulsate, or how many LEDs have lit up (when a switch is pressed), giving the user feedback. When the wearer wears excessive weight (currently calibrated at approximately 10-11 pounds), the LEDs blink rapidly to warn the wearer. The entire apparatus is powered by an AAA battery and controlled by a Lilypad Arduino, which is attached to components by conductive thread sewn into the surface of the bag. 

Illustrations and photographs of the bag are below. 

Step 1: Components

Here is a list of equipment you will need for this experiment:
Lilypad Arduino - A sewable version of the arduino microprocessor
Breakout board and USB cord - connects lilypad to computer
Lilypad battery pack
4 lilypad LEDs
Lilypad switch
Force sensitive resistor
Conductive thread - 4 ply tends to fray, but has much lower resistance than 2 ply
Needle and threader - threader is vital for 4 ply thread
Alligator clips - vital for testing circuits. Sewing is too slow to test with. 
Fabric glue and fabric paint - to seal threads
Tote bag - any thin fabric one will do 

Step 2: Basting

[Edit: I later found that putting the battery pack so close to the Arduino leads to an unreliable connection as the folding motion between the two parts loosens the thread. Leave a bit more distance, two or three stitches, to prevent this from happening. ]

This is an essential step to prevent components from moving around during sewing. See the pictures for how to lay out the components for the bag. Use a reverse stitch to keep the petals in place. 

Picture 1 shows the overall layout for basting. The view is from the inside of the bag. Grey components are on the outside of the bag, and white components are on the inside of the bag. 

Picture 2 shows how to sew components with 2 petals (LED, Switch) to prevent them wobbling

Picture 3 shows how to sew components with multiple petals (Lilypad, Battery pack). 
Picture 4 shows how to place the FSR inside the strap. 

Picture 4 shows how to sew the FSR to one side of the strap. 

Step 3: Sewing

 Now you will need to sew connections between all the threads. 

Picture 1 shows the layout for all the sewing on the bag. 

Picture 2 shows the circuit diagrams for each comoponent. Specific Arduino pins are mentioned to ensure compatibility with the code. 

Picture 3: Sew through the petals multiple times to ensure a good connection between the thread and the petal. 

Picture 4 and 5: I used a straight stitch to reduce thread length and resistance (picture 4), but I later learned that a diagonal stitch allows more stretch, so it is preferable (picture 5). 

Picture 6: Stitch around the FSR pins to hold them in place

Picture 7: Curl the ends of the resistors to form loops that you can sew through. 

Picture 8: Tie a thread to an existing stitch to merge threads (black arrows on schematic). 

Picture 9: Sew threads on opposite sides of fabric when they cross to prevent shorting. 

Picture 10: Test stitches with the multimeter to check resistance. 

Picture 11. Glue the knots that you tie to end a stitch, to prevent them unravelling, and paint the exposed threads along the stitch to reduce chances of shorting. 

The photographs show how the sewing will look on your bag when finished. 

Step 4: Coding

You can test the code throughout the sewing process, first by connecting petals with alligator clips to create the circuits, then with the fabric circuits themselves. You can download the code (Readinput.pde) or view a flow diagram of the program's logic (Flow diagram.jpeg). 

The code consists of several distinct parts. 

The variable declarations declare variables for the Lilypad petals, an array and reading variables for measuring the force, variables to control the LED pulsing, and a variable to keep track of excessive pressure. 

setup() activates all the pins, and enables Serial (for debugging). 

loop() checks the pressure, logs excessive pressure, and either issues a warning if there is excessive force, shows the level if the switch is pressed, or pulsates otherwise. It also calls printReading(). 

getReading() uses an array to record the pressure. 

printReading() helps with debugging, by printing all the reading variables. 

checkWarning() logs a continuous period of high force before triggering warning(). 

warning() causes the LEDs to blink. 

level() shows more LEDs for larger force. 

pulse() shows faster pulsations for larger force. 

ledLight() helps light the LEDs for level() and pulse(). 

Step 5: Calibration

You must now calibrate the bag to check how weight corresponds to the FSR's readings. 

Use objects with equal weight to gradually add weight. A set of cans or bottles works well. 

Wear the arduino with the cable attached. 

Use the Serial Monitor feature to read off printReading and check the force. 

Repeat this process to log how the force reading changes with weight. 

Once you are done, tweak the code to match the calibration, and you should be ready to go. 

<span class="short_text" id="result_box"><span style="background-color: rgb(255,255,255);" title="yo no lo le&iacute; todav&iacute;a, y adem&aacute;s la electr&oacute;nica no es mi fuerte, pero la idea es muy interesante.">I did not read it yet (the electronics is not my forte), but the idea is very interesting.</span></span><br />

About This Instructable

5,019views

14favorites

License:

More by markaleung:Weight Sensing Tote Bag 
Add instructable to: