Author Topic: Infrared sensor to input servo controller  (Read 4739 times)

0 Members and 1 Guest are viewing this topic.

Offline ktaTopic starter

  • Beginner
  • *
  • Posts: 3
  • Helpful? 0
Infrared sensor to input servo controller
« on: September 23, 2008, 11:41:30 PM »
Hi ,i'm Catalin from Romania and  i'm new on this forum , very nice job boys! I  would like to ask if i can get some help  with a servo controller that works depending on input signal from a IR sensor.I want to use it like a head  for my 6 legged insect . I have allready  build the  IR sensor  with a conventional ne555 and it works fine. Now i want to mount it on a servo, buit i need schematics and code for it. If it's possible i would like to build all this wiith PIC 16f84 controller.
Thank you 

Offline izua

  • Supreme Robot
  • *****
  • Posts: 682
  • Helpful? 0
    • izua electronics
Re: Infrared sensor to input servo controller
« Reply #1 on: September 24, 2008, 12:22:48 AM »
neaţa.

PIC16F84 is outdated, IMO. It's direct replacement, 16F628 is cheaper and has more capabilities (ADC, several timers, PWM stages).
I'm not exactly sure how you use an infrared sensor and a 555. Perhaps you're talking about an infrared receiver?
What kind of signal should it receive? A digital one, or just averaged reflectivity?
Check out my homepage for in depth tutorials on microcontrollers and electronics.

Offline ktaTopic starter

  • Beginner
  • *
  • Posts: 3
  • Helpful? 0
Re: Infrared sensor to input servo controller
« Reply #2 on: September 24, 2008, 11:26:10 AM »
It is not about sensor..it's work fine ,the 555 timer in the circuit is used to modulate the infrared LED
at  38-40 kHZ  ...i'm just looking the servo controller cicuit to use the signal from sensor.

Offline izua

  • Supreme Robot
  • *****
  • Posts: 682
  • Helpful? 0
    • izua electronics
Re: Infrared sensor to input servo controller
« Reply #3 on: September 24, 2008, 12:24:43 PM »
Dude, you're not making any sense.

We know absolutely nothing about your sensor or the signal it receives, the 555, or the signal that your sensor is modulating.
A servo needs a signal between 1 and 2 ms. 38kHZ has a higher period (26.3 us).

What are you trying to achieve? Wireless control of a servo? Detecting reflectivity and moving the servos according to a ground pattern?
Check out my homepage for in depth tutorials on microcontrollers and electronics.

Offline ktaTopic starter

  • Beginner
  • *
  • Posts: 3
  • Helpful? 0
Re: Infrared sensor to input servo controller
« Reply #4 on: September 24, 2008, 02:09:33 PM »
yes ,  detecting reflectivity and moving  1 servo left and right(depending on the reflectivity  result of sensor output) , and all this  with 1 PIC  microcontroler  and  input signal  from sensor. The output signal of sensor it's  2.5V when an object is in front of it , and  5V when the sensor do not dectect anything. All that i need it's seems to be like        http://www.societyofrobots.com/robot_50_robot_sharpIR.shtml    where on the top of the servo is mountig a sharpIR , but instead of sharpIR i want to use my  IR sensor .

Offline izua

  • Supreme Robot
  • *****
  • Posts: 682
  • Helpful? 0
    • izua electronics
Re: Infrared sensor to input servo controller
« Reply #5 on: September 24, 2008, 05:36:39 PM »
Well, for starters, I'd change the PIC. 16F84 has no ADC, so there's little way to read that analog value (unless you try the capacitative one, which IMO takes a lot of cycles). 16F628 is the direct, cheaper, replacment. If you're much into pics, go with 16F877A. If not, just switch to AVR.

Next, I'd start using that IC to get a signal from my sensor. What language are you using? Some have a very easy learn curve, while beeing inefficient overall (oshonsoft pic compiler for example, allows you to do an adc reading with a single instruction). Others implement a standardised langauge (such as C) and thus make it harder for you to do a reading (actually, you have to read the datasheet, to find out how it's made), but allow a great deal of flexibility.

Generating a servo signal is easy, I assume you've already done that, since you can already move your insect (personally, I'd like to see it, since I'm a big fan of multilegged stuff). All that's left now is integrating the ADC value over a period of time, to reduce noise, and use that figure to drive some logic. This logic will then create motion profiles and actuate them in the servo/servos
Check out my homepage for in depth tutorials on microcontrollers and electronics.

Offline izua

  • Supreme Robot
  • *****
  • Posts: 682
  • Helpful? 0
    • izua electronics
Re: Infrared sensor to input servo controller
« Reply #6 on: September 24, 2008, 05:40:39 PM »
I just remembered. you do know that the $50 robot has several sensor inputs, and sends its outputs to hacked servos (which, although behave differently, require the same signal as a normal one). Only difference - those are photoresistors in a voltage dividier configuration, while you have your own sensor, but to an ADC channel, this makes no difference.
Check out my homepage for in depth tutorials on microcontrollers and electronics.

 

SMF spam blocked by CleanTalk