Product Information
actually capable of. It is possible to reduce the time the SRF08 listens for an echo, and
hence the range, by writing to the range register at location 2. The range can be set in
steps of about 43mm (0.043m or 1.68 inches) up to 11 metres.
The range is ((Range Register x 43mm) + 43mm) so setting the Range Register to 0
(0x00) gives a maximum range of 43mm. Setting the Range Register to 1 (0x01) gives a
maximum range of 86mm. More usefully, 24 (0x18) gives a range of 1 metre and 140
(0x8C) is 6 metres. Setting 255 (0xFF) gives the original 11 metres (255 x 43 + 43 is
11008mm). There are two reasons you may wish to reduce the range.
1. To get at the range information quicker
2. To be able to fire the SRF08 at a faster rate.
If you only wish to get at the range information a bit sooner and will continue to fire the
SRF08 at 65ms of slower, then all will be well. However if you wish to fire the SRF08 at
a faster rate than 65mS, you will definitely need to reduce the gain - see next section.
The range is set to maximum every time the SRF08 is powered-up. If you need a
different range, change it once as part of your system initialization code.
Analogue Gain
The analogue gain register sets the Maximum gain of the analogue stages. To set the
maximum gain, just write one of these values to the gain register at location 1. During a
ranging, the analogue gain starts off at its minimum value of 94. This is increased at
approx. 70uS intervals up to the maximum gain setting, set by register 1. Maximum
possible gain is reached after about 390mm of range. The purpose of providing a limit to
the maximum gain is to allow you to fire the sonar more rapidly than 65mS. Since the
ranging can be very short, a new ranging can be initiated as soon as the previous range
data has been read. A potential hazard with this is that the second ranging may pick up a
distant echo returning from the previous "ping", give a false result of a close by object
when there is none. To reduce this possibility, the maximum gain can be reduced to limit
the modules sensitivity to the weaker distant echo, whilst still able to detect close by
objects. The maximum gain setting is stored only in the CPU's RAM and is initialized to
maximum on power-up, so if you only want do a ranging every 65mS, or longer, you can
ignore the Range and Gain Registers.
Note - Effective in Ranging Mode only, in ANN mode, gain is controlled automatically.
Gain Register
Decimal Hex
Maximum Analogue Gain
0 0x00 Set Maximum Analogue Gain to 94
1 0x01 Set Maximum Analogue Gain to 97
2 0x02 Set Maximum Analogue Gain to 100
3 0x03 Set Maximum Analogue Gain to 103
4 0x04 Set Maximum Analogue Gain to 107
5 0x05 Set Maximum Analogue Gain to 110
6 0x06 Set Maximum Analogue Gain to 114
7 0x07 Set Maximum Analogue Gain to 118
8 0x08 Set Maximum Analogue Gain to 123
9 0x09 Set Maximum Analogue Gain to 128