I've been using this schematic to turn off power to an LCD for several years, but I just noticed on a board I made that the Atmega chip was getting warm. Not hot, but warmer than it should. So after lots of testing, I traced it down to pin A1 that sources power to a P channel Mosfet thru a 121 ohm resister. My Fluke meter shows a voltage drop of .062 volts across the 121 resister, which would be 41 ma of current. I thought the max current was 40 ma for a pin, but I see it's 30ma. I've got boards in the field that have been running for several years with this setup. I guess it's not too bad. My board stays about 80 degrees F, but the IC warms up to 100 F.
I think I'll swap this 121 out for a 220 ohm resister, which would be 23ma. is that enough to operate the P channel mosfet?
The resistor controls the charge time of the MOSFET gate capacitance, which in turn determines how fast the MOSFET switches, and the power the MOSFET dissipates while switching.
A larger resistor means slower switching, more heat.
The resistor should not have any voltage drop in the steady state, so if it does, the MOSFET is fried or something else is wrong.
Are you sure you have MOSFETs? Your readings would make sense if you had gotten a normal PNP BJT in there instead...
MOSFET only needs like 1uA of current.
The 10K resistor ends up drawing more, 5V/10000 ohm = 500uA.
My Fluke meter shows a voltage drop of .062 volts across the 121 resister, which would be 41 ma of current.
Try that calculation again.
.062 / 121 = ?
DVDdoug:
Try that calculation again..062 / 121 = ?
Equals the same as 4.938 (the remainder of the 5 V supply) / 10k (the other resistor forming a voltage divider). About half a milliamp. ![]()
Other observations:
"121" is an unlikely value for a resistor. The marking "121" on a SMD generally indicates a 120 Ohm resistor the final "1" representing the power of 10. Similarly, most "1602" displays contain a resistor "R8" marked "101" or 100 Ohms which means an external resistor such as the 10 Ohms for "R8" in the diagram above, is neither necessary or meaningful.
And the connection of the potentiometer to 5 V is a persistent mistake. Removing that connection makes contrast setting easier and saves a tiny amount (500 µA) of current (which is significant if you wish to operate on batteries and turn off the backlight but not have to re-initialise the display).
In fact, with the 100 Ohm value of R8 on the 1602 display, the backlight can be directly controlled with an Arduino pin as it draws only 25 mA, and another pin can turn off the LCD itself - if you really want to as it is only drawing 1 mA with the correction made to the contrast potentiometer.
Thanks! I wondered what a 10ohm R could really do to change the current for the backlight. That’s very informative about contrast not needing Vcc connection. So it’s not looking for a voltage divider, but rather just the correct resistance on the contrast pin.
I finally figured out my problem. It was a pcb flaw from the fab house. A couple of the pins on the LCD were shorted to the ground plane. So when I initiated the LCD E and R were directly shorted to ground.
