Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: galannthegreat on January 27, 2009, 10:17:13 PM

Title: What is the best general sensor?
Post 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.
Title: Re: What is the best general sensor?
Post by: Soeren on January 27, 2009, 10:52:48 PM
Hi,

That cannot be answered without knowing what you want to sense!
(A humidity sensor is no good if you want to sense color)
Title: Re: What is the best general sensor?
Post by: galannthegreat on January 27, 2009, 11:04:22 PM
ah good point, sorry. Just generally speaking an object sensor for object avoidance.
Title: Re: What is the best general sensor?
Post by: Admin on January 28, 2009, 05:37:28 AM
Sharp IR is the best object avoidance sensor for a beginner.
Title: Re: What is the best general sensor?
Post by: galannthegreat on January 28, 2009, 10:53:02 AM
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?
Title: Re: What is the best general sensor?
Post by: Admin on January 28, 2009, 11:05:08 AM
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
Title: Re: What is the best general sensor?
Post by: galannthegreat on January 28, 2009, 11:07:30 AM
thank you very much :)
Title: Re: What is the best general sensor?
Post by: galannthegreat on January 28, 2009, 11:48:48 AM
on another note, how would i connect the servo to the MCU?
Title: Re: What is the best general sensor?
Post by: Admin on January 28, 2009, 12:01:33 PM
I believe you need to search before asking :P

(read the servo tutorial)
Title: Re: What is the best general sensor?
Post by: galannthegreat on January 28, 2009, 05:03:58 PM
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?
Title: Re: What is the best general sensor?
Post by: galannthegreat on January 28, 2009, 10:47:14 PM
can someone help me out with this i plainly need to connect these things to my PIC MCU on my own homemade board.

thanks
Title: Re: What is the best general sensor?
Post by: paulstreats on January 29, 2009, 11:07:10 AM
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.

Quote
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.
Title: Re: What is the best general sensor?
Post by: galannthegreat on January 29, 2009, 12:06:07 PM
Thank you, that is exactly what i wanted to know. I just needed the bits to connect them too.