Searching \ for '[PIC]:calibrating light sensors with the 16f628 in' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/ios.htm?key=sensor
Search entire site for: 'calibrating light sensors with the 16f628 in'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]:calibrating light sensors with the 16f628 in'
2003\03\01@185954 by Alexander Luis Perez

picon face
I want to have a light seeking robot use
phototransistors in  a voltage dividing circuit and
use the comparators on the 16f628 take the brightest
of the two, but i don't want to constantly adjust a
potentiometer for all the varying light levels.  I
once saw a project that did just that but didn't show
any code for it.  could anyone help me with this?


__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email spam_OUTlistservTakeThisOuTspammitvma.mit.edu with SET PICList DIGEST in the body

2003\03\01@202403 by michael brown

picon face
Alexander Luis Perez wrote:
> I want to have a light seeking robot use
> phototransistors in  a voltage dividing circuit and
> use the comparators on the 16f628 take the brightest
> of the two, but i don't want to constantly adjust a
> potentiometer for all the varying light levels.  I
> once saw a project that did just that but didn't show
> any code for it.  could anyone help me with this?

I just did some tinkering with the comparator module.  ;-)  Tell me more
about how you've designed your control system so far.  I'm curious about
your use of the potentiometer.  Tell me more about what you already have
designed, and how it's connected together.


michael brown

"In the land of the blind, he who has one eye is king"

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email .....listservKILLspamspam@spam@mitvma.mit.edu with SET PICList DIGEST in the body

2003\03\01@211901 by John Pearson

flavicon
face
I don't know if this will apply to your setup or plan, but I did a motion
detector once that used two photo diodes connected to adc. The software
would discount any light changes that occurred simultaneously. Thus, a
changing light level was never a problem. The detector software only looked
for changes that did not occur simutaneously.

John
{Original Message removed}

2003\03\01@213148 by Dwayne Reid

flavicon
face
At 03:59 PM 3/1/03 -0800, Alexander Luis Perez wrote:
>I want to have a light seeking robot use phototransistors in  a voltage
>dividing circuit and
>use the comparators on the 16f628 take the brightest of the two, but i
>don't want to constantly adjust a potentiometer for all the varying light
>levels.  I once saw a project that did just that but didn't show any code
>for it.  could anyone help me with this?

Use the comparitor in the '628.  Here is one method: connect one side of
both photo sensors to +5V.  The other side of each sensor goes to pins RA1
& RA2.  Also connected to pins RA1 & RA2 are pull-down resistors - you will
need to experiment to find the best value but start with 10K.  Set CMCON to
b'00000101'.

To find the best value of resistor for the pull-downs, use a meter between
one of the sensors inputs (RA1 or RA2) and GND.  Pick the resistor so that
in the brightest light you expect to encounter, the voltage is no greater
than about 3.5V.  Now see what the voltage is in the lowest light level you
expect to encounter - it should be greater than about 0.2V.

Depending upon what sensors you are using, the resistor could be as high as
1M or 2M or as low as 1K or 2K.  You just have to experiment.  Use that
value for both resistors.

Now just look at CMCON bit 7.  As one sensor becomes brighter than the
other and vice versa, the state of that bit will change.

Hope this helps.

dwayne

--
Dwayne Reid   <dwaynerspamKILLspamplanet.eon.net>
Trinity Electronics Systems Ltd    Edmonton, AB, CANADA
(780) 489-3199 voice          (780) 487-6397 fax

Celebrating 19 years of Engineering Innovation (1984 - 2003)
 .-.   .-.   .-.   .-.   .-.   .-.   .-.   .-.   .-.   .-
    `-'   `-'   `-'   `-'   `-'   `-'   `-'   `-'   `-'
Do NOT send unsolicited commercial email to this email address.
This message neither grants consent to receive unsolicited
commercial email nor is intended to solicit commercial email.

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email .....listservKILLspamspam.....mitvma.mit.edu with SET PICList DIGEST in the body

2003\03\02@121816 by Alex Perez

flavicon
face
I don't have thie actual light seeking module yet made, but I was basing my worry on what happens with many light seeking BEAM robots and comparator-only based robots.


>Date:         Sat, 1 Mar 2003 18:20:39 -0800
>Reply-To:     pic microcontroller discussion list <EraseMEPICLISTspam_OUTspamTakeThisOuTMITVMA.MIT.EDU>
>From:         John Pearson <xerospamspam_OUTCMC.NET>
>Subject: Re: [PIC]:calibrating light sensors with the 16f628 in c2c
>To:           @spam@PICLISTKILLspamspamMITVMA.MIT.EDU
>
>I don't know if this will apply to your setup or plan, but I did a motion
>detector once that used two photo diodes connected to adc. The software
>would discount any light changes that occurred simultaneously. Thus, a
>changing light level was never a problem. The detector software only looked
>for changes that did not occur simutaneously.
>
>John
>{Original Message removed}

More... (looser matching)
- Last day of these posts
- In 2003 , 2004 only
- Today
- New search...