Go Down

Topic: How do I use a logic level converter? (Read 1 time) previous topic - next topic

gerry87

Sorry for multiple posts, just figured they were two different topics.

I've got a sensor (http://elecfreaks.com/store/download/HC-SR04.pdf) that works off 5v, and I want to use it with my DUE - so I got one of these http://www.coolcomponents.co.uk/catalog/channel-directional-logic-level-converter-txb0108-p-1124.html

I'm wondering how to actually hook it up...

Here's my guess, could someone tell me if this is wrong?



 
 
 
 
 


 
 
 
 
 


 
 
 
 
 


 
 
 
 
 


 
 
 
 
 


 
 
 
 
 



 
 
 
 
 


 
 
 
 
 


 
 
 
 
 

DUE -> txb0108 <- hc sr04
3.3v -> VCCA
5v -> VCCB <- VCC
GND <- GND
GND -> OE
b1 <- trig
b2 <- echo
Pin 6 -> a1
Pin 7 -> a2

mehdio

Hi gerry87,
Never used that components but from what i read from the datasheet i noticed one mistake.

OE is 'output enable'. When it is high which means connected to VCCA (AND NOT VCCB), the output are enabled. If it is low (connected to GND), like you did, the outputs are in high impedance state thus disabled. So connect OE to 3,3V.

The rest seems fine!




gerry87

Thanks mehdio, I connected 3.3v to OE and did the rest as in my post, worked perfectly!


Vidocaz

Hello, i'm trying to use this sensor with arduino pro mini 3.3v and sparkfun logic level converter.

Could anyone help me to wire it correctly? I checked voltage with multimeter and on high side it shows zero. I have two wires from battery to low side and two wires out to hc-sr04 5v sensor (gnd nad vcc)


CrossRoads

Got a link? Need to see the schematic.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Vidocaz

Here is my schematics

CrossRoads

I don't see any schematic. I see 2 blurry humongous pictures of boards & wires with no indication of what is connected to what, or what is what even.
Can you draw a few blocks on a  piece of paper and clearly show what pins are connected to what pins? And scale it down to no more than 1000 pixels wide before you post it. You must have written something down so you could tell everything was connected when you were done, yes?
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Vidocaz

Thank you. Attached new one.

CrossRoads

This is the level converter?
https://www.sparkfun.com/products/8745

You have to provide it with 3.3V on the LV pin and 5V on the HV pin.
I see voltage on one side from the battery.
I don't see the other side being powered at all.
Here's a schematic of the board
https://www.sparkfun.com/datasheets/BreakoutBoards/Level-Converter-v10.pdf
You can see where HV is an input that needs to be powered.

You are not running any signals thru the converter? What is your thoughts on what it is supposed to be doing for your circuit? It is intended to change 5V control signals down to say 3.3, 1.8V, etc, and 1.8 or 3.3V level signals up to 5V. It will not change the Power lines for you.
If you are thinking it will make 5V to power (the ping sensor?) it will not do that.
For that you need a boost regulator, such as:
http://www.pololu.com/product/2562
(and conveniently on sale!)
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Vidocaz

Thank you, CrossRoads. Got the answer. Yes i'm trying to boost up voltage.

Can I use this for boost up voltage?
http://www.adafruit.com/blog/2011/07/15/new-product-8-channel-bi-directional-level-converter-txb0108/

CrossRoads

No. That is also used to change the levels of control signals.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Go Up