joy-iT SEN-US01 Ultrasonic Distance Sensor User Guide
- June 1, 2024
- JOY-It
Table of Contents
- joy-iT SEN-US01 Ultrasonic Distance Sensor
- Product Usage Instructions
- GENERAL INFORMATION
- INTERFACES
- USAGE WITH THE RASPBERRY PI
- USAGE WITH THE ARDUINO
- USAGE WITH THE MICRO: BIT
- USAGE WITH THE RASPBERRY PI PICO
- SUPPORT
- FAQ
- References
- Read User Manual Online (PDF format)
- Download This Manual (PDF format)
joy-iT SEN-US01 Ultrasonic Distance Sensor
Specifications
- Product: Ultrasonic Distance Sensor SEN-US01
- Interfaces: GPIO, UART, I2C
- Resistor: 10k resistor (0603)
Product Usage Instructions
Usage with the Raspberry Pi
Connection
GPIO interface
Connect SEN-US01 to Raspberry Pi as follows:
- VCC to 3.3V
- Trig to GPIO 24 (Pin 18)
- Echo to GPIO 23 (Pin 16)
- GND to GND
3.1.2 UART interface
Connect SEN-US01 to Raspberry Pi as follows:
- VCC to 3.3V
- Trig/Rx to GPIO 14 (Pin 8 / TXD)
- Echo/Tx to GPIO 15 (Pin 10 / RXD)
- GND to GND
I2C interface
Connect SEN-US01 to Raspberry Pi as follows:
- GND to GND
- GND to GND
Code examples
Download the code example from the provided link or execute the commands in
the console.
Usage with the Arduino
Connection
GPIO and UART interface
Connect SEN-US01 to Arduino as follows:
- VCC to 3.3V
- Trig/Rx to A5
- Echo/Tx to A6
- GND to GND
I2C interface
Connect SEN-US01 to Arduino as follows:
- GND to GND
- GND to GND
Code examples
Download the code example for each interface and upload it using the Arduino
IDE.
Usage with the Micro: Bit
Connection
Connect SEN-US01 to Micro: Bit using a Voltage Translator as shown in the
diagram.
GENERAL INFORMATION
Dear customer,
Thank you for purchasing our product. In the following, we will show you which
things should be noted during the use.
Should you encounter any unexpected problems, do not hesitate to contact us.
This ultrasonic module can measure distances from 2 to 450 cm, with a
resolution of 1 mm.
This is done with the help of ultrasound; an ultrasonic signal is emitted that
hits an obstacle, is reflected by it and returns to the sensor. The distance
of the obstacle can then be calculated from the duration that the signal has
been traveling and the speed of sound at which the signal travels.
INTERFACES
The SEN-US01 has the three interfaces GPIO, UART and I2C. The desired interface can be selected by soldering a resistor. The solder pads R4 and R5 are decisive for this. If necessary, these must be connected by means of a 10k Ω resistor (0603).
New version with 1-Wire
USAGE WITH THE RASPBERRY PI
These instructions were written under Raspberry Pi OS Bookworm for the Raspberry Pi 4 and 5. It has not been checked with newer operating systems or hardware.
Connection
GPIO interface
UART interface
I2C interface
Code examples
We provide you with a code example which you can download here or you can
enter the following command into your console. wget https://www.joy-
it.net/files/files/Produkte/SEN-US01/SEN-US01_Codeexample_RaspberryPi.zip
Now unzip the .zip file with the following command: unzip SEN-
US01_Codeexample_RaspberryPi.zip
for the GPIO interface
You do not need to perform any further installations for this connection.
So you can directly execute the corresponding code example with the following
command. Note, that your directory can be different. python3 SEN-
US01_Codeexample_RaspberryPi/SEN-US01_GPIO.py
for the UART interface
First you have to enable serial communication in the settings. To do this,
enter the following command in the console. sudo raspi-config
Select there Interface Options → I5 Serial Port .
There, click No when you are asked the question Would you like a login shell to be accessible over serial? .
Accept the question Would you like the serial port hardware to be enabled? .
After that, restart the Raspberry Pi with the following command. sudo reboot
Now, execute the following command to install the library for the serial
communication. sudo apt-get install python3-serial
The code example used is configured for the Raspberry Pi 5, to use the Pi4 you
need to remove the # character at the beginning of line 6 and insert it at the
beginning of line 7.
You can now use the following command to run our example code for the UART interface. Be aware that your directory may differ. python3 SEN- US01_Codeexample_RaspberryPi/SEN-US01_UART.py
for the I2C interface
First you have to enable serial communication in the settings. To do this,
enter the following command in the console. sudo raspi-config
Select there 3 Interface Options → I4 I2C .
There, click Yes when you are asked the question Would you like the ARM I2C interface to be enabled? .
Now, install the required library for I2C communication with the follo-wing two commands.
- sudo apt-get install i2c-tools
- sudo apt-get install python3-smbus
You can now execute our sample code for the I2C interface with the follo-wing command. Please note that your directory may differ. python3 SEN- US01_Codeexample_RaspberryPi/SEN-US01_I2C.py
USAGE WITH THE ARDUINO
Connection
GPIO and UART interface
I2C interface
Code examples
We provide you with a code example for each interface. You can down-load
these examples here. You can open these codes in your Arduino IDE and use the
Upload button to upload them on your Arduino. Make sure that Board and Port
are selected correctly under Tools
The serial communication between the SEN-US01 and the Arduino does not take
place via the hardware UART interface of the Arduino, rather by means of a
software-based serial commu-nication. The UART interface of the Arduino is in
fact needed to display the measured values on your serial monitor.
USAGE WITH THE MICRO: BIT
Connection
Connect your sensor to a Voltage Translator and your Micro:Bit as shown in
the diagram and the table. We recommend the KY-051 Voltage Translator by Joy-
IT.
Code example
The following code example requires the pxt-sonar extension from Micro-
soft. You can import this into your MakeCode sketch via the extensions. You
can then either rebuild the code example or import it into your sketch via the
following .hex-file.
USAGE WITH THE RASPBERRY PI PICO
Connection
Connect your sensor to a Voltage Translator and your Raspberry Pi Pico as
shown in the diagram and table. Here we recommend the KY-051 Voltage
Translator by Joy-IT.
Code example
In the following code example, a distance measurement is performed every
second and the result is displayed in the console. Copy the code example and
transfer it completely to your Raspberry Pi Pico. Alternatively, you can
download the sample code here.
OTHER INFORMATION
Our Information and Take-back Obligations according to the Electrical and
Electronic Equipment Act (ElektroG)
Symbol on Electrial and Electronic Products:
This crossed-out bin means that electrical and electronic products do not
belong into the household waste. You must hand over your old appliance to a
registration place. Before you can hand over the old appliance, you must
remove used batteries and replacement batteries which are not enclosed by the
device.
Return Options:
As the end user, you can hand over your old appliance (which has essentially
the same functions as the new one bought with us) free of charge for disposal
with the purchase of a new device. Small devices, which do not have outer
dimensions bigger than 25 cm can be handed in for disposal independently of
the purchase of a new product in normal household quantities.
-
Possibility of return at our company location during our opening hours
Simac Electronics Handel GmbH, Pascalstr. 8, D-47506 Neukirchen-Vluyn -
Possibility of return nearby
We will send you a parcel stamp with which you can send us your old appliance free of charge. For this possibility, please contact us via e-mail at service @joy-it.net or via telephone.
Information about the Package:
Please package your old appliance safe for transport. Should you not have
suitable packaging material or you do not want to use your own material, you
can contact us and we will send you an appropriate package.
SUPPORT
If any questions remain open or problems may arise after your purchase,we are available by e-mail, telephone and ticket support system to answer these.
- E-Mail: service@joy-it.net
- Ticket-system: https://support.joy-it.net
- Telephone: +49 (0)2845 9360 – 50 (Mo-Do: 09:00 – 17:00 o’clock CET,
- Fr: 09:00 – 14:30 o’clock CET)
- For further information visit our website: www.joy-it.net
- Published: 2024.04.15
FAQ
Q: Can I use SEN-US01 with other microcontrollers not mentioned in the
manual?
A: While the manual specifies usage with Raspberry Pi, Arduino, and Micro:
Bit, you can potentially use it with other microcontrollers with compatible
interfaces and communication protocols.
References
- ITnet | Servizi di Colocation e Cloud
- Pin.in
- For Makers and Professionals | Joy-IT
- GitHub - microsoft/pxt-sonar: A Microsoft MakeCode package to handle sonar sensors and pings
- Joy-IT Helpdesk
- For Makers and Professionals | Joy-IT
Read User Manual Online (PDF format)
Read User Manual Online (PDF format) >>