Industrial manufacturing
Industrial Internet of Things | Industrial materials | Equipment Maintenance and Repair | Industrial programming |
home  MfgRobots >> Industrial manufacturing >  >> Manufacturing Technology >> Manufacturing process

Arduino UNO Plays the Indian National Anthem – Simple Hardware Prototype

Components and supplies

Arduino UNO Plays the Indian National Anthem – Simple Hardware Prototype
Arduino UNO
×1
Arduino UNO Plays the Indian National Anthem – Simple Hardware Prototype
Bitcraze Micro SD card deck
×1
Arduino UNO Plays the Indian National Anthem – Simple Hardware Prototype
Speaker: 3W, 4 ohms
×1
Arduino UNO Plays the Indian National Anthem – Simple Hardware Prototype
General Purpose Transistor NPN
×1

About this project

Hi all,

I developed a Hardware prototype which is playing Indian National Anthem.

Components

First of all We need

  • Arduino Board Anyone
  • SD Card Module
  • Speaker 4ohm
  • BC547
  • 1k Resistor

Connect all hard wares as the circuit schematic.

You need one library to play your favorite song I found from this link.

This method only work for wav file. so you should convert your song with this settings

  • WAV file,
  • 8-bit,
  • 8-32khz Sample Rate,
  • mono.

https://github.com/TMRh20/TMRpcm/wiki#functions

Files easily converted:Using iTunes:

Click _> Edit > Preferences > Import Settings_Change the dropdown to _WAV Encoder_ and Setting: _Custom > 16.000kHz to 32kHz, 8-bit, Mono_Right click any file in iTunes, and select _"Create WAV Version"_

Using Audacity:

Tracks > Stereo Track to Mono    Project Rate (HZ) > set to 32000, 22050, 16000 or 11025    File > Export > Save as type: Other uncompressed files > Options...    Select WAV, Unsigned 8 bit PCM    

Then copy file to SD card using computer

This is the output

Code

  • Code
CodeC/C++
#include "SD.h"
#define cs 4
#include "TMRpcm.h"
#include "SPI.h"

TMRpcm Bz;

void setup(){
Bz.speakerPin = 9;
Serial.begin(9600);
if (!SD.begin(cs)) 
{
return;
}
}

void loop()
{ 
  Bz.setVolume(4); 
Bz.play("na.wav");
//delay(300000);
//Bz.play("176.wav");
//delay(300000);
//Bz.play("128.wav");
delay(58000); // Song duration
}

Schematics

BC547 Fritzing Pinout E B CArduino UNO Plays the Indian National Anthem – Simple Hardware Prototype

Manufacturing process

  1. Build a Bluetooth‑controlled Arduino Spybot
  2. FlickMote: Gesture‑Controlled IR Remote for Smart Home
  3. DIY Arduino TV B-Gone: Universal Remote for All TVs
  4. Build a Custom LED Master Clock with Alarm – Viewable from 12 Meters
  5. Find Me: Smart Item Locator with Arduino and Bluetooth
  6. Arduino Light & Sound Display: US National Anthem
  7. Optimized Power Solutions for Arduino Projects
  8. Arduino Tic Tac Toe with MAX7219 LED Matrix and Cardboard Enclosure
  9. Build a Smart Arduino Quadruped Robot: Step‑by‑Step Guide
  10. Build a Custom Arduino Joystick Steering Wheel for Gaming