-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Strange issue with MCP3561 #11
Comments
hi @y3nd I can not remember ever experiencing your issues... a dirty fix which came to my mind is to increase OSR more likely it is an issue with _getValue - which data format are you using? as far as I remember this function changed as well between those branches... converting the raw value into signed 32bit dependent on the data_format and resolution and there are bitmasks which might explain your issue. |
I forked the main branch in December, i'll try the develop branch next but I don't think it's a conversion issue from the lib, since printing the raw values from the SPI transfer are showing the same 00000 for LSB. I saw on the web issues with SAR, and AD has an article about "stuck codes" but it doesn't match with the "specific stuck codes" issue I have, and my board has practically no noise as the analog parts are quite decoupled with their own power-supply etc.. but it could be flawed somewhere. |
I circumvented the ADC spikes issue by using differential mode. No spikes or stuck codes now, but really high gain all the time, about x20 gain. Setting the gain just multiplies the always-present x20 gain (0.33x = 6.6x, 1x = 20x, 2x = 40x etc..) really weird. I've contacted Microchip and they have no idea of what's going on. It might be a counterfeit, but I bought it through JLCPCB... |
Hello,
I know the question is not directly related to the library, but I still want to give it a shot, since I am a bit stuck there.
I have a MCP3561 with a MAX4208 amplifier to measure the voltage at the output of a strain gauge. The MCP3561 is drived by an ESP32 using this library. I would like the system to work in continuous mode in MUX mode (differential).
Everything is working well (config settings, continuous mode, irq pin) but I have very strange steps showing in the output signal. It seems to be related to some specific ADC count values, and I can't find anything similar on the web too. After some digging I found out that sometimes, somehow, a group of samples has missing ADCDATA bytes, always the less significant ones. So data like 0x3Cxxxx becomes 0x3C0000 and it stays like this until a high/low enough sample appears and change the current value.
Like you can see on this picture (values are calibrated values for my use), there are somes value-based steps appearing at 11.27-21.68-31.04, on the ascent and the descent of the curve.
There is a small antialiasing filter consisting of two RC (1k/100n) filters in between, like in the schematics of the weight scale example application provided by microchip
I have tried with a signal generator directly on the input of the antialiasing filter and it still the same.
If you have any clue or something I could check/test/do to know what's causing this issue...
The text was updated successfully, but these errors were encountered: