Author Topic: Interference Issues with Arduino Mega + 2xSPI devices  (Read 2565 times)

0 Members and 1 Guest are viewing this topic.

Online Nominal Animal

  • Super Contributor
  • ***
  • Posts: 7307
  • Country: fi
    • My home page and email address
Re: Interference Issues with Arduino Mega + 2xSPI devices
« Reply #25 on: October 22, 2024, 03:08:35 pm »
Dammit, I'm an idiot for not realizing this earlier.  Apologies to the OP for not seeing the trivial, obvious solution.

Level shifter: PiHut TXB0104
TXB0104 can definitely three-state the pins: it's got the OE pin for exactly this purpose.  When it is low (OP has it tied high), all signal pins are in high-impedance state, as if they were disconnected.

However, TXB0104 datasheet notes that VCCA ≤ VCCB; VCCA = 1.2V to 3.6V, VCCB = 1.65V to 5.5V.  OP has it the exact wrong way in the schematic, but since the acceptable voltages are silkscreened on the board, I assume they have them right.

The simplest option is to connect the CS1_5V pin (the active-low select for the ADS1220) ALSO to the TXB0104 OE.  That way, whenever the ADS1220 is enabled (CS1_5V is LOW), the TXB0104 is disabled and all its pins in high impedance state ("disconnected").  No other changes are needed.

(While OE pin is powered by VCCA, it is safe for voltages up to 5.5V, so it is perfectly okay to use VCCA=3.3V, VCCB=5V, and connect OE to a 5V I/O pin.  The 3.3V VCCA simply means that on the OE pin, LOW is below 1.2V, and HIGH is above 2.2V.)
 
The following users thanked this post: Ian.M

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 13235
Re: Interference Issues with Arduino Mega + 2xSPI devices
« Reply #26 on: October 22, 2024, 03:40:09 pm »
Well spotted.  Assuming the TXB0104 is the right way round, it still probably needs some mods, namely 100K pullup resistors on LSM6DSO CS, SDA and SCL pins to keep it deselected when the the TXB0104 outputs are tristated. 

Also I still have concerns about the construction as I raised in reply#3 - if the modules are patched together with long duPont jumpers its unlikely to work well if at all, as the TXB0104 cant tolerate much load capacitance.  If its on an Arduino Mega proto shield with minimum length jumpers tracks between modules, or other compact minimum connection length construction, this is far less of a concern.
 

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 28501
  • Country: nl
    • NCT Developments
Re: Interference Issues with Arduino Mega + 2xSPI devices
« Reply #27 on: October 22, 2024, 03:49:11 pm »
IIRC the bi-directional level shifters have pull-up on the pins. Somewhere around 10k Ohm.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 13235
Re: Interference Issues with Arduino Mega + 2xSPI devices
« Reply #28 on: October 22, 2024, 04:06:37 pm »
IIRC the bi-directional level shifters have pull-up on the pins. Somewhere around 10k Ohm.
That's not what the TXB0104 datasheet says in 6.5 Electrical Characteristics:
IOZ - High impedance state output current - max. +/- 2 uA

If there *is* an internal pullup, it must be either >2.5 Meg not to breach that spec @5V supply or be disconnected when OE is low.
 
The following users thanked this post: nctnico

Online Nominal Animal

  • Super Contributor
  • ***
  • Posts: 7307
  • Country: fi
    • My home page and email address
Re: Interference Issues with Arduino Mega + 2xSPI devices
« Reply #29 on: October 22, 2024, 04:46:35 pm »
Assuming the TXB0104 is the right way round, it still probably needs some mods, namely 100K pullup resistors on LSM6DSO CS, SDA and SCL pins to keep it deselected when the the TXB0104 outputs are tristated. 
Right.  TXB0104 does not have internal pull-ups, and any external ones must be at least 50k.  (The board is actually Adafruit 1875, indicated by the ThePiHut ADA1875 product identifier.)

Also I still have concerns about the construction as I raised in reply#3 - if the modules are patched together with long duPont jumpers its unlikely to work well if at all, as the TXB0104 cant tolerate much load capacitance.
Definitely agreed.

Here, too, TXU0304 is better with higher drive strength (12mA max at 5V), so it would have been a better choice from the get go – if only anyone sold suitable breakout boards.  (While I have my own design – in CC0-1.0/Public Domain –, Ian.M had some great ideas on how to make it much more betterer.  As it is now, it just fit my immediate needs.. Also, I noticed that the TXU0304 datasheet explicitly states it will not glitch during VCCx < 0.1V high-Z ("glitch-free power supply sequencing" in any order), without even any specific ramp order or rate.)
While 74LVC1T45 has even higher drive strength (24mA max), it lacks the Schmitt triggers the TXU0304 has, so voltages between the low and high thresholds may cause excess current draw.
« Last Edit: October 22, 2024, 04:48:28 pm by Nominal Animal »
 
The following users thanked this post: Ian.M


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf