Generating and controlling audio with an Arduino Mega 2560... URGENT ASSISTANCE

Hi guys,

I am new to the whole Arduino build thing, however I am satisfactory at general C++ coding. So my understanding of how code is wrote is valid, however I am in need of assistance when coming to interfacing my first Arduino project.

Due to a few complications with me travelling I am in need to complete this small project within 2 days. Can you believe it? However I don't think that this is demanding, but more of a test with interfacing software with hardware components (which I am currently not any good at)

I need to wire up my Arduino, and interface it with a small breadboard, that has 2 momentary push buttons, and 3 potentiometers.

1 button must be able to turn on/off a sine wave of 440Hz, whilst the other turns off/on a sinewave of 880Hz.

2 potentiometers are needed to control the gain/volume of each individual sine wave. The last potentiometer is used to control the overall gain of both signals.

This is the first time I have done anything remotely in this area, and would like assistance on coding, and wiring up.

I do also need to compile a schematic of the build, with each component being expressed in a usual electrical circuit diagram.

To me, this seems like huge task, however there's a part of me that is just assuming it isn't hard, and I am having problems getting it done.

Could anyone assist me in this?

Kind regards,

DC

What problems? Post your current code.

To me, this seems like huge task, however there's a part of me that is just assuming it isn't hard, and I am having problems getting it done.

One thing at a time. What is it you want help with first.?

(The schematic you are going to have to draw by hand with pen & paper and post a photo of it. We are not going to do that for you. )

however there's a part of me that is just assuming it isn't hard,

Then I should have a word with that part of yourself. This is by no means an easy project, it requires at least some external filtering if not two D/A converters. The Mega might be under powered for the job.

I am in need to complete this small project within 2 days.

Sorry but that is simply not going to happen.

I've googled electronic schematic symbols and found numerous tutorials and links. I don't know why you are having any problem.

Just clarifying little more, maybe but it would help someone to answer better.

Where is these sine waves coming from? And where are they going after “controlling”? And by “control the gain/volume” do you mean change the amplitude? Keeping the wavelength same…?

If you are sending the signal from computer and want to receive to a computer after “controlling” then steps would be following. 1. Convert the signal to digital to some resolution 2. Send the signal to arduno via serial port 3. Change (+/- some constant to that digital stream) to that signal on the ardunio code based on reading from potentiometer pin 4. Write new data back to serial port 5. Read it from computer

1 button must be able to turn on/off a sine wave of 440Hz, whilst the other turns off/on a sinewave of 880Hz.

I have a news flash for you. Doing the above without a couple of DACs is going to be difficult, to say the least. You can get a 12-bit dac from Adafruit but you won't make your deadline.

Just clarifying little more, maybe but it would help someone to answer better.

Where is these sine waves coming from? And where are they going after “controlling”? And by “control the gain/volume” do you mean change the amplitude? Keeping the wavelength same…?

If you are sending the signal from computer and want to receive to a computer after “controlling” then steps would be following. 1. Convert the signal to digital to some resolution 2. Send the signal to arduno via serial port 3. Change (+/- some constant to that digital stream) to that signal on the ardunio code based on reading from potentiometer pin 4. Write new data back to serial port 5. Read it from computer

Can you clarify the nature of the communication from on uC to the other ? Are you sending commands or data ?

raschemmel:
Can you clarify the nature of the communication from on uC to the other ? Are you sending commands or data ?

don’t know! i asked the same thing… and suggested a possible scenario.
Deadcell might explain what he is actually doing :slight_smile:

Deadcell: To me, this seems like huge task,

If you aren't familiar with hardware and firmware development then you've got quite a steep learning curve ahead of you. It seems unrealistic to expect to complete it in just two days.

This is the first time I have done anything remotely in this area, and would like assistance on coding, and wiring up. I do also need to compile a schematic of the build, with each component being expressed in a usual electrical circuit diagram.

Reality Check ?