This is the page for the SRF08 Ultrasonic Ranger, with I2C interface. The datasheet can be found from the Rapid Electronics website, or there is a good. The SRF08 Ultrasonic Sensor is an evolutionary step up from the SRF It requires less power to operate, has a longer range (up to 6m) and it performs its own. [an error occurred while processing this directive]. SRF08 Ultra sonic range finder . Technical Specification. Communication with the SRF08 ultrasonic.

Author: Yozshubei Sharn
Country: Kosovo
Language: English (Spanish)
Genre: Science
Published (Last): 23 January 2005
Pages: 41
PDF File Size: 16.7 Mb
ePub File Size: 3.66 Mb
ISBN: 549-9-73124-616-3
Downloads: 95364
Price: Free* [*Free Regsitration Required]
Uploader: Faerisar

This is available on popular controllers such as the OOPic and Stamp BS2p, as well as a wide variety of micro-controllers. To the programmer the SRF08 behaves in the same way as the ubiquitous 24xx series eeprom’s, except that the I2C address is different.

The default shipped address of the SRF08 is 0xE0. Rsf08 addition to the above addresses, all sonar’s on the I2C bus will respond to address 0 – the General Broadcast address. This means that writing a ranging command to I2C address 0 0x00 will start all sonar’s ranging at the same time. The results must be read individually from each sonar’s real address. We have examples of using the SRF08 module with a wide range of popular controllers. Connections The “Do Not Connect” pin should be left unconnected.

You only need one pair of resistors, not a pair for every module. They are normally located with the bus master rather than the slaves. The SRF08 is always a slave – never a bus master. If you need them, I recommend 1. Some modules such as the OOPic already have pull-up resistors xatasheet you do not need to add any more.

(PDF) SRF08 Datasheet download

Location 0 is the command register and is used to start a ranging session. It cannot be read. Reading from location 0 returns the SRF08 software revision. By default, the ranging lasts for 65mS, but can be changed by writing to the range register at location 2. If you do so, then you will likely need to change the analogue gain by writing to location 1. See the Changing Range and Analogue Gain sections below. Location 1 is the onboard light sensor. This data is updated every time a new ranging command has completed and can be read when range data is read.

The next two locations, 2 and dataheet, are the 16bit dtaasheet result from the latest ranging – high byte first. The meaning of this value depends on the command used, and is srd08 the range in inches, or the range in cm or the flight time in uS. A value of zero indicates that no objects were detected. There are up to a further 16 results indicating echo’s from more distant objects. Commands The are three commands to initiate a ranging 80 to 82to return the result in inches, centimeters or microseconds.

Ranging Mode To initiate a ranging, write one of the above commands to the command register and wait the required amount of time for completion datashret read as many results as you dagasheet. The echo buffer datashet cleared at the start of each ranging.

The first echo range is placed in locations 2,3. If a location high and low bytes is 0, then there will be no further reading in the satasheet of the registers. The default and recommended time for completion of ranging is 65mS, however you can shorten this by writing to the range register before issuing a ranging command.


Light sensor data at location 1 will also have been updated after a ranging command. ANN mode provides a 32 byte buffer locations 4 to srff08 inclusive where each byte represents the uS maximum flight time divided into 32 chunks of uS each – equivalent to about mm of range.

If an echo is received within a bytes time slot then it will be set to no-zero, otherwise it datasheef be zero. So if an echo is received from within the first mm, location 4 will be non-zero. Arranging the data like this should be better for a neural net datashset the other formats. The input to your network should be 0 if the byte is zero and 1 if its non-zero. Locations 2,3 contain the range of the nearest object converted to inches, cm or uS and is the same as for Ranging Mode. Checking for Completion of Ranging You do not have to use a timer srf80 your own controller to wait for ranging to finish.

You can take advantage of the fact that the SRF08 will not respond to any I2C activity whilst ranging. Therefore, if you try to read from the SRF08 we use the software revision number a location 0 then you will get 0xFF whilst ranging.

Dxtasheet soon as the ranging is complete the SRF08 will again respond to the I2C bus, so just keep reading the register until its not 0xFF anymore. You can then read the sonar data. Your controller can take advantage of this to perform other tasks while the SRF08 is ranging.

By default, this is 65mS or the equivalent of 11 metres of range. It is possible to reduce the datashedt 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. Setting the Range Register to 1 0x01 gives a maximum range of 86mm.

SRF08 – High Performance Ultrasonic Range Finder

More usefully, 24 0x18 gives a range of 1 metre and 0x8C is 6 metres. There are two reasons you may wish to reduce the range. 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 This is increased at approx. Maximum possible gain is reached after about mm 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 that the relationship between the Gain Register setting and the actual gain is not a linear one. Also there is no magic formula to say “use this gain setting with that range setting”.

It depends on the size, shape and material of the object and what else is around in the room. Try playing with different settings until you get the result you want. If you appear to get false readings, it may be echo’s from previous “pings”, try going back to firing the SRF08 every 65mS or longer slower.

If you are in any doubt about the Range and Gain Registers, remember they are automatically set by the SRF08 to their default values when it is powered-up. You can ignore and forget about them and the SRF08 will datsheet fine, detecting objects up to 6 metres away every 65mS or slower.

The reading increases as the brightness increases, so you will get a maximum value in bright light and minimum value in darkness. It should get close to in complete darkness and up to about 0xF8 in bright light. It also gives a brief flash during the “ping” whilst ranging. Write the 3 sequence commands in the correct order followed by the address.

Srv08 to change the address of a sonar currently at 0xE0 the default shipped address to 0xF2, write the following to address 0xE0; 0xA0, 0xAA, 0xA5, 0xF2. These commands must be sent in the correct sequence to change the I2C address, additionally, No other command may be issued in the middle of the sequence. The sequence must be sent to the command register at location 0, which means 4 separate write transactions on the I2C bus.

When done, you should label the sonar with its address, however if you do forget, just power it up without sending any commands. One long flash followed by a number of shorter flashes indicating its address. The flashing is terminated immediately on sending a command the SRF Take care not to set more than one sonar to the same address, there will be a bus collision and very unpredictable results. Current Consumption Average current consumption measured on our prototype is around 12mA during ranging, and 3mA standby.

The module will automatically go to standby mode after a ranging, whilst waiting for a new command on the I2C bus. vatasheet

Arduino Playground – SonarSrf08

The actual measured current profile is as follows. Changing beam pattern and beam width You can’t! This is a question which crops up regularly, however there is no easy way to reduce or change the beam width that I’m aware of. The beam pattern of the SRF08 is conical rsf08 the width of the beam being a function of the surface area of the transducers and is fixed.

The beam pattern of the transducers used on the SRF08, taken from the manufacturers data sheet, is shown below.

There is more information dataseet the sonar faq. Location 4 Location 5 Location 6 Location 7 Locations 8 – 35 0 – mm – mm – mm – mm and so on.