I am having a problem with the output value of my arduino mkr nb 1500 I am turning to you for advice or solutions.
Here are the details of my setup:
Arduino card: MKR NB 1500
Power supply used: PC (+ External battery)
Connected components: Microphone equipped with a pre-amp
Supply voltage: 5V
The problem I encounter is the following: My microphone is connected to port A0 of the arduino and then thanks to the maths, i determine the voltage and then htanks to the sensivity of the micro i have the SPL value but when i am wired to te PC + an external battery i have a value and then when i disconnect one the value drops despite the same noise.
If anyone has encountered this type of problem before or has any idea what could be causing this, I would appreciate any advice. All suggestions are welcome!
Interesting, sounds like a hardware problem. Post an annotated schematic showing exactly how you have wired it, include all power sources and links to technical information on each module. Show what battery you are using. If it is a 9v smoke alarm battery expect that to be the problem.
If you have a multimeter, check to see if the 5V or 3.3V is changing. I don't know much about the MKR but the default analog reference is probably 3.3V.
What is this and post a link to its technical information.
I will take a SWAG and say your microphone board has a digital output but not an analog. Also the pot adjusts the threshold of the onboard OP-AMP/comparator allowing you to set a threshold level.
The Microphone you have and what you originally showed are completely different. It sounds feasible with what you have. Post that schematic, the pictures do not cut it. Also measure the voltages when it is connect up each way. Analog is very sensitive to supply voltages and noise.
I don't get you problem. If connected like you showed, just read out A1 and print it out to the console and open the serial plotter. Then you should see the waveform. Here freestyle without checkin:
int sensorPin = A1; // select the input pin for the potentiometer
int sensorValue = 0; // variable to store the value coming from the sensor
void setup() {
Serial.begin(115200);
delay(1500); // Wait for Serial Monitor to start
}
void loop() {
// read the value from the sensor:
sensorValue = analogRead(sensorPin);
Serial.println(sensorValue);
delay(5); // Bit hickup prevention, maybe not neccesary
}
If you start this and then ->Tools->Serial plotter
Make sure you switched the plotter to 115200 Baud or whatever you define in the code
What dou you see while you talking into the micro?