photodiode

Status
Not open for further replies.

UnD3aD

New Member
hi
i want to make a line follower with pic16f84...
i use photodiodes for detecting the line... but i d'ont understand how can i capture with the pic the voltage that came out from the photodiodes... can you explain it to me?

tnx
 
You may have to uas an Analog to Digital converter converter as the F84 doesnt have one , but other inexpensive models do have an A/D converter..
 
UnD3aD said:
hi
i want to make a line follower with pic16f84...
i use photodiodes for detecting the line... but i d'ont understand how can i capture with the pic the voltage that came out from the photodiodes... can you explain it to me?

As williB has already mentioned, the 84 isn't a good choice, it's also obselete, and you should use a modern PIC instead. The 16F819 and 16F88 are pin compatible, and have internal analogue to digital converters.

However, for line following you can easily do without analogue inputs, use comparators to generate a switching signal from the photodiodes, you can make the other input of the comparator adjustable so you get a reliable switching signal from the line detection.

If you use the 16F628 (the 84's direct replacement), it already has internal comparators, and an analogue output for use with the comparators.
 
i bought today a LM2901 comparator... and it works.... but the output voltage is not the V+, it is <1V
why?
 

Attachments

  • scheme.jpg
    12.9 KB · Views: 1,514
UnD3aD said:
i bought today a LM2901 comparator... and it works.... but the output voltage is not the V+, it is <1V
why?

That circuit seems lacking in many of the essential components, I wouldn't expect it to work at all!.
 
comparators typically have open-drain outputs. that is, for a low output, they pull it to ground normally, but for a high output, they act as an open-circuit. you need to use a pull-up resistor with it most likely.
 
Eh UnD3aD,
It looks like you haven't had much to do with opamps or the like here is a link to some tutorials, I find them very informative and I always refer back to them when I don't know where to go next in my designs
**broken link removed**

Cheers Bryan1
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…