Tuesday, October 17, 2006

Group 7 _ Week 4 Experiments - lola stan sara orama

  1. We made and tested a LWM circuit which can regulate voltage, analog control of flexinol
  2. We hooked up 2 flexinols and were able to make a program which responds to the analog flexiforce input by moving one flexinol wire when the pressure is in a certain range, and activate another flexinol when the pressure is in a different range.
{$STAMP BS2}
' {$PBASIC 2.5} `
' {$PORT COM15}

DO
FOR B1=100 TO 200
PWM 15,B1, 50
NEXT
LOOP

' Flexiforce Simple.bs2
' Displays R/C Discharge Time in BASIC Stamp DEBUG Window
' {$STAMP BS2}
' {$PBASIC 2.5}
' {$PORT COM15}

rawForce VAR Word '(sets up variable FOR when pressure is applied TO sensor)
sensorPin CON 13 '(port that sensor is plugged into)

BRANCH B1,[cmd0, cmd1]
IF rawForce <> 5000 THEN cmd1

cmd0: ' Flexinol PIN 15 on
LOW 1
HIGH 15
PAUSE 1000
LOW 15
GOTO measure

cmd1: 'Flexinol PIN 1 on
LOW 15
HIGH 1
PAUSE 1000
LOW 1
GOTO measure

Measure:
HIGH sensorPin '(activates sensor)
PAUSE 2
RCTIME sensorPin,1,rawForce
DEBUG HOME, "Flexiforce raw output = ", DEC rawForce,CR









'

week 4 experiments









Comments: Post a Comment



<< Home

This page is powered by Blogger. Isn't yours?