Hello,
I just had a question about the HC-SR04 Ultrasonic Sensor and wanted to make sure the way I’m wiring it is valid, as it doesn’t seem to be working in Mission Planner and we wanted to check if it’s a wiring issue.
Below is a picture of the wiring with a Pixhawk 6X:
-
I used a voltage divider to reduce the voltage coming from the Echo pin, as I found the PWM pins on the Pixhawk can only receive 3.3V and found that some people said the voltage needed to be reduced or else the PWM pins could be damaged
-
I did not connect the PWM pins of the Pixhawk to ground/power, I just connected the ultrasonic sensor to signal on the Pixhawk, and connected ground & power to the ultrasonic sensor separately (from an Arduino plugged into the wall.) → would this cause an issue? This is how I saw most wiring diagrams done from the forums, but I wanted to make sure that just signal being connected to the PWM pins was OK. (I know you can connect a 5V source to power the PWM pins but just wanted to keep it separate for now)
-
We followed the article on this sensor (HC-SR04 Sonar Rangefinder — Copter documentation) for the parameter setups
Thank you!