How to Generate Tones With Arduino

358

10

Posted in TechnologyArduino

Introduction: How to Generate Tones With Arduino

About: For me, instructables is more than a website. It is a lifestyle. It gave me the chance to live my dream. Share what I do with the world. I am an embedded Systems Engineer. Love to travel , run , design usefu...

In this instructable I made a circuit that generates tone with Arduino. I really like simple and fast to build projects. Here is a simple project of this kind.

This is a show and tell project that I made exactly using documentation from Arduino website.

https://www.arduino.cc/en/Tutorial/ToneMelody?from=Tutorial.Tone

In this post, I’ve tried to generate tones with Arduino board.

Using Arduino Uno and an 8 ohm speaker, you can easily generate tones and sounds.

This Arduino sketch uses Tone function to generate sounds.

Microcontroller Contest

This is an entry in the
Microcontroller Contest

Step 1: Components and Circuit

Components:


Arduino Uno or any other Arduino board will do.

eBay , Banggood , Aliexpress , Amazon US , Amazon UK , Amazon CA , Amazon DE , Amazon FR

, Amazon IT , Amazon ES

8 Ohm Speaker

eBay , Banggood , Aliexpress , Amazon US , Amazon UK , Amazon CA , Amazon DE , Amazon FR
, Amazon IT , Amazon ES

Prototyping Breadboard

eBay , Banggood , Aliexpress , Amazon US , Amazon UK , Amazon CA , Amazon DE , Amazon FR
, Amazon IT , Amazon ES

Connection circuit:

The circuit is very simple.

Connect the speaker to Arduino board on PIN 8 and GND.

Step 2: Simulation and Code

Simulation is a great tool to test your design before actually building anything. You can also use simulation when you don't have the hardware and you need to get started.

In this simple circuit, simulation is only used for clarifying the concept and showing how it works.

There are many Arduino simulation software. In this instructable, I used Autodesk online platform Tinkercad.

You can see the circuit and start simulation. You can edit it and change the code to your needs.

https://www.tinkercad.com/things/fWelGEvtEDT-start-simulating

You can build any circuit you like and you can also browse all projects to find what you are looking for.

Here is the post on my website

http://www.ahmedebeed.com/2018/04/how-to-learn-arduino-when-you-dont-have.html

Step 3: Build Real Circuit

Now you can build the real circuit and upload Arduino sketch to the board.

Here is the video of the circuit in action.

Here is the circuit on my website

http://www.ahmedebeed.com/2018/04/arduino-tones-how-to-easily-generate.html

You can visit my author page on Amazon. There you can find all my books and blog posts.

amazon.com/author/ahmedebeed

Thank you for reading.

Share

    Recommendations

    • Microcontroller Contest

      Microcontroller Contest
    • Science of Cooking

      Science of Cooking
    • Spotless Contest

      Spotless Contest
    user

    We have a be nice policy.
    Please be positive and constructive.

    Tips

    Questions

    Comments