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
IMG_0083.jpeg
Screen Shot 2021-12-07 at 10.16.05 AM.png
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

Using a screw driver, unscrew the screws that hold the front and back together, exposing the circuit.

Build the Relay Circuit

IMG_0082.jpeg
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
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 }