Hi,
I'm new here but using ESPEasy a long time.
I want to count traffic trough our street using KY-037.
It has analog and digital output.
I want to use a digital pullup for counting, in a later stage analog values to discriminate between normal cars and heavy traffic.
First things first: the digital way.
I have setup ESPEasy as follows.
As you can see below it catches sound
but in a rather unpredictable way.
Happily some of the results even land in domoticz
I'd like to have some advice about what type of sensor to choose and what settings
Maybe someone has set it up properly.
KY-037 KY-038 sound sensor for traffic counting
Moderators: grovkillen, Stuntteam, TD-er
-
- New user
- Posts: 4
- Joined: 25 Mar 2024, 22:25
Re: KY-037 KY-038 sound sensor for traffic counting
I'm not sure if sound is the best way of counting traffic, as modern electric cars hardly make any sound, other than some continuous 'whine', that can easily be mistaken for background noise.
For the digital counting, I assume you already set some threshold using the potentiometer on the sensor, so not every change in sound is actually counted.
When using the Analog input, you could work with a dynamic threshold, making the measurement somewhat more accurate, but it will take quite some effort to get that right.
For the digital counting, I assume you already set some threshold using the potentiometer on the sensor, so not every change in sound is actually counted.
When using the Analog input, you could work with a dynamic threshold, making the measurement somewhat more accurate, but it will take quite some effort to get that right.
/Ton (PayPal.me)
-
- New user
- Posts: 4
- Joined: 25 Mar 2024, 22:25
Re: KY-037 KY-038 sound sensor for traffic counting
The street is a brick road, so every car that passes is noisy.
I cannot hear myself speak when a car passes.
Meanwhile I discovered that measuring sound is unreliable.
Not because of the sound but because of the device, the KY-037.
It's easy to set a threshold but how long should the input interval, the dealy before the next input be.
I'd be happy to get more advice and I'm open to using other devices to do the counting.
I cannot hear myself speak when a car passes.
Meanwhile I discovered that measuring sound is unreliable.
Not because of the sound but because of the device, the KY-037.
It's easy to set a threshold but how long should the input interval, the dealy before the next input be.
I'd be happy to get more advice and I'm open to using other devices to do the counting.
Re: KY-037 KY-038 sound sensor for traffic counting
Maybe you can use one of those 'radar' sensors like the LD2401.
Those do also react to humans, but maybe you can set some thresholds based on measured distance?
Not sure how fast the cars drive by, so it might not respond fast enough as those are typically designed for detecting humans/animals.
Those do also react to humans, but maybe you can set some thresholds based on measured distance?
Not sure how fast the cars drive by, so it might not respond fast enough as those are typically designed for detecting humans/animals.
Re: KY-037 KY-038 sound sensor for traffic counting
Here are some more approaches for traffic counting and traffic control. You can implement these and see if you get better results than the sound sensor. If you compare the performances, it may help you select the proper components for your final design.
https://www.hackster.io/lintangwisesa/i ... ter-3657c5
https://www.pcbway.com/project/sharepro ... 84430.html
https://github.com/ahmetozlu/vehicle_co ... tensorflow
https://www.hackster.io/lintangwisesa/i ... ter-3657c5
https://www.pcbway.com/project/sharepro ... 84430.html
https://github.com/ahmetozlu/vehicle_co ... tensorflow
-
- New user
- Posts: 4
- Joined: 25 Mar 2024, 22:25
Re: KY-037 KY-038 sound sensor for traffic counting
Hey thank you @bidrohini
I'll have a look at it.
Maybe different counting methods alltogether may result in more or less exact counting.
Whatever method I'm using, it cannot be a method with a camera. It's forbidden to take pictures in the public area.
Meanwhile I have been trying and testing.
- setting the sound threshold does a lot of good and I'll finetune it while watching the traffic and compare it to the actual count from the KY-037.
- setting the non responsive interval to (at this moment) 8 seconds enhances the counting accuracy a lot.
I'm realistic. I don't need to achieve a 100% exact count, but knowing about how much traffic passes is interesting to be able to compare my numbers with the numbers the local authoroties are publishing.
I just want my estimation being supported with figures.
I'll have a look at it.
Maybe different counting methods alltogether may result in more or less exact counting.
Whatever method I'm using, it cannot be a method with a camera. It's forbidden to take pictures in the public area.
Meanwhile I have been trying and testing.
- setting the sound threshold does a lot of good and I'll finetune it while watching the traffic and compare it to the actual count from the KY-037.
- setting the non responsive interval to (at this moment) 8 seconds enhances the counting accuracy a lot.
I'm realistic. I don't need to achieve a 100% exact count, but knowing about how much traffic passes is interesting to be able to compare my numbers with the numbers the local authoroties are publishing.
I just want my estimation being supported with figures.
Who is online
Users browsing this forum: Google [Bot] and 1 guest