![]() |
Forum Index : Microcontroller and PC projects : SRO4 (waterproof) for Watertank Depth
![]() ![]() |
|||||
Author | Message | ||||
lizby Guru ![]() Joined: 17/05/2016 Location: United StatesPosts: 3378 |
The part of the link before the "?" worked fine for me--that's all you need: https://www.ebay.com/itm/283996510576 pressure transducer PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed |
||||
phil99![]() Guru ![]() Joined: 11/02/2018 Location: AustraliaPosts: 2642 |
Another for $10. https://www.ebay.com/itm/373635657577 Various pressure ranges. The 15 PSI one corresponds to about 10 m water height vs 100 m for the one above. Relative accuracy will be greater for a 2 m tank even though its full scale accuracy is lower. |
||||
Andrew_G Guru ![]() Joined: 18/10/2016 Location: AustraliaPosts: 871 |
Hi Folks, How can I measure the length of a pulse (ie about 5V) between 150uS and 25mS long? I'm still not having any joy with my SR04M-2 ultrasonic sensors. I now have two types, the one I linked to (and pictured) above, and another labelled "JSN-SRO4T-V3.0" from Clearsonics (made by JSN). The latter seems to work with the DISTANCE CFUNTION but is less accurate/consistent than the former unit. The problem with the former unit (SR04-2) is that it is not triggering from the MM but is transmitting the echo pulse continuously - thereby risking spurious echos within the tank and false readings. I do suspect that the trigger pulse sent by the CFUNCTION is less than the 20uS recommended for that unit. I can use PULSE or PWM to send a 'Trigger' pulse (at least 20uS long) but I can't see how to measure the length of a returned pulse that is between 150uS and 25mS long. The length of the returned pulse is proportional to the distance. (TIMER works above 1mS but its resolution is not fine enough). Any suggestions? Thanks, Andrew |
||||
Mixtel90![]() Guru ![]() Joined: 05/10/2019 Location: United KingdomPosts: 7938 |
Will PULSIN do it? It should read from 1us upward. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
Andrew_G Guru ![]() Joined: 18/10/2016 Location: AustraliaPosts: 871 |
Mick, Thanks. Should do! I'll test shortly. How long has that Function existed (to the nearest decade)? - sorry to be so stupid! Andrew |
||||
phil99![]() Guru ![]() Joined: 11/02/2018 Location: AustraliaPosts: 2642 |
#Andrew_G Looking at your thread on the DHT11 TassyJim used ADC to read very short pulses in the data stream from that. |
||||
Andrew_G Guru ![]() Joined: 18/10/2016 Location: AustraliaPosts: 871 |
Mick & Phil, I've had a quick play and PULSIN is certainly giving me a reading. I'll also check the ADC method. Tomorrow, I've got a footy game to win shortly (Phil can explain to you Mick). Thanks and I'll report back, Andrew |
||||
Mixtel90![]() Guru ![]() Joined: 05/10/2019 Location: United KingdomPosts: 7938 |
Footy? We've heard of that on this side of the planet too. :) Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
Andrew_G Guru ![]() Joined: 18/10/2016 Location: AustraliaPosts: 871 |
Phil, Thanks but I must confess I don't follow the ADC method but: Mick, PULSIN works (on the latter version by JSN). Using it I can replicate the readings obtained via DISTANCE. But, I haven't been able to get the SR04M-2 version to do anything but report "-1" which is the timeout error (and I've tried various timeout values). I suspect that it is more than just the duration of the trigger pulse (but at least with PULSE and PULSIN I can test this). I'll keep trying for a little longer but it looks like I'll need to stick with the JSN version and use DISTANCE (thanks to Peter). I have noticed that both sensors are quite sensitive to objects within the cone of the signals, including placing them in a tube that goes any distance beyond their front face. It will be interesting to see how they go within a corrugated steel tank. Many thanks, Andrew (PS: Mick, many of us Aussies refer to "footy" as using a prolate spheroid-shaped ball (of several sizes) and to "football" meaning "The World Game", using a spherical ball. My preferred team won) Edited 2021-09-26 09:32 by Andrew_G |
||||
zeitfest Guru ![]() Joined: 31/07/2019 Location: AustraliaPosts: 582 |
My impression is that most of the people on this BBS are brit citizens with dual citizenship at best PS maybe "Britizens" ![]() Edited 2021-09-26 11:27 by zeitfest |
||||
Mixtel90![]() Guru ![]() Joined: 05/10/2019 Location: United KingdomPosts: 7938 |
I suspect that you may have to do away with the tube and mount the ultrasonics centrally in the top, Andrew. You'll always get bounce from a tube, especially using low-cost, non-specialised transducers (The SR04 series are wide-angle, I think, intended for movement detection). There are some systems that use a narrow beam (possibly a single transducer for TX/RX) but they are probably for those with deep pockets. In theory you should be able to get reliable, non-tank detection from the SR04M-2 units using a trigger pulse longer than 10us and then measuring the reflected pulse from its falling edge. They shouldn't pulse repeatedly. Here's a great page on the HC-SR04. :) https://www.davidpilling.com/wiki/index.php/HCSR04 I've just been looking at an application note by Texas Instruments on using a bottom transducer firing upwards through the liquid to bounce from the surface! https://www.ti.com/lit/pdf/snaa270 It all looks very clever! Edited 2021-09-26 17:09 by Mixtel90 Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
![]() ![]() |
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |