Arduino Uno, LCD Shield current draw

Hello! The title of the topic is a bit misleading since the questions are more than one.

I have applied an LCD Shield (1602 mr007) on top of the Arduino Uno board. The Arduino gets external power of 7+ volts. I use the 5v pin to supply voltage to a sensor (12mA), a button and a led. The LCD Shield is really dim , can barely see it with the brightness full on. So I've noticed some things and have the following questions.

Reading the Arduino UNO datasheet, I understand that the max current that can be drawn from the pins is 200mA. The shield doesnt include a current draw in the datasheet and I would appreciate if someone from experience could tell me what it is. Ive read that it could be up to around 150mA. Wouldn't this mean that I am too close to the maximum of 200mA? Could this be the reason it is dim?

In addition, when I connect the Arduino to the USB (with the external power supply or not) the shield works perfectly. Why is that?

Thanks everyone for your time!

Gabr21:
In addition, when I connect the Arduino to the USB (with the external power supply or not) the shield works perfectly. Why is that?

Because the on-board regulator is essentially useless!

The clear blunder is not comprehending what the "Vin" or "RAW" terminal is. The regulator on the Arduino UNO/ Nano/ Pro Mini/ Mega2560/ Leonardo/ Pro Micro has very little heatsink, so will not pass very much current (depending on the input voltage and thus, how much voltage it has to drop) before it overheats and (hopefully reversibly) shuts down. It is essentially a novelty provided in the very beginning of the Arduino project when "9V" power packs were common and this was a practical way to power a lone Arduino board for initial demonstration purposes. And even then it was limited because an unloaded 9 V transformer-rectifier-capacitor supply would generally provide over 12 V which the regulator could barely handle.

Nowadays, 5 V regulated switchmode packs are arguably the most readily available in the form of "Phone chargers" and switchmode "buck" regulators are cheap on eBay so these can be fed into the USB connector or 5 V pin to provide adequate power for most applications. Unfortunately, many tutorials or "instructables" are seriously outdated or misleading and have not been updated to reflect the contemporary situation.

Just to add to what Paul__B said, the reason you are seeing a different behavior when powering via USB is because the USB connection is providing 5 V directly, and thus is not subject to the limitations of the Vin pin's voltage regulator. In that case, the current is only limited by the capabilities of the power supply connected to the USB jack.

pert:
In that case, the current is only limited by the capabilities of the power supply connected to the USB jack.

And the polyfuse. :sunglasses:

(He said "UNO".)

Gabr21:
The LCD Shield is really dim , can barely see it with the brightness full on. So I've noticed some things and have the following questions.

A few questions and comments.


When you say "with the brightness full on" what you do you mean?
On that type of lcd & shield there is no brightness control. The backlight is either on or off.
When using an inverted display (light dots on a dark background) the contrast will appear to be controlling "brightness" as the contrast will affect the brightness level of the pixels, but the actual brightness of the backlight is constant and the contrast setting is controlling the contrast of the pixels.

Are you referring to contrast adjustment when you say "brightness full on"?


Contrast will vary with supply voltage. The voltage output of the 5v regulator may be slightly different than the voltage of your USB power, particularly when under load.
I have cases where I have to adjust the contrast pot when moving a device from being power by USB from a computer vs a 5v phone charger. The voltages are off by about .3v from each other and that is enough to create an annoying contrast difference.


There is also a common h/w issue on many of the shields of type you are using.
There is a sticky thread about it the Displays forum section:
https://forum.arduino.cc/index.php?topic=96747.0

The summary is that if the shield has the h/w issue, and the sketch attempts to use D10 to control the backlight, whenever D10 is high, it creates a short and draws massive power - potentially damaging the AVR processor.
The hd44780 library includes a diagnostic test sketch, LCDKeypadCheck, that will test the h/w and report whether or not it has the h/w issue.
It is included in the hd44780_pinIO i/o class examples.

The hd44780 library includes API functions to control the backlight and also includes code to work around the h/w issue, if you want/need control the backlight and the shield has the h/w issue.

--- bill

bperrybap:
Are you referring to contrast adjustment when you say "brightness full on"?

Exactly.

I've been trying to get the same brightness when its either connected via USB or just powered with external voltage without having to adjust the contrast but as you comment, I haven't been able to.

Again, while the brightness level of of the pixels will vary when adjusting the contrast pot when using an inverted LCD, it isn't adjusting the actual backlight brightness.
When you say "LCD brightness" it can be confused with the brightness level of the backlight.

Check the VCC voltage at the 5v pin on the Arduino.
See if it is different between the two ways of being powered.
I'm guessing it is, in which case, there is nothing you can do to get consistent contrast levels other than manually adjust the contrast pot.

Are you trying to control the backlight using Arduino pin 10? which causes a short.
What were the results of the LCDKeypadCheck?

