Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Possible -Playing a simple sound using an AVR uC?

Status
Not open for further replies.

suhasm

New Member
Here in India , we have gadgets called "shruthi boxes" which produce a continuous drone which is used for tuning various instruments or for aid while singing.

The problem is that these things are hideously expensive for the simple things that they are (a basic one is 120$ , and a good one will be 200$).

So ,i was thinking of making one myself using a AVR uC.
Here is the link to an online sruthi box :
Royal Carpet: karnATik Online Shruti Box

The sound that comes out of is very simple and is in a continuous loop.
So , is there any way of loading a part of the sound into the uC and then looping it as to produce a continuous sound?

It would be pretty much a revolution in india if someone manages to make sumthing like this and sell it for less than 10$...
 
You could use the cheapest micro that would accept a crystal, probably a dollar in volume. Other parts like PC board, speaker, packaging, marketing, etc. are unpredictable.

But you can already load files into an iPod, essentially a free sruthi box for anyone who already owns an iPod. This probably includes most musicians.
 
The cost is not really a factor right now as i'm not thinking of production or anything.
I want to make one for myself first to test it out.

AVR uCs are pretty cheap in India too. tiny2313s are around a $ a piece and Atmega8s are around 1.5$. Atmega16s and all the others are available too.
Most of them are <4$.


So is there a way to make the uC 'sing'? The sound quality does not really matter that much. I would prefer using a Atmega8 for the job.
I read somewhere that PWM could be used to accomplish this , but i have no idea about the code.

I would be grateful if someone could provide some C code or pseudocode regarding this.

Thanks ,
Suhas
 
Do you need the weird sound where the harmonics keep changing or can you use pure sine-waves for tuning?
 
**broken link removed** is a good place to start.
 
Weird harmonics are required. Those weird harmonics dont make the drone sound awkward if it is used during a performance.
A sine wave (or any other) will not blend in well.


@Sceadwian
Thanks for the link.

Is there anyway of analysing the waveform and finding a function for it?
We can then perhaps use that function to directly synthesize the sound in the uC instead of playing it back from the EEPROM.
 
The MiniDDS project may work for your needs, you'll just need to use a custom lookup table that has some randomness to it so you don't get a pure sine wave. This should be trivial to do in audio editing software and then you can zoom in on a single cycle of the audio to get what you need.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top