Go Down

Topic: How to wire Logic Level Converter ? (Read 5316 times) previous topic - next topic

runaway_pancake

So, should probably just connect the OE pin to a logic-high voltage.

It is, already, "in hardware", see previous reply and link.
"Who is like unto the beast? who is able to make war with him?"
When all else fails, check your wiring!

TomGeorge

Hi,
Were you at anytime running the LED off the output of the converter without a current limit resistor?

Thanks.. Tom... :)
Everything runs on smoke, let the smoke out, it stops running....

Southpark

#17
Aug 07, 2016, 04:13 am Last Edit: Aug 07, 2016, 04:17 am by Southpark
It is, already, "in hardware", see previous reply and link.

Thanks RP.... yeah, I added some extras soon-after in my post. Thanks for that.

raschemmel

#18
Aug 07, 2016, 12:14 pm Last Edit: Aug 07, 2016, 01:02 pm by raschemmel
datasheet

OP's link

Quote
TXS? TXB?
The Level Converter can be found in two flavors: the TXS line, and the TXB line. The TXS line is optimized to work on open-drain outputs as I2C or 1 wire, where the lines are bidirectional, and their direction changes from one way to the other (input <-> output), and where there is a shared bus. The TXB line is optimized to work with push-pull outputs lines, as SPI or mono directional lines.  
Looks like OP has chosen the wrong  flavor.

@OP,
Post a schematic of your planned application for this converter. We need to know how you plan to use it to determine if you have chosen the correct type.

