Go Down

### Topic: Amperage too high? (solved) (Read 8866 times)previous topic - next topic

#### jakub014

##### Mar 12, 2016, 09:53 pmLast Edit: Apr 02, 2016, 01:03 am by jakub014
Hey,
currently I'm working with my arduino uno on an 6x7 LED table for school. I use I2C port expanders(mcp23017) to control these RGB LEDs. (You can find a draft of my circuit diagram at the attachments or here: http://i.imgur.com/PgKxKyM.png) As you can see the circuit is parallel, so the amperage increases. My question would be how high would the amperage go and what can I do prevent my arduino from getting destroyed?
Arduino Uno output U:5V I:20mA
RGB LED: Red: max. U:2V at 20mA
Blue, Green max. U:3V at 20mA

Jakub

#### Grumpy_Mike

#1
##### Mar 12, 2016, 10:37 pmLast Edit: Mar 12, 2016, 10:40 pm by Grumpy_Mike
Quote
As you can see the circuit is .....
Complete wrong.

You need one resistor with each LED colour. That is like you have in the red only on the blue and green as well. Also loose the resistor the other side ( common connection ) of the LED. If you have 42 RGB LEDs then you will need 42 * 3 = 126 resistors.

So with a proper circuit you would draw 20mA per LED colour to give you 43 * 3 * 20 = 2520mA or 2.52 Amps. This is way way more that an Arduino 5V line can supply.

#### jakub014

#2
##### Mar 12, 2016, 11:00 pm

This is way way more that an Arduino 5V line can supply.
Is there a solution to this problem?

#### Grumpy_Mike

#3
##### Mar 12, 2016, 11:03 pm
Quote
Is there a solution to this problem?
Yes use an external power supply.

By the way what is the Arduino doing here, just acting as a power supply?

#### jakub014

#4
##### Mar 12, 2016, 11:06 pmLast Edit: Mar 12, 2016, 11:17 pm by jakub014
I use the Arduino to toggle the LEDs off and on. Is something wrong with it?
Moreover my teacher told me to inform about transistors, are they a possible solution as well?

#### Grumpy_Mike

#5
##### Mar 13, 2016, 02:46 amLast Edit: Mar 13, 2016, 02:47 am by Grumpy_Mike
Quote
I use the Arduino to toggle the LEDs off and on.
That was not shown on the schematic you just had the LEDs going to a battery. Can you draw a schematic of what you actually have or want.

An Arduino output pin should not be asked to drive more than 40mA, and there is a total chip limit as well of 200mA for all the outputs added together. Further more there are group limits on ports.

Once we find out what you actually want to do we can talk about soloutions but at the moment this is a X-Y Problem

#### JimboZA

#6
##### Mar 13, 2016, 05:50 amLast Edit: Mar 13, 2016, 05:50 am by JimboZA
transistors, are they a possible solution as well?
Like this?

Johannesburg hams call me: ZS6JMB on Highveld rep 145.7875 (-600 & 88.5 tone)

#### jakub014

#7
##### Mar 13, 2016, 11:44 am
That was not shown on the schematic you just had the LEDs going to a battery. Can you draw a schematic of what you actually have or want.
Im apologizing for my vague question. You can find a more detailed version of the circuit at the attachments. This schematic shows only 1 port expander, in reality it should have 8.
Like this?
So in my case I would need an external power supply and 126 transistors(to toggle each color of the leds), or am I thinking wrong?
I also was thinking about what kind of power supply do I need and how do I connect the LEDs with it?

Besides, thank you for helping me.

#### Grumpy_Mike

#8
##### Mar 13, 2016, 12:21 pmLast Edit: Mar 13, 2016, 12:22 pm by Grumpy_Mike
If you are using port expanders and only driving one colour LED from each of the port expanders that would be fine. The 5V would be supplied from an external power supply with the ground connected to the Arduino ground.

These days I would advise using Neopixel LEDs either as a strip or as individual 5mm LEDs. It is way the simplest solution.

#### jakub014

#9
##### Mar 13, 2016, 01:12 pm
Im sorry if this is a dumb question but do I need something like this: https://www.antratek.de/usb-adapter-5v-2a?gclid=COjfvKbIvcsCFQhuGwod7r0DLw
And if I need this one, how do I connect it to my circuit?
Im wondering also why RGB LEDs and common LEDs make a difference in this circuit?

#### sterretje

#10
##### Mar 13, 2016, 04:34 pm
There is no difference; in principle each LED needs a resistor. In an RGB LED you have three LEDs so you need three resistors.

With a single LED, it does not matter if the resistor is connected to the anode or the cathode (although there might be design considerations to use one over the other).
Because a RGB LED has one common pin, you can not connect the three resistors to that pin (as they will be shared between all LEDS) so you have to connect the resistors to the other three pins.
If you understand an example, use it.
If you don't understand an example, don't use it.

Electronics engineer by trade, software engineer by profession. Trying to get back into electronics after 15 years absence.

#### MarkT

#11
##### Mar 13, 2016, 05:56 pm
Each LED either needs a constant current drive, or a resistor.  Some LED driver chips do constant
current drive and resistors would not be needed.
[ I DO NOT respond to personal messages, I WILL delete them unread, use the forum please ]

#### Grumpy_Mike

#12
##### Mar 13, 2016, 06:56 pm
Quote
but do I need something like this: https://www.antratek.de/usb-adapter-5v-2a?gclid=COjfvKbIvcsCFQhuGwod7r0DLw
Yes.

Quote
And if I need this one, how do I connect it to my circuit?
Connect the ground to the Arduino ground and the +5V to the +5V power supply of your port expanders.

#### jakub014

#13
##### Mar 13, 2016, 08:18 pmLast Edit: Mar 13, 2016, 08:23 pm by jakub014

Im sorry to bother you even more, but now I got 3 (hopefully final) questions:

Connect the ground to the Arduino ground and the +5V to the +5V power supply of your port expanders.
1. If I do so, I don't need transistors, right?

2. What kind of port do I need for this power supply and with what kind of port can i connect it to my circuit.

3. Is it possible to supply my arduino with it as well?

4. Would the external supply deliver 2.5A to each expander(Im not sure if the expander can handle this) and would this circuit be parallel as well?(else, how would it look like?)

#### Grumpy_Mike

#14
##### Mar 13, 2016, 09:14 pm
Quote
1. If I do so, I don't need transistors, right?
If you go with that last schematic with 8 port expander chips then no need for extra transistors.

Quote
2. What kind of port do I need for this power supply
I have no idea what you mean by this.

Quote
3. Is it possible to supply my arduino with it as well?
Yes.

Quote
Would the external supply deliver 2.5A to each expander
No, the total current it can supply would be 2.5A and that includes your Arduino.

Quote
and would this circuit be parallel as well?
I am not sure what you mean but I guess no.

You do know you will only be able to get 7 colours from those RGB LEDs with that circuit don't you?

Go Up