Author Topic: I got 5V on my board, is it possible to avoid adding a 3v3 regulator for LCD?  (Read 4756 times)

0 Members and 1 Guest are viewing this topic.

Offline king.osloTopic starter

  • Frequent Contributor
  • **
  • Posts: 432
  • Country: no
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
« Last Edit: June 25, 2012, 11:15:11 pm by king.oslo »
 

Offline unknowndomain

  • Regular Contributor
  • *
  • Posts: 63
  • Country: gb
    • Blog
Re: I got 5V on my board, how to avoid adding a 3v3 reg to drive LCD
« Reply #1 on: June 25, 2012, 11:15:24 pm »
Isn't the issue also that the logic low will still be for 3.3V not 5V logic?
 

Offline king.osloTopic starter

  • Frequent Contributor
  • **
  • Posts: 432
  • Country: no
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.
 

Offline gxti

  • Frequent Contributor
  • **
  • Posts: 507
  • Country: us
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.
 

Offline free_electron

  • Super Contributor
  • ***
  • Posts: 8517
  • Country: us
    • SiliconValleyGarage
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.
Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).
 

Offline hlavac

  • Frequent Contributor
  • **
  • Posts: 536
  • Country: cz
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 so

You 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.
Good enough is the enemy of the best.
 

Offline king.osloTopic starter

  • Frequent Contributor
  • **
  • Posts: 432
  • Country: no
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
« Last Edit: June 26, 2012, 08:21:54 am by king.oslo »
 

Offline DaveW

  • Frequent Contributor
  • **
  • Posts: 284
  • Country: gb
    • WattCircuit
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

I 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
 

Offline king.osloTopic starter

  • Frequent Contributor
  • **
  • Posts: 432
  • Country: no
Yes. Thank you.M
« Last Edit: June 26, 2012, 11:26:18 am by king.oslo »
 

Offline gxti

  • Frequent Contributor
  • **
  • Posts: 507
  • Country: us
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 so

You 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.

That 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.
 

Offline hlavac

  • Frequent Contributor
  • **
  • Posts: 536
  • Country: cz
Quote
It means that when the slave is pulling the line low, the master will see 1.7V minimum.

What are you talking about? GND is GND
Good enough is the enemy of the best.
 

Offline gxti

  • Frequent Contributor
  • **
  • Posts: 507
  • Country: us
Quote
It means that when the slave is pulling the line low, the master will see 1.7V minimum.

What are you talking about? GND is GND

Never mind, for some reason I thought you were talking about putting the diodes in the data line. Obviously wouldn't end well.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf