Problem with PIC18 ADC port

Thread Starter

arthurprs

Joined Apr 16, 2011
2
Hello everyone

I'm testing the following circuit for a line follower robot.



I have set up the PIC to power a LED on port C0 when the voltage over the 100k resistor goes above 3.91V (collected with port A0)

For some reason the LED is always ON, with or without a white surface in front of the sensor!

When I connect my multimeter to check the voltage over the 100K resistor, my LED turns off as previously expected... I can confirm the reason with the multimeter, the voltage is ~2V.
With the multimeter connected it works as expected. If I put a white surface in front of the emitter and photo-diode the uC lights the LED in C0.

What I'm missing? Thanks.
 

Thread Starter

arthurprs

Joined Apr 16, 2011
2
I definitely need better tools, my multimeter set to read up to 5Vdc have only 20K internal impedance! So my 100k resistor was way higher than I needed (I calculated its value using the multimeter...). I replaced the 100K with a 2x10K in series and it worked fine.
 

thatoneguy

Joined Feb 19, 2009
6,359
You can get a decent DMM from harbor freight for $3.

They aren't the most perfect, but have high input impedance and acceptable accuracy for these tasks.

If you plan on being in the hobby for a long time, I'd suggest a Fluke 87-III or 87V from eBay.

There are many meters in between with varying accuracy and price.
 
Top