Welcome to Laser Pointer Forums - discuss green laser pointers, blue laser pointers, and all types of lasers

LPF Donation via Stripe | LPF Donation - Other Methods

Links below open in new window

ArcticMyst Security by Avery

Voltage Inverter

Joined
Sep 11, 2011
Messages
249
Points
18
Hello All,

I want to build a voltage inverter using the LM2687 IC. I think I will use the schematic found on page 2 of the document. Does anyone see any potential problems? I need to invert the voltage from an Arduino to control the contrast of a LCD screen for my upcoming project.

Thanks!
 
Last edited:





Joined
Sep 5, 2015
Messages
122
Points
18
If your trying to drive a lcd back light at 10ma then its going to be a bit dim. Honnestly why go through the trouble of ordering and connecting that in your circuit? Stick in some current limiting resistors and your in business.
If your back light leds are in parallel then this will not work. If they are in series then you will need more current.
 

Benm

0
Joined
Aug 16, 2007
Messages
7,896
Points
113
That last part probably should be the other way around ;)

But then again, why invert at all? On most LCD's the backlight leds are electrically isolated from the rest of the panel, at least in the actual panel. They could be connected on the circuit board the LCD is mounted onto, though i've never seen one where the backlight had to be driven with negative voltage if the ground was common.
 
Joined
Sep 11, 2011
Messages
249
Points
18
That last part probably should be the other way around ;)

But then again, why invert at all? On most LCD's the backlight leds are electrically isolated from the rest of the panel, at least in the actual panel. They could be connected on the circuit board the LCD is mounted onto, though i've never seen one where the backlight had to be driven with negative voltage if the ground was common.

I'm trying to use a 5V LCD this with a 3.3V Arduino since I'm using a single cell Li-ion battery. Someone on the Arduino forums told me that the 5V LCD would work with the 3.3V Arduino and that the only problem I would have is adjusting the LCD contrast, not the back light. I haven't dealt with LCDs before but I'm guessing if the Vin drops too low there wouldn't be enough voltage difference for the contrast pin? Is this correct?

I'll be powering the RGB backlight using the Arduino software PWM which should be fine. As you can see here, the LED PWM pins are also negative but this shouldn't matter. The brightness would just be inverse and I'll just have to code it as active low.
 
Last edited:
Joined
Sep 12, 2007
Messages
9,399
Points
113
The contrast is set by a voltage divider (a pot, typically). Inverting the voltage will probably break something.
 

Benm

0
Joined
Aug 16, 2007
Messages
7,896
Points
113
On all the LCD's of that i've style i have seen the voltage on the contrast pot is optimal somewhere between 0 and 1 volt, positive voltage.

The 3.3 volt should not be a problem there, though i'm not sure you can reliably drive these 5 volt lcd's from 3.3 volt logic without a level shifter. This depends on the input logics voltage turning point. If they are straight logic anything over >2.5 volt should suffice to represent a '1', but if they are schmitt-trigger type inputs the treshold is 2/3 supply voltage which is spot on 3.3 volts.

You'll find out right away though: on powerup most of these lcd's will display a row of blocks on the top row, indicating that contrast setting is good, despite any data coming through at all.
 
Joined
Sep 11, 2011
Messages
249
Points
18
The contrast is set by a voltage divider (a pot, typically). Inverting the voltage will probably break something.

Yea, that's what I thought when I looked the data sheet up. I don't know why they suggested the negative voltage on the Arduino forums.

On all the LCD's of that i've style i have seen the voltage on the contrast pot is optimal somewhere between 0 and 1 volt, positive voltage.

The 3.3 volt should not be a problem there, though i'm not sure you can reliably drive these 5 volt lcd's from 3.3 volt logic without a level shifter. This depends on the input logics voltage turning point. If they are straight logic anything over >2.5 volt should suffice to represent a '1', but if they are schmitt-trigger type inputs the treshold is 2/3 supply voltage which is spot on 3.3 volts.

You'll find out right away though: on powerup most of these lcd's will display a row of blocks on the top row, indicating that contrast setting is good, despite any data coming through at all.

I'm going to use a I2C backpack to drive it. I think that's a shift register? Also, if you don't mind, could you explain what shift register is to me? I've read about it but I'm still not very clear about it. I know it takes the signal from the Arduino and processes it someway making it possible to use less pins to power the LCD or other stuff but that's about it.

Also, if it's 0-1V it should be fine. I didn't know that, thanks!
 
Last edited:
Joined
Jan 14, 2009
Messages
1,452
Points
83
Yea, that's what I thought when I looked the data sheet up. I don't know why they suggested the negative voltage on the Arduino forums.



