Hi all,
I'm new to the sensor thing. But is it okay if I have a result like picture below? I used loudness sensor that connected to 3v3. Which pin should I connect 3v3 or V5 pin? I used the esp32 board, so if I'm not mistaken when I blow the analog reading should higher and closer to 4096 right? Can someone help me.
No problem, Connect the red to the green and do not forget the violet goes to the orange. That is the best answer I can give unless I know what you are talking about. Post links to each of the hardware devices that give technical information. It may surprise you but I have no idea what Arduino you are using. A simple schematic showing how this is connected showing all connections including power, ground and power supplies would be a big help for us to help you. If you forgot from your previous visit please skim over the forum guidelines to refresh your memory.
Hi gilshultz. I used this loudness sensor and it say that analog reading is 0-1023. What if I connect to board esp32 (should I get 0-4095 or 0-1023). Is it okay if I connect Vcc pin from sensor to V5 pin in esp32 board or 3v3? because the datasheet show 3.5-10v for input power to sensor.
This is an analog output board, that is a positive voltage from 0 to +5V. The spec Output Signal range (0-1023) really is not appropriate: the Arduino uC A/D unit will digitize based on software setup:
-
0-1023 == 2^10 bit digitation
-
0-4095 == 2^12 bit digitation
Depends on how your A/D is configured and the A/D capability. You feed the uC and the peripherial with the same Vcc ... that is, if a 5V uC then 5V to the loudness sensor. If the uC is 3.3 V then the sensor should be provided with 3V3.
Hi mrburnette. Based on what I understand, I should get between 0-4095 since I used esp32 board and connect 5v uC to 5V loudness sensor. However, I found the sensor not quite sensitive , the max I got is 3115 which equivalent to 3.8v. that is when I blow closer to microphone.
Is it because of the sensitivity show on the datasheet?
const byte soundpin = 35;
void setup() {
pinMode (soundpin, INPUT);
Serial.begin (115200);
}
void loop() {
int sample = analogRead(soundpin);
Serial.print(sample);
Serial.print("\t");
float volt_calc= sample*(5/4096.0);
Serial.print(volt_calc);
Serial.print("\n");
delay(200);
}
Crank-up the gain to max.
You get what you get.
3115 out of 4096 sounds about right to me. Betcha my wife screaming could give a solid 4095.
I am having vision problems, I cannot see the schematic or any of the needed technical details. That link has no real technical information, it is a sales blurb. It does not give any indication of what the output is in relation to the SPL (Sound Pressure Level). The LM2904 is not a rail to rail op amp so you will not get 5V out with 5V supply nor will you get zero. "Filters high frequency, what does that tell us"? They say that analog reading is 0-1023, that tells me nothing about the sensor just what the A/D can do. Using a 10 Bit will give you a higher number assuming the same reference voltage. For the voltage reading counts to mean anything the reference voltage and the input reference both need to be known as to the number of bits the A/D is. Anything in the range is OK, just be sure the grounds of the supply are connected. The 5V pin is ok as is the 3V3. It also appears you did not read the Forum guidelines,.
the technical data related to sensor by grove
LM2904DR.pdf (448.0 KB) -data sheet of lm2904
Grove_loudness_sensor.pdf (35.5 KB)
Grove-loudness sensor PCB.pdf (17.8 KB)
below are my code to get analog read and voltage calculated
int sample = analogRead(soundpin);
Serial.print(sample);
Serial.print("\t");
float volt_calc= sample*(5/4096.0);
Serial.print(volt_calc);
Serial.print("\n");
delay(200);
here is the output from serial monitor when I played a song of 80% of the phone speaker with a distance about 3cm to microphone. I used V5 pin from esp32 board
Are you saying you are connecting a 5V signal to a 3V3 ESP32 board?
If so then 3V3 is the maximum voltage you can measure because it is a 3V3 processor.
All very well but it does not show in any way how you have wired things up in your circuit.

here is the wire connection , esp32 connects to laptop through micro usb and the nc not connected.
vcc- v5 pin
gnd -gnd pin
sig- pin 35
As I thought you are trying to feed a 5V signal into a 3V3 device, thus overloading, and possibly damaging your ESP32.
So you need to connect a 2K resistor from the ESP pin 35 to ground, and also a 1K resistor from the ESP pin 35, to the sig pin of your loudness sensor, in order to read the full output of the loudness sensor.
but based on this website, the input range for sensor from 3.5-10v , do I need to place the resistor?


ref: Grove - Loudness Sensor - Seeed Wiki
That means that you are exceeding reaching the maximum reading possible on the ESP32.
So
Yes.
If you want to see the full range from the sensor to be reflected in the maximum output the analogue the digital to analogue converter of the ESP32 can supply.
If you don't and don't mind potentially damaging your ESP32 then feel free to ignore my advice. But you will still be faced with the same problem as you have now. As you asked for help it seems a pity to ignore it.
Also I will not take part in this thread any more as I would be just wasting my time, that could be spent helping people who really want help.
I would appreciate if you draw the circuit diagram on which part to connect 2k and 1k resistor. I dont get how the connection and will try to follow the best I can.
The schematic you posted shows a SENSOR-MULPS4CX, what is it? At this point I suggest you spend some time with basic electronics books/tutorials, focusing on Op-Amp output voltage range vs power supply voltages. When You understand that you will start to understand that the pseudo specifications given are saying. They are not wrong just wide open to misinterpretation to the inexperienced while not giving a lot of information. The picture shows the LM2904, not U4.
Read both the Arduino and Basic Electronics cookbooks, that will start you in the correct direction. You also should understand most of us do not have the parts you are talking about, just an understanding of electronics and how parts work.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.






