Ultra-Sound Meter HC-SR04

Ultra-Sound Meter HC-SR04 – Study

  • Scope of this post

I recently bought a sensor of the typ HC-SR04 and because of the poor documentation we can get on the internet I have decided to characterize the sensor myself. I also decided to use an ATMEGA841 to do the measurement. That component has many capabilities, it can be used for distance measurment as we will see here, it could also be used to have a serial/I2C interface, ADC conversions (for e.g. temperature, current, …), PWM for servo motor and many more, all running at the same time in the same chip.

The different part of the project are

  1. What do we know (sensor, sound)?
  2. Connection to atmega 841
  3. Code to measure travel time
  4. Calibration process
  5. Sources of inaccuracy