WiFi Distance Sensor with configurable heartbeat and WiFi connection

WiFi Distance Sensor

I have tinkered with mostly every sensor I got a hold of and now I found a pretty cheap distance sensor. I decided to integrate it with the ESP8266 and get some  distance measurements via WiFi.

The sensor is the HCSR04 and the specs can be found here http://www.micropik.com/PDF/HCSR04.pdf

It is very easy to integrate, just set the ESP to send a trigger signal, wait a few milliseconds, and receive the echo signal. The delay is proportional to the distance. My implementation returns the distance in meters as a floating point number (actually it will be a string as it returns it via TCP).

The module measures the distance at a heartbeat rate which is configurable and sends the value to a server and port which is also configurable. The server and port is configured up front while the heartbeat can be changed at any time by sending a TCP message to the board.

Here is the final board:

DistanceSensor

Advertisements

About hbouzas

Born in Buenos Aires, Argentina. Studied Physics at the University of Buenos Aires. Joined Schlumberger in February 1985 in Houston, Texas, and worked in several technical and managerial positions until 2000. From 2000 until 2008 held several management positions in Abingdon, UK; Calgary, Alberta and London, UK. Worked in the areas of Geophysical Exploration, Geological Modeling, Structural Modeling, Reservoir Modeling and Petroleum Economics and holds several patents. He is currently the Norway Technology Center Manager for Schlumberger Information Solutions and is based in Oslo and Stavanger. Main interest are software, technology, innovation, 3D visualization, design, human computer interaction, energy, environment.
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s