View Full Version : 20mV is high???

04-10-2007, 05:28 AM
hey, can any1 tell me why this program for a set of tripwires wont read IN9 as 0 when it trips low to 20mV?

Aircraft_Ident VAR Word
Aircraft_pass VAR Word
Current_weight VAR Word
Aircraft_weight VAR Word
Yes_No VAR Bit

IF IN9 = 0 AND IN10 = 1 THEN calc 'tells program to weigh'
IF IN9 = 1 AND IN10 = 0 THEN standby 'someone is walking through scale backwards'
IF IN9 = 1 AND IN10 = 1 THEN begin 'loops tripwire'

IF IN9 = 1 OR IN10 = 1 THEN begin 'this is just to make sure there are no glitches'

location CON 0
i VAR Nib
total VAR Word
Aircraft_Ident = 0
Aircraft_Ident = 50 'test value
DEBUG DEC Aircraft_Ident
PAUSE 1000 'delay to compensate for time to get on scale'
total = 0
FOR i = 1 TO 15
total = total + (INS & $01FF) - Aircraft_Ident 'takes reading from IN0 - IN8'
PAUSE 100 'this delay is because the converter is running at 10 Hz'
total = total / 15
WRITE location,total

Phil Pilgrim (PhiPi)
04-10-2007, 05:38 AM
Any action that depends on IN9 being zero also depends on IN10 being one. Are you sure BOTH conditions are being met?


04-10-2007, 05:42 AM
they're both being met. the only thing that i can get to work is the both high case. ive got a multimeter hooked up and is reading about 15mV when low b/c i changed a resistor. but the prog still wont read low. the pins are arbitrarely reading high also, im guessing they're supposed to though

Martin Hebel
04-10-2007, 05:44 AM
Also, do you have pull-down resistor on those inputs so they are not floating high? Use a simple loop of ? IN9 and ? IN10 to watch their states. You don't say really how the electrical connections are.

StampPlot - GUI and Plotting, and XBee Wireless Adapters (http://www.selmaware.com/)
Southern Illinois University Carbondale, Electronic Systems Technologies (http://www.siu.edu/~isat/est)

Chris Savage
04-10-2007, 05:44 AM
Exactly how is the pin connected? If it’s floating in the LOW state it may not actually be LOW.

Chris Savage
Parallax Tech Support

04-10-2007, 05:47 AM
i have the load wire from the tripwire coming into a node with a resistor running to ground and a wire from the node to the pin. when it trips the pin reads 15mv. when not tripped it read 7V

Phil Pilgrim (PhiPi)
04-10-2007, 06:21 AM
Seven volts? Connected directly to the Stamp pin? You may have fried the input circuitry.


04-10-2007, 06:29 AM
i can also run the resistor to Vdd and switch the order around.
but i think it might be fried, i tried writing

LOW 10

P10 would read low but P9 would read like 5 volts on the multimeter