4 Replies Latest reply on Aug 6, 2019 10:42 PM by MoTa_728816

    UltraSonic (HC-SR04) Sample Project (CY8CKIT-044)


      As someone asked for help with CY8CKIT-042, I decided to leave my CY8CKIT-044 version here.


      This HC-SR04 sensor module is somewhat affordable and looks simple, but the ICs on the module do nice job!



      At first, I set the Timer Clock Frequency to 10MHz, so that the calculation would be simple,

      but with the 24MHz source clock, the error is rather large and I ended up to have measurement

      errors around 2cm for CY8CKIT-044 and 4cm for CY8CKIT-042.


      Then Considering the hint from lukebartol-san, I changed the Timer Clock Frequency to 12MHz

      so that the clock error is much smaller, and I got less than 1cm error(s) for both CY8CKIT-044

      and CY8CKIT-042.




      Last but not least, as the module requires 5V operation, we need to set J9 to 2-3 from 1-2.