Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Problem with color sensor not working when attached to a PIC

Status
Not open for further replies.

gryfbell

Newbie level 3
Joined
Aug 9, 2010
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
philippines
Activity points
1,308
i have been working over my project for quite sometimes..while working on it, i've notice some discrepancies..during the individual testing of the components, the color sensor was working quite well, but when i attach it to the PIC or the microcontroller, the sensor won't work at all..i was wondering the there is a possible mismatch between the hardware and the program...i programmed the code on PIC SIMULATOR IDE..
 

Re: color sensor

better post your interface diagram.
 

color sensor

provide the details:
type of sensor (manufacturer)
how wr you doing the connection bw the two
are you using just turn on and read code?
 

Re: color sensor

66_1281377046.jpg


here's the schematic diagram of the color sensor..i got it from the internet...
i use an LDR in place of the photocell..
 

color sensor

Have you tested you PIC analog input with a simple potentiometer? I suspect your settings are not correct for the PIC ADC.

Keith.
 

color sensor

What is the type of pic you are using? Does it accept analog inputs? If no than you have to use an external ADC
 

color sensor

which voltage values do you have? (from 0v to 1v or from 0 v to 5v or else???)

i think 33k is too high... maybe you need to set an amplifier or buffer to decrease the impedance... (in most pics it should be lower than 10k, for adc input... )
 

Re: color sensor

gryfbell said:
i have been working over my project for quite sometimes..while working on it, i've notice some discrepancies..during the individual testing of the components, the color sensor was working quite well, but when i attach it to the PIC or the microcontroller, the sensor won't work at all..i was wondering the there is a possible mismatch between the hardware and the program...i programmed the code on PIC SIMULATOR IDE..

simply go here you will find all stuff along with code example which can be easily transfer to pic

**broken link removed**


**broken link removed**

regards
Fragrance
 

Re: color sensor

@keith:i haven't tested it yet, since when i retry the sensors, i was able to get some analog values..but i still have some problems regarding ADC..when i am going to use ADC, the sensors on PORTE and the motors connected on PORTC aren't working well..i don't know what's the possible cause..

@pakitos:i am using 40-pins PIC16f877a which has an internal ADC..
 

color sensor

It sounds like your opto circuit isn't the problem - you need to sort out the PIC port and ADC driving first.

Keith.
 


Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top