0
\$\begingroup\$

I have 3 MCP3008's being read by an ESP32 on the same bus isolated by an ADUM3154ARSZ. I was reading each pin on the MCP3008's about every 10ms. I seemed to have a lot of jitter and after averaging the values I found them to be way too low. I then tried just reading one of the inputs every second to see what was going on and it appeared to be missing almost every second result. (0 or very low value)

02:28:21.170 > 426
02:28:22.178 > 0
02:28:23.204 > 1
02:28:24.210 > 422
02:28:25.218 > 0
02:28:26.230 > 424
02:28:27.234 > 1
02:28:28.242 > 425
02:28:29.250 > 0
02:28:30.258 > 0
02:28:31.282 > 423
02:28:32.290 > 0
02:28:33.298 > 424
02:28:34.306 > 1
02:28:35.314 > 0
02:28:36.322 > 425

I hooked up my scope to the serial pins at the MCP3008 and I seem to be getting corruption/low voltage on the MISO data line between the MCP3008's and ADUM3154ARSZ. (See pictures below) I have stripped everything down to just reading one MCP3008 through the isolator. I added a 10k pullup on the MISO line thinking that the isolator wasn't pulling the line up hard enough, but did not seem to change anything. I added some different delays between pulling the ADUM3154ARSZ address lines low and starting the SPI transaction but it did not seem to help either. (Shouldn't matter as address 0 is both address lines low anyways) Changing up the time between reads does not seem to change the ratio of how many good readings vs bad readings there are.

Also, when zooming right out on my scope I see the MISO line getting pulled down up to 15ms after the initial read and then about 12ms and then 9ms and keeps going down till 0ms and goes back 15ms or so. (Not sure what this is but seems to be a repeatable pattern)

I am not sure why it's doing this and was hoping someone here could spot what I am doing wrong.

Thanks!

Schematic for reference: (L3V3 and LGND are supply for ESP32 and P3V3 are supply for MCP3008's) Schematic

Good Reading: Good Reading

Bad Reading: Bad Reading

Another Bad Reading: Another Bad Reading

\$\endgroup\$

1 Answer 1

0
\$\begingroup\$

Complete facepalm here, I totally missed the pullups on the CS lines...

I had read on page 17:

To allow compatibility with nonstandard SPI interfaces, the MI pin is
always active, and does not tristate when the slave select is not
asserted.

I had assumed that this also applied to all the pins including the CS. I also thought the MCP3008's had CS pullups too. Not sure how I missed this in the scope, the CS looked good but I didn't realize the other 2 MCP's that I was not probing were driving the MISO line low.

From page 18:

Figure 12 illustrates the behavior of the SSA0 and SSA1
channels. This diagram assumes that MSS is low and that SS0,
SS1, SS2, and SS3 are pulled up.
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.