Astro02
Posts: 20
Joined: Mon Oct 05, 2015 2:59 pm

Level Shifer

Sun Nov 08, 2015 4:22 pm

I need a level shifter to Translate 3.3v(Rpi gpio) to 2.6v
(i need to use openocd, for some jtag test )
can i use this circuit appling 3.3 to hight side and 2.6 to low side (TMS,CLK,TDI)
and can be used to translate 2.6v to 3.3v with the same connection(TDO)
Image

User avatar
PeterO
Posts: 5623
Joined: Sun Jul 22, 2012 4:14 pm

Re: Level Shifer

Sun Nov 08, 2015 4:58 pm

The issue would be that 2.6V may not be enough to turn the FET on when the low side pulls down to "0",

The data sheet says spread of Gate threshold voltage min=0.8V typ=2.1V max=3V so some examples might not work.

PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

Astro02
Posts: 20
Joined: Mon Oct 05, 2015 2:59 pm

Re: Level Shifer

Sun Nov 08, 2015 5:09 pm

thanks can you tell me a circuit or a breadboard integrated circuits to do this work(i know that txb010x or tbs010x but i don't know how solder a tssop package)

User avatar
PeterO
Posts: 5623
Joined: Sun Jul 22, 2012 4:14 pm

Re: Level Shifer

Sun Nov 08, 2015 5:15 pm

I would only be doing the same google searches that you can do :-)
PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

Astro02
Posts: 20
Joined: Mon Oct 05, 2015 2:59 pm

Re: Level Shifer

Sun Nov 08, 2015 5:17 pm

I have googled a lot, i thinked that you know some chip, thank anyway

User avatar
PeterO
Posts: 5623
Joined: Sun Jul 22, 2012 4:14 pm

Re: Level Shifer

Sun Nov 08, 2015 5:22 pm

Astro02 wrote:I have googled a lot, i thinked that you know some chip, thank anyway
No sorry.. I've only needed to use the circuit you showed for 3v3 to 5v shifting.
PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

klricks
Posts: 6843
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA
Contact: Website

Re: Level Shifer

Sun Nov 08, 2015 5:24 pm

Unless specified otherwise my response is based on the latest and fully updated Raspbian Buster w/ Desktop OS.

Astro02
Posts: 20
Joined: Mon Oct 05, 2015 2:59 pm

Re: Level Shifer

Sun Nov 08, 2015 5:35 pm

i live in italy and i wan't pay up to 20€ for a 2€ chip
i have already foud this https://www.sparkfun.com/products/11771
thanks anyway
Last edited by Astro02 on Sun Nov 08, 2015 5:50 pm, edited 3 times in total.

User avatar
PeterO
Posts: 5623
Joined: Sun Jul 22, 2012 4:14 pm

Re: Level Shifer

Sun Nov 08, 2015 5:37 pm

klricks wrote:Google works for me.
https://www.sparkfun.com/products/12009
Same circuit, but different FET with much lower gate threshold voltage, so it will work at the lower voltages Astro02 required.

If you can get the FETS you can build the circuits up yourself.

PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

Astro02
Posts: 20
Joined: Mon Oct 05, 2015 2:59 pm

Re: Level Shifer

Sun Nov 08, 2015 5:50 pm

exists a breadboard equivalent of bss138(i hate smd component are difficult to solder)
Edit:
Anyone know if
I also need to level translate the jtag nRST and tRST?
Edit2: the sot-23 package can be soldered with normal iron solder

Astro02
Posts: 20
Joined: Mon Oct 05, 2015 2:59 pm

Re: Level Shifer

Mon Nov 09, 2015 2:32 pm

can CD40109B or CD4504B or SN74LVC245ADWR or 74hc244 do this work?

User avatar
Laurens-wuyts
Posts: 716
Joined: Wed Aug 21, 2013 7:35 pm
Location: Belgium
Contact: Website

Re: Level Shifer

Mon Nov 09, 2015 2:54 pm

Wouldn't a voltage divider work here? ;)

Laurens

Astro02
Posts: 20
Joined: Mon Oct 05, 2015 2:59 pm

Re: Level Shifer

Mon Nov 09, 2015 4:08 pm

wikipedia mean:For direct current and relatively low frequencies, a voltage divider may be sufficiently accurate if made only of resistors;

in my applicatiom will be a cpu, a rapberry pi and the the frequency of jtag is 5mhz

User avatar
Laurens-wuyts
Posts: 716
Joined: Wed Aug 21, 2013 7:35 pm
Location: Belgium
Contact: Website

Re: Level Shifer

Mon Nov 09, 2015 4:39 pm

Astro02 wrote:the frequency of jtag is 5mhz
Oops, I didn't think of that. :)

Laurens

Astro02
Posts: 20
Joined: Mon Oct 05, 2015 2:59 pm

Re: Level Shifer

Mon Nov 09, 2015 4:50 pm

i found 74HC4050N can be used for this ?

pksato
Posts: 295
Joined: Fri Aug 03, 2012 5:25 pm
Location: Brazil

Re: Level Shifer

Mon Nov 09, 2015 4:57 pm

Voltage divider can work on GHz band.
Just choose a low reactance packaging (SMT).
Common carbon film resistor can be used above 5MHz.
Just test, it cost only few cents (or free).
Use high current (8mA) to maintain low RC constant.
R1=82
R2=330

Oscilloscope Probe is a voltage divider, and work on hundreds of MHz.

Astro02
Posts: 20
Joined: Mon Oct 05, 2015 2:59 pm

Re: Level Shifer

Mon Nov 09, 2015 5:10 pm

thanks, but i don't want make a disaster, i need to connect the raspberry with open ocd,to a old phone to load a bootloader into it, it has a msm7227 cpu whit a arm1136 core that can accept max2.6V
i also need to convert 2.6 to 3.3 for tdo(return data)

User avatar
Laurens-wuyts
Posts: 716
Joined: Wed Aug 21, 2013 7:35 pm
Location: Belgium
Contact: Website

Re: Level Shifer

Mon Nov 09, 2015 5:15 pm

2,6V shouldn't be a problem to connect to the 3,3V pins. They will detect it fine.
You can check your voltage after the voltage divider with a multimeter. Just connect the 3.3V side to the 3.3V pin on the raspberry pi.

Laurens

pksato
Posts: 295
Joined: Fri Aug 03, 2012 5:25 pm
Location: Brazil

Re: Level Shifer

Mon Nov 09, 2015 5:26 pm

Voltage divider is safe, if proper connected.
Or replace R2 (GND side) for a zener diode.
Minimum voltage to RPi recognize as high is near 2V. Device to RPi not need level shifter.
If is official jtag, probable have a protection to avoid danger voltages.

Astro02
Posts: 20
Joined: Mon Oct 05, 2015 2:59 pm

Re: Level Shifer

Mon Nov 09, 2015 5:46 pm

i'll try when arrive my raspberry,
the trasfer rate of voltage divider is comparable to a level shifter(5-20Mbps)?
if i use a zener diode the R1 is the same of voltage divider

User avatar
Cancelor
Posts: 768
Joined: Wed Aug 28, 2013 4:09 pm
Location: UK

Re: Level Shifer

Mon Nov 09, 2015 6:11 pm

I use these >>> http://www.ebay.co.uk/itm/4-channel-Bi- ... Sw~OdVYXxJ

They are bi-directional and can also converter 2.8V and 1.8V devices.

In your case just connect Vhigh to the RPi 3.3v and Vlow to 2.8v

Cheap as chips, but you will have to wait a long time for delivery from China.
Can't find the thread you want? Try googling : YourSearchHere site:raspberrypi.org

Astro02
Posts: 20
Joined: Mon Oct 05, 2015 2:59 pm

Re: Level Shifer

Mon Nov 09, 2015 6:20 pm

Cancelor wrote:I use these >>> http://www.ebay.co.uk/itm/4-channel-Bi- ... Sw~OdVYXxJ

They are bi-directional and can also converter 2.8V and 1.8V devices.

In your case just connect Vhigh to the RPi 3.3v and Vlow to 2.8v

Cheap as chips, but you will have to wait a long time for delivery from China.
this is the same as https://www.sparkfun.com/products/12009
use the schematic on first post but with bss138 mosfet

hampi
Posts: 223
Joined: Fri May 31, 2013 11:29 am
Contact: Website

Re: Level Shifer

Mon Nov 09, 2015 9:41 pm

By my experience that circuit works between 3.3 V and 3.0 V (Q3 and Q4 in circuit diagram)

https://github.com/oh7bf/RaspiPwr12V/bl ... pwr12V.pdf

You could just try if it works down to 2.7 V too.

Astro02
Posts: 20
Joined: Mon Oct 05, 2015 2:59 pm

Re: Level Shifer

Tue Nov 10, 2015 2:06 pm

the 74HC541 or 74hc4050 works?
(i hate smd component are too small :D )
what is the difference of a hex level shifter and a level shifter?
what is the tree-state output?

User avatar
PeterO
Posts: 5623
Joined: Sun Jul 22, 2012 4:14 pm

Re: Level Shifer

Tue Nov 10, 2015 2:39 pm

Hex means there are 6 of them in each packace
Tri-state means each output pin has 3 states: Pulled High (1) or Pulled Low (0) or High Impedance.

PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

Return to “General discussion”