Quote
and want to use it with the HC-SR4
Quote
The TXS line is optimized to work on open-drain outputs as I2C or 1 wire, where the lines are bidirectional, and their direction changes from one way to the other (input <-> output)  
The HC-SR4 is not an I2C device. The TXS version (you bought) is the version optimized for I2C applications. The TXB version is the type optimized for monodirectional lines (such as the ones on the HC-SR4.

HC-SR4

I suggest you use a monodirectional level shifter like the  74LVX245  or CD4050 because the HC-SR4 is not an open-drain device and therefore will not work well with the TXS version you bought. You do not have a bi-directional application so you do not need a bidirectional level converter. There are no bidirectional pins on the HC-SR4. Any simple monodirectional level converter will work for that device.




Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,<br />DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

luca_p

"OE" is pulled up to 'VCCA' already.

http://www.artekit.eu/resources/ak-txs0108-v2/doc/AK-TXS0108_V2.0-1.pdf

I think the OP's board is not the same on the schematics you linked.

If the board the OP is using is this I can only see two decoupling caps. So the OP should be connecting OE to VA.

noname2x

Hey southpark, Thanks for your very nice explanation . I now remove the LED , unconnected OE , try with a capacitor like you said. I measure 5V at the output . Problem solved !!

Thanks you guys so much !!!

noname2x

@ raschemmel  yeah i think it's could be the problem with the wrong version too, i will order another version and give i try. Thanks !

Southpark

Problem solved !!

Thanks you guys so much !!!
Great to see and hear you're back in action!

raschemmel

#23
Aug 07, 2016, 05:37 pm Last Edit: Aug 07, 2016, 05:59 pm by raschemmel
Quote
@ raschemmel  yeah i think it's could be the problem with the wrong version too, i will order another version and give i try. Thanks !
Please read what I said.
You do NOT need a bidirectional level converter. Any mono-directional level convert will suffice.

Quote
I think the OP's board is not the same on the schematics you linked.

If the board the OP is using is this I can only see two decoupling caps. So the OP should be connecting OE to VA.
This is the link the OP posted in Reply#2 . You are correct that it does not match the link posted in the OP (Reply#0) . The schematic for that link was posted in Reply#13. We do not (as you have implied),
actually know which one the OP has since he has linked both. Regardless of which link, it seems clear that since both links are for an XTS type, both schematics are for the WRONG type of level converter, rendering the schematic issue irrelevant. The OP is NOT using I2C and therefore should NOT use the XTS, but COULD use the XTB , IF he had a bidirectional application, which he does NOT. Therefore,
neither the XTS nor the XTB are what he needs but if he HAD to choose between those two, the correct choice would be the XTB.  What he SHOULD be using is a simple monodirectional level converter like the ones linked in my previous post.

Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,<br />DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

MrAl

#24
Aug 08, 2016, 07:34 am Last Edit: Aug 08, 2016, 08:37 am by MrAl
Hello there,


I just thought i would add a small note here about a particular caution when using *some* logic level converters.


Most logic level converters require a 3.3v voltage source input when going from 5v to 3.3v which is very common, although this note applies to any voltage lower than 5v like 1.8v also.

The important point is that logic level converters require a clamp to the +3.3v line, and during operation if this line becomes disconnected for even a microsecond, that could cause the input of the 3.3v device to get a voltage high enough to blow out one of the input protection diodes which then could cause the whole 3.3v device to malfunction.
In other words, if the 3.3v line becomes disconnected the 3.3v device blows out.

The reason i bring this up is because we often use those little jumpers for connecting the Arduino to other devices, and that means we have to rely on the connection of the jumper to the headers.  This works fine in many applications because if it becomes disconnected we just plug it back in or jiggle it a little and it works again.
But with a clamp voltage we cant get away with that.  The clamp voltage must be present for the entire time the circuit is running or else something blows out.

The only fix is probably to SOLDER that particular wire in place, on both the Arduino (perhaps under the board) and the 3.3v device.  That makes it more permanent.  Of course steps should be taken to make sure the wire cant break either.

Good luck with it.

MorganS

I don't understand the failure mode. How does having a 3.3v "clamp" stop damaging amps from flowing from the 5V side? Those amps aren't going into the 3.3V rail because then it would simply fail to be a level converter - it could not have worked in the first place.
"The problem is in the code you didn't post."

MrAl

#26
Aug 08, 2016, 08:33 am Last Edit: Aug 08, 2016, 08:36 am by MrAl
I don't understand the failure mode. How does having a 3.3v "clamp" stop damaging amps from flowing from the 5V side? Those amps aren't going into the 3.3V rail because then it would simply fail to be a level converter - it could not have worked in the first place.
Hi,


We could take a look at the particular logic level converter you are talking about if you post a picture of the schematic.  I suppose some could be different.
The ones that rely on a clamp diode to +3.3v would be the ones affected.



Southpark

Most logic level converters require a 3.3v voltage source input when going from 5v to 3.3v
Hello....... do you mean 'going from 3.3V to 5V'?

raschemmel

Quote
We could take a look at the particular logic level converter you are talking about if you post a picture of the schematic.  I suppose some could be different.
The ones that rely on a clamp diode to +3.3v would be the ones affected.
Well I don't know what all the fuss is about. I never had a problem with one of these.

or

these

They both work the same way. The output voltage is determined by the Vcc. (3.3V or 5V).
The device is 5V tolerant when running on 3.3V.

Therefore, if you THINK about it, you CANNOT use the SAME chip to go BOTH ways.
If you have some signals that need to go from 3.3V to 5V, you need one chip dedicated to that purpose. If you have OTHER signals that need to go from 5v to 3.3V you need ANOTHER chip didicated to that purpose. In the case of the OP's application, IF he had purchased the XTB instead of the XTS,
he could use the SAME chip because it is BIDIRECTIONAL. I stated that he does NOT have a BIDIRECTIONAL application because he does NOT in point of fact, have a single signal that must go BOTH directions. All of the signals in his circuit are either 3.3V to 5V OR 5V to 3.3V. That makes it a MONODIRECTIONAL application. That being said, there is ,in fact some convenience in being able to accomplish both directions with ONE chip, even if NONE of the signals are going BOTH ways.
The XTB should be capable of doing this because it has TWO supply voltage inputs and it is bidirectional so signals can go either way. It is , however NOT necessary , for the reasons given, and offers only the convenience I described in the case of the OP's application. I happen to have the XTB and NOT the XTS but have had issues with insufficient bias current to change the direction of the signal so I rely on something foolproof like the two chips linked above . These have never failed to perform the required function.
Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,<br />DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

MrAl

Hello....... do you mean 'going from 3.3V to 5V'?
Hi,

Well, whenever a 5v system has to talk to a 3.3v system bidirectionally or even when a 5v system has to talk to a 3.3v system.
The signal starts out as a 0 to 5v level, either about 0v or about 5v.  That has to go to the input of the 3.3v device somehow, so we use a logic converter sometimes.

One scheme for example is to use a resistor in series with the 3.3v input, and clamp the 3.3v input to either +3.3v or a little lower than that so the diode drop doesnt change much.  If that +3.3v power line becomes disconnected, the 3.3v input sees the whole 5v signal which causes the upper ESD diode to conduct which blows the chip.

I realize other types of logic level converters may not have this problem if the +3.3v power line becomes disconnected because the MOSFET says 'off'.

We could look at specific drawings if someone wants to look at one they had been thinking about.

Go Up