Author Topic: level shifter boards not working correctly  (Read 4797 times)

perigalacticon

  • Newbie
  • *
  • Posts: 9
level shifter boards not working correctly
« on: January 27, 2017, 06:33:36 pm »
I got 2 DigiX level shifting boards for use with an Arduino Due and they seem to not work correctly.

I have tried writing pins 2-13 low and high by digitialWrite and the pin voltage is nearly constant around 1.9-2.1V for each pin measured by a voltmeter, except for a few which will occasionally read 4.45V when high once or twice.  This is about the same when using a 10k pull down resistor.

As INPUTs, when the shield is disconnected from the board I find the shield outputs ~1.9V to the Due as a digital HIGH signal when the shield 5V pin input is ~> 2.7V, which seems correct, except sometimes they output 3.2V to the Due instead.  Also the Due-side signal is near zero then the input is ground which is also correct.

I tried ramping analogWrite min to max and with the shield installed the output voltage of the 5V pins varies from ~1.9V to 2.3V on some pins and 0-1.9V on other pins.  I verified the Due pins are outputting correctly, but the shield is not.

The behavior is similar on both shields.  Can you please help me resolve this?

Thanks.
« Last Edit: January 27, 2017, 11:26:27 pm by perigalacticon »

PeterF

  • Hero Member
  • *****
  • Posts: 883
Re: level shifter boards not working correctly
« Reply #1 on: January 28, 2017, 02:56:08 am »
Hopefully exeng or someone else with the shield who has had a bit experience with it has something to say on this... as I can't work out what an earth is going on either. I tried pins 5,6,7 with a 2 second on/off and I got a more sensible ~4.5v from those pins (at times... there was a few times there it kept giving me 1.8v and 2.2v :-/ )... but I can't get anything consistent from the top five... I had better luck when running from a USB power bank to ensure the DigiX was getting a proper 5v supply, but I don't know if that related to the problem... the TXB0108 which this is based on should be fine all the way down the 1.2v...  I know from the datasheet this thing is supposed to be auto-direction sensing... but shouldn't 3.3v on the low voltage side be telling it that it should be stepping up to the 'high voltage side' ???

Edit: Just adding that this is no coincidence... I had another level shifter that was still in it's packaging from the kickstarter, and it's exhibiting the same behaviour... I stuck it on the o-scope and instead of a nice sharp 3.3v up and down, it is just quivering around 2-3v.
« Last Edit: January 28, 2017, 03:11:34 am by PeterF »

exeng

  • Sr. Member
  • ****
  • Posts: 452
Re: level shifter boards not working correctly
« Reply #2 on: January 28, 2017, 09:39:40 am »
Pete, perigalacticon,

Sorry, the only level shifting boards I have are for the Oak, not the DigiX.

digistump

  • Administrator
  • Hero Member
  • *****
  • Posts: 1465
Re: level shifter boards not working correctly
« Reply #3 on: January 30, 2017, 12:57:55 pm »
The TXB0108 used on the level shifter requires a load to produce a proper voltage - so if you put an LED, connect it to another IC, etc on a pin it should be correct and work right - but just a voltmeter will be misleading.

PeterF

  • Hero Member
  • *****
  • Posts: 883
Re: level shifter boards not working correctly
« Reply #4 on: January 30, 2017, 07:19:31 pm »
Ah ha... Thanks for that Erik... I'd tried a 10k -ish resistor to GND as a pulldown at one point, but didn't put a load across it... that would would explain the bizarre readings ;)

perigalacticon

  • Newbie
  • *
  • Posts: 9
Re: level shifter boards not working correctly
« Reply #5 on: January 30, 2017, 07:28:34 pm »
The TXB0108 used on the level shifter requires a load to produce a proper voltage - so if you put an LED, connect it to another IC, etc on a pin it should be correct and work right - but just a voltmeter will be misleading.

How much current can the pins source?  Because pins 0, 2, 13, and all the analog in pins can only source 3mA from the Due.
« Last Edit: January 30, 2017, 08:26:21 pm by perigalacticon »

perigalacticon

  • Newbie
  • *
  • Posts: 9
Re: level shifter boards not working correctly
« Reply #6 on: February 13, 2017, 08:26:55 am »
Hey this is an important question, I need to know the max voltage and current limits for your shield for all of the pins please.

PeterF

  • Hero Member
  • *****
  • Posts: 883
Re: level shifter boards not working correctly
« Reply #7 on: February 13, 2017, 07:49:11 pm »
Simply going from the datasheet, the TXB0108 chip that is doing the shifting is speced as a maximum input voltage of 6.5v, and a continuous output of +/- 50mA.

perigalacticon

  • Newbie
  • *
  • Posts: 9
Re: level shifter boards not working correctly
« Reply #8 on: March 05, 2017, 10:18:18 pm »
I tried a std. red LED between pin 10 and ground and it just stayed lit brightly at 2V although the program was commanding switching between high and low at 1 Hz. 

Then I tried a set of resistors.  I found if they weren't making perfect contact the voltage would be 2.1V.  The pin voltage increased as the resistance increased from 100 ohms up to 100k ohms.  I attached the plot of measured voltage vs. resistance.  It seems you need even more than 100k resistance to get 5V output, as I only got 4.3V with 100k ohms. 

I suppose this might work with high-impedance shields, I have been hesitant to try because I don't want to fry anything.  I need to know is this expected with your level converter shield? 

I also read this chip doesn't work with I2C so that eliminates a lot of shields I want to use it with is this true?
« Last Edit: March 05, 2017, 10:29:34 pm by perigalacticon »

PeterF

  • Hero Member
  • *****
  • Posts: 883
Re: level shifter boards not working correctly
« Reply #9 on: March 06, 2017, 08:40:12 pm »
I haven't tried it myself with I2C, but that is my understanding... that because pullups are needed, it confuses the auto-direction sensing, hence I2C doesn't work (well). It is also referenced in the app note linked below:

Quote
This architecture is designed to exclusively be connected and interfaced with a push-pull CMOS driver and is capable of driving a capacitive or high impedance loads in applications such as Secure Digital (SD) or Serial Peripheral Interface (SPI). The TXB010x devices are not intended for use in open-drain applications. For applications such as I2C where there is a need to connect and interface with an open-drain driver, TI offers TXS-type (i.e., "S" for Switch-type) translators.

It being 4.3v shouldn't be a issue for most 5v logic stuff, as I believe most parts consider something around 3v to be logic high (i.e. 1/2 of VCC +  a margin). The app note explaining how the parts work may help, especially the impedance table. These parts are intended for use with hi-impedance parts, specifically, for logic chip to logic chip translation. So having them drive parts that don't have that impedance (i.e. loads such as leds) is problematic. 40-50k seems to be the recommended impedance for 5v to 3.3v.
« Last Edit: March 06, 2017, 08:42:02 pm by PeterF »

perigalacticon

  • Newbie
  • *
  • Posts: 9
Re: level shifter boards not working correctly
« Reply #10 on: March 08, 2017, 08:48:09 pm »
Thanks.  I'll try a few Arduino shields with it and see what happens now.