Help: Selection of MOSFET value

Hi everyone,

I have 10 RGB Common Anodes Leds. I am trying to do multiplexing. I am following tutorial of 6 RGB Led project. Here the link is "LED MULTIPLEXING 101: 6 AND 16 RGB LEDS WITH JUST AN ARDUINO"

He is using P channel MOSFET. Can anyone tell which value of MOSFET is used in this?

How you find the Transistor and MOSFET if you know required parameters of it? Let us suppose
if i want to provide 12V and 4 AMP current to circuit where i go to find transistor value or name?

If there is a better tutorial or suggestion for multiplexing of RGB then please share it.

Thanks in advance

Instructables have a bad name around here. Many forum members are tired of fixing problems caused by bad designs found in instructables. Most of them are poorly designed by people who do not have enough expertise to be instructing others. Two signs of a bad Instructable are: no proper schematic diagram; missing component values, so this does not seem to be a good one.

With 12V supply, you cannot drive a p-channel MOSFET with an Arduino pin alone. This is because to switch the mosfet off, you must pull it's gate up close to 12V. An Arduino pin can only output 5V. So you will need a pull-up resistor from 12V to the gate and another (small) transistor to pull the mosfet gate down to 0V. And a resistor to limit the current into the second transistor's base/gate.

You should post a schematic showing how you plan to wire your common anode LEDs with a 12V supply. I am concerned that a 12V supply is not ideal. Please make a proper schematic. If you are using Fritzing, use the schematic view, not the breadboard view. Also post a link to the data sheet or web page about the LEDs. See the forum guide to find out how to post links correctly, so they can be clicked.

PaulRB:
With 12V supply, you cannot drive a p-channel MOSFET with an Arduino pin alone. This is because to switch the mosfet off, you must pull it's gate up close to 12V. An Arduino pin can only output 5V. So you will need a pull-up resistor from 12V to the gate and another (small) transistor to pull the mosfet gate down to 0V. And a resistor to limit the current into the second transistor's base/gate.

You should post a schematic showing how you plan to wire your common anode LEDs with a 12V supply. I am concerned that a 12V supply is not ideal. Please make a proper schematic. If you are using Fritzing, use the schematic view, not the breadboard view. Also post a link to the data sheet or web page about the LEDs. See the forum guide to find out how to post links correctly, so they can be clicked.

Thanks PaulRB for reply,

The link is https://www.instructables.com/id/LED-Multiplexing-101-6-and-16-RGB-LEDs-With-Just-a/ .
I did not created circuit yet. Actually i following same circuit as in that project and trying to understand concept of multiplexing technique. And also i have no knowledge about Mosfets & Transistors. That's why i asked that how to find right Mosfet name or value even you have calculated parameters of transistors?

12V supply is just an example used because UNO board itself Current limitation like MAX Current 500 MA on USB. Mostly LEDs circuit requires current in Amperes and DC barrel Jack supports 7 to 12V. I uploaded circuit diagram which i am trying to copy.

Actually i following same circuit as in that project and trying to understand concept of multiplexing technique

Then forget that circuit and get yourself a proper tutorial to work with. That one is crap.

I uploaded circuit diagram

No you didn’t. You attached a physical layout diagram, which, when you know something about electronics, you will know is utterly useless.

Have a read of this
http://www.thebox.myzen.co.uk/Workshop/LED_Matrix.html

Grumpy_Mike:
Have a read of this
http://www.thebox.myzen.co.uk/Workshop/LED_Matrix.html

Thanks, i will study.

PaulRB:
Please make a proper schematic. If you are using Fritzing, use the schematic view, not the breadboard view. Also post a link to the data sheet or web page about the LEDs. See the forum guide to find out how to post links correctly, so they can be clicked.

Remember those things I asked you to do? You did neither of them. You posted a breadboard view and your link cannot be clicked. I think you have no respect for the forum.

PaulRB:
You posted a breadboard view and your link cannot be clicked. I think you have no respect for the forum.

