Port pin voltage doubler OK?

Go To Last Post
14 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I want to run an +5.0v LCD display from a +3.3v AVR system.
Is it possible or feasible to create the +5v from a voltage doubler on two port pins toggling 3.3v through the diode/capacitor standard voltage doubler?

I thought of using a timer to have Pn.0 and Pn.1 alternate between high and low about 10,000 times a second. When one side is high, the other is low.

Or would it be better to have the main input voltage to the system be +5V (which supplies the LCD)?
Then use a low-dropout voltage regulator to make the 3.3V for the AVR. And finally use a 74HC4050
level shifter to bring the LCD control lines from the 3.3v used by the AVR to the +5v used by the LCD screen.

While I realize that the best approach would be to use a 3.3v LCD display, I want to take advantage of the cheap 16x2 white_chars_on_blue_background LCD modules selling on eBay for a few dollars.

Would this wreck the port pins or the AVR?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The lcd should run quite happily from 3V although the contrast voltage may need to go negative. A pwm channel and a charge pump circuit can generate this. The AVR port pin should have a low enough impedance to stop the pin going too negative

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

See this thread in an enemy forum, replace "PIC" with "AVR" where appropriate :lol:

Warning: Grumpy Old Chuff. Reading this post may severely damage your mental health.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Don't suppose the design has a MAX232 for UART? That includes a 12V voltage pump reference which can easily be divided back down for the LCD.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Sounds like you have a lot of options.

Some 5V only displays can be used with 3.3V if contrast pin is taken negative, but not all 5V displays can work with negative contrast.

So I would rather have 5V for the display.

If it is not a problem, use 5V input voltage instead of 3.3, and use an LDO for the AVR. Then at least 3.3V systems are protected, but LCD gets input 5V directly, so it is unprotected from overvoltage.

There are also simple charge pump converters that take a range of input voltages and put out 5V.

If you use an IO pin, you only need one pin for voltage doubler. Hardware PWM pin would be nice for that.

The RS232 charge pump voltage is a good source too.

You may not need level shifting, if the display uses TTL levels (2.0V is minimum high input). If it uses CMOS levels then you need level shifting. Of course you cannot read from the display then, not even the busy bit. Or maybe you can, if you put series resistors, as LCD modules usually have TTL type outputs which source very little current.

What good would a 74HC4050 level shifter do? It can convert 5V to 3.3V, but not 3.3V to 5V, which is what you want.

I used a 74HCT245 buffer from a 3.3V AVR to 5V display. One way only, 4-bit mode. I did not care about reading busy bit.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:
Don't suppose the design has a MAX232 for UART? That includes a 12V voltage pump reference which can easily be divided back down for the LCD.

MBedder's link above wrote:
Such negative voltage can be obtained from various sources - existing system negative supply (if any), RS232 level converter (such as MAX3232, if any) V- pin, dedicated charge pump voltage inverter IC etc.

FYI: MAXx232 has a voltage doubler/inverter which gives +-10V when powered from 5V or +-6.6V when powered from 3.3V.

Warning: Grumpy Old Chuff. Reading this post may severely damage your mental health.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

This Thread discusses this topic, also.

JC

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

FYI: MAXx232 has a voltage doubler/inverter which gives +-10V when powered from 5V or +-6.6V when powered from 3.3V.

True. How about the MAX3232 which is what I guess would actually be used in a 3.3V design?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

All depends on the current consumption. For a mobile phone-like display I use voltagedoubling with just one pin and a cap-diode doubler. Supplying more than 1 mA will be hard. Use schottky's, not 1N4148 like.

A GIF is worth a thousend words   She is called Sylvia (2018), lives at Mint18.3 https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The 74LVC4254 is a dual supply bidirectional level converter.

I'd simply just try in a quick setup whether that particular display module actually works before committing to anything like a PCB design and run.

If you want it to be generic and prepared for all variations of modules available, I'd invest some time in investigating different approaches.

I have a microdot 16x2 module here that consumes slightly less than 1mA at 5V. In the battery fed project I used it in, I simply connected it to an AVR port pin to be able to shut it down for power savings :) (which is a bit tricky by the way).

Otoh, what's wrong with feeding the whole system with 5V and be done with it? Are there other ICs/subcircuits that can only run at 3V3?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:
True. How about the MAX3232 which is what I guess would actually be used in a 3.3V design?

MBedder wrote:
MAXx232 has a voltage doubler/inverter which gives +-10V when powered from 5V or +-6.6V when powered from 3.3V.

Warning: Grumpy Old Chuff. Reading this post may severely damage your mental health.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

To answer the original question -

Yes, a voltage doubler driven by a port pin should be just fine. Provided that the load current is low (20ma max) since all the load current has to be supplied by the port pin. It will work best with much lower currents (say, under 2ma). You would want close to 50% duty cycle. The higher the frequency, the easier it is to use small caps. I would start with 0.1uf but you can probably go down to 0.01uf if ripple is not a big deal (should not be for an LCD).

All of this aside, though, is this also going to power the controller? If so, there is a maximum voltage limit that MUST be adhered to. Then, you also need to do voltage translation on at least 6 logic lines (if it has a parallel interface).

Thus, in the end, you may be better off getting a display that is designed for use at the supply voltage you have.

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ka7ehk wrote:
All of this aside, though, is this also going to power the controller? If so, there is a maximum voltage limit that MUST be adhered to. Then, you also need to do voltage translation on at least 6 logic lines (if it has a parallel interface).
Cool grass! :lol:

Warning: Grumpy Old Chuff. Reading this post may severely damage your mental health.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Maybe use the XTAL out on PB1 via fuse settings ?