The laboratory work explores interfacing ultrasonic distance sensors with the RPi Pico platform and generating PWM signals for sound, lighting, DC motor control, etc. Through the BT module, interconnections with other equipment can be made. The aim is to use gestures to generate musical notes. At the end of the laboratory, detailed information will be available about building gesture-controlled musical instruments as a project model
Hardware: Platforme Raspberry pi Pico , sensor cu ultrasunete Hc-SR04, LED, modul BT RN42/HC05, modul audio tip GF1002, difuzor 8ohmi 0,25W.
Software: MicroPython
1. PWM to control LED brightness 2. Ultrasound - distance visualization 3. Generate PWM notes for score - “One Elephant”------See video 4. Generate sounds with ultrasonic sensor Interfacing the HC-SR04 ultrasonic sensor to the Raspberry Pi Pico platform is shown in the schematic below:
The sensor emits trains of ultrasonic signals after the Trig command is validated, and the travel distance of the ultrasonic waves is proportional to the duration of the echo signal, as shown in the figure below:
In prototype program 1 there is a solution for determining the duration, and thus the distance to an object. Frequently, this sensor is used in vehicles for object detection as follows:
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
2. Create a MicroPython application that, through a mobile phone equipped with a BT Terminal, will generate musical notes with a duration of 1 second when pressing keys 1, 2...8. 3. Create an application that allows displaying on a mobile phone equipped with a BT Terminal the distance provided by the ultrasonic sensor. 4. Create a MicroPython application that generates musical notes accompanied by harmonics; 5. Create a musical instrument that allows generating sounds with 2 hands according to prototype program no. 4 (see NASA SPIN OFF).
- Building gesture-activated musical instruments; - Building active objects for the visually impaired; - Building systems for object detection; - Developing applications for motor control, lighting, inverters/converters; - Developing the universe of Wearable computing
|