--- bill

bperrybap:
Are you trying to control the backlight using Arduino pin 10? which causes a short.

This refers to this warning thread at the top of this forum. A tricky matter, worth reading. :grinning:

Gabr21:
I've been trying to get the same brightness when its either connected via USB or just powered with external voltage without having to adjust the contrast but as you comment, I haven't been able to.

So you have learned - powering "Vin" or the barrel jack is simply not workable when you have components added to the basic Arduino board. It is the wrong way to power the board, just do not do it! :roll_eyes:

You can power with either your PC connected to the USB jack, or a USB "Phone charger". Alternatively, connect your regulated 5 V into the "5V" pin (and ground of course) on the Arduino board. But even then, different USB sources will have slightly different voltages, especially if you are drawing more than one or two hundred milliamps, so you will get some contrast variation.

Noting on this board, that the contrast adjustment is - somewhat inconveniently - placed poking up on the top left corner, it is recommended that you carefully cut the trace on the PCB between the very corner-most pin of the potentiometer and pin 2 of the LCD (5 V). The black solder mask makes it a little tricky!

This correct a foolish blunder that has been perpetuated in designs copied since the very early days of the displays; it reduces unnecessary current consumption by all of half a milliamp but makes contrast setting twice as precise. :sunglasses:

I use the barrel jack or Vin input all the time, I power it with 7.5 Volts to 8.5 volts however I do not use the board to power anything external I use a separate supply for that implementing a single point grounding system. That is what the jack is for and the board was designed to be used in this manner. This keeps the regulator cool and stable eliminating most A/D drift problems as the regulator also sources Vref. I do not use the 5V pin as it can lead to lots of problems. I use whenever possible the Primary mains supply to power everything, and use Buck, Boost, and SEPIC converters to create my voltages. My USB connections do not change anything the USB voltage is typically a little lower, many times the +5 is opened at the plug. To find your problem start with just the LCD shield and see if that works. then add one part at a time and you will know when you find the fault. Be sure the contrast pot (if you installed it) is connected correctly. What you are describing is an overload on the power source which is starting to back down but not go fully off.
Good Luck & Have Fun!
Gil

bperrybap:
Check the VCC voltage at the 5v pin on the Arduino.
See if it is different between the two ways of being powered.
I'm guessing it is, in which case, there is nothing you can do to get consistent contrast levels other than manually adjust the contrast pot.

--- bill

Indeed, when powered via USB I measure a voltage of 4.9 volts at the 5v pin. When powered via the jack (close to 8volts) I measure around 4.15 volts at the 5v pin (is such a voltage drop to be expected?).
I dont understand however how this voltage difference is translated into a difference in the intensity of the display. Am I providing less current because of the regulator?

gilshultz:
I use the barrel jack or Vin input all the time,

Good for you! :grinning:

gilshultz:
I power it with 7.5 Volts to 8.5 volts however I do not use the board to power anything external

OK, so you have bought out of this discussion as he is using something external - a LCD shield. So, let's get back to the situation in hand. :roll_eyes:

Gabr21:
Indeed, when powered via USB I measure a voltage of 4.9 volts at the 5v pin. When powered via the jack (close to 8volts) I measure around 4.15 volts at the 5v pin (is such a voltage drop to be expected?).

Yes and no. It is a little surprising that you are seeing quite as much drop.

In regard to your original questions, the 200 mA for the ATmega chip is a parameter of the chip itself given an unrestricted 5 V supply. It means you must not draw more than that current from the I/O pins of the chip. It has nothing to do however, with the voltage regulator on an Arduino UNO. The ATmega chip itself draws some 40 or 50 mA and the mega16U2 USB interface chip, somewhat less.

The LCD draws a milliamp or so with an extra half milliamp due to that wiring blunder I mentioned. The backlight usually draws about 25 mA though some odd displays draw more. There is no other significant current draw on the keypad shield.

And you mention that your sensor draws 12 mA. Arguably the regulator should be sufficient under these limited circumstances but in general, it is a bad idea to use it.

Gabr21:
I don't understand however how this voltage difference is translated into a difference in the intensity of the display. Am I providing less current because of the regulator?

OK, there is (always) some confusion about the LCD display. Its brightness relates only to the backlight LEDs and you do not (generally) adjust that, There will be a little drop in intensity between 4.9 and 4.15 V as the LED is operating at about 3 V so you are looking at a variation from 1.9 to 1.15 V across the resistor and the LED current is accordingly different.

What you are actually seeing is variation in contrast and this is quite sensitive to voltage (which is why the potentiometer is required in the first place). Half a Volt corresponds to almost the whole contrast adjustment rage.

In summary - simply don't use the on-board regulator; find a nice regulated 5 V supply of suitable scale.

When powered via the jack (close to 8volts) I measure around 4.15 volts at the 5v pin (is such a voltage drop to be expected?).

