Introduction: Pacing Track

Pace v. i. [imp. & p. p. {Paced} p. pr. & vb. n. {Pacing}]
1. To go; to walk; specifically, to move with regular or
measured steps.
2. To walk up and down nervously, as to expend nervous energy.

Description:
These are instructions for building a home monitoring system that measures and documents nervous pacing activity. The result is a physical visualization of the amount of pacing, for personal use in a domestic environment. The purpose is to visualize the distance traversed while engaged in measured, contemplative walking.

The monitoring system takes the form of a track, specifically scaled and designed for pacing on. The track is elevated from the ground level and balances on a subtle see-saw. Sensors at each end of the track keep tabs on the amount of laps. The distance paced is calculated and transmitted to a wall-mounted unit which dispenses an equivalent length of red yarn. The yard accumulates on the floor, anywhere you choose to install it. Mine is installed by the doorway.

Assumptions:
1. You have a basic understanding of construction and fabrication techniques,
as well as access to the appropriate tools and facilities.
2. You have a working knowledge of physical computing (reading circuit diagrams)
3. You are overwhelmed with the anxiety of living in a failing state, and frustrated
that most of your household objects address only physical rather than emotional health.

Step 1: Materials Needed

Here is an overview of the materials that will be needed.
Each individual page has more details and links on where you can purchase some of these materials.

