FPGA music box: help needed

FPGA projects on this site, or abroad

FPGA music box: help needed

Postby Blistered_Heart » Thu Aug 09, 2007 8:33 am

Hi.. I've sign in to this forum n i hope that i can gain knowledge as well as info in this forum.

I'm doing my bechelor project on FPGA music box at the moment. The problem is, I'm not really familiar with FPGA. I need info about the concept how to produce music(sound) using FPGA.

Thanks... :oops:
Blistered_Heart
 
Posts: 7
Joined: Thu Aug 09, 2007 7:47 am
Location: Malaysia

Postby Kristallo » Thu Aug 09, 2007 9:28 am

A FPGA can do anything so you are only limited to your ability and the amount of time you have.

Google "sound synthesis" to get some ideas.
Kristallo
 
Posts: 203
Joined: Mon Sep 20, 2004 3:25 am

FPGA or CPLD?

Postby Blistered_Heart » Wed Sep 05, 2007 3:29 am

hi guys...

i have a simple question here. why FPGA is more preferable than CPLD in designing music box? I think CPLD is better because of its higher performance compared to FPGA...

please give some reasons.... :?
Blistered_Heart
 
Posts: 7
Joined: Thu Aug 09, 2007 7:47 am
Location: Malaysia

Postby Kristallo » Wed Sep 05, 2007 5:52 am

That depends on how you define performance. A CPLD has more predictable timing, a FPGA har a lot more computing power.

I don't think either is suitable for sound generation. A CPU would be far more suitable for general purpose sound generation because you can develop the application without fighting bad compiler software.
Kristallo
 
Posts: 203
Joined: Mon Sep 20, 2004 3:25 am

FPGA or microcontrollers?

Postby Blistered_Heart » Thu Sep 06, 2007 3:29 pm

Dear friends.....

I just need a few information... Microcontrollers are CPU based devices. If that so, don't microcontrollers also can be used for music box? What are the advantages of FPGAs over microcontrollers that make FPGAs more suitable for designing music box?

Thanks friends, I appreciate your help..... :oops:
Blistered_Heart
 
Posts: 7
Joined: Thu Aug 09, 2007 7:47 am
Location: Malaysia

Postby Kristallo » Fri Sep 07, 2007 3:12 am

An ARM based microcontroller would be very good for sound synthesis. It all depends on your requirements.

I don't think FPGAs have any advantages in this case unless you need to interface to some specific hardware or other requirements that is not compatible with a modern microcontroller.

You have not defined your idea of what a "music box" is so it is impossible to say anything specific.
Kristallo
 
Posts: 203
Joined: Mon Sep 20, 2004 3:25 am

Postby Blistered_Heart » Fri Sep 07, 2007 4:02 am

Hello...

The concept of my music box is simple. I just need to write program using verilog code to perform frequency division using the FPGA. The 25 Mhz input clock will be devided using counter to produce desired output frequency.
Blistered_Heart
 
Posts: 7
Joined: Thu Aug 09, 2007 7:47 am
Location: Malaysia

Postby Kristallo » Fri Sep 07, 2007 4:48 am

That could be done cheaper and simpler using other methods so it does not make sense to use a FPGA from a practical perspective.

As a project to learn about FPGAs it would be reasonable place to start.
Kristallo
 
Posts: 203
Joined: Mon Sep 20, 2004 3:25 am

problem statement

Postby Blistered_Heart » Thu Sep 13, 2007 4:58 am

hello guys...

I got a simple problem statement that i can't figure out the answer. For this project of making music using FPGA, what is the benefits or purpose, drawbacks and the contribution towards music industry?

I just need some idea. May be your idea will generate mine....

thanks a lot dudes..... :wink:
Blistered_Heart
 
Posts: 7
Joined: Thu Aug 09, 2007 7:47 am
Location: Malaysia

Postby Kristallo » Thu Sep 13, 2007 8:37 am

