Showing posts with label ultrasonic. Show all posts
Showing posts with label ultrasonic. Show all posts

Sunday, August 24, 2014

SRF02 ultrasonic sensor with STM32F4-Discovery

This blog has been moved: http://scholtyssek.org/blog/2014/08/24/srf02-ultrasonic-sensor-with-stm32f4-discovery/

The SRF02 Ultrasonic range finder is a ultrasonic distance sensor, which is a transceiver with only one membrane. That's practical, because the sensor is very small and so it is perfect for small sized hardware applications. It detects distances from 16 to 6000 cm. The Sensors needs a 5 V source, so it can be directly connected to many microcontroller. It communicates through serial interface or through i²c bus (also I2C bus called). The following article describes how to connect and use the sensor with a STM32F4 through I2C. The databus is very handy because it needs only two wires (SDA and SCL) for communication. SDA is the data wire and SCL is the clock. Components can be distinguished by a unique I2c address. In this example there are four SRF02 sensors on one bus. The configuration of the address will be described too. The I2C master is a ARM based STM32F4-Discovery (STM32F407VG) controller.