Distance sensor HC-SR04 interfering with cellular modem?


#1

I’m working on connecting an ultrasonic distance sensor (HC-SR04) to the dash-pro and I think I’m seeing some interference with the cellular connection. When I activate the distance sensor, the cellular connection times out and won’t re-connect. When I comment the distance sensor code out, the card connects fine. The distance sensor seems to be working fine and I’m using NewPing to get the readings. I’m driving the 5 volts off the 5 volt pin and so far the 3.3 V logic level hasn’t been a problem.

I’m using the D01 and D02 pins as the Trigger and Echo line and I’m wondering if that is interfering with the modem as I noticed in the documentation that D01 and D02 are shared with the microcontroller. I’ve used both 0.9.2 and 0.9.4 firmware with not much difference (0.9.4 is a lot more verbose). Any input on the correct pin choice or other comments is appreciated.


#2

Hi, if you power the sensor off of a separate 5V source does it work? Sounds like it might just be pulling too much


#3

Reuben,

Thanks for the response. I’m reconfiguring to power the distance sensor separately, however, I continue to run into a performance difference between the 0.9.2 and 0.9.4 firmware for the Dash-Pro. When I run 0.9.2, I connect to the cell network almost immediately (minute, minute and a half). When I switch to 0.9.4 it just sits and endlessly cycles (10 - 15 mins before I give up). I’m still powering from the usb connector and will work to get alternative power to the 5Vin pin, but I don’t see why in this case the firmware version should change the power requirements unless something significantly changed.

This is the log from from 0.9.4:

+EVENT:LOG,65,5,DEBUG,54,Delaying to prevent carrier frustration, please wait:
+EVENT:LOG,13,5,DEBUG,3,10s
+EVENT:LOG,81,5,DEBUG,70,Bootstrapping (1/14): Init modem (can sometimes take several minutes).
+EVENT:LOG,25,5,DEBUG,14,Modem command:
+EVENT:LOG,16,5,DEBUG,6,AT&F0

+EVENT:LOG,31,4,WARN,21,Modem command timeout
+EVENT:LOG,25,5,DEBUG,14,Modem command:
+EVENT:LOG,16,5,DEBUG,6,AT&F0

+EVENT:LOG,31,4,WARN,21,Modem command timeout
+EVENT:LOG,25,5,DEBUG,14,Modem command:
+EVENT:LOG,16,5,DEBUG,6,AT&K4

+EVENT:LOG,31,4,WARN,21,Modem command timeout
+EVENT:LOG,25,5,DEBUG,14,Modem command:
+EVENT:LOG,16,5,DEBUG,6,AT&K4

+EVENT:LOG,31,4,WARN,21,Modem command timeout
+EVENT:LOG,25,5,DEBUG,14,Modem command:
+EVENT:LOG,15,5,DEBUG,5,ATE0

+EVENT:LOG,31,4,WARN,21,Modem command timeout
+EVENT:LOG,25,5,DEBUG,14,Modem command:
+EVENT:LOG,15,5,DEBUG,5,ATE0

+EVENT:LOG,31,4,WARN,21,Modem command timeout
+EVENT:LOG,25,5,DEBUG,14,Modem command:
+EVENT:LOG,15,5,DEBUG,5,ATE0

+EVENT:LOG,31,4,WARN,21,Modem command timeout
+EVENT:LOG,25,5,DEBUG,14,Modem command:
+EVENT:LOG,15,5,DEBUG,5,ATE0

+EVENT:LOG,31,4,WARN,21,Modem command timeout
+EVENT:LOG,65,5,DEBUG,54,Delaying to prevent carrier frustration, please wait:
+EVENT:LOG,13,5,DEBUG,3,90s

I’ve seen some other reports indicating 0.9.4 has impacted other users. Just adding to the list.


#4

Hey @PRapatz,

Thank you for your report! We’ll try and reproduce on a Dash Pro.

Best,
PFW


#5

I’ve now connected an alternative 5V source through the 5vusb pin along with the usb cable. This setup connects very quickly with 0.9.2 but once again, when I switch to 0.9.4 it begins cycling in failed attempts and then increasing timeout cycles. I don’t really think its a power issue.


#6

Have you been able to reproduce the issue with 0.9.4 on a DashPro? Using 0.9.4, I consistently fail to connect to the cellular network even with an alternative power source. Switching to 0.9.2 immediately allows me to connect and send data. I’m concerned that I’m missing important updates that are part of 0.9.4, especially for auto connecting the modem after a period of snooze or sleep.

Regards.