First of all I am new to electronics. I am using ESP32 dev kit and trying to communicate with an i2c sensor and an analogue sensor. I am able to communicate both devices. I am using freertos Task to gather output running on parallel threads on two cores of esp32. But I moticed that as the i2c commumication begins the noise in the analogue signal increase to very high level. I am completely puzzled why this is happening. Could be ghosting ? Or something that I don't know . Need your guidance on that. How to resolve this issue. Please note if i2c device is not running analogue values are read perfectly. Please help with your ideas or questions. Thanks a bunch
It could be an electromagnetic interference or a bug. If any of you have any ideas that would help me a lot.
Regards,Avi
I2c communication and analogue read, not working ideas??
-
- Posts: 9711
- Joined: Thu Nov 26, 2015 4:08 am
Re: I2c communication and analogue read, not working ideas??
How did you build your hardware? Breadboard, jumper wires, proper PCB, ..? Also, what sensors do you use and how are they mounted?
Re: I2c communication and analogue read, not working ideas??
Thank you for your response.
Here is the configuration:
I2C Device: 3 axis accelerometer
Analog device: analog Microphone
Board: ESP32 dev kit
Arrangements: on the breadboard with jumper wires
I2C device drawing power from the ESP32 dev module, and communicating via pin via 21 and 22 (SCL, SDA).
Analog device drawing power from ESP32 as well, and communicating via pin34. (have tried multiple pins though)
Test1: I2C if off, analogue is reading perfectly no noise. Confirmed the signal values with an external Arduino also.
Test2: I2C comm. is on, analog signal has noise.
Test3: I2C is on and analogue is on both supplied power from ESP32 devkit. Kept a distance between Analog wires and sensor away from the I2C to minimize any electromagnetic interference. Analogue is showing noise.
Test4: I2C drawing power from ESP32, where as analog drawing power from an Arduino. Still similar level of noise.
And interesting test ...
Test5: I2C and analog drawing power from the ESP32 board. Arduino is also reading the same Analog signal that's being fed to ESP32. SO ESP32 and Arduino both are reading the same analog signal, but ESP32 is also working with I2C sensor. ESP32 reading from analog device have similar noise but Arduino is reading the signal without any noise. It seems there is a problem internally with ADC of ESP32.
Please let me know if this helps. Looking forward to more suggestions.
Please note I have confirmed both sensors individually works fine.
Cheers,
Avi
Here is the configuration:
I2C Device: 3 axis accelerometer
Analog device: analog Microphone
Board: ESP32 dev kit
Arrangements: on the breadboard with jumper wires
I2C device drawing power from the ESP32 dev module, and communicating via pin via 21 and 22 (SCL, SDA).
Analog device drawing power from ESP32 as well, and communicating via pin34. (have tried multiple pins though)
Test1: I2C if off, analogue is reading perfectly no noise. Confirmed the signal values with an external Arduino also.
Test2: I2C comm. is on, analog signal has noise.
Test3: I2C is on and analogue is on both supplied power from ESP32 devkit. Kept a distance between Analog wires and sensor away from the I2C to minimize any electromagnetic interference. Analogue is showing noise.
Test4: I2C drawing power from ESP32, where as analog drawing power from an Arduino. Still similar level of noise.
And interesting test ...
Test5: I2C and analog drawing power from the ESP32 board. Arduino is also reading the same Analog signal that's being fed to ESP32. SO ESP32 and Arduino both are reading the same analog signal, but ESP32 is also working with I2C sensor. ESP32 reading from analog device have similar noise but Arduino is reading the signal without any noise. It seems there is a problem internally with ADC of ESP32.
Please let me know if this helps. Looking forward to more suggestions.
Please note I have confirmed both sensors individually works fine.
Cheers,
Avi
Who is online
Users browsing this forum: No registered users and 67 guests