Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: MaltiK on December 07, 2008, 08:10:46 PM

Title: How do you make an SRF05 act as a Ping)))?
Post by: MaltiK on December 07, 2008, 08:10:46 PM
I know it is possible, in fact I remember someone saying if you ground the "no connection"/ "mode" pin they will act the same way. I dont know if that is true, can someone confirm this?
I want the SRF05 to be 3-pinned, can I make one pin be I+O?
Would I have to change code than if it were PING-Based?
Title: Re: How do you make an SRF05 act as a Ping)))?
Post by: Ro-Bot-X on December 07, 2008, 09:05:18 PM
Quote
A new operating mode (tying the mode pin to ground) allows the SRF05 to use a single pin for both trigger and echo, thereby saving valuable pins on your controller. When the mode pin is left unconnected, the SRF05 operates with separate trigger and echo pins, like the SRF04.

Voltage: 5V only Required
Low Current: 4 mA Typical!
Frequency: 40 KHz
Maximum Range: 4 meters (~13 ft.)
Minimum Range: 1 cm (<1/2")
Modes: Single pin for trig/echo or 2 Pin SRF04 compatible.
Input Trigger: 10 uSec min. TTL level pulse
Echo Pulse: Positive TTL level signal, width proportional to range
Size: 1.69 x 0.79 x 0.67 in.
43 x 20 x 17 mm

Title: Re: How do you make an SRF05 act as a Ping)))?
Post by: MaltiK on December 08, 2008, 05:25:30 AM
so then which pin will be the designated I/O pin?, so I can use only 3 pins thru this strat?

So I should disregard the regular GND pin, and GND the Mode pin instead, and only use one of the Trigger/Echo pins? Does it matter which one?
Also is the code any different than it would be if it were a Ping)))?
Title: Re: How do you make an SRF05 act as a Ping)))?
Post by: Ro-Bot-X on December 08, 2008, 06:36:13 AM
You tie BOTH GND and Mode pins to GND.
You use the Trigger pin to do both functions.
You look at the specs I quote for you in the last post and see there is a little difference in the trigger timing. This sensor needs at least 10us trigger signal, the Ping needs at least 3us trigger signal, typical 5us. So you adjust the code acordingly.

More info here: http://www.robot-electronics.co.uk/htm/srf05tech.htm (http://www.robot-electronics.co.uk/htm/srf05tech.htm)
Title: Re: How do you make an SRF05 act as a Ping)))?
Post by: MaltiK on December 08, 2008, 07:52:04 AM
So I will need a Y-Harness for the GND and Mode pins if I want only 3 pins, and I will not connect anything to the Echo pin.