Contents
How to use an ultrasonic sensor with Raspberry Pi Pico?
3. Connect the 3V3 pin of the Raspberry Pi Pico to the VCC pin o f the ultrasonic sensor using a male to male jumper wire. 4. Connect a GND pin on the Raspberry Pi Pico to the GND pin of the ultrasonic sensor using a jumper wire. 5. Connect the Trigger pin of the ultrasonic sensor to GPIO pin 3 of the Raspberry Pi Pico.
How is the ultrasound module connected to the Raspberry Pi?
This tutorial shows the connection and control. There are four pins on the ultrasound module that are connected to the Raspberry: connect the 330Ω resistor to ECHO. On its end you connect it to Pin 18 (GPIO24) and through a 470Ω resistor you connect it also to Pin6 (GND). We do this because the GPIO pins only tolerate maximal 3.3V.
How does a Raspberry Pi distance sensor work?
On its end you connect it to Pin 18 (GPIO24) and through a 470Ω resistor you connect it also to Pin6 (GND). We do this because the GPIO pins only tolerate maximal 3.3V. The connection to GND is to have a obvious signal on GPIO24. If no pulse is sent, the signal is 0 (through the connection with GND), else it is 1.
What can you do with a Raspberry Pi motion sensor?
In another tutorial, we showed how to use a PIR motion sensor with Raspberry Pi Pico. Used in alarm systems, PIRs employ Infrared light to detect moving bodies in a room and are good for projects where, for example, you want users to wave their hands in front of a device to activate it.
How to connect a distance sensor to a Raspberry Pi?
If you are using a 3.3 V compatible sensor, such as the RCWL-1601 mentioned above, connect the sensor’s Gnd and Vcc pins to your Raspberry Pi’s GND and 3V3 pins respectively. Then connect GPIO pins BCM 24 ( physical pin 18) and BCM 23 ( physical pin 16) on your Raspberry Pi to the sensor’s Trig and Echo pins respectively.
Can a 5 V sensor be used on a Raspberry Pi?
If you are using a 5 V only sensor, such as the original HC-SR04, we need to use a resistive voltage divider on the sensor’s Echo pin so as not to damage the 3.3 V GPIO of the Raspberry Pi. Connect the sensor’s Gnd and Vcc pins to your Raspberry Pi’s GND and 5V pins respectively.