HC-SR05 << firmware

Moderators: grovkillen, TD-er, Stuntteam

Post Reply
Message
Author
User avatar
dynamicdave
Normal user
Posts: 214
Joined: 30 Jan 2017, 20:25
Location: Hampshire, UK

HC-SR05 << firmware

#1 Post by dynamicdave » 07 Dec 2019, 14:17

Hi,
I'm trying to get an HC-SR05 ultrasonic distance sensor to work with a Wemos D1 Mini and wanted to know the best version of ESP Easy to use.

Although the sensor report distances, the readings sort of jump from reasonable distances to a fixed value of 1038.

I'm using a level shifting board, so the levels for all the interface signals are correct.

Also, what's the maximum repetition rate for sampling??
Will the SR05 go as long as once every second??

Regards, David.

TD-er
Core team member
Posts: 2645
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: HC-SR05 << firmware

#2 Post by TD-er » 07 Dec 2019, 15:15

The ultrasonic plugin does send out "chirps".
If my memory serves me well, this plugin has a max. distance setting to prevent outputting bogus values.
at 300m/s speed of sound, you should expect a measure time of 1/150 sec per meter you want to measure (+ some handling time), so measuring once per sec should be perfectly fine I guess.

The plugin should not consider values higher than the set max. as valid and you should set it as low as possible to make sure you're not receiving bogus values.

One thing I'm not sure about is how often it does take a sample.
I can imagine it must take several to filter out the outliers.

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 32 guests