SRF08
Ultra sonic range finder
The SRF08 is an evolutionary step from the
SRF04, developed
to improve on the following features of the SRF04.
The key points are;
1.
The maximum range of 3m can be limiting in some situations.
2. The 36mS timeout + 10mS recharge
is rather long – equivalent to almost 8m on a 3m product.
3.
The SRF04 requires 2 I/O pins per sonar. 32 I/O lines for a 16 sonar
system.
4.
The users host processor is required to time the returning echo
5.
The 50mA maximum current is too high – 800mA for 16 sonar’s.
6.
Only a single returning echo is possible.
7.
The SRF04 can’t see the light (read on)
The 3m limit of the SRF04 is imposed by the need not to have a gain so high that the cross coupling between transmit an receive transducers causes the op-amps saturate at close range. If they did then the system could not tell the difference between the cross coupling and a legitimate returning echo. The SRF08 uses a digital pot to vary the gain as the range increases. This allows a higher overall gain to be set and consequently better range. The Typical range we are seeing on the prototype is 6m and we have had it up to 11m for a large object. This is too sensitive because it detects small close by anomalies in the floor that the robot really ought to ignore. The gain was therefore deliberately reduced to around 6m.
The 36mS timeout of the SRF04 was imposed because the PIC12C508 processor used only has a single timer, and this is used for tone detection of the returning echo. The watchdog timer is used to time out the ranging. This could only be set in increments of 18mS. Whilst 18mS is just enough – about 3m range – it is a “typical” value only and not guaranteed, so the real range could be less depending on ambient temperature and chip tolerances. A further 10mS is specified in order to recharge the +/- 10v supplies for the op-amp and comparator. The max232 IC is switched off during echo timing to reduce noise in the op-amps. With the SRF08 the analog circuit has been changed to a single 5v supply, so the max232 (actually an ST232) does not need to charge up a 22uF capacitor, only the 100n’s. Recharge time now drops to just 600uS and is taken care of by the processor automatically when a new reading is requested. A change of processor from the PIC12C508 to the PIC16F872 means more timers are available and the SRF08 is not stuck with the 36mS watchdog timer. However one of the problems with terminating the ranging early is that the in-flight “ping” does not know this. It quite happily bounces off a far wall and returns. Now if it happens to return just after you have started a new ranging, the sonar will pick up this earlier “ping” and think there is an object much closer than there really is. The SRF08 allows the maximum gain to be limited to reduce this possibility.
The number of I/O lines required by multiple sonar’s has been an issue with some users. There is also a problem which has been identified with the basic stamp, which does not treat all I/O lines equally when timing. When using 16 sonar’s, 32 I/O lines are required. This can be reduced to 17 by gating the 16 echo pulse outputs together with 16 diodes. A further reduction to 6 I/O lines can be achieved by using a 4 to 16 line decoder such as the CD4514B. This involves the user building additional circuitry. The SRF08 uses the I2C interface so all 16 sonar’s can be controlled using just 2 I/O lines. The I2C bus interface is available on popular controllers such as the OOPic, and of course cheap processors such as many of the PIC family.
On the SRF04, the users host processor is required to time the returning echo. This has been an issue when using the Stamp, as it does not treat all I/O lines equally. This is an internal problem with the Stamp and was discovered by Jim Fry of Lynxmotion. The SRF08 does its own internal timing and sends you the result.
The 50mA max. current required by the SRF04, whilst already far better than the 150mA (2.5A peak) of the Polaroid units, has been further reduced to 15mA nominal and around 3mA in standby. The SRF08 automatically goes into standby when it has completed each ranging, and powers up again when it receives the next command.
Because of the way the SRF04 works, only a single echo can be received. After this the module powers up its +/- 10v generators again ready for the next trigger pulse. With the SRF08 multiple echo’s can be received. A buffer stores the first 16 echo’s received. The idea is to be able so see through open doorways where a standard sonar would just see the door frame.
Finally, to make the SRF08 even more
useful, I included a light sensor. This is readable over the I2C bus just as the
sonar data is.
SRF08 Technical Documentation OOPic Example BS2 Stamp Example Schematic Software