I don’t know much about the different FR0’s but I can say the Ping 3-pin will not work with a picaxe. The 3 pin is for a Stamp board and one pin is used for both input signal and output as well. The picaxe uses 2 different pins for I and O -thus 4 wires. Other than that the FR05 seems to be the standard everywhere.
ERHM - The Ping SHOULD work with the Picaxe, I am PRETTY sure!
Pretty - I did post you some on this somewhere, Chris, no?
BUT… I agree - do not do the 3-pin - alone for the fact that it is not as good a solution; Harder to code, not as fast result, only a solution if you have less ins / outs and want to spare one.
In terms of the 3 pin and 4 pin… the problem I ran into is that the 3-pin uses a single pin for input and output. The stamp controller, it seems, has pin that allows for rapid toggle between I and O. The “ping” unit is “stamp” brand after all. When I say it didn’t work with a picaxe, is not to say it won’t but from what I am seeing you would have to use 2 channels with diodes so the output pulse would not get sent directly to the input pin of the picaxe. I guess the 08m would do it on one channel if it could toggle from I/O fast enough. I dunno… for me, I would rather just get the propper accessory and spend time coding instead of having to MacGyver for a night to get it to work. In conclusion, I am wicked new at all this, just lettin’ ya’ll know what I think I know.
There are plenty of pins on thePicaxes that can be used for both out and in. With the smaller Picaxes this is very common to use because you have so few pins - which is also why the SRF05 when shipped from picaxe comes with instructions on how to use it with only 3 pins… I think I wrote this to you, no?
I’ve successfully used a PING on an Arduino too. Here was my code for that:
#define SONAR_PIN 9
unsigned long ping() { pinMode(SONAR_PIN, OUTPUT); // Switch signalpin to output digitalWrite(SONAR_PIN, LOW); // Send 0-1-0 pulse to trigger PING delayMicroseconds(2); // Wait for 2 microseconds digitalWrite(SONAR_PIN, HIGH); // Send high pulse delayMicroseconds(5); // Wait for 5 microseconds digitalWrite(SONAR_PIN, LOW); // Go back to low pinMode(SONAR_PIN, INPUT); // Switch signalpin to input digitalWrite(SONAR_PIN, HIGH); // Turn on pullup resistor unsigned long echo = pulseIn(SONAR_PIN, HIGH); //Listen for echo unsigned long sonar_value = (echo / 58.138) * .39; //convert to CM then to inches return sonar_value; } // unsigned long ping()
I had no problems with response time, I think switching between input and output happens pretty fast.
So, basicly the are made for diferente proposes, as u can find here, the SRF04
Sensor
Communication
Range
Angle*
Echoes**
Ranging Time
Notes
Minimum
Maximum
SRF02
I2C / Serial
15 cm
6 m
45°
One
70 ms
A
SRF04
Digital
3 cm
3 m
45°
One
100 μs - 36 ms
SRF05
Digital
3 cm
4 m
45°
One
100 μs - 36 ms
SRF08
I2C
3 cm
6 m
45°
17
65 ms
B C
SRF10
I2C
3 cm
6 m
60°
One
65 ms
A B
SRF235
I2C
10 cm
1.2 m
15°
One
10 ms
A D
*: Approximate angle of the sensor cone at 1/2 sensor range (see diagram above). **: The number of echoes recorded by the sensor. These are the recorded echoes from the most recent reading, and are overwritten with each new ranging. A: These sensors are smaller than the typical (SRF 04 / 05 / 08) size. B: Range time can be adjusted down by adjusting the gain. C: This sensor also includes a photocell on the front for light detection.
About the PICAXE 28x1, i never used it, sory can’t help you on this!