HC-SR04 (Distance) only sends data with connected serial converter?
-
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
-
@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.
-
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