MOTIVATION
I listen to music all the time but I can’t play any instrument. I stumbled across some projects on hackster.io that regarded lasers and how they are used to produce music since I am doing research with a professor on some special kinds of lasers. Then I had the idea to make a theremin by using the built-in laser in ToF sensors. Hope you will enjoy replicating this project!
Software
To get started with the PocketBeagle, I first had to load Linux onto an SD card. I grabbed the bone-debian-9.5-iot-armhf-2018-10-07-4gb.img.xz file from BeagleBoard.org and used it to flash the SD card. After that, I made sure my PocketBeagle was connected to the internet for better integration. You can find handy tutorials for flashing the SD card and connecting to the internet here:
- Flash SD Card: https://beagleboard.org/getting-started#update
- Connect to Internet: https://beagleboard.org/blog/2016-10-19-%E2%80%8Bhow-to-connect-a-beaglebone-black-to-the-internet-using-usb
I also needed to load Python and a couple of libraries, including Adafruit’s BBIO Python Library and the Threading library, for this project. To check if Python is installed, just run the following command in the terminal.
Then, install the Python package manager:
Now you can install the Adafruit BBIO library:
Link to the video:
The wiring below was done according to the following scheme of the pinouts of a PocketBeagle:
Wiring:
VCC --> P1_14
GND--> P1_16
Button Connections:
VCC --> 3.3 V
P2_59--> Other pin of the button (as well as pull-down resistor)
VL53L0x Connections:
VIN--> 3.3 V
GND-->GND
SDA-->P2_11
SCL-->P2_9
Buzzer Connections:
GND--> negative pin
P2_50--> positive pin
BUILD INSTRUCTIONS:
- collect all of the needed hardware devices
- solder the PocketBeagle pins (4 rows) and connect the UB & UI and ID & GND also by soldering them together
- use the micro USB adapter to connect the female USB
- connect a button to pin P2_1 (the PWM)
- solder the vl53l0x pins
- wire the vl53l0x to the button for power, the ground rail and SCL and SDA to the PocketBeagle
OPERATION INSTRUCTIONS:
- press the push button to activate the sensor
- cover the vl53l0x with your hand at different heights and play some beautiful notes on your theremin
System Block Diagram
LASERTHEREMIN REPOSITORY
https://github.com/Guido-Domenico-De-Santis/ENGI301
Challenges and future goalsThe biggest challenges to this project was making sure that the data from the time-of-flight sensor would be printed by the PocketBeagle. Once this was done the implementation became quite straightforward.
For future plans, the project needs to use more ToF sensors and buzzers, and it could handle more notes then the ones I ran in the code. Adding more frequencies would definitely improve the project and make it easier to switch from one note to the other.
Comments
Please log in or sign up to comment.