Yes, i posted breadboard view because i was not created circuit and only copy the image from other site. Link is [here](https://www.instructables.com/id/LED-Multiplexing-101-6-and-16-RGB-LEDs-With-Just-a/ .). I was created hyperlink in starting post on text "LED MULTIPLEXING 101: 6 AND 16 RGB LEDS WITH JUST AN ARDUINO". Now i again created clickable link. I respect the forum rules and regulations and everybody on the forum. If you think i didn't respect, i apologize for it.

I created schematic diagram but some components are missing due to lack of knowledge. 8 RGB leds are placed. These leds are going to place in garden, so 4x2 position sets right. Wiring is not an issue, if better solution is available.

Sorry but that circuit can't possibly do anything, it looks all shorted out.

some components are missing due to lack of knowledge

Knowledge about the tool or electronics?
If it is the tool then just draw your schematic on a piece of paper and post a photo of it.

I created circuit of RGB Leds. I hope this circuit will work. I think it follows Row Scanning. What type of transistor or Mosfet require and resistors to connect it.

Grumpy_Mike, Have you written article on MOSFETS and Transistors? if not please write it, it will help lot to newbies.


For this circuit I would use 5V supply and 4 X bc327 pnp transistors.

There is no need or advantage to a 12V supply. The max current drawn by the matrix, with a 1:4 multiplex, is only around 120mA.

Do you have a data sheet or web page for the LEDs which tells you the forward voltage of the red, green and blue LEDs? The max current is normally 20mA. If you don't know the forward voltages, we can tell you how to measure them (you will need a multimeter). Knowing that we can tell you how to calculate the resistors needed in the circuit.

Note where you have Arduino pins on that diagram you need to put a resistor in seriese with the pin. Don’t connect the cathodes directly to the Arduino.

Hi,

Leds are i am using, they are standard. No Brand name we can say chinese Item.

I connected BC327 transistor in circuit. Now how i can connect Common Anode to transistor? should i place a resistor between them or directly connect to it?

Arduino pins running out so shift register is required? Please suggest what other components are required and their value to complete circuit.

OOPS i think i made a mistake. I connected Base Pins of BC327 to Digital Pins not PWM. Please review diagram.

The emitters should be connected to 5V, there should be a resistor in the base of the transistor to limit the base current use 330R. Then the collectors of the transistors should be connected to each common anode point in your first diagram.

Each cathode from each LEDs needs to have a current limiting resistor before being connected to the others and on to the Arduino pin.

Thanks Grumpy_Mike for prompt reply.

I connected resistors to cathodes. The arduino UNO pins get all used. I want to add new things to UNO, so some pins would be required. What DeMUX Chip required?

I attached all components to circuit.

You could use 74hc138, but you would only save 2 pins.

You can use the analog pins as digital input/output if that helps.

If you are concerned about using fewer Arduino pins, use ws2812 LEDs. Only 1 pin needed for all 8 LEDs, or more.

Just use a MAX7219.

Three control pins.

PaulRB:
If you don't know the forward voltages, we can tell you how to measure them (you will need a multimeter). Knowing that we can tell you how to calculate the resistors needed in the circuit.

Hi PaulRB,

Can you tell me that how to measure forward voltage of RGB led Common Anode for learning purpose.

My circuit is completed with support of you, Grumpy_Mike and Paul__B. Thanks to all. I will go market soon for buy components.

Yes, just connect one rgb led with the series resistors shown in your schematic, anode to 5V and resistors to ground. Then use your multimeter to measure the voltage between the anode and each cathode. Repeat the process for a few more LEDs to check they all have the same values (approximately). I would expect the red to be around 1.8-2.0V, and the green and blue to be around 3.0-3.2V.

The forward voltages will vary a little depending on the current flowing through them, which is partly determined by the series resistor value. But doubling or halving the current should only make small differences to the forward voltage. If you experiment to see this effect, don't exceed 20mA current, or the LEDs could be damaged. You can normally exceed the 20mA limit, to maybe 40mA or even more, but only when you are multiplexing, so current is flowing for only a fraction of the time. If you had a data sheet, it might give an indication of the maximum instantaneous current, which for some LEDs can be 5x the maximum continuous current. With no data sheet, who knows? But I would not recommend to exceed 40mA even when using a 1:4 multiplex.