stoduk / PingSerial

Arduino library for using serial enabled ultrasonic distance modules (eg. US-100)
MIT License
16 stars 9 forks source link

Compatibility with JSN-SR04T #11

Closed szerwi closed 2 years ago

szerwi commented 2 years ago

Hi,

I would like to ask if the library is compatible with JSN-SR04T sensor when I set it to UART mode? Does this sensor also has a temperature sensor?

I also have one more question about US-100. Is the temperature compensation automatic in UART mode and the sensor returns distance already compensated for temperature or should I implement it by myself in the microcontroller?

stoduk commented 2 years ago

I've not come across that module, but I don't know if this library is needed. What problem are you trying to solve?

That module operates in three modes: 1) trigger/echo mode (with all the problems discussed on the front page for this library) 2) continuous serial mode (distances are output periodically) 3) on-demand serial mode

There seems to be no temperature reporting, so it lacks one of the reasons for this library (needing to know what the last operation requested, so you can't understand the response). If you see either of the other two problems then there might be some benefit to using the library.

However, I don't have one of these modules so I won't be able to help getting it to work... It shouldn't be hard to do if needed though.

szerwi commented 2 years ago

@stoduk ok, thanks.

Do you know the answer for my second question about temperature compensation in US-100? I think that a few months ago I found that information somewhere on the Internet, but can't find it again now.

stoduk commented 2 years ago

I don't honestly remember, it has been a while! It never mattered for my needs (indoor use, so temperature variations would have negligible effect) but I see that the speed of sound varies by around 5% between freezing temperature and room temperatures, so if that might matter to your use case then it would be worth checking. I can't find any documentation online either way but I suspect you could experiment with a hair dryer to confirm if it varies the output at a fixed distance. If you can report back that could help others.