@salonijain12 wrote:
Hi All,
I am trying to connect HC-SR04 ultrasonic 4 pin sensor to pixhawk flight controller for obstacle detection.
HC-SR04 has 4 pins: 5V Supply, Trigger pulse Input, Echo pulse output, Ground.
Can we connect this sensor on "Serial 4/5 port" as follows:
Connecting the RX line of the serial 4/5 to the Echo pin of HC-SR04 and TX line of
the serial 4/5 to the trigger pin of HC-SR04 and connecting the GND and
5V lines.The echo pin of HC-SR04, sends 5V to Rx of serial4/5.
As per the specification of pixhawk, in serial4/5 TX/Rx pins are +3.3V,
so when the Rx receives the +5V from the echo pin, will pixhawk be able
to tolerate +5V.
As per "https://pixhawk.org/modules/pixhawk" under the section
"Console Port:-
The system's serial console runs on the port labeled SERIAL4/5. The pinout
is standard serial pinout, to connect to a standard FTDI cable (3.3V, but its 5V tolerant). "So kindly confirm is this connection of HC-SR04 and serial 4/5 correct so
that I can proceed with writing the driver for the same.Thanks and Regards,
Saloni
Posts: 1
Participants: 1