I'm going to use a I2C backpack to drive it. I think that's a shift register? Also, if you don't mind, could you explain what shift register is to me? I've read about it but I'm still not very clear about it. I know it takes the signal from the Arduino and processes it someway making it possible to use less pins to power the LCD or other stuff but that's about it.

Also, if it's 0-1V it should be fine. I didn't know that, thanks!

In its simplest form a shift register is a cascade of D type flip flops that share the same clock , D is data input and Q is the flip flops data output .

they allow data to be shifted in as binary by serial and then output the data all in one go on its outputs .

Example using the 74HC595 8 Bit shift register ( very common PDIP sift register ) .

There are 8 outputs and 3 inputs that we care about ( there are others but ill skip them )

Latch - When this is pulled high data in the flip flops is transferred to the outputs .
Clock - Master clock for the flip flops
Data - input to the first flip flops D input .

Q0 - Q7 - Outputs from each register



We want to shift out the byte to the register - 10011001 . Each pin is represent by the single number with a 1 been output ON and 0 been output OFF -

Starting in order of how the Arduino controls them .

1 . Latch pin is pulled low .
2 . Data pin is pulled HIGH ( this represent a 1 )
3. Clock transitions from LOW to HIGH

Now when this happens the HIGH ( 1 ) is transferred to the Q0 on the first shift register .

Next we have a 0 so ,

4. Clock transitions from HIGH to LOW
5. Data pin is pulled LOW ( this represents a 0 )
6. Clock transitions from LOW to HIGH .

Now remember that we have a 1 in the first register and they all share the same clock so when step 4 - 6 happen the 1 in Q0 moves over the Q1 and the 0 moves to Q0

Steps 1 - 3

Q0 Q1 Q2 Q3 Q4 Q5 Q6 Q7
1 0 0 0 0 0 0 0

Steps 4 - 6

Q0 Q1 Q2 Q3 Q4 Q5 Q6 Q7
0 1 0 0 0 0 0 0


Next 0

7. Clock transitions from HIGH to LOW
8. Data pin is pulled LOW ( this represents a 0 )
9. Clock transitions from LOW to HIGH .


Steps 7 - 9

Q0 Q1 Q2 Q3 Q4 Q5 Q6 Q7
0 0 1 0 0 0 0 0


Next 1

10. Clock transitions from HIGH to LOW
11. Data pin is pulled HIGH ( this represents a 1)
12. Clock transitions from LOW to HIGH .

Steps 10 - 12

Q0 Q1 Q2 Q3 Q4 Q5 Q6 Q7
1 0 0 1 0 0 0 0



Now this happens for the next 4 bits and when that is done the latch pin is pulled high and then data we have just shifted in will turn on the appropriate outputs

Q0 Q1 Q2 Q3 Q4 Q5 Q6 Q7
1 0 0 1 1 0 0 1


That's my attempt to explain it xD , I use them a lot in my numitron clocks to control 7 segment displays
 
Last edited:

Benm

0
Joined
Aug 16, 2007
Messages
7,896
Points
113
I didn't mean a shift register, but a (logic) level shifter.

This is a device that 'translates' between, for example, 3.3 volt logic on a microcontroller and 5 volt logic on something you want to drive from it.

Between 5 and 3.3 volt logic you can -sometimes- get away with omitting it, but it can lead to problems. In cases such as driving a 5v lcd from a 3.3v arduino i would give it a try first, if it doesn't work reliably when prototyping you can always add one.

If you are driving 3.3 volt things from 5 volt logic there is a danger of damage. If it's strictly one-way traffic you could just put 2 resistors to divide the voltage.
 
Joined
Sep 11, 2011
Messages
249
Points
18
In its simplest form a shift register is a cascade of D type flip flops that share the same clock , D is data input and Q is the flip flops data output .

they allow data to be shifted in as binary by serial and then output the data all in one go on its outputs .

Example using the 74HC595 8 Bit shift register ( very common PDIP sift register ) .

There are 8 outputs and 3 inputs that we care about ( there are others but ill skip them )

Hey thanks so much for the explanation. So it just takes data from 3 pins and uses time to encode it to many different pins? That's how I understand it.
 

Benm

0
Joined
Aug 16, 2007
Messages
7,896
Points
113
That's one thing you can do with them :)

You could use this approach if you need a lot of outputs, but speed is not that important. Best thing is that you can daisy chain them, so you as many outputs as you like from only a clock, data and latch line. This is often done in led-matrix displays like the ones you find at shop signs etc.
 




Top