This has nothing to do with FPGAs, we are not here to do your homework for you.
Kristallo
 
Posts: 203
Joined: Mon Sep 20, 2004 3:25 am

Postby Blistered_Heart » Thu Sep 27, 2007 4:57 pm

good day friend,..

now i've started to get into the herilog DHL. The problem is, i'm using a numerical division way which is considering floating number. The ieee library seems not support this program. What other library should i use that support numerical division?

Thanks a lot.. :lol:
Blistered_Heart
 
Posts: 7
Joined: Thu Aug 09, 2007 7:47 am
Location: Malaysia

Postby Kristallo » Fri Sep 28, 2007 2:59 am

Multiplication is really bad, division is a complete disaster when it comes to FPGAs. They are either slow or require a lot of resources, or both. Except for those FPGAs with built in multipliers.

There are 100 ways to solve your problem, none of them are nice.
Kristallo
 
Posts: 203
Joined: Mon Sep 20, 2004 3:25 am

Postby Hash » Fri Oct 19, 2007 10:47 pm

hey guys,

i was trying to implement the music box project in VHDL.
I am using the D2E (digilent) fpga board.
i got the code ready, but when I connect the speaker i am not able to hear anything. :(

I used a 1K Ohm resistor and an 8 Ohm mini speaker.
Here are the speaker specs.
Rated Input : 0.1W
Max Input : 0.2W

I also tried directly connecting the speaker without the resistor. That too didnt work.

Any idea where i am going wrong?

thx

--Hash.
Hash
 
Posts: 1
Joined: Fri Oct 19, 2007 10:42 pm

Postby vlado » Wed Oct 24, 2007 6:04 pm

Power W=U*I
U= R*I

W = R*I*I

In your case current I is about or less than 10mA (depends of FPGA)
I*I = 0.0001 A

W = 8* 0.0001 = 0.0008 watts

If you use resistor 1k Ir = 3mA so W = 0.00007 watts

I'll be wondering if you can hear anything.
Use transistor to amplify output power.
Ic = Ib * beta (were beta is about 1000)
Don't forget to limit Ic current with resistor.
vlado
 
Posts: 29
Joined: Mon Apr 16, 2007 5:40 pm

Postby Blistered_Heart » Thu Dec 13, 2007 3:34 am

In case of sound production.

The output waveform from the fpga is square wave shape waveform. Doesn't it suppose to be a sinusoidal shape waveform to produce sounds? Do we need a cycloconverter to convert the output waveform?... :lol:
Blistered_Heart
 
Posts: 7
Joined: Thu Aug 09, 2007 7:47 am
Location: Malaysia

Postby Kristallo » Thu Dec 13, 2007 6:40 am

The shape depends on the sound you want, only you know what sound you want so only you know the shape of the waveform.

For complex waveforms you have these choices:
You can use PWM and get good quality. You can use PWM with noise shaping and get perfect quality. You can make a D/A converter by using simple resistors, like a R2R network. Use a proper D/A converter.
Kristallo
 
Posts: 203
Joined: Mon Sep 20, 2004 3:25 am

Postby nzsyen » Sun Feb 17, 2008 8:13 pm

Hash wrote:hey guys,

i was trying to implement the music box project in VHDL.
I am using the D2E (digilent) fpga board.
i got the code ready, but when I connect the speaker i am not able to hear anything. :(

I used a 1K Ohm resistor and an 8 Ohm mini speaker.
Here are the speaker specs.
Rated Input : 0.1W
Max Input : 0.2W

I also tried directly connecting the speaker without the resistor. That too didnt work.

Any idea where i am going wrong?

thx

--Hash.


hey guy,

i wonder where to connect the speaker to the board...
since the speaker only got wire...where should we plug the wire or what extension we need to apply this?
nzsyen
 
Posts: 2
Joined: Wed Jan 30, 2008 4:38 am


Return to General projects