RCtime problem (it is a very strange problem!! )
Joe
Posts: 184
Hi,
I am reading some values using the Photoresistor and a 470 Ohm resistor and
a 104 condenser and a red Led. All the hardware is into a black box ( without any kind of external light)
because I add a red Led into the black box.
The problem I have is that the W2 variable started at 18500
and after minutes is 19600 and the number is increasing the value
even now ( it is night ) , the value is now 22500.
( I am sure that any kind of external light is coming into the black box)
All the circuit have been made to keep always the same value
but I don't know why W2 is bigger each time.
It is the second time that I have the same problem.
I changed all the components and I have the same problem !!
The rutine is very simple:
HIGH 7
PAUSE 100
RCTIME 7, 1, W2
DEBUG ? W2
I don't understand the problem !!!
do you know?
Thanks, Joe
I am reading some values using the Photoresistor and a 470 Ohm resistor and
a 104 condenser and a red Led. All the hardware is into a black box ( without any kind of external light)
because I add a red Led into the black box.
The problem I have is that the W2 variable started at 18500
and after minutes is 19600 and the number is increasing the value
even now ( it is night ) , the value is now 22500.
( I am sure that any kind of external light is coming into the black box)
All the circuit have been made to keep always the same value
but I don't know why W2 is bigger each time.
It is the second time that I have the same problem.
I changed all the components and I have the same problem !!
The rutine is very simple:
HIGH 7
PAUSE 100
RCTIME 7, 1, W2
DEBUG ? W2
I don't understand the problem !!!
do you know?
Thanks, Joe
Comments
·
·· Try changing your PAUSE to 1 instead of 100.· Also, I would recommend declaring a variable name rather than trying to use the W2 register directly.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
I am using pause 1 instead of 100 and it seems the problem is solved
(Thanks)
I will continue monitoring the numbers.
All the numbers are about 1500 instead of 18500
but it seems they are moving between 1495 and 1505
but they are not moving over 1505.
Do you know what was happened?
Thanks, Joe
PS: I am still using the "W2" (word variables yet )
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
·
·· Well the deviation of the numbers is to be expected…The values you’re posting now are typical…It’s due to tolerance of the components.· As for what was happening before, you had to long of a PAUSE causing the capacitor to charge 100 times longer than what it should be.· Due to component tolerances I could see that being the main part of the problem, although I have never tried to recreate it.· In any event I’m glad you got it working.· Take care.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
The result of changing from PAUSE 100 to PAUSE 1 suprises me. It makes me wonder how you have this wired up. Could you post a schematic?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
Remember the capacitor temperature rating also affects the time constant, a z5u rated cap acts almost like a thermistor using capacitance instead of resistance with a +22%, -56% change over temperature.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Think Inside the box first and if that doesn't work..
Re-arrange what's inside the box then...
Think outside the BOX!
My point is this - fans in computers try to keep things cool. What you are experiance is excess heat.
Think of it like a toaster.