Precise distance measurement using ultrasonic sensor (HC-SR04) and Arduino

  • Stare: Pending
  • Premiu: $20
  • Intrări primite: 6

Rezumat concurs

The challenge:
Measure the distance using the ultrasonic distance sensor after a trigger signal. Send the result through the serial port (Baudrate: 115200, 8 databit, No parity, 1 stopbit) within 200[ms] (so the result must arrive within 200[ms] after the trigger), each result must arrive in a new line. The result must arrive as string rounded to 2 decimal places.
If the result do not arrive in 200[ms] after the trigger then a 0 will be recorded in its place. All the provided sensors can be used. The trigger signal is a high-low-high transition with 10[ms] low time.

How to participate:
Send the hex file of your code to us: ingaelearn (at) [login to view URL] or share your link in the description of your submission. You can send maximum 3 submissions per user (3 HEX files). You have to select your final submission.

Testing:
An object will be set to different distances from the distance sensor, the output of your code will be recorded. We will test each HEX once during the submission period and once after closing the submission period with a slightly different measurement setup.
The score will be calculated with the Mean Squared Error using the ground truth, the lower the better.

Winner:
The participant with the lowest Mean Squared Error result will be in the first place. In this case you have to share your source code with us to win the prize.

Prize:
$20

The hardware setup:
Name Type Pin configuration

Arduino Uno Rev. 3 SERIAL RX: PIN0
SERIAL TX: PIN1
TRIGGER: PIN4

Temp. & hum. sensor DHT11 SIGNAL: PIN2

Distance sensor HC-SR04 TRIG: PIN13
ECHO: PIN12

Aptitudini recomandate

Top intrări pentru acest concurs

Vezi mai multe intrări

Panou Public de Clarificare

  • patrickwagner068
    patrickwagner068
    • acum 1 lună

    What do you mean by "high-low-high" transition ?
    Do you want the signal to be triggered on logic level or signal edge ?
    Should it trigger from high to low or low to high ?

    What do you mean by rounding to 2 decimal places? Which unit ?
    Should the String only contain the number or the unit and elapsed time as well ?

    How do you want exceptions to be handled ?
    The HC-SR04 operates between 2cm and 4m, what should happen, when a result is outside this range ?

    • acum 1 lună
  • tonnyboy
    tonnyboy
    • acum 1 lună

    I have a problem while submiting work please check the link https://www.youtube.com/watch?v=Zux5YFAge1E

    • acum 1 lună
  • Abelk020
    Abelk020
    • acum 1 lună

    Is the wiring connection flexible, i mean can the external trigger pin which gives high low high signal be connected to pin 3.

    • acum 1 lună
  • Abelk020
    Abelk020
    • acum 1 lună

    "If the result do not arrive in 200[ms] after the trigger then a 0 will be recorded in its place." Can you please elaborate.?

    • acum 1 lună
  • i2eng
    i2eng
    • acum 1 lună

    Hello! Do you need the code for the DHT11 too?

    • acum 1 lună
    1. collaborart
      Titular Concurs
      • acum 1 lună

      The DHT11 is only for temperature calibration if you need.

      • acum 1 lună
  • collaborart
    Titular Concurs
    • acum 1 lună

    If you have any questions feel free to ask!

    • acum 1 lună

Arată mai multe comentarii

Cum să începi concursurile

  • Postează-ţi concursul

    Postează-ți Concursul Rapid și ușor

  • Obţine tone de intrări

    Obţine tone de Intrări Din întreaga lume

  • Premiază cea mai bună intrare

    Premiază cea mai bună intrare Descarcă fişiere - Uşor!

Postează un concurs acum sau Înscrie-te astăzi!