I would say no. If the voltage is that low, then something is likely an issue.
I would expect that if the voltage is that low, that the regulator is smoking hot.
The most likely things are:

  • excessive current draw and the voltage regulator can't handle it.
    This could be from incorrect wiring or attempting to use D10 on shield with backlight issue or using a high Vin voltage.
  • poor/bad external power supply that is drooping and not supplying enough voltage.
  • poor/bad external power supply that is providing a much higher than rated voltage.
  • bad voltage regulator

Paul__B:
There is no other significant current draw on the keypad shield.

There is one other potential source of current draw and it is a very significant one.

If the LCD keypad shield has the backlight h/w issue and D10 is set to HIGH, then there can be a draw of several hundred ma from the short created.

I asked about this in post #4 and post #6 but still have no answer.

There is also the possibility of incorrect wiring, perhaps on the external components that is creating a large current draw.


Many things we still don't know:

  • does the LCD keypad have the backlight issue and is D10 being set to HIGH
  • schematic of the external components (are they wired incorrectly creating an excessive current draw)
  • current draw of the " sensor (12mA), a button and a led"
  • the full current draw of everything to see how much load is on the voltage regulator.
  • Vin voltage when actually using the external supply and measuring 4.14v on Vcc,
    (to know if that supply is drooping as well)

--- bill

bperrybap:
There is one other potential source of current draw and it is a very significant one.
If the LCD keypad shield has the backlight h/w issue and D10 is set to HIGH, then there can be a draw of several hundred ma from the short created.

Yes, I had that in mind, perhaps I concentrated on it more in the other thread!

bperrybap:
I asked about this in post #4 and post #6 but still have no answer.

Because Gabr21 is focused on his (her) perception of the problem. :grinning:

bperrybap:
There is also the possibility of incorrect wiring, perhaps on the external components that is creating a large current draw.

Surely not!

bperrybap:
does the LCD keypad have the backlight issue and is D10 being set to HIGH

Given that Gabr21 has not revealed the code used, it is difficult to tell.

bperrybap:
schematic of the external components (are they wired incorrectly creating an excessive current draw)

Likewise.

bperrybap:

  • Vin voltage when actually using the external supply and measuring 4.14v on Vcc,

"close to 8volts" - post #9.

Gabr21:
In addition, when I connect the Arduino to the USB (with the external power supply or not) the shield works perfectly.

And frankly, at several hundred mA, the USB is relatively unlikely to be providing all of 4.9 V.

Essential equipment:

I don't know how the KEWEISI dongle behaves.
I have a similar Ebay dongle.

It gives you an idea of the current. It drops significant voltage under load.
So it is handy to check if there is an unusual current.

USB will happily provide 500mA with a tiny voltage drop.
Your "almost 8V" supplying a 7805 regulator is an unknown quantity.

I suggest that you invest in a $5 DMM. This can tell you what the "almost 8V" really is. And can tell you what the current really is. The DMM will not drop significant voltage when measuring current.

Since your shield came with a ready-soldered LCD I would assume that the LCD is correct i.e. sensible backlight current.

But you can still wire things wrong. Or write wrong code e.g. make OUTPUT pins fight each other.

David.

bperrybap:
I would say no. If the voltage is that low, then something is likely an issue.
I would expect that if the voltage is that low, that the regulator is smoking hot.
The most likely things are:

  • excessive current draw and the voltage regulator can't handle it.
    This could be from incorrect wiring or attempting to use D10 on shield with backlight issue or using a high Vin voltage.
  • poor/bad external power supply that is drooping and not supplying enough voltage.
  • poor/bad external power supply that is providing a much higher than rated voltage.
  • bad voltage regulator

There is one other potential source of current draw and it is a very significant one.

If the LCD keypad shield has the backlight h/w issue and D10 is set to HIGH, then there can be a draw of several hundred ma from the short created.

I asked about this in post #4 and post #6 but still have no answer.

There is also the possibility of incorrect wiring, perhaps on the external components that is creating a large current draw.


Many things we still don't know:

  • does the LCD keypad have the backlight issue and is D10 being set to HIGH
  • schematic of the external components (are they wired incorrectly creating an excessive current draw)
  • current draw of the " sensor (12mA), a button and a led"
  • the full current draw of everything to see how much load is on the voltage regulator.
  • Vin voltage when actually using the external supply and measuring 4.14v on Vcc,
    (to know if that supply is drooping as well)

--- bill

So. Reading the datasheet of the LCD Shield I have not found pin 10 mentioned at all.

(LCD Shield for Arduino 16x2 Blue LED Backlight)

