There is a drum which is played by two DC motors and Arduino Nano. We used a wooden sheet and we have changed the rotational motion of motor into Oscillation motion as it hits the drum and Drum play. With, Motor Driver L-298 we can control the speed and direction of motors. And, we also give the motors more voltage to increase their power of hitting.
The motors will controlled by motor driver which is connected to Arduino Nano.The MOTORS will attach on the OUTPUTS of Motor Driver. Then, attach IN1, IN2 ( as motor 1 ) and the IN3, IN4 (as motor 2) with the PWM pins of Arduino.The ENA of motor driver controlled the speed and they'll also connect with PWM Pin of Arduino.Now, Giving electric power to motor Driver to provide power in Arduino and Motors. There are three pins, 12-V, 5V and GND. 5V will attach on 5V of Arduino and GND will attach on GND of arduino Now we provide power in Motor Driver. Connect an ADAPTER 12-V connect +ve (red) wire with 12V and Connect-ve with GND of MOTOR DRIVER (black).Now the power will given to MOTOR DRIVER and it gives 5V to Arduino.