Author Topic: problem with infrared sensor output  (Read 11072 times)

0 Members and 1 Guest are viewing this topic.

Offline jhonilsonTopic starter

  • Jr. Member
  • **
  • Posts: 23
  • Helpful? 0
problem with infrared sensor output
« on: June 20, 2008, 10:00:32 AM »
  HI. I make a ir sensor very similar to http://www.societyofrobots.com/schematics_infraredemitdet.shtml
but.... i have a problem, i want to send the output from the phototransistor to my microcontroller (pic16f84a) but it no read the sign..!!!
   
   I see in the web other configurations, for example, they use a operational amplifiiers  or comparators. My questions is This is 100% necesary for my  microcontroller work?
  Other person recommend me to use a 7414 integrated (http://lorien.die.upm.es/~macias/docencia/datasheets/ds/7414.pdf) because i will not need to use resistors or other components.
 
   But is really necesary to use other components in phototransistor output??  You know other way more easy or cheap??

   Thank you

Offline izua

  • Supreme Robot
  • *****
  • Posts: 682
  • Helpful? 0
    • izua electronics
Re: problem with infrared sensor output
« Reply #1 on: June 20, 2008, 11:20:56 AM »
A phototransistor is an analog device (or anyway, to measure several values, you need to use it as an analog device).
A microcontroller is a digital device.
You need an analog to digital converter. 16F84 doesn't have one, and there is nothing you can do about it. Either add a seperate ADC or get a better chip (16f625).

There's also the option of measuring charge times, without using any ADCs but that's more complicated.
« Last Edit: June 20, 2008, 11:21:31 AM by izua »
Check out my homepage for in depth tutorials on microcontrollers and electronics.

Offline jhonilsonTopic starter

  • Jr. Member
  • **
  • Posts: 23
  • Helpful? 0
Re: problem with infrared sensor output
« Reply #2 on: June 20, 2008, 11:41:03 AM »
    Then i suppose i will must to use comparators or amplififiers anyway?
   
    What recommend you comparators or amplifiers?? 

    I have lm324 but in the tutorial appear lm358.not problems if i use lm324??

    Thank you very much

Offline izua

  • Supreme Robot
  • *****
  • Posts: 682
  • Helpful? 0
    • izua electronics
Re: problem with infrared sensor output
« Reply #3 on: June 20, 2008, 03:43:16 PM »
revise your grammar and topic. i have trouble understanding your sentences, and i'm sure others have too. it's your best interest, not mine.

anyway. you don't need a comparator, unless you want a yes/no output.
if you want a range of values, as presented in admin's tutorial, you need an adc. An ADC, not a comparator, nor an opam.
even if you use lm358, lm324, or even a basic 741, you still need an adc to transform the voltage into a binary representation.
opamps are usually interchangable, if you replace something bad with something good (higher slew rate, more bandwidth, etc)
Check out my homepage for in depth tutorials on microcontrollers and electronics.

Offline jhonilsonTopic starter

  • Jr. Member
  • **
  • Posts: 23
  • Helpful? 0
Re: problem with infrared sensor output
« Reply #4 on: June 20, 2008, 05:02:29 PM »
   Sorry for my bad english, I am not from USA.

   Please see these links

http://usuarios.lycos.es/ccencho/Fotos/circuito_1.jpg

http://r-luis.xbot.es/sensores/ir.html

I think not to use other microcontroller. I need to use 5 ir sensors and the microcontrollers have one pin ADC converter only, i believe.

Thanks for all


Offline izua

  • Supreme Robot
  • *****
  • Posts: 682
  • Helpful? 0
    • izua electronics
Re: problem with infrared sensor output
« Reply #5 on: June 20, 2008, 06:23:12 PM »
I'm sorry then. Just use the spellchecker, at least, and select the correct word :P
The schematic in the first link doesn't have any infrared sensors. Those are leds.
I think I understand what you are trying to do. You want to decode an infrared signal from a remote control.
I wouldn't recommend the method described in the second link - it has now frequency filtering, so it can catch a lot of noise.

Because you are using the IR sensor in a digital manner, I'd advise you to use coupled nand gates or schmitt triggers for buffering (40xx family). Using an opamp in comparator mode might work, but be sure it has rail to rail outputs.
Check out my homepage for in depth tutorials on microcontrollers and electronics.

Offline izua

  • Supreme Robot
  • *****
  • Posts: 682
  • Helpful? 0
    • izua electronics
Re: problem with infrared sensor output
« Reply #6 on: June 20, 2008, 06:26:20 PM »
Oh, btw, PIC16F84/A has no peripherals except an 8bit timer.
Its most direct replacment, pin and (mostly) code compatible is the one mentioned above, 16f628.
Check out my homepage for in depth tutorials on microcontrollers and electronics.

Offline jhonilsonTopic starter

  • Jr. Member
  • **
  • Posts: 23
  • Helpful? 0
Re: problem with infrared sensor output
« Reply #7 on: June 21, 2008, 11:00:23 AM »
   Gracias.
    I will try with hef40106 schmitt trigger. Similar to the second link.
     I want not to make a remote control, i want to build a follower line robot.!!!

Offline izua

  • Supreme Robot
  • *****
  • Posts: 682
  • Helpful? 0
    • izua electronics
Re: problem with infrared sensor output
« Reply #8 on: June 21, 2008, 01:02:58 PM »
then you will need an analog type of sensing.
it's not a good idea to use a hardware decision method, you will need to be able to make this decision happen in the microcontroller.

i'd suggest the tutorial section.
there's a photovore (light seeker) robot that can be built cheap, and i think someone else has posted some code around for a cheaper robot that can follow lines and/or light.
Check out my homepage for in depth tutorials on microcontrollers and electronics.

 


data_list