Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Electret mic / Arduino configuration

Status
Not open for further replies.

frusciante89

Newbie level 6
Joined
Feb 16, 2013
Messages
11
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,366
Hi everybody, I have a problem with an electret mic. I searched the forum but i wasn't able to find an answer. I'm pretty new in this field so I hope you can understand my low level... :)
I am design a sound following robot, and I decided to use two electret mics. First problem is how to amplify the signal going to the Arduino. I saw several boards on sparkfun but I want to build my own. I tried to build this one:
https://www.inexglobal.com/downloads/ZX-sound_e.pdf
however, I had to make some modifications due to the available material I had in the lab:
- I used a MC33078 op amp instead of the TLC272
- I used a 10 ohm resistor instead of the 12 ohms (I had none)
- I used only electrolytic caps


This is the arduino code I'm using for the analog signal reading:

/*
AnalogReadSerial
Reads an analog input on pin 0, prints the result to the serial monitor.
Attach the center pin of a potentiometer to pin A0, and the outside pins to +5V and ground.

This example code is in the public domain.
*/

// the setup routine runs once when you press reset:
void setup() {
// initialize serial communication at 9600 bits per second:
Serial.begin(9600);
}

// the loop routine runs over and over again forever:
void loop() {
// read the input on analog pin 0:
int sensorValue = analogRead(A0);
// print out the value you read:
Serial.println(sensorValue);
delay(200); // delay in between reads for stability
}


I tried the circuit and it's not working (gives a reading of 910 no matter how loud I speak into the mic), could it be because of the modifications I made?
I have also a couple of more questions:
what is the best way to process the signal coming from the two mics in order to tell the direction? should I use a volume based detection or a delay based detection?

Thanks for your help,
Andrea


foto 2-1.JPGfoto 1-1.JPGfoto 3-1.JPG
 
Last edited:

I'm running a simulation. The final output is a pulse train, alternating 0 and 5V.

The second op amp has too much gain. It has no feedback resistor.

It's hard to be sure what amount of gain is needed at the first op amp.

Troubleshooting will be awkward because your op amps are powered from a single supply. You need to adjust for a proper volt level at all their inputs, so as to get an output which is riding the right amount of DC component.

While you are in the development stage, it will be easier if you power them from a bipolar supply. Get things working right with AC. Then you can gradually reduce the amplitude on the negative supply, while you adjust volt levels at inputs to maintain correct output.
 

The TLC272 that is specified for the circuit has a common mode input voltage (Vicm) that extends below its negative rail, so an input centred on 0V is acceptable.

But the MC33078 has a Vicm that only goes as low as Vcc+1V at best, and 0V is outside that range, so it will not work in that circuit.
 

The TLC272 that is specified for the circuit has a common mode input voltage (Vicm) that extends below its negative rail, so an input centred on 0V is acceptable.

But the MC33078 has a Vicm that only goes as low as Vcc+1V at best, and 0V is outside that range, so it will not work in that circuit.

Thanks for your answer... do you think there's a way to modify the circuit to make it work with the MC33078?
 

As Bradtherad suggested, you could power the amp from a dual power supply that gives Vss and Vdd as negative and positive relative to the input ground. The input would then always be higher than Vcc,
 

As Bradtherad suggested, you could power the amp from a dual power supply that gives Vss and Vdd as negative and positive relative to the input ground. The input would then always be higher than Vcc,
ok, how can I realize this?
 

As it's for a robot, I assume it will be battery operated.

Use 2 x AAA cells in series and connect ground to the +ve of the cells. Connect the -ve to Vss. Use the (5V?) Arduino supply for Vdd. You will then have Vss = -3.0V and Vdd = +5V.

The output of the 2nd amp will go between those two voltage levels, so you will need a resistor to ground on your Arduino and feed it via a diode so the Arduino input goes from 0V to +4.3V. That should be OK for the Arduino.
 
Last edited:

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top