Distance Sense

Distance Sense

Signal Conditioning Application

Ultrasonic ranging modules provide a non-contact measurement function. This design is a controller for an ultrasonic rangefinder based on the HC-SR04.

 

Ingredients

  • Any GreenPAK
  • Eight LEDs
  • Eight resistors

GreenPAK Diagram

Design Steps

  1. Configure GPIO input for Echo and output for Trig.
  2. Add LUT logic and CNT/DLY0 to create a generator with ENABLE signal.
  3. Add Pipe Delay and CNT/DLY2 to create a generator for detect distance.
  4. Configure CNT/DLY blocks to rising-edge delay mode to measure varied distances.
  5. Add and configure DFFs to latch distance data.
  6. Connect each DFF output to the desired output pins and configure as open-drain.

Resources

GreenPAK Designer files