Friday, May 4, 2007

Technical details





The final system consists of three main sensing instruments, an LED display, and a Processing program.





Sensors
1. Two foot switches track the foot position. That's the simple part.

2. A clipboard with four force sensing resistors provides a reading for pressure on the clipboard. The clipboard is a sandwich of two rigid boards, with the FSRs located approximately in the middle of each quarter of the clipboard (they are pushed a little bit outward, from trial and error). Bumpers (slightly flexible plastic bumpers for protecting the floor from furniture) are affixed over the sensing area of each resistor, so that pressure downward on the clipboard is localized to the resistors, rather than spread out over the entire clipboard area. The corners of the clipboard are secured, so that little/no additional force is added, but they are held securely in place.

Roughly, the same weight on the clipboard at different locations results in the same average pressure on all the FSRs. There is variation at different locations on the clipboard. This could be improved through greater precision in construction and by calibrating each resistor individually, but a long-term solution probably requires a tighter grid or a different technical solution entirely. The current solution was a compromise between accuracy, cost, and time.


Initially, the FSRs were individually connected between power and ground, but they are now connected in parallel, so that only a single input is sent to the Arduino. Thus, rather than getting a voltage from each FSR that is proportional to its resistance, the input voltage is proportional to the sum of the inverse of each FSR's resistance. This appears to work fine. I was actually surprised that I didn't need to do some serious reworking of the code when I tried this,

3. The helper hand mouse is a small triangular device with three FSRs. The student places this device under his or her 'helper hand' (off-hand used to hold the paper in place).

Again, bumpers are used to localize the pressure, the FSRs are connected in parallel, and their input voltage changes with increasing pressure on the device. This device serves two purposes. First, because it is placed on the clipboard, this allows the computer to distinguish between changes in pressure on the helper hand (which is okay) and changes in pressure on the clipboard itself from pencil and/or the writing hand. Second, it serves to remind the student to use his or her off-hand to hold the paper in place.



As with the clipboard, this is an imperfect but reasonably effective solution. The combination of using three rather than four FSRs (a choice made simply because I ran out of FSRs!) and of using a smaller-sized FSR means that the pressures don't correlate directly, so there's some math in the code, made from trial and error, that matches them up better. The triangular shape and smaller size of the helper hand mouse seems to result in a more uniform response to pressure than the clipboard does, even when it is moved around or the hand on the mouse changes position slightly.

LED Display
There are three LEDs in the box that houses the electronics. The left and right LEDs correspond to the left and right foot switches. When the feet are placed on the foot mats, the LEDs are off. When the feet are lifted, the LEDs light up.

The middle LED corresponds to the helper hand mouse. When the hand is on the mouse, the LED is off. When the hand is off the mouse, the LED lights up.

This interaction is controlled through the Arduino, although it can be turned on or off from the Processing program.

Processing Program
The Processing program receives the voltages from the clipboard and the mouse (as well as the states of the switches, although it doesn't use them for anything at the moment), interprets the incoming data, and provides running graphical and auditory feedback.



The program provides continuous graphical feedback. The data from the clipboard is green, from the helper mouse yellow, and the calculated threshhold (described below) is white.

The program has two phases.
For calibration, the student first must get situated comfortably, with his or her feet on the mats and helper hand on the mouse. The student begins writing, and the teacher clicks on the "calibrate" button. The student writes for a little while, and the teacher finishes calibration by clicking again on the calibrate button. The computer then determines the peak difference between the clipboard and mouse pressures, and uses that as the threshhold to determine if the student later presses too hard while writing.

The teacher then begins recording by clicking on the "record" button. The program receives pressure data and compares it to the threshhold. If the data exceeds the threshhold, a sound is triggered (randomly selected from a pool of pre-recorded voices), and the graph lines turn red. This state continues for 4 seconds, to allow the sound to finish playing (and to keep from overwhelming the student), before comparison begins again. A recording session can be ended by clicking on the record button again--this will save the data from that session to a file.

A new recording session can be started for the same student by clicking on the record button again, or a new student can be begun by clicking on the reset button. This sets everything back to the initial state, and calibration must be performed before recording can be begun.

The teacher can turn the LEDs and the auditory feedback on and off from within the program.

No comments: