Project tutorial
Money Heist BELLA CIAO Song In Arduino Uno

Money Heist BELLA CIAO Song In Arduino Uno

This is a fun project for working with the Arduino and the piezoelectric Buzzer.

  • 750 views
  • 2 comments
  • 10 respects

Components and supplies

Apps and online services

About this project

In this tutorial, I will show you how you can play Money Heist Song Bella Ciao in any Arduino with the help of Piezoelectric buzzer. This cool project is dedicated to all Money Heist fans all over the world. So, Let's get started.

What is Arduino?

Arduino is an open-source electronics platform based on easy-to-use hardware and software. Arduino boards are able to read inputs - light on a sensor, a finger on a button, or a Twitter message - and turn it into an output - activating a motor, turning on an LED, publishing something online. You can tell your board what to do by sending a set of instructions to the microcontroller on the board. To do so you use the Arduino programming language (based on Wiring), and the Arduino Software (IDE), based on Processing.

Over the years Arduino has been the brain of thousands of projects, from everyday objects to complex scientific instruments. A worldwide community of makers - students, hobbyists, artists, programmers, and professionals - has gathered around this open-source platform, their contributions have added up to an incredible amount of accessible knowledge that can be of great help to novices and experts alike.

Arduino UNO

The Arduino UNO is the best board to get started with electronics and coding. If this is your first experience tinkering with the platform, the UNO is the most robust board you can start playing with. The UNO is the most used and documented board of the whole Arduino family.

Arduino Uno is a microcontroller board based on the ATmega328P (datasheet). It has 14 digital input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, a 16 MHz ceramic resonator (CSTCE16M0V53-R0), a USB connection, a power jack, an ICSP header and a reset button. It contains everything needed to support the microcontroller; simply connect it to a computer with a USB cable or power it with a AC-to-DC adapter or battery to get started.. You can tinker with your Uno without worrying too much about doing something wrong, worst case scenario you can replace the chip for a few dollars and start over again.

Piezoelectric Buzzer

A piezo buzzer is a sound-producing device. The main working principle is based on the theory that, whenever an electric potential is applied across a piezoelectric material, a pressure variation is generated. A piezo buzzer consists of piezo crystals in between two conductors.

When a potential difference is applied across these crystals, they push one conductor and pull the other conductor by their internal property. The continuous pull and push action generates a sharp sound wave.

Piezo buzzers generate a loud & sharp sound. So, they are typically used as alarm circuits. Also, they are used to make an alert of an event, signal or sensor input. A special characteristics of the piezo buzzer is, the sound pitch or level is not depended on the voltage level that is, it works only in a specific voltage range.

Typically, a piezo buzzer can generate a sound in the range of 2 to 4 kHz.

How to play the Notes?

First of we have to define the frequencies of the notes (pleasent to be heard) with the "int" function. Then define the value of BPM (You can modify it obviously) and according to that define the note values.

int rounda=0;
int roundp=0;
int white= 0;
int whitep=0;
int black=0;
int blackp=0;
int quaver=0;
int quaverp =0;
int semiquaver=0;
int semiquaverp=0;

I then defined the value of the BPM ( you can modify it obviously).

int bpm= 120;

According to the defined value of BPM define the note values.

black= 35000/bpm; 
blackp=black*1.5;
white= black*2;
whitep=white*1.5;
rounda= black*4;
roundp= rounda*1.5;
quaver= black/2;
quaverp=quaver*1.5;
semiquaver= black/4;
semiquaverp=semiquaver*1.5;

With these defined values you can easily play a note with the command "tone" like this.

tone (pin, note, duration);

In this project, we are using the same method.

tone(BuzzerPin,Mi,black);
delay(black+50);

This way, I made the melody for the Bella Ciao Song. That's all about the code.

Try to write the code yourself. avoid copy pasting.

Let's upload the code to our Arduino board now.

Upload the code to Arduino

Open the code in Arduino Software. Select the model of Board you are using. Here I will go with the Arduino Uno. To select the board, Go to "Tools > Boards".

Now, Select the Port where your Arduino is connected. to select the port, go to "Tools > PORT".

After selecting the correct ones, Click the Upload Button to upload the code to the Arduino.

Connecting the Buzzer with Arduino

We have successfully programmed our microcontroller to play the Bella ciao Notes. Now we have to connect the Piezo Buzzer to hear the music. So, Connect the Red wire of the Piezo Buzzer to the 11th Pin of Arduino Uno and the Black Wire to 'GND' as shown in the circuit diagram.

Watch our Youtube Video

That's all. Follow us for more interesting projects.

Please Follow us on Instagram: https://www.instagram.com/pi_bots

Thank You.

Code

Bella_ciao_arduino.inoArduino
/*
 * 
 * Created by Pi BOTS MakerHub
 * 
 * Email: pibotsmakerhub@gmail.com
 * 
 * Github: https://github.com/pibotsmakerhub
 * 
 * Copyright (c) 2020 Pi BOTS MakerHub
 * 
 * WhatsApp: +91 9400 7010 88
 * 
 */

int BuzzerPin = 11;     // Connect Buzzer to Arduino pin 11

