representing Analog signal (voice) in digital >>>>>>>>>(Arduino Due)<<<<<<<<<<

Hello all,

the aim of my project, is to build a simple system which takes voice via MIC and translates it into a digital representation zeros and ones. this output then is connected to LEDs . the board i am using is Arduino due.

could anyone helps me out to get the source code?!!

any help would be greatly appreciated,

Mohamed,

this output then is connected to LEDs

To do what, they will flash so fast they will look like they are on at about half brightness most of the time.

could anyone helps me out to get the source code?

Before that you need to get your hardware correct. You need to amplify the audio signal and then apply a biasing circuit just like the one at the front of this project:-
http://interface.khm.de/index.php/labor/experimente/arduino-realtime-audio-processing/

Hello Grumpy_Mike,

thank you very much for replying. my aim is establishing a simple telecommunication link between two point using visible light. at the transmitter, voice signal obtained by microphone then translated to digital by ADC and then sent by LEDs ,very much like On-Off Keying modulation. The LEDs work here as an antenna.

at the receiver point, a photo-detector receives the transmitted signal. the transmitted signal then converted to analog by DAC and then fed it to a headset to hear it.

Best Wishes,

Mohamed,

then translated to digital by ADC and then sent by LEDs ,very much like On-Off Keying modulation

If you just use the analogue value to set the brightness you will need a D/A because the PWM period will be too slow. The other problem using amplitude modulation like this is that you need a much bigger signal to prevent it dropping out at low volumes. You could always up the PWM speed to something like 38KHz but that puts a constraint on the speed that the detector has to work at. The difficult part is going to be the receiver. You need to sort out exactly what your hardware is going to be before you worry about code.

i parched two Arduino Due board to use then in this project .

why i am using digital output ?

"based on my poor understanding" a sequence of digital values that have converted voice signal allows me to use channel coding to detect and fixed some bits at the receiver side which have been damaged in the transmission link.

thanks,

to use channel coding

What is this?
You can not use data correction without building up some redundancy in your code, that is adding another layer of complexity and will require you to transmit data even faster.

dear Grumpy_Mike, we can ignore the coding thing at the moment since it is the final stage in my project (optional).

all regards

m_lab85:
dear Grumpy_Mike, we can ignore the coding thing at the moment since it is the final stage in my project (optional).

all regards

It is not optional because you need to know how you are going to code things before you can design the hardware.

because of Lack of sufficient time to submit my project, the coding part of my project is excluded from my project.
regards

hello Grumpy_ Mike,

i received the boards yesterday. i am in the learning processing i am trying to understand the examples which come with IDE software and run them.

code you helpl me with the sketch please?
thanks
M

Hi

With the help of the examples i've learnt some of basics on using Arduino Due. this code below is what i've reached so for.

void setup() {

Serial.begin(9600);
//pinMode(24,OUTPUT);
}

void loop() {
// analogReadResolution(12);
int VoiceInput = analogRead(A4);

Serial.println(VoiceInput);
delay(1);

}

==========================================================================================
As it illustrated in the sketch, i able to see the voice input signal though Serial Monitor window.
i stopped here!!!
my questions:
is there a function that i can use to take the data from analogReadResolution(12) and then connected into one of the digital output?
if not, can i see the address i am using to save voice input , because i am thinking i might be able to store the input data after converted by the commend analogReadResolution(12) and then connected to a digital output if it is possible?!!

sorry for the unprofessional description i am very very beginner in embedded circuits,

thanks,
M

m_lab85:
because of Lack of sufficient time to submit my project, the coding part of my project is excluded from my project.

You misunderstand. Not the code and in the computer instructions but the coding, as in how you are going to take your audio modulation and put it out to light an LED. Without knowing that you can not begin to do anything.

is there a function that i can use to take the data from analogReadResolution(12) and then connected into one of the digital output?

No but you could connect it to an analogue output. Use the dacc_write_conversion_data() function. Call the analogWriteResolution(12) in setup() first.

can i see the address i am using to save voice input

Store it in an array if you want to store it.