Page 3 of 4

Re: HC-SR04

Posted: Mon Sep 18, 2023 5:15 pm
by jgu1
well, well, ok I understand, I am stupid, :lol: :lol: FC has seen the new one as an old or different when I update, I suppose, so sorry Martin ;)

Re: HC-SR04

Posted: Mon Sep 18, 2023 5:50 pm
by ELECTRONICA67
Hi Martin,

An apology Martin, yesterday I was not able to do the tests, now I downloaded the component and saved it in Flowcode10, components, HC_SR04_Ultrasonic.fcpx, I opened Flowcode 10 and the program, and did the tests with both sensors, but they gave me the same data ( not correct) use a PIC16F887.

I will send you a photograph of the reading and the real distance.

Best Regards
Enrique

Re: HC-SR04

Posted: Mon Sep 18, 2023 6:02 pm
by ELECTRONICA67
I just uploaded a post, could you publish the post to continue with the topic, my username is electron67, my email is <removed by admin> I have published more than 310 posts from the Flowcode 3 forum. In the Flowcode 10 forum not It let me continue with my username, could you fix that detail ?

Enrique (electron67)
Thanks

Re: HC-SR04

Posted: Tue Sep 19, 2023 9:13 am
by medelec35
Hi Enrique.
I will send an email to the appropriate member of staff and see if it can be done or not.
As for distance, do you have a logic analyser or a scope?
If you do, can you measure the pulse width on the echo pin and let me know what the duration of the width is and the distance reading you are expecting?

I have removed your email address so you don't get unwanted spam.

Re: HC-SR04

Posted: Tue Sep 19, 2023 5:14 pm
by ELECTRONICA67
Hi Martin,

I only have basic equipment, sources, multimeter and material (I am well stocked) but I do not have an oscilloscope or analyzers :cry: . Can I help in any other way ? :?:

Thank You
Enrique

Re: HC-SR04

Posted: Tue Sep 19, 2023 5:42 pm
by medelec35
The HC-SR04 update is now available via updates.
This is a great low-cost analyser. It can analyse I2C SPI UART , one wire and loads of other protocols.
https://www.amazon.co.uk/gp/product/B08 ... XLJG&psc=1

Re: HC-SR04

Posted: Tue Sep 19, 2023 7:10 pm
by ELECTRONICA67
Hi Martin,

I hope this information helps in some way; The program to download the new HC-SR04 component has just finished, the sensor did not work in port C, but in port B it did work, but it delivered the same erroneous data; but if you multiply the reading delivered by the sensor by 1.65 it approaches the correct distance 55x1.65=90.75 (correct distance 90 cm) with an acurrence of 1 cm. The other reading was 30 cm; 30x1.65=49.5 (correct distance 50 cm) another reading further away is 156 cm; 156x1.65=257.4 (correct distance 257) I send a photograph of the data taken.
Theoretically you would lengthen the measurement distance more.

What opinion do you have or what could be the solution :?:

Enrique

Re: HC-SR04

Posted: Tue Sep 19, 2023 7:32 pm
by ELECTRONICA67
Logic Analyzer 24MHz 8CH with USB Cable for Arduino ARM FPGA M100 SCM
https://www.amazon.co.uk/gp/product/B08 ... XLJG&psc=1

I just ordered it on AMAZON MEXICO for USA $12 Dlls. Thanks just need to learn how to use it :D

Enrique

Re: HC-SR04

Posted: Tue Sep 19, 2023 8:31 pm
by medelec35
To be honest it's the best analyser I have used.
Not only is it easy but you have live mode for constant monitoring.
I use it a lot for decoding UART, I2C and SPI.
I will PM you a link for the drivers and software as it has a demo mode when no hardware attached.
I can help you with using it of course. :)
Edit: Link pm'd

Re: HC-SR04

Posted: Tue Sep 19, 2023 8:35 pm
by chipfryer27
Hi

Download PulseView (free) and you will probably find that the option for using "Salea" analysers is compatible. PulseView is pretty easy to use being quite intuitive.

Do note that 99% of problems with these modules are related to the supplied USB lead. Probably best to bin it and use a known good one.

Regards