Pages: [1]   Go Down
Author Topic: representing Analog signal (voice) in digital >>>>>>>>>(Arduino Due)<<<<<<<<<<  (Read 1117 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 36
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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,
« Last Edit: October 10, 2013, 11:35:15 am by m_lab85 » Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 597
Posts: 33301
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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.

Quote
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/
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 36
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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,
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 597
Posts: 33301
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 36
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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,

Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 597
Posts: 33301
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 36
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

all regards
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 597
Posts: 33301
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 36
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Offline Offline
Newbie
*
Karma: 0
Posts: 36
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 36
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 597
Posts: 33301
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

Quote
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.

Quote
can i see the address i  am using to save voice input
Store it in an array if you want to store it.
Logged

Pages: [1]   Go Up
Jump to: