5V to 3.3V logic conversion - Page 1
Forum section: electronics / beginners

author: steve_sky
author_rank: Newbie
timestamp: March 03, 2016, 08:48:16 pm
content: Hi all.!I'm doing a motor controller in a FPGA. The FPGA I/O is 3.3v and all the encoders are 5v. So I need to convert the 5V output from the encoder to 3.3v to keep the FPGA alive.I can come up with 3 options which all seems reasonable:resistor voltage dividerzener diodeBus Transceiver ICBut which one is best practice and therefore the one to choose?Best regards

author: Mr.B
author_rank: Unknown
timestamp: March 03, 2016, 08:53:57 pm
content: I use FETs.Simple and cheap.

author: Zero999
author_rank: Super Contributor
timestamp: March 03, 2016, 08:55:48 pm
content: A simple resistor may do.Failing that, the 74HC4050 will do.http://www.ti.com/lit/ds/symlink/cd54hc4049.pdf

author: Wilksey
author_rank: Super Contributor
timestamp: March 03, 2016, 09:08:56 pm
content: Quote from: Mr.B on March 03, 2016, 08:53:57 pm+1

author: langwadt
author_rank: Super Contributor
timestamp: March 03, 2016, 09:21:01 pm
content: Quote from: Hero999 on March 03, 2016, 08:55:48 pmYep, it is in most Xilinx datasheets usually say that as long as the input current is limited to a few mAany voltage is allowedas a safety feature you might want to add a resistor on the 3.3V supply to make sure there is a minimum load higher than the maximum input current

author: suicidaleggroll
author_rank: Super Contributor
timestamp: March 03, 2016, 10:12:39 pm
content: Quote from: Mr.B on March 03, 2016, 08:53:57 pmAs a side note, that works great for I2C as well. Bidirectional and it never forces the line high. The resistor values may need to be tweaked depending on line capacitance and required speed though.

author: Mr.B
author_rank: Unknown
timestamp: March 03, 2016, 10:24:16 pm
content: Quote from: suicidaleggroll on March 03, 2016, 10:12:39 pmYes, I mostly use it on I2C.

author: ROBOT
author_rank: Contributor
timestamp: March 03, 2016, 10:45:02 pm
content: For an encoder it's typically pretty critical you get real time information. But this depends on a lot of factors. Resolution, RPM, Clocked Output or real time? etc. So your best option is a resistor divider.Is quadrature or are you using one of the many encoder communication protocols avaliable?

author: danadak
author_rank: Super Contributor
timestamp: March 03, 2016, 11:30:00 pm
content: If you go to ON Semi or Fairchild Semi or TI or..... there are a lotof cheap low cost, fully protected low power translator solutionsthat do not compromise noise margin and handle power cyclingissues.If the number of pins needing translation is more than just a fewmany of these devices handle many I/O pins.Regards, Dana.

author: spudboy488
author_rank: Regular Contributor
timestamp: March 04, 2016, 12:49:27 pm
content: Since (I would think) all the encoder outputs are inputs to the FPGA (all 1 direction), either suggestion from Mr. B or Hero999 would work fine as well as a simple resistor voltage divider. You may want to look for a FPGA with 5V tolerant inputs. I use Altera CPLDs for this very reason. I'm not sure if FPGAs are available to do the same.

author: DimitriP
author_rank: Super Contributor
timestamp: March 04, 2016, 01:00:57 pm
content: ...and here is the rest of the list...http://www.newark.com/pdfs/techarticles/microchip/3_3vto5vAnalogTipsnTricksBrchr.pdf

author: Zero999
author_rank: Super Contributor
timestamp: March 04, 2016, 01:58:49 pm
content: Quote from: spudboy488 on March 04, 2016, 12:49:27 pmThe MOSFET circuit has the advantage of being bidirectional. The downside is it will be slower and use more power, when the output is low, compared to a voltage level translator IC.

author: tszaboo
author_rank: Super Contributor
timestamp: March 04, 2016, 02:07:21 pm
content: Quote from: Mr.B on March 03, 2016, 08:53:57 pmI really wish people would finally stop doing this.This is not a cheap solution, nor proper, nor fast, nor reliable. It doesnt drive the outputs properly, andA 74LCX125 is 20 cents in single quantity, gives you 4 Channel. If quantity goes up, yours will increasingly become more expensive as the pick and place will cost more than the components. And soldering it by hand is PITA.

author: mikerj
author_rank: Super Contributor
timestamp: March 04, 2016, 02:22:18 pm
content: Quote from: NANDBlog on March 04, 2016, 02:07:21 pmAn 74LCX125 is not bi-directional though. All the bi-directional translators I've found have logic level voltage quirks as well.