-> I need to read resistance! HELP!! PLEASE QUICK
Archiver
Posts: 46,084
i tried what you said and the only numbers bow that i see is 4078 and
with me covering the photocell and not covering it, i still see the
same number, then i unplug the photocell and i just see 0, so as i
test, i put in a 4.7k ohm resistor and all i see in the debug is
2000, am i also supposed to put in to the ground too? because i also
just pluged in the pin with the photocell without the ground and it
still gives me that number. Help please, i really am confused whats
going on???? Please respond soon. =-) Im going crazy that this is
happening..
oh, i forgot to say, sometimes, which is like 1 out of 100 runs, i
see numbers go like up to 6000 but then it goes back to 1. i have
tried that and also i have a bs2 and b.o.e. bread board. also i would
like to know if i can do a if x > 5000 - 8000 then run1..? and also
about the 10k thermisitor if i can read it the same in the debug
screen like the photocell. this will help me alot if i can figure out
the problem soon: why i just see 1 or 0?
waiting to recieve more info...
>
> --- In basicstamps@yahoogroups.com, jonwms@a... wrote:
> > Then check your connection. Since the circuit is simple, I'd
> suggest
> > rebuilding (especially if on a breadboard) since unseen bad
> connections are
> > often blamed for software troubles. Trust me, I know this from
> experience.
> >
> > -- Jon Williams
> > -- Parallax
> >
> > In a message dated 4/27/2003 12:35:56 PM Central Standard Time,
> > vea@v... writes:
> >
> > > This is the same code that i have and it is still not doing
> anything
> > > execpt for showing 1 and 0. the average resistance is 4k ohms,
5k
> is
> > > my guess where the number becomes 0
> >
> >
> >
> > [noparse][[/noparse]Non-text portions of this message have been removed]
with me covering the photocell and not covering it, i still see the
same number, then i unplug the photocell and i just see 0, so as i
test, i put in a 4.7k ohm resistor and all i see in the debug is
2000, am i also supposed to put in to the ground too? because i also
just pluged in the pin with the photocell without the ground and it
still gives me that number. Help please, i really am confused whats
going on???? Please respond soon. =-) Im going crazy that this is
happening..
oh, i forgot to say, sometimes, which is like 1 out of 100 runs, i
see numbers go like up to 6000 but then it goes back to 1. i have
tried that and also i have a bs2 and b.o.e. bread board. also i would
like to know if i can do a if x > 5000 - 8000 then run1..? and also
about the 10k thermisitor if i can read it the same in the debug
screen like the photocell. this will help me alot if i can figure out
the problem soon: why i just see 1 or 0?
waiting to recieve more info...
>
> --- In basicstamps@yahoogroups.com, jonwms@a... wrote:
> > Then check your connection. Since the circuit is simple, I'd
> suggest
> > rebuilding (especially if on a breadboard) since unseen bad
> connections are
> > often blamed for software troubles. Trust me, I know this from
> experience.
> >
> > -- Jon Williams
> > -- Parallax
> >
> > In a message dated 4/27/2003 12:35:56 PM Central Standard Time,
> > vea@v... writes:
> >
> > > This is the same code that i have and it is still not doing
> anything
> > > execpt for showing 1 and 0. the average resistance is 4k ohms,
5k
> is
> > > my guess where the number becomes 0
> >
> >
> >
> > [noparse][[/noparse]Non-text portions of this message have been removed]
Comments
is no capacitor, and i redid my circuits. this is the next message:
=-(
i tried what you said and the only numbers bow that i see is 4078 and
with me covering the photocell and not covering it, i still see the
same number, then i unplug the photocell and i just see 0, so as i
test, i put in a 4.7k ohm resistor and all i see in the debug is
2000, am i also supposed to put in to the ground too? because i also
just pluged in the pin with the photocell without the ground and it
still gives me that number. Help please, i really am confused whats
going on???? Please respond soon. =-) Im going crazy that this is
happening..
oh, i forgot to say, sometimes, which is like 1 out of 100 runs, i
see numbers go like up to 6000 but then it goes back to 1. i have
tried that and also i have a bs2 and b.o.e. bread board. also i would
like to know if i can do a if x > 5000 - 8000 then run1..? and also
about the 10k thermisitor if i can read it the same in the debug
screen like the photocell. this will help me alot if i can figure out
the problem soon: why i just see 1 or 0?
waiting to recieve more info...
> > --- In basicstamps@yahoogroups.com, jonwms@a... wrote:
> > > Then check your connection. Since the circuit is simple, I'd
> > suggest
> > > rebuilding (especially if on a breadboard) since unseen bad
> > connections are
> > > often blamed for software troubles. Trust me, I know this from
> > experience.
> > >
> > > -- Jon Williams
> > > -- Parallax
> > >
> > > In a message dated 4/27/2003 12:35:56 PM Central Standard Time,
> > > vea@v... writes:
> > >
> > > > This is the same code that i have and it is still not doing
> > anything
> > > > execpt for showing 1 and 0. the average resistance is 4k
ohms,
> 5k
> > is
> > > > my guess where the number becomes 0
> > >
> > >
> > >
> > > [noparse][[/noparse]Non-text portions of this message have been removed]
you're so frustrated that you're simply "shotgunning" attempts to fix the
problem and are create more issues than solutions.
You will see zero when you unplug the photocell because the capacitor never
charges and the RCTIME timer overflows and returns zero -- this is proper
behavior.
Crack open the manul or current help file and look at the circuit
connections. Use the configuration called "A." In the is configuation. One
side of the cap is connected to Vdd (+5), the other connected to the junction
that is the Stamp IO pin and one side of the resistance. The other side of
the resistance connects to Vss (ground). You really should put a 220 ohm
resistor between the Stamp IO pin and the RC junction. That way, if the
resistance is at or near zero, you won't have a short when discharging the
capacitor with the HIGH pin command.
One more time ... slow down and start over. I could have built 20 version of
this project with my eyes closed between now and your last e-mail. It's
really easy and I promise you're going to feel silly for being so frustrated
(I know, I've been there....).
Grab some fresh parts from your stock and try again. Once you get repeatable
results -- results that you expect, then put your photocell in. BTW, what
size cap are you using? You really should be using a 0.1 uF or 0.01 uF for
the resistance you've specified. If your cap is very big, RCTIME is
overflowing and retuning zero.
-- Jon Williams
-- Parallax
In a message dated 4/27/2003 1:24:22 PM Central Standard Time, vea@v...
writes:
> i tried what you said and the only numbers bow that i see is 4078 and
> with me covering the photocell and not covering it, i still see the
> same number, then i unplug the photocell and i just see 0, so as i
> test, i put in a 4.7k ohm resistor and all i see in the debug is
> 2000, am i also supposed to put in to the ground too? because i also
> just pluged in the pin with the photocell without the ground and it
> still gives me that number. Help please, i really am confused whats
> going on???? Please respond soon. =-) Im going crazy that this is
> happening..
>
>
> oh, i forgot to say, sometimes, which is like 1 out of 100 runs, i
> see numbers go like up to 6000 but then it goes back to 1. i have
> tried that and also i have a bs2 and b.o.e. bread board. also i would
> like to know if i can do a if x >5000 - 8000 then run1..? and also
> about the 10k thermisitor if i can read it the same in the debug
> screen like the photocell. this will help me alot if i can figure out
> the problem soon: why i just see 1 or 0?
>
> waiting to recieve more info...
[noparse][[/noparse]Non-text portions of this message have been removed]
you're using RCTIME as a high speed timer, and you have already specified
that you want to measure a photocell.
OPEN THE MANUAL and use the cirucit (version "A") if you want to measure a
changing resistance (like a photocell under varying light conditions).
-- Jon Williams
-- Parallax
In a message dated 4/27/2003 1:29:30 PM Central Standard Time, vea@v...
writes:
> i dont want to keep bothering you, since i know you know alot. there
> is no capacitor, and i redid my circuits. this is the next message:
> =-(
[noparse][[/noparse]Non-text portions of this message have been removed]