Skip to content
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Troubleshooting
  3. HC-SR04 (Distance) only sends data with connected serial converter?
  • Getting Started
  • Controller
  • Build
  • Hardware
  • Download/API
  • Forum
  • Store

HC-SR04 (Distance) only sends data with connected serial converter?

Scheduled Pinned Locked Moved Troubleshooting
3 Posts 2 Posters 909 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • edsteveE Offline
    edsteveE Offline
    edsteve
    wrote on last edited by
    #1

    Hallo,

    Hardware:
    i have an Arduino pro mini 5V connected to a HC-SR04 sensor and using the standard mysensors code unchanged. It runs on a 3,7V battery with a stepUp Buck converter to 5V (LM2596) which i use in many projects. The data is sent via NRF24L01+ which has it's own converter.

    It works flawless when the USB to Serial adapter (FT232BL) is connected. Every 5 seconds a reading.
    But when i let the sensor "run by itself" i can see that the sensor gets registered in Domoticz, but Domoticz does not receive any data. When i plug in the serial converter. Domoticz gets all the data as it should be.

    I also unplugged the power wires from the serial converter to see if it is a power issue. But same result.
    I do actually get a reading sometimes. Maybe every 2 minutes or so instead of every 5 seconds. But even that has the wrong values (always 0cm)

    Drives me crazy. What is that?

    Thx for thinking with me
    ED

    sundberg84S 1 Reply Last reply
    0
    • edsteveE edsteve

      Hallo,

      Hardware:
      i have an Arduino pro mini 5V connected to a HC-SR04 sensor and using the standard mysensors code unchanged. It runs on a 3,7V battery with a stepUp Buck converter to 5V (LM2596) which i use in many projects. The data is sent via NRF24L01+ which has it's own converter.

      It works flawless when the USB to Serial adapter (FT232BL) is connected. Every 5 seconds a reading.
      But when i let the sensor "run by itself" i can see that the sensor gets registered in Domoticz, but Domoticz does not receive any data. When i plug in the serial converter. Domoticz gets all the data as it should be.

      I also unplugged the power wires from the serial converter to see if it is a power issue. But same result.
      I do actually get a reading sometimes. Maybe every 2 minutes or so instead of every 5 seconds. But even that has the wrong values (always 0cm)

      Drives me crazy. What is that?

      Thx for thinking with me
      ED

      sundberg84S Offline
      sundberg84S Offline
      sundberg84
      Hardware Contributor
      wrote on last edited by sundberg84
      #2

      @edsteve could it be that Domoticz does not update the value if it's unchanged ? You can monitor the gw log.

      If not I would suspect the booster generate noice that disturbs your radio.

      Controller: Proxmox VM - Home Assistant
      MySensors GW: Arduino Uno - W5100 Ethernet, Gw Shield Nrf24l01+ 2,4Ghz
      MySensors GW: Arduino Uno - Gw Shield RFM69, 433mhz
      RFLink GW - Arduino Mega + RFLink Shield, 433mhz

      1 Reply Last reply
      0
      • edsteveE Offline
        edsteveE Offline
        edsteve
        wrote on last edited by
        #3

        Thanks for your reply.
        I was dealing with it for 3 hours now. Grml. But as usual i figured it out right after this post. The trigger pin was connected to the wrong Arduino pin (4 instead of 6). Of course i didin't check it, because it still worked with connected serial converter. How strange.

        So i guess this post can be deleted due to waste of space.

        Cheeers
        ED

        1 Reply Last reply
        2
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        9

        Online

        11.7k

        Users

        11.2k

        Topics

        113.0k

        Posts


        Copyright 2019 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • OpenHardware.io
        • Categories
        • Recent
        • Tags
        • Popular