Pages: [1]   Go Down
Author Topic: How do I use a logic level converter?  (Read 1554 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 27
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!



Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 27
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

np. Glad it worked!
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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)



* lipo.png (334.29 KB, 840x630 - viewed 65 times.)
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 544
Posts: 27352
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Got a link? Need to see the schematic.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Here is my schematics


* IMG_20131128_100038.jpg (2025.15 KB, 3264x2448 - viewed 63 times.)

* IMG_20131128_100128.jpg (1403.58 KB, 3264x2448 - viewed 53 times.)
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 544
Posts: 27352
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thank you. Attached new one.


* lipo2.png (14.49 KB, 840x630 - viewed 59 times.)
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 544
Posts: 27352
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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!)
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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/
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 544
Posts: 27352
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

No. That is also used to change the levels of control signals.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Pages: [1]   Go Up
Jump to: