Page 1 of 2

Recent update of HCSR04

Posted: Mon Mar 11, 2024 6:38 pm
by ELECTRONICA67
Hello,

I received an update for the HCSR04 sensor, but from that update the sensor sends a reading of 0, I am using the PIC16F1847, I tested the sensor with another program and if it works, I think there is something wrong with the update of the file component HCSR04. :(

Enrique
Thanks

Re: Recent update of HCSR04

Posted: Mon Mar 11, 2024 6:44 pm
by medelec35
Hello.
Have you got the Use Timer interrupt to yes and set the timer for timer 0 and pre and post scaler both at 1:1?

Re: Recent update of HCSR04

Posted: Mon Mar 11, 2024 7:35 pm
by ELECTRONICA67
I tested it using a PIC16f887 and it worked :o

Re: Recent update of HCSR04

Posted: Mon Mar 11, 2024 7:54 pm
by ELECTRONICA67
I tested it using a PIC16f819 and PIC16f1847 and it not worked
( Use Timer interrupt to yes and set the timer for timer 0 and pre and post scaler both at 1:1 )

Re: Recent update of HCSR04

Posted: Mon Mar 11, 2024 8:50 pm
by ELECTRONICA67
I can connecting echo B6 and trigger B7, timmer0 1:1 1:1 work ? :?: or B0 and B1

Re: Recent update of HCSR04

Posted: Mon Mar 11, 2024 11:26 pm
by medelec35
Have you tried the one second flasher test to check your target device is running at the correct speed?

Re: Recent update of HCSR04

Posted: Tue Mar 12, 2024 12:04 am
by ELECTRONICA67
Hi Martin;

Yes, in fact it is working with a program that you made in Flowcode 5, but the process is simpler in flowcode 10; use the same PCBs in the process you designed in V5 if it works; Even a few months ago you fixed that component in V10, it only multiplied the reading by 1.65 and the distance was almost exact.
The problem restarted. with an update from a few days ago; now the reading is 0 zero, in V10. For now I am preferably using PIC16F1847 and PIC16F819, I did a test in V10 with the PIC16F887 and if I perform the measurements correctly.

Re: Recent update of HCSR04

Posted: Fri Mar 15, 2024 6:01 pm
by ELECTRONICA67
Hello Martin,

I sent the readings with a file from the sensor that you designed in flowcode 5 with its reading and physical measurement and included the measurement with the flowcode 10 component on display and physically as well as the configuration. I use the PIC16F1847 or the PIC16F819, I send the readings using RF NRF24L01.
I have sent the data in BYTE, STRING, FLOAT, but in all cases the data sent is 0 zero.

Enrique

Re: Recent update of HCSR04

Posted: Fri Mar 15, 2024 6:03 pm
by ELECTRONICA67
the rest of the photographs

Re: Recent update of HCSR04

Posted: Fri Mar 15, 2024 7:08 pm
by jgu1
Hi Enrique!

I see on your picture you use the waterproff device. For this you have to choose the AJ-SR04M type in properties and you have to play with the
Timer, Prescaler and Postscaler, maybe this could help you ;)

Br Jorgen