I got 5V on my board, is it possible to avoid adding a 3v3 regulator for LCD? - Page 1
Forum section: electronics / beginners

author: king.oslo
author_rank: Frequent Contributor
timestamp: June 25, 2012, 11:10:33 pm
content: Hello there,In my circuit, I have amongst other things, one MCU which drives an lcd-display.The LCD has RGB backlight which I PWM from 5V no problems. But it has I2C BUS lines which needs to be pulled high (to 3V I suppose? Or can it be pulled to 5V?), and it has 3v5 tolerant VDD pin (3v3 nominal input).My question:- Is it safe to pull the i2c pins to 5V using 4K7 resistors?- Can i use a voltage divider to lower the 5V to 3v3 for the VDD pin? It says VDD current is 1mA nominal, but nothing about the maximum consumption. I am worried that voltage could drop very low, should there be a current spike.- In short, can I get away without a 3v3 rail by using passives?Thank you for your time.Kind regards,Marius

author: unknowndomain
author_rank: Regular Contributor
timestamp: June 25, 2012, 11:15:24 pm
content: Isn't the issue also that the logic low will still be for 3.3V not 5V logic?

author: king.oslo
author_rank: Frequent Contributor
timestamp: June 25, 2012, 11:19:43 pm
content: I assume the MCU would sink the current so that the LCD would see circa 0V on its clock lines. When the line is high, it would see 5V. At present, I have a 4K7 resistor on each line of the bus, but I could increase the values if you recommend this.I suppose I could use a voltage divider to pull the bus lines to to a lower voltage, but I have no idea about the current consumption of the bus.Thank you for your time.

author: gxti
author_rank: Frequent Contributor
timestamp: June 26, 2012, 12:23:29 am
content: The nice thing about I2C is that you, the designer, get to choose what voltage to pull the bus to. First check the LCD datasheet to see if it lists the I2C pins as "5V tolerant", if so then pull the bus to 5V and you're good. But it probably won't be 5V tolerant. If not, then check the datasheet on your MCU and see what it lists as the minimum "logic high" voltage for 5V operation. If you're lucky it will be less than 3V, in which case you can pull the I2C bus to 3.3V and everyone's happy because the MCU will see it as logic high even though it's less than VDD. If neither of these work out then you'll need a level shifter. I2C is also pretty easy to level-shift as long your voltages are fixed, search for AN10441 for a trivial solution using a single MOSFET per line.As for your original question about using a divider to produce 3.3v, it's just not worth the trouble unless you're manufacturing thousands of units, minimum. Plop down the cheapest 3.3v fixed voltage regulator you can find and sleep easy.

author: free_electron
author_rank: Super Contributor
timestamp: June 26, 2012, 02:39:45 am
content: slap on an lm1117-3.3 or an lf33 and off you go.for the level conversion you can do the trick with the mosfets as per the NXP app note , but keep in mind that this not always works correctly. Especially when other devices are present on the bus there can be trouble. a true I2C lvel shifter may be in order PCA9605 if memory serves me right does the trick.

author: hlavac
author_rank: Frequent Contributor
timestamp: June 26, 2012, 07:52:05 am
content: You can simply use two or three diodes in series to make voltage drop to sort of a 3.3V rail, like this:+5V o-------|>|----|>|----|>|-------o +3.3 or soYou can then connect both the LCD and pullups to that.It will not be exactly 3.3, depends on the voltage drop of the diodes at the current.For example 1N4007 has drop under 0.6V at 1mA, so you need 3 of them.

author: king.oslo
author_rank: Frequent Contributor
timestamp: June 26, 2012, 07:54:46 am
content: hlavac, seems like a good idea.gxti, free_electron, PIC16F1938 logic high is 0.7V. I suppose that means I can pull it to 3v3. Correct? Thanks.M

author: DaveW
author_rank: Frequent Contributor
timestamp: June 26, 2012, 10:50:04 am
content: Quote from: king.oslo on June 26, 2012, 07:54:46 amI suspect that'll be 0.7 * Supply voltage (0.7 VDD in datasheet), so with a supply voltage of 5V, a logic high level of 3.5V

author: king.oslo
author_rank: Frequent Contributor
timestamp: June 26, 2012, 11:09:05 am
content: Yes. Thank you.M

author: gxti
author_rank: Frequent Contributor
timestamp: June 26, 2012, 09:53:34 pm
content: Quote from: hlavac on June 26, 2012, 07:52:05 amThat would be unreliable for I2C because the protocol is bidirectional (even if the device is write-only it still has to ACK). It means that when the slave is pulling the line low, the master will see 1.7V minimum. Whether that will be read correctly again depends on the MCU datasheet, but it's even less likely than the "3.3v read as high" case.

author: hlavac
author_rank: Frequent Contributor
timestamp: June 26, 2012, 11:14:07 pm
content: QuoteWhat are you talking about? GND is GND

author: gxti
author_rank: Frequent Contributor
timestamp: June 27, 2012, 12:13:45 am
content: Quote from: hlavac on June 26, 2012, 11:14:07 pmNever mind, for some reason I thought you were talking about putting the diodes in the data line. Obviously wouldn't end well.