PC cooler
The $133000 Frist ever self playing guitar using complexed optical sensors introduced by Steinway spirio in 2016
This week assignment is about building and Programing a smart circuit using an Arduino UNO which reads a signal from an input component (Sensor, Switch, or variable resistor) to control an action component (Motor, Buzzer, LED...etc) using Code Blocks.For this assignement, i have been inspired by the self playing guitar shown in the left,the main idea is to use an ultrasonic sensor to play the sound whenever someone approaches from a distance and a buzzer as an input to play the sound of the piano without the need for an enclosure or cardboard so let us do this.
Components
Arduino uno with USB cable for coding and programming
5V buzzer for playing music
breadboard to ease the connection
jumber wires to connect between components
Software
Tinkercad to design the device circuit and simulate
In this circuit, i connected the 5v pin of arduino to the positive of breadboard and negative of breadboard to ground of arduino.Then, i connected the positive of buzzer to pin 4 of arduino and the negative of buzzer to negative of breadboard. The Vcc and ground of ultrasonic sensor are connected to the positive and negative of breadboard respectively.Lastly the trigger and echo of the sensor are connected to pin 11 and 10 respectively.For the coding purpose, i made it in such that if the ultrasonic sensor read a distance less than 20cm,the buzzer plays piano sound with different tones on pin 4 elsewhere dont play the buzzer.
Inserting breadboard
Inserting arduino
Inserting 5v buzzer
Adding the ultrasonic sensor
Connecting the components to arduino using jumbers
started making blocks
Simulation video in tinkercad
preparation and connection of circuit
testing voltage in each component,in this case voltage across the sensor is 5V which is correct
copying the code from tinkercad
For the coding purpose, i made it in such that if the ultrasonic sensor read a distance less than 20cm,the buzzer plays piano sound with different tones on pin 4 elsewhere dont play the buzzer.
Video showing the magic
the challenge in this assignement was making the piano sound where i had some issues with the tuning,for that i had to make a bit of research and found the correct sequence for the pin 4 to play the piano sound.
The coolest thing from this week was the end of week session when we had to make in groups ,a waving hand both in automatic and manual mode using servomotors and ultrasonic sensor and a potentiometer for moving servomotor in manual mode and it was amazing .