int Si2 =1975;
int LaS2=1864;
int La2= 1760;
int SolS2=1661;
int Sol2=1567;
int FaS2=1479;
int Fa2= 1396;
int Mi2= 1318;
int ReS2=1244;
int Re2= 1174;
int DoS2=1108;
int Do2= 1046;

// Low Octave
int Si = 987;
int LaS= 932;
int La = 880;
int SolS=830;
int Sol= 783;
int FaS= 739;
int Fa=  698;
int Mi=  659;
int ReS= 622;
int Re = 587;
int DoS =554;
int Do = 523;

// define the notes
int rounda=0;
int roundp=0;
int white= 0;
int whitep=0;
int black=0;  
int blackp=0;
int quaver=0;
int quaverp =0;
int semiquaver=0;
int semiquaverp=0;
int bpm= 120;

void setup(){
      pinMode(BuzzerPin,OUTPUT);
      
      black= 35000/bpm; 
      blackp=black*1.5;
      white= black*2;
      whitep=white*1.5;
      rounda= black*4;
      roundp= rounda*1.5;
      quaver= black/2;
      quaverp=quaver*1.5;
      semiquaver= black/4;
      semiquaverp=semiquaver*1.5;
}
void loop(){
  tone(BuzzerPin,Mi,black);
  delay(black+50);
  tone(BuzzerPin,La,black);
  delay(black+50);
  tone(BuzzerPin,Si,black);
  delay(black+50);
  tone(BuzzerPin,Do2,black);
  delay(black+50);
  tone(BuzzerPin,La,black);
  
  delay(2*white+50);
  
  tone(BuzzerPin,Mi,black);
  delay(black+50);
  tone(BuzzerPin,La,black);
  delay(black+50);
  tone(BuzzerPin,Si,black);
  delay(black+50);
  tone(BuzzerPin,Do2,black);
  delay(black+50);
  tone(BuzzerPin,La,black);
  
  delay(2*white+50);
  
  tone(BuzzerPin,Mi,black);
  delay(black+50);
  tone(BuzzerPin,La,black);
  delay(black+50);
  tone(BuzzerPin,Si,black);
  delay(black+50);
  tone(BuzzerPin,Do2,white*1.3);
  delay(2*black+50);
  
  tone(BuzzerPin,Si,black);
  delay(black+50);
  tone(BuzzerPin,La,black);
  delay(black+50);
  tone(BuzzerPin,Do2,white*1.3);
  delay(2*black+50);
  
  tone(BuzzerPin,Si,black);
  delay(black+50);
  tone(BuzzerPin,La,black);
  delay(black+50);
  tone(BuzzerPin,Mi2,black);
  delay(white+50);
  tone(BuzzerPin,Mi2,black);
  delay(white+100);
  
  tone(BuzzerPin,Mi2,black);
  delay(white+50);
  tone(BuzzerPin,Re2,black);
  delay(black+50);
  tone(BuzzerPin,Mi2,black);
  delay(black+50);
  tone(BuzzerPin,Fa2,black);
  delay(black+50);
  tone(BuzzerPin,Fa2,white*1.3);
  delay(rounda+100);
  
  tone(BuzzerPin,Fa2,black);
  delay(black+50);
  tone(BuzzerPin,Mi2,black);
  delay(black+50);
  tone(BuzzerPin,Re2,black);
  delay(black+50);
  tone(BuzzerPin,Fa2,black);
  delay(black+50);
  tone(BuzzerPin,Mi2,white*1.3);
  delay(rounda+100);
  
  tone(BuzzerPin,Mi2,black);
  delay(black+50);
  tone(BuzzerPin,Re2,black);
  delay(black+50);
   tone(BuzzerPin,Do2,black);
  delay(black+50);
  tone(BuzzerPin,Si,white*1.3);
  delay(white+50);
  tone(BuzzerPin,Mi2,white*1.3);
  delay(white+50);
  tone(BuzzerPin,Si,white*1.3);
  delay(white+50);
  tone(BuzzerPin,Do2,white*1.3);
  delay(white+50);
  tone(BuzzerPin,La,rounda*1.3);
  delay(rounda+50);
  
}

Schematics

untitled_sketch_bb_gIO2mYPlRr.jpg
Untitled sketch bb gio2myplrr

Comments

Similar projects you might like

Automatizing Percussion with Solenoids: "The Sound Compass"

Project tutorial by touchmysound

  • 4,773 views
  • 4 comments
  • 14 respects

National Anthem Tank

Project tutorial by Thomas Fowler

  • 885 views
  • 1 comment
  • 1 respect

Arduino UNO Guitar Pedal

Project tutorial by electrosmash

  • 67,694 views
  • 31 comments
  • 202 respects

Arduino Musical Tesla Coil

Project in progress by Brandon Michelsen

  • 12,732 views
  • 5 comments
  • 17 respects

Turn an Arduino Uno into a MIDI Controller: Guitar Pedals

Project tutorial by Johan van Vugt

  • 9,914 views
  • 1 comment
  • 11 respects
Add projectSign up / Login