Ardunio Controlled Toy Piano, by Julia Duggan and Chae-Hee Park
by PHS_Engineering in Circuits > Arduino
253 Views, 0 Favorites, 0 Comments
Ardunio Controlled Toy Piano, by Julia Duggan and Chae-Hee Park
![IMG_0085.jpeg](/proxy/?url=https://content.instructables.com/F5A/NZNP/KWW46V5K/F5ANZNPKWW46V5K.jpg&filename=IMG_0085.jpeg)
![IMG_0083.jpeg](/proxy/?url=https://content.instructables.com/FBW/BH9J/KWW46V5F/FBWBH9JKWW46V5F.jpg&filename=IMG_0083.jpeg)
![Screen Shot 2021-12-07 at 10.16.05 AM.png](/proxy/?url=https://content.instructables.com/FBP/F84D/KWW46VIB/FBPF84DKWW46VIB.png&filename=Screen Shot 2021-12-07 at 10.16.05 AM.png)
![sick arduino torture device](/proxy/?url=https://content.instructables.com/FE9/REG0/KWW46W6I/FE9REG0KWW46W6I.jpg&filename=sick arduino torture device)
Every second, the Arduino turns on the piano, making a noise.
Supplies
Materials
- 8 male to male wires
- electrical tape
- 1 1k ohm resistor
- 1 transistor
- 1 relay
- 9v battery and snap-on connecter clip
- arduino uno board
- toy piano
- bread board
-screwdriver
- diode rectifier
- USB cable
Open Up the Piano
![IMG_0095.jpeg](/proxy/?url=https://content.instructables.com/F6G/BKTG/KWW46V5D/F6GBKTGKWW46V5D.jpg&filename=IMG_0095.jpeg)
Using a screw driver, unscrew the screws that hold the front and back together, exposing the circuit.
Build the Relay Circuit
![IMG_0082.jpeg](/proxy/?url=https://content.instructables.com/FC1/8MT0/KWW46V5E/FC18MT0KWW46V5E.jpg&filename=IMG_0082.jpeg)
![relay diagram.png](/proxy/?url=https://content.instructables.com/FG1/4LVR/KWW46WHA/FG14LVRKWW46WHA.png&filename=relay diagram.png)
Follow the diagram as shown and build the relay circuit.
Connect Wires With Tape
![Screen Shot 2021-12-07 at 10.15.43 AM.png](/proxy/?url=https://content.instructables.com/F56/9S3X/KWW46VHZ/F569S3XKWW46VHZ.png&filename=Screen Shot 2021-12-07 at 10.15.43 AM.png)
![Screen Shot 2021-12-07 at 10.15.10 AM.png](/proxy/?url=https://content.instructables.com/FBL/3D32/KWW46VFQ/FBL3D32KWW46VFQ.png&filename=Screen Shot 2021-12-07 at 10.15.10 AM.png)
Using electrical tape, connect the black and red wires to each side of the circle button on the circuit board. Make sure each side is connected to one wire.
Here's the Code!!
int RelayPin = 13; // the relay is connected to pin 13
void setup() { // put your setup code here, to run once:
pinMode (RelayPin, OUTPUT); // tne relay is an output }
void loop() { // put your main code here, to run repeatedly:
digitalWrite(RelayPin, HIGH); // power is going to pin 13
delay (1000); // there's a delay for 1 second
digitalWrite(RelayPin, LOW); // the power to pin 13 is turned off
delay (1000); // there is a delay for 1 second }