How to wire Logic Level Converter ?

Hi everybody, i am really frustrated after many days try to wire the Logic Level Converter. I bought 2 of these pieces https://www.geras-it.de/documents/image/44/441/441.jpg and want to use it with the HC-SR4

I wire exactly like schematic , but it didn't work. So i try to test it with a LED. In the attachment is my test wiring with arduino

red 3.3v to a2 logic input
white 3.3V from Arduino
orange, blue is ground
green output at 5V site
yellow 5V from arduino

The LED glows very weak, the measured voltage is just about 1,0v to 1,5v . The same happens with the second piece , i have no idea why :confused: . Can somebody help me please ? Thanks so much

What schematic are you referring to as I don't see one on the product page here.

Have you also connected the OE, VA, VB & GND correctly?

Thanks for reply, the schematic here Using Logic Level Converters | Artekit Labs .

VA i connected to 3.3 V from arduino, VB to 5V and same Ground for both VA an VB, OE unconnected

Hi,
OP's images.

Hi
OP's Image

Hi,
Question1, the BRIGHT Led you have on the protoboard, where is the current limit resistor?
Question2, why do you need a level interface between 5V UNO and 5V HC-SR4?

http://arduinobasics.blogspot.com.au/2012/11/arduinobasics-hc-sr04-ultrasonic-sensor.html

Tom.. :slight_smile:

  1. the LED can be drove directly from 5V (tested) , i just use it to see if the the chip output correctly
  2. I actually use another linux embbeded system which has 3.3v GPIO . The point of using Arduino is to have the 3.3v and 5V output just for testing the chip

If that LED hasn't melted yet, try it with a 470 - 560 R resistor in series with the LED.

But the output is still not correct .... Input is HIGH on 3.3v Site but on the 5V Site there is only 1.5V ?

...Which is the forward voltage of the LED. You won't see any higher voltage until the LED pops or you put in an appropriate resistor. Wear eye protection.

I have to remind you guys, the problem here is not about the LED ! It has nothing to do with the LED , the LED is just there to check if there is voltage there. Later if everything work correctly , i will use that setup with the Ultrasonic sensor . I am asking why my wiring not work ? and why the output is only 1,5 V at the 5V site althought i do exactly like instruction ? :frowning: :frowning:

You are not listening to those that know far more about electronics than you. Yes, it has everything to to do with the LED. You asked why the LED is so dim and why is there only 1.5 volts output. Others have explained why but you have dismissed them without learning anything.

Please do as the others have suggested and place a 470 ohm resistor in series with the LED and then measure the output voltage again on the 5 volt side. You'll see that it has risen to approximately 5 volts and you should see about 3 volts across a white or blue LED. That will prove the logic level convertor is working. That is of course if you've not blown anything up...

Once you've stopped chasing the "red herring" you've created by using the LED improperly, you can get on with troubleshooting the original problem.

Ok guys , i am sorry, i am just so frustrated about that problem. So this time i remove the LED , i measure the open voltage at the pin -> 0V . I try to connect pin OE to 3.3v , the output is now at 5 V . I thought it worked ... but not actually . The thing is when i put the pin on 3.3V Domain on LOW , the output on 5V domain still there. Really really confusing ! :frowning:

noname2x:
I try to connect pin OE to 3.3v...

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

noname2x:
Thanks for reply, the schematic here Using Logic Level Converters | Artekit Labs .

VA i connected to 3.3 V from arduino, VB to 5V and same Ground for both VA an VB, OE unconnected

First of all. Have you read-up on what each of those pins (eg. 'OE') do? Or what they are?

OE is 'output enable'. All outputs are "enabled" when the pin is at a logic-high voltage. Outputs are disabled when the pin is at a logic-low voltage. So, should probably just connect the OE pin to a logic-high voltage.

In many cases, the manufacturer may have a 'default' voltage level on that pin (via an INTERNAL pullup resistor, or sometimes a pulldown resistor). Hopefully the manufacturer guide indicates it. But yep....there are some times where those idiots don't tell you this, or they don't put that information up-front for everybody to see clearly. But this is often typical of data sheets/user guides/spec sheets - where instead of telling everything as it is (clearly, with useful typical examples), they create cryptic puzzles for users to solve for themselves.

The 'A' side is the lower voltage side. The 'B' side is the higher voltage side.

Now, as for the meaning of 'outputs', I believe that would mean..... if you use say pin B2 as an input, then pin A2 would automatically become an output. And vice versa.

So, apart from seeing what happens if you tie the OE pin to a logic-high voltage, could also try putting an electrolytic capacitor (eg. 100 microFarad) between 5V arduino pin and the arduino GND pin..... which could help to cut down on supply voltage fluctuations (if any).

noname2x:
The same happens with the second piece , i have no idea why

That's because you didn't follow one of the golden rules of electronics..... to check on manufacturer specifications to see if the device is able to output the required amount of 'power' (voltage and current) to drive the device (ie. to drive the LED). In many cases, if this isn't checked in advance, then it can lead to undesirable results.... like damaged components, things not working, etc.

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

It is, already, "in hardware", see previous reply and link.

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

Thanks.. Tom... :slight_smile:

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

datasheet

OP's link

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.

and want to use it with the HC-SR4

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.

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.