The regulator used is LM7808. Supposed to give an output voltage of 8.3 Volts and current of 1.5 A.
(https://static1.squarespace.com/static/5416a926e4b09de8832655bc/t/5442704de4b03de3b67b8981/1413640269816/lm7808.pdf)

Components of the circuit : button that uses pullup resistor (10K). Sensor supplied with voltage from the 5V pin. Transistor supplied with voltage from digital pin of the Arduino. LED connected to pin 13 of Arduino.

I have disconnected however all the wiring and still get 4.16 volts when powered with jack, and 4.9 volts when powered with USB.

Why would you use an 8V regulator?
This means that you have to provide >10.5V to feed the 7808. And then the 7808 supplies Vin jack on the Arduino.

Invest in a DMM. Measure the actual voltages and currents.

An Uno with 16x2 and pushbuttons would take about 50mA.
What are your "Sensors" ?
I would not expect more than a few mA unless they contain heaters or radio transmitters.

If you can't afford a DMM, feel the 7808. Is it hot?

David.

david_prentice:
Why would you use an 8V regulator?
This means that you have to provide >10.5V to feed the 7808. And then the 7808 supplies Vin jack on the Arduino.

Invest in a DMM. Measure the actual voltages and currents.

An Uno with 16x2 and pushbuttons would take about 50mA.
What are your "Sensors" ?
I would not expect more than a few mA unless they contain heaters or radio transmitters.

If you can't afford a DMM, feel the 7808. Is it hot?

David.

Because I have a solenoid that operates at 12 volts. So I regulate this voltage in order to supply to the Arduino a value between 7-9 volts. The sensor only draws a max of 12 mA.

Gabr21:
So. Reading the datasheet of the LCD Shield I have not found pin 10 mentioned at all.
(LCD Shield for Arduino 16x2 Blue LED Backlight)

That shield uses a different pin mapping than most LCD keypad shields.
That shield uses Arduino pin 9 to control the backlight instead of pin 10.
I would still recommend verifying if the backlight transistor on the shield is wired up correctly.
The hd44780 LCDKeypadCheck sketch can still test this shield, it just requires editing it to use pin 9 instead of pin 10.


I have disconnected however all the wiring and still get 4.16 volts when powered with jack, and 4.9 volts when powered with USB.

What is Vin on the Arduino, when you measure 4.16volts?
Are the voltages the same with NOTHING but power and the shield plugged into the Arduino (no extra external components)?


Components of the circuit : button that uses pullup resistor (10K). Sensor supplied with voltage from the 5V pin. Transistor supplied with voltage from digital pin of the Arduino. LED connected to pin 13 of Arduino.

Because I have a solenoid that operates at 12 volts

So you have more and different external stuff hooked up to the Arduino than you originally said in your initial post:

I have applied an LCD Shield (1602 mr007) on top of the Arduino Uno board. The Arduino gets external power of 7+ volts. I use the 5v pin to supply voltage to a sensor (12mA), a button and a led

You now say you have a transistor and a solenoid.
Accurate details really matter!

Some of the new details seem suspect, like having a button that uses a 10k pullup, and a Transistor supplied with voltage from digital pin of the Arduino.
These don't make sense to me.


Please show us exactly how you have everything wired up.
Show us a schematic of what you are trying to do and then photographs of what you have wired up.

These images should be good enough for us to be able to replicate what you have done.
This will allow us to see everything to see if there are any circuit or wiring issues.

--- bill

bperrybap:
That shield uses a different pin mapping than most LCD keypad shields.
That shield uses Arduino pin 9 to control the backlight instead of pin 10.
I would still recommend verifying if the backlight transistor on the shield is wired up correctly.
The hd44780 LCDKeypadCheck sketch can still test this shield, it just requires editing it to use pin 9 instead of pin 10.


What is Vin on the Arduino, when you measure 4.16volts?
Are the voltages the same with NOTHING but power and the shield plugged into the Arduino (no extra external components)?


So you have more and different external stuff hooked up to the Arduino than you originally said in your initial post:
You now say you have a transistor and a solenoid.
Accurate details really matter!

Some of the new details seem suspect, like having a button that uses a 10k pullup, and a Transistor supplied with voltage from digital pin of the Arduino.
These don't make sense to me.


Please show us exactly how you have everything wired up.
Show us a schematic of what you are trying to do and then photographs of what you have wired up.

These images should be good enough for us to be able to replicate what you have done.
This will allow us to see everything to see if there are any circuit or wiring issues.

The reason I have not included the schematic is that the measurements have been the same with components connected or disconnected. I just measured the Vin before reading your post and unfortunately it is 7.2 volts (was supposed to be close to 8volts). I believe that this voltage drop is the one responsible for the voltage drop to the 5v pin and hence the problem I have with the display. Just for the sake of the conv here is a broad schematic of the circuit

Your schematic only shows the voltage regulator connected with two pins.
The LM7808, you said you were using, has 3 pins (input, GND, output) and requires capacitors.

--- bill