Society of Robots - Robot Forum
Electronics => Electronics => Topic started by: kta 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
-
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?
-
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.
-
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?
-
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 .
-
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
-
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.