tsl230 sensor and pulsin command
Archiver
Posts: 46,084
Hello,
I am using a tsl230 light to frequency sensor fro taosinc.com. I
followed the project for using a BSII to measure light frequency.
Instead of using the count command, I used code similar to
experiment #18 in the stampworks documentation. I used pulsin. My
questions are:
1.) I used a red led to illuminate the sensor with a black tube to
protect from stray light. I used all settings in combination and the
frequency measurement doesn't add up. The red led is 640nm and the
speed of light I used is 3 X 10^8. For the formula f=c/Wavelength.
Red LED 640 nm wavelength from 5 cm distance
S0 S1 S2 S3 Freq(Hz)Period (uSec)
H H H L 62500 8
H H L L 62500 8
H H L H 10860 48
H H H H 1050 476
L H H L 5310 94
L H L L 10860 46
L H L H 1050 472
L H H H 100 4740
Am I doing something wrong? BTW in the code in Experiment #18,
freq = 50000 / period * 20 is this suppose to be *20 or *10.
Because on the next page of the experiment is:
This creates a problem for BASIC Stamp math though, as it can only
deal with 16-bit numbers
(maximum value is 65,535). To fix the formula, we convert 500,000 to
50,000 x 10 and rewrite the
formula like this
frequency = 50,000 / period * 10
Thanks,
Curtis
I am using a tsl230 light to frequency sensor fro taosinc.com. I
followed the project for using a BSII to measure light frequency.
Instead of using the count command, I used code similar to
experiment #18 in the stampworks documentation. I used pulsin. My
questions are:
1.) I used a red led to illuminate the sensor with a black tube to
protect from stray light. I used all settings in combination and the
frequency measurement doesn't add up. The red led is 640nm and the
speed of light I used is 3 X 10^8. For the formula f=c/Wavelength.
Red LED 640 nm wavelength from 5 cm distance
S0 S1 S2 S3 Freq(Hz)Period (uSec)
H H H L 62500 8
H H L L 62500 8
H H L H 10860 48
H H H H 1050 476
L H H L 5310 94
L H L L 10860 46
L H L H 1050 472
L H H H 100 4740
Am I doing something wrong? BTW in the code in Experiment #18,
freq = 50000 / period * 20 is this suppose to be *20 or *10.
Because on the next page of the experiment is:
This creates a problem for BASIC Stamp math though, as it can only
deal with 16-bit numbers
(maximum value is 65,535). To fix the formula, we convert 500,000 to
50,000 x 10 and rewrite the
formula like this
frequency = 50,000 / period * 10
Thanks,
Curtis
Comments
wavelength.
-- Jon Williams
-- Applications Engineer, Parallax
-- Dallas Office
Original Message
From: cenlasoft [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=Mf1aP_TWse8eOQm_qsra9Yt5yLHHDsF54TFMVKlAKZzIJyq9cGCoGcdNpGfitKvIW_DKBjT-kQNLQ7R_j9E]cenlasoft@y...[/url
Sent: Monday, January 19, 2004 9:11 PM
To: basicstamps@yahoogroups.com
Subject: [noparse][[/noparse]basicstamps] tsl230 sensor and pulsin command
Hello,
I am using a tsl230 light to frequency sensor fro taosinc.com. I
followed the project for using a BSII to measure light frequency.
Instead of using the count command, I used code similar to
experiment #18 in the stampworks documentation. I used pulsin. My
questions are:
1.) I used a red led to illuminate the sensor with a black tube to
protect from stray light. I used all settings in combination and the
frequency measurement doesn't add up. The red led is 640nm and the
speed of light I used is 3 X 10^8. For the formula f=c/Wavelength.
Red LED 640 nm wavelength from 5 cm distance
S0 S1 S2 S3 Freq(Hz)Period (uSec)
H H H L 62500 8
H H L L 62500 8
H H L H 10860 48
H H H H 1050 476
L H H L 5310 94
L H L L 10860 46
L H L H 1050 472
L H H H 100 4740
Am I doing something wrong? BTW in the code in Experiment #18,
freq = 50000 / period * 20 is this suppose to be *20 or *10. Because on
the next page of the experiment is:
This creates a problem for BASIC Stamp math though, as it can only
deal with 16-bit numbers
(maximum value is 65,535). To fix the formula, we convert 500,000 to
50,000 x 10 and rewrite the
formula like this
frequency = 50,000 / period * 10
Thanks,
Curtis
outputs frequency it is really measuring intensity.
Then why would I use this sensor for? Are there
examples? Iam sorry for the many questions.
Thanks
Curtis
--- Jon Williams <jwilliams@p...> wrote:
> The frequecny output of that sensor is related to
> light intesity, not
> wavelength.
>
> -- Jon Williams
> -- Applications Engineer, Parallax
> -- Dallas Office
>
>
>
Original Message
> From: cenlasoft [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=uKOgAwBEz2JTjAst0sb3aHW_3SFg8CofhknqcWqrnubLDMubIow5Y_Nt85NUJPv45zzL5MZItj1w]cenlasoft@y...[/url
> Sent: Monday, January 19, 2004 9:11 PM
> To: basicstamps@yahoogroups.com
> Subject: [noparse][[/noparse]basicstamps] tsl230 sensor and pulsin
> command
>
>
> Hello,
> I am using a tsl230 light to frequency sensor fro
> taosinc.com. I
> followed the project for using a BSII to measure
> light frequency.
> Instead of using the count command, I used code
> similar to
> experiment #18 in the stampworks documentation. I
> used pulsin. My
> questions are:
> 1.) I used a red led to illuminate the sensor with a
> black tube to
> protect from stray light. I used all settings in
> combination and the
> frequency measurement doesn't add up. The red led is
> 640nm and the
> speed of light I used is 3 X 10^8. For the formula
> f=c/Wavelength.
> Red LED 640 nm wavelength from 5 cm distance
>
>
> S0 S1 S2 S3 Freq(Hz)Period (uSec)
> H H H L 62500 8
> H H L L 62500 8
> H H L H 10860 48
> H H H H 1050 476
> L H H L 5310 94
> L H L L 10860 46
> L H L H 1050 472
> L H H H 100 4740
>
> Am I doing something wrong? BTW in the code in
> Experiment #18,
> freq = 50000 / period * 20 is this suppose to be *20
> or *10. Because on
> the next page of the experiment is:
>
> This creates a problem for BASIC Stamp math though,
> as it can only
> deal with 16-bit numbers
> (maximum value is 65,535). To fix the formula, we
> convert 500,000 to
> 50,000 x 10 and rewrite the
> formula like this
> frequency = 50,000 / period * 10
> Thanks,
> Curtis
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
> from the same email address that you subscribed.
> Text in the Subject and Body of the message will be
> ignored.
>
>
> Yahoo! Groups Links
>
> To visit your group on the web, go to:
> http://groups.yahoo.com/group/basicstamps/
>
> To unsubscribe from this group, send an email to:
> basicstamps-unsubscribe@yahoogroups.com
>
> Your use of Yahoo! Groups is subject to:
> http://docs.yahoo.com/info/terms/
>
>
__________________________________
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus
identify color, like I did with my little M&M color ID project:
http://www.parallax.com/dl/docs/cols/nv/vol4/col/98.pdf
-- Jon Williams
-- Applications Engineer, Parallax
-- Dallas Office
Original Message
From: Curtis Desselles [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=DKPBc-EZQ_4dWVw_Ak9mvrVADTCng_1yWUmFbXhoPbdq9HVFfmv_HOxUnJFjIi-YMhA5XCF3O0oCEELOxg]cenlasoft@y...[/url
Sent: Monday, January 19, 2004 9:47 PM
To: basicstamps@yahoogroups.com
Subject: RE: [noparse][[/noparse]basicstamps] tsl230 sensor and pulsin command
So what you mean is that when they say the sensor
outputs frequency it is really measuring intensity.
Then why would I use this sensor for? Are there
examples? Iam sorry for the many questions.
Thanks
Curtis