Final Sensor Report

SpectraSymbol's SoftPot, a touch-sensitive linear potentiometer. See the report here.

Applications created for the SoftPot can be seen here.

Final Sensor Declaration

For my final sensor report, I have chosen a linear potentiometer from SpectraSymbol. Unlike most mechanical potentiometers, however, SpectraSymbol's use a polymeric carbon ink which "is deposited onto plastics for the static resistive element." This allows for a touch-sensitive linear potentiometer without any moving parts. The pot is wired with a power, ground and wiper (like most potentiometers) and can range in length from 0.25 inch to 6 feet!

SpectraSymbol supplies their products to Siemens, General Electric, Varian Medical, Adept Technologies and many other companies.

Week3

Datasheet Summary - QProx QT113

Week2

Communicating with Processing through a PIC has been something i have loathed (and avoided) ever since first trying about a year ago. Today I still don't enjoy the process, I can say, with confidence, that it is something I am comfortable in doing...

Why the turnaround? Simply, because it was something I had to do.

While the assignment was not aking for much, it took several days (4) of banging my head against the wall for it to sink in. I basically took the code samples Tom provided, used a basic potentiometer as a sensor, and tried to get those to work properly. Once those codes worked, I started to add bells and whistles. I've provided my codes and their results below.

Datalogging
I reworked Tom's Peak Detection code as follows:

Sending All Sensor Data

define OSC 4
DEFINE  ADC_BITS        10
DEFINE  ADC_CLOCK       3
DEFINE  ADC_SAMPLEUS    20

SensorValue var word
SensorValueB var Byte

tx var portc.6
rx var portc.7

n9600 con 16468
Threshold = 30
PeakValue = 0
noise = 5

TRISA = %11111111
ADCON1 = %10000010

Main:
    high portb.0
    ADCin 0, SensorValue  
    SensorValueB = SensorValue/4

    serout2 tx, n9600, [SensorValueB]

    low portb.0
    pause 50
Goto main

Sending only Peak Values

define OSC 4
DEFINE  ADC_BITS        10          
DEFINE  ADC_CLOCK       3         
DEFINE  ADC_SAMPLEUS    20         

PeakValue var word
SensorValue var word
LastSensorValue var word
Threshold var word
Noise var word

PeakValueB var byte

tx var portc.6
rx var portc.7

n9600 con 16468
Threshold = 50     
PeakValue = 0
noise = 5          

TRISA = %11111111
ADCON1 = %10000010   

Main:
    high portb.0
    ADCin 0, sensorValue
' check to see that it's above the threshold:
    If sensorValue >= threshold + noise then
' if it's greater than the last reading,
' then make it our current peak:
        If sensorValue >= lastSensorValue + Noise then
            PeakValue = sensorValue
        endif

' if the sensorValue is not above the threshold,
' then the last peak value we got would be the actual peak:
    Else
        If peakValue >= threshold then
' this is the final peak value; take action
            PeakValueB = peakvalue/4
            serout2 tx, n9600, [peakValueB]
        endif

' reset peakValue, since we've finished with this peak:
        peakValue = 0
           Endif
    low portb.0
' store the current sensor value for the next loop:
    lastSensorValue = sensorValue
    pause 50
Goto main

 

After successfully implementing Tom's Processing Datalogger, I repurposed it as follows:

import processing.serial.*;
Serial myPort;
int serial = 1; // data from serial port

void setup () {
size(300, 300);
println(Serial.list());
myPort = new Serial(this, Serial.list()[0], 9600);
background(255);
noFill();
stroke (200);
ellipse (150, 150, 50, 50);
ellipse (150, 150, 100, 100);
ellipse (150, 150, 150, 150);
ellipse (150, 150, 200, 200);
ellipse (150, 150, 250, 250);
}
void draw () {
if (myPort.available() > 0) {
serial = myPort.read();
serialEvent();
}
}

void serialEvent () {
background(255);
fill(serial, serial/3, 100);
stroke (0);
ellipse(150, 150, serial, serial);
noFill();
stroke (200);
ellipse (150, 150, 50, 50);
ellipse (150, 150, 100, 100);
ellipse (150, 150, 150, 150);
ellipse (150, 150, 200, 200);
ellipse (150, 150, 250, 250);
println (serial);
}

I wanted to depart from the green and black horizontal scrolling mountains I so closely associate with computer-ness. I ended up using circles that grow as sensor data increases (turning a pot, pushing on an FSR, bending a flex sensor, et cetera). I also mapped the color of the circle to reflect the changing sensor levels. For reference, I added markers every 50 steps. Right now, the color changes with the growing circles but i would like to change it to reflect something different (like magnitude of change in peak value or an additional sensor's reading).

Check out my screen captures:

Tom Igoe's Datalogger

My Datalogging Ellipses

 

Week 1

Sensor experience: a day of exploring sensors
Sensors I experienced in one day
1) Alarm clock snooze button - while 'merely' a digital switch, it temporarily pauses the alarm for exactly 9 minutes.
2) Touch-screen display - I used the touch-screen display of a self-service digital picture printing station. I believe the display is pressure-sensitive, with a thin membrane-type layer that rests atop the monitor, though it may be heat- or area-sensing (like a QProx).
3) CD drive - the digital 'eye' of the drive passes under the surface of the CD scanning digital 1's and 0's converting that information to, say, images.
4) Bar code scanner - I know the sensor is a bar code reader, emitting a series of red lasers recognizing the pattern of the 15 or so lined bar code, but I don't really know how it works.
5) Credit card 'machine' - I call it a 'machine' because I don't actually know what it's called, but I'm referring to the fancy ones that you swipe your card in and then sign. There's a lot going on in there, what with the bar reader, the touch pad, and the 'pen' you sign your name with. I had one actually deny my signature when I 'signed' using a shape rather than my name. Thinking about sensors, I'd have to say this is an impressive little invention!
6) automatic door opener - this is motion sensing, as the sensor box rests obviously above the door.
7a) Laptop - while there must be dozens of sensors in my Apple-branded laptop, I notice 2 on a daily basis. The first is what I believe to be a mechanical sensor, 'knowing' when I open my laptop, awakening it from sleep and putting it to sleep when I close it. I think the sensor is built in to the hinge that clasps it closed.
7b) Laptop - The second sensor is a light sensor, hidden somewhere to the left of the keyboard. The contrast adjusts based upon the lighting conditions of the room my laptop is in. I know it to be to the left of the keyboard because when I place my hand over the left speaker, the contrast adjusts to accommodate a low-light setting.
8) Elevator - this 'modern miracle' uses an IR sensor (I think) to recognize presence as the door closes.