Playing with LCD, Voltage on parralel port ?

camay123

[H]ard|Gawd
Joined
Dec 18, 2002
Messages
1,343
Im playing with an LCD display,

Im trying to put a led in the circuit and a switch.
When the circuit is on by the switch, the led will light up.
But im having a problem, in the circuit there is the printer port and and 5v supply coming in. My problem is, the led is always light up when my printer port is plug, even if I dont supply the 5v.

How can I setup this for the led to light up only when 5v is supplied ? there seem to be electricity on the printer port.

I made a graph of my circuit as I tought it would work:

lcd.jpg
 

xonik

[H]F Junkie
Joined
Jun 20, 2001
Messages
10,318
So let me get this straight. You want the LED to stay on whenever power is applied from an outside source, regardless of whether the LCD is connected to the parallel port?

That's easy. Wire the LED in series with the switch and resistor, with the anode going to analog (power) ground.
 

camay123

[H]ard|Gawd
Joined
Dec 18, 2002
Messages
1,343
Originally posted by xonik
So let me get this straight. You want the LED to stay on whenever power is applied from an outside source, regardless of whether the LCD is connected to the parallel port?

That's easy. Wire the LED in series with the switch and resistor, with the anode going to analog (power) ground.

If I put the resistor and led in series, mu voltage will drop for the rest of the circuit.

What I want is the led to be on when the switch is on, and the led off when the switch is off. My circuit reflect that.

But the problem is : My led always stay one, even if I dont supply the 5v by having the switch on.

Is there voltage coming from the printer port, there must be because my led is always on.
 

xonik

[H]F Junkie
Joined
Jun 20, 2001
Messages
10,318
Okay, wire up the LED without the LCD initially. Confirm that it responds properly to ON and OFF. Then simply tie VCC to the switch at the point connected to the cathode of the LED.
 

camay123

[H]ard|Gawd
Joined
Dec 18, 2002
Messages
1,343
Originally posted by xonik
Okay, wire up the LED without the LCD initially. Confirm that it responds properly to ON and OFF. Then simply tie VCC to the switch at the point connected to the cathode of the LED.

Without the printer port connected, the led respond to on/off by switch , and also my lcd backlight respond to the on/off wich is alright.

But when I plug the printer port, my led stay on but my lcd backlight still respond. Now If I tie the vcc to the switch like my diagram, thats waht happen.
 

xonik

[H]F Junkie
Joined
Jun 20, 2001
Messages
10,318
Is the LED's anode connected to power supply ground or parallel port ground?
 

camay123

[H]ard|Gawd
Joined
Dec 18, 2002
Messages
1,343
Both the power supply ground (5v) and parralel pin 18-25 (ground) are connected together. The - prong of the led is connected to that.

Could it be that my paralell port is not grounded to the computer ?
 

xonik

[H]F Junkie
Joined
Jun 20, 2001
Messages
10,318
Try keeping the LCD grounds all connected to parallel port grounds, except VSS. Connect VSS and the LED anode to power supply ground.
 

camay123

[H]ard|Gawd
Joined
Dec 18, 2002
Messages
1,343
Originally posted by xonik
Try keeping the LCD grounds all connected to parallel port grounds, except VSS. Connect VSS and the LED anode to power supply ground.

How do know how I can do it.
Vss must be connected to all the parallel port ground (18-25)

This is the original graph I use to build my circuit.
I only added the switch/led/resistor to my circuit.

lcdo.jpg
 

xonik

[H]F Junkie
Joined
Jun 20, 2001
Messages
10,318
Do you have any low voltage/Schottky diodes handy? You could connect one in between the switch and VCC to prevent back-current in the absence of the 5 volt supply.
 

camay123

[H]ard|Gawd
Joined
Dec 18, 2002
Messages
1,343
Originally posted by xonik
Do you have any low voltage/Schottky diodes handy? You could connect one in between the switch and VCC to prevent back-current in the absence of the 5 volt supply.

No I dont have such diodes.

I tought there was no voltage coming from the parallel port.
I measure the voltage at the source of the led and it's 2,5v DC.
 

camay123

[H]ard|Gawd
Joined
Dec 18, 2002
Messages
1,343
Originally posted by xonik
Do you have any low voltage/Schottky diodes handy? You could connect one in between the switch and VCC to prevent back-current in the absence of the 5 volt supply.


You are right. My Pin2 VCC is feeding the led.

What kind of diode do I need ? to prevent back current.

Hey thx for your help.
 

xonik

[H]F Junkie
Joined
Jun 20, 2001
Messages
10,318
It's called a Schottky diode. Diodes can usually be identified by forward voltage drop. You'd want one with the lowest possible forward drop, so that VCC still gets ~5 volts. Diodes are good for this type of thing because they almost completely block reverse current but permit forward current as needed.
 

xonik

[H]F Junkie
Joined
Jun 20, 2001
Messages
10,318
No, that has a 1 volt forward drop. That would mean that VCC would only be getting 4 volts. Try this one:

Digi-Key # MA2ZD1400LCT-ND

It only drops the 5 volt source by 0.27 volts.
 

camay123

[H]ard|Gawd
Joined
Dec 18, 2002
Messages
1,343
Originally posted by xonik
No, that has a 1 volt forward drop. That would mean that VCC would only be getting 4 volts. Try this one:

Digi-Key # MA2ZD1400LCT-ND

It only drops the 5 volt source by 0.27 volts.

Great thx alot for the help.
Now I know what to look for. Ill go to my "local" electronic store tommorow.
 

xonik

[H]F Junkie
Joined
Jun 20, 2001
Messages
10,318
Yeah, try to get the lowest forward drop possible. ASK the people there for this characteristic specifically. All diodes I'm familiar with have good reverse current protection, which is exactly why I am suggesting that you use a diode.
 

camay123

[H]ard|Gawd
Joined
Dec 18, 2002
Messages
1,343
Yup. It's working with the diode.

I bought some 20v / 1A Schottky diode.
Drop 0.45v forward voltage at 1A.

Thx for the help Xonik. Very appreciated. :D
 
Top