Problem with Arduino/MCP4131: maybe a SPI related issue?

Hi all,

I’m having some issues replicating my breadboard circuit on a PCB. The issue appears to be surrounding the MCP4131 chip (digital potentiometer) that I am using to calibrate a strain gauge bridge circuit.

On the breadboard circuit, I am able to adjust the voltage values (confirmed with DMM measurements of TP7). When I measure TP7 on the PCB, the voltage does not change to changing the register values (always stuck at 2.12V).

Any thoughts on what the root cause could be would be appreciated!

Additional information:

  • When I power reset the PCB and load a Blink code, the voltage at TP7 is closer to 1.5V. Whenever I upload any code to the register value (as attached) the TP7 voltage goes to 2.12 V
  • I got a colleague to take a look and they mentioned that the CS signal (Pin 6) was not going high after transmission after measuring on an oscilloscope. I didn’t supervise this measurement though, so I am not sure if it’s related. He may have uploaded a different code, different measurement, etc. I attached a screenshot of the oscilloscope reading.

Schematic, Code attached.

Using Arduino Nano IoT
Using the DFN package of MCP4131 on the PCB; DIP package on the breadboard

ArduinoMCP4131Test.ino (663 Bytes)

Schematic_V1_0503.pdf (65.5 KB)

Schematic_V1_Markup.pdf (85.4 KB)

You must not power the MCP4131 with 3.3V but signal it with 5V on the SPI pins.

Please describe what you think the purpose of U5 is.

SPI.beginTransaction(SPISettings(10000000, MSBFIRST, SPI_MODE0));

A Nano isn't able to produce a 10MHz SPI signal.

On the breadboard circuit, I am able to adjust the voltage values (confirmed with DMM measurements of TP7).

Do you have picture of that setup?

I got a colleague to take a look and they mentioned that the CS signal (Pin 6) was not going high after transmission after measuring on an oscilloscope. I didn't supervise this measurement though, so I am not sure if it's related. He may have uploaded a different code, different measurement, etc. I attached a screenshot of the oscilloscope reading.

I have doubts about the quality of that measurement if the signal goes negative in it.

Thank you for your feedback. Please bare my ignorance, as I am new to a lot of this.

pylon: You must not power the MCP4131 with 3.3V but signal it with 5V on the SPI pins.

I am not sure exactly what you mean here. According to the data sheet, Vdd can be between 2.7V and 5.5V, so why is it an issue to use the 3.3V line from the Arduino?

|392x500

pylon: Please describe what you think the purpose of U5 is.

I understand that U5 looks useless according to the schematic. I originally intended U5 to control the gain on the Op-Amp, but I mistakenly connected the wrong pin (P0B instead P0W). Unfortunately, the board was printed like this, but I intend to correct it. :sweat_smile:

pylon: SPI.beginTransaction(SPISettings(10000000, MSBFIRST, SPI_MODE0));

A Nano isn't able to produce a 10MHz SPI signal.

So I checked the processor data sheet for the Arduino Nano IoT 33 as well as the MCP4131 datasheet. The Arduino sheet says that the frequency is 11.9 MHz (screenshot attached). The MCP4131 datasheet says it uses 10 MHz operation. I tried all of 11.9 MHz, 10 MHz and 1 MHz on the breadboard circuit and was able to successfully control the resistance values, but not on the PCB. From what I understand, Arduino selects an appropriate frequency when you specify something that may not work? What frequency would you suggest using here?

|471x500

pylon: Do you have picture of that setup?

I followed the same schematic as on the PCB, which is what I attached on my original post. I mocked up this diagram since I'm not sure whether a picture of all the messy jumpers is helpful :sweat_smile: (showing just the MCP4131 chips). Please let me know if this is helpful at all or whether you need to see more.

|500x183

pylon: I have doubts about the quality of that measurement if the signal goes negative in it.

Agreed, I wasn't sure how to interpret it.

Some additional information: I am able to successfully measure changing voltage values on U5 (on the PCB) between the P0A and P0W pins. This tells me that there doesn't seem to be anything wrong with U5 using the same code, which would point to something wrong with the U3 chip; although I'm not sure what would have caused this.