Physical Materials:
> 2, 4x8 Sheet of Plywood. 3/4" I used a piece of shop-grade birch.
> Misc pieces of 1" Plywood. Could be scrap
> 1" Diameter aluminum or steel pole
> 6, 2x4's
> 20 LongLag Bolts (4")
> 8 Shorter Lag Bolts (3")
> Wood Screws (1 5/8", 2 1/2")
> 1 Sheet of clear acrylic (at least 2 square feet)
> 1-2 large rolls of red yarn from any craft store
> 2 turntable bearings ("lazy susan" bearings)

Electronics, Misc:
> 1 low rpm, high torque motor
> 1 H-Bridge (SN754410NE)
> 2 Proximity Sensors (SHARP GP2D120XJ00F)
> 1, 2-state toggle switch
> 2 Arduino Microcontrollers (Diecimille or newer)
> 2 9V battery clips with 5mm (center positive) male jacks.
> 2 xBee wireless modules
> 2 xBee shiels from LadyAda
> 1 FTDI cable for programming the xBees

Step 2: Cut Out the Track's Upper Surface

For the sake of brevity, I will not go into details about fabrication and woodshop technique. But this piece will be construction heavy. I am offering these as examples of what I chose to do, but you are welcome to employ any methods at your disposal, as simple or complex as they may be.

To begin, I bought two sheets of thick, 3/4" birch ply and had them cut down from 4x8 to 4x6'. In the shop, I set up a router to cut a 2' radius circle, and centered it about 2' from the edge of the piece, centered. I circled off the edges of the plywood like in the images below, so they would look like a jogging track. To cut the slit in the center, I simply drilled a 1" diameter hole at a distance of my choosing, and on a table saw, I cut the wood two times, only up to the edges of the circle. Voila, a simple track shape.

Set this face down on a clean surface, or elevated on some 2x4's on the ground. We will be attaching the underneath structure from the bottom.

Step 3: Build the Track's Supporting Structure

The track has to be sturdy and solid, so underneath the main pieces will be a supporting structure of cross-braced 2x4s. My design attempt to brace it in the pivotal points that will prevent against too much torsion. See the attached diagram for exact specifications on how I made mine.

The 2x4 frame is screwed to the top piece by 20 long lag bolts. I pre-drilled holes before driving in each bolt. The hole and bolt have to go all the way through the 2x4 and just grab into the plywood without going too far and emerging from the top-side; just under 4". Be sure to clamp everything tight and in position while you work (not pictured).

The fulcrum is supported by metal bar for extra stability. The bar is sitting in pre-drilled holes (about 1" diameter) and the pivoting pieces are made out of thick scrap wood that I found. Be careful that all the holes are the same height or the track won't pivot evenly!

Notes: I tapered the edges of most visible 2x4's for aesthetic purposes, but this was not necessary for the construction. The hole that holds the metal bar on the outside 2x4's is only drilled about halfway through, so it won't be visible. Finally, the 2x4s that are extended are held together by two shorter lag bolts, driven in from opposite sides.

Step 4: Install and Calibrate the Proximity Sensors

To keep track of the distance paced, sensors at each end will register how many times the track pivots back and forth. Putting the track on a pivot not only elevates the experience, but also gives us two convenient point to install "switches". Operating under the assumption that a you'll be pacing in a circle, engaging each ends switch, is like telling the circuit "another 12 feet have been walked". The signal will be communicated wirelessly to the yarn dispensing machine.

In an early prototype, I used buttons on each end, but for the amount of weight hitting the ground, it is not wise to use a mechanical solution, as things like buttons tend to break over time with heavy use. So my solution is strictly optical. Two proximity sensors at each end will look for a threshold range. The logic is as follows: If this proximity sensor is about 3mm from the ground, and the opposite one is about 10mm off the ground, than we know this end of the track is now touching the floor, etc.

By checking out the curve on the data sheet for these proximity sensors, I knew that 3mm and up would be a good range to be operating within. So it's important that when one end of the track is touching the ground, the sensor be at least 3mm away. To be safe, I installed mine about 4mm from the part touching the ground (see image). The code will do the rest (next step).

Step 5: Build and Program the Track's Circuit

The electronics will be divided into two parts, a sending component and a receiving component. The circuit connected to the track is the sending component; it sends the signal of how much pacing is occurring.
Using the diagram below, build the circuit for the track, and connect it to the proximity sensors we installed. I've attached a higher resolution PDF for more detail.
Program the arduino with the code provided in the text file.

If you don't know how to work with Arduino, here are some references so you can learn:
> Main Arduino Website
> Freeduino -- Repository of Arduino knowledge and links
> NYU, ITP's in-house physical computing site with tutorials and references.

Step 6: Build the Yarn Dispenser

The yarn is coiled up on a spool, which is itself attached to a motor. The motor connects to a circuit which tells it when to turn on and off based on signals from the track.
I have included a diagram with my measurements and specs for building the yarn dispenser. You could easily appropriate a spool from a coil of wire or rope and use that instead, but I chose to fabricate my own for aesthetic reasons.

The spool is connected to the hold by turntable, or "lazy susan" bearings. These are usually made up of two metal squares, sandwiching a ring of ball bearings. They can be found at a hardware store or home depot, and look like this.

Notes: When winding the yarn around the spool, take care to make sure it's loosely wrapped and can fall easily, otherwise the yarn can accidentally grab onto itself and begin pulling up. Similarly, if you use a material like wood that has splinters, the splinters risk snagging the yarn as well.

Step 7: Build and Program the Yarn Dispenser's Circuit

When the correct signal is received, the yarn dispenser releases twelve feet of yarn (approximately the length of a half-lap around the track. You can reprogram the circuit as you wish to dispense any length.

Build the circuit in the diagram below, and program it with the provided code. I determined what twelve feet of yarn was by simply timing it with a stop-watch. The code runs the motor for that amount of time (converted into milliseconds).

For convenience, I built my circuit with an H-Bridge -- an IC chip that can switch the direction of a motor. The H-Brige's direction is determined by a toggle switch. Here is a tutorial about h-bridges.

Step 8: A Word About Wireless

One thing I haven't talked about yet, is how the wireless communication is being achieved. I am using xBee wireless modems. xBee's are an easy way to make a wireless point-to-point connection, or create a mesh network. To interface with my Arduino board, I used LadyAda's xBee adapter. It's inexpensive, easy to put together and there is a detailed instructional website explaining how to configure it.
Through a combination of this website, and a chapter on xBee radio's in the book "Making Things Talk" (Tom Igoe), I implemented, possibly what is the simplest use of these radios, which are actually quite powerful.

I got my adapters and xBees (+ the appropriate cable) from here.
Instructions on configuring the xBees are here.

The only thing i'm not going into is how to configure the xBees. I did it very easily (on a mac) by transcribing some code from Igoe's book that uses Processing to create a simple terminal for programming the xBee. That code is on page 198.

Step 9: Finished.



Congrats! You're finished. You are now ready to use your Pacing Track to monitor your emotional health.