Society of Robots - Robot Forum
Electronics => Electronics => Topic started by: galannthegreat on January 27, 2009, 10:17:13 PM
-
I need help in deciding what type of sensor to choose and how i should use it on, basically, my first robot project.
-
Hi,
That cannot be answered without knowing what you want to sense!
(A humidity sensor is no good if you want to sense color)
-
ah good point, sorry. Just generally speaking an object sensor for object avoidance.
-
Sharp IR is the best object avoidance sensor for a beginner.
-
I usually see that sensor with a servo attached to it, how would I do that with a PIC 16F877a? I know how the sensor hooks up but how would i get the servo to scan back and forth?
-
16F877 source code + examples of sharp IR on a servo:
http://www.societyofrobots.com/robot_hyper_squirrel.shtml
http://www.societyofrobots.com/robot_omni_wheel.shtml
-
thank you very much :)
-
on another note, how would i connect the servo to the MCU?
-
I believe you need to search before asking :P
(read the servo tutorial)
-
now, in your own expierience did it help to pull the signal of the servo high or low by default? and should i do the same with the sharp module or is there one built in?
-
can someone help me out with this i plainly need to connect these things to my PIC MCU on my own homemade board.
thanks
-
Neither the servo nor the sharp ir need pulling low by default. If you use a servo correctly then the signal wire is constantly being altered. The sharp ir signal wire is an output wire so you shouldnt be controlling it at all, it just contains a varying voltage.
can someone help me out with this i plainly need to connect these things to my PIC MCU on my own homemade board.
Do you mean how do you physically connect them ? if so then well need to see a picture of youre board
or do you mean where to connect them on the PIC? this depends on which port you want them on. The sharp ir signal wire wants to connect to the portA0 pin most likely (being the first analog pin). The servo signal wire wants to connect to a general i/o port like portD0.
-
Thank you, that is exactly what i wanted to know. I just needed the bits to connect them too.