Assistance needed ASAP

Hello all! I am completely new to Arduino and multiplexing, but I found a super cool graduation cap that I wanted to try to do and I'm doing well, until I have to connect everything to the micro-controller (Aruino Mega). I'm on step 5 and I just want to make sure I connect everything correctly. I have all of the parts and resistors as well. Please let me know what you guys think I should connect where, otherwise I'll have to guess and play around. (Would definitely prefer not to guess!) I'll post step 5:

Step 5: Connect It To Your Microcontroller
Time: 45 minutes.
So your microcontroller should have at least 32 digital outputs. You should also have 16 2N 2222A transistors. 16 of your digital outputs will be used to control the transistors (connected to the gate) and the other 16 are directly connected to the cathodes. The collector of the transistors should be wired to +5V and the emitter to the anodes. A high signal to the transistor and a low signal to the cathode will allow current to flow through the LED.
I did not include any resistor into my circuit because I wanted maximum brightness over longevity of LED. Yes, the LED will probably burn out faster, but I wanted the brightness. Furthermore, I'm going to be scanning through the rows anyway, so the LEDs are really only on at most 1/16th of the time and not continuous operation. Well, that's the theory anyway.

and here is the website I keep referencing: Technical How To - Graduation Cap Mod

Any guidance is appreciated!

Hello all! I am completely new to Arduino and multiplexing, but I found a super cool graduation cap that I wanted to try to do and I'm doing well, until I have to connect everything to the micro-controller (Aruino Mega). I'm on step 5 and I just want to make sure I connect everything correctly. I have all of the parts and resistors as well. Please let me know what you guys think I should connect where, otherwise I'll have to guess and play around. (Would definitely prefer not to guess!) I'll post step 5:

Step 5: Connect It To Your Microcontroller
Time: 45 minutes.

So your microcontroller should have at least 32 digital outputs. You should also have 16 2N 2222A transistors. 16 of your digital outputs will be used to control the transistors (connected to the gate) and the other 16 are directly connected to the cathodes. The collector of the transistors should be wired to +5V and the emitter to the anodes. A high signal to the transistor and a low signal to the cathode will allow current to flow through the LED.

I did not include any resistor into my circuit because I wanted maximum brightness over longevity of LED. Yes, the LED will probably burn out faster, but I wanted the brightness. Furthermore, I'm going to be scanning through the rows anyway, so the LEDs are really only on at most 1/16th of the time and not continuous operation. Well, that's the theory anyway.

and here is the website I keep referencing: Technical How To - Graduation Cap Mod

Any guidance is appreciated!

Please do not cross-post. Threads merged.

Sorry about that! :slight_smile:

jinx92:
Any guidance is appreciated!

Speaking of being sorry, omitting the resistors is asking to be sorry. Your display will make people wonder why you are graduating as an engineer if sporadic LEDs or indeed whole rows or columns fade out in the middle of the demonstration! You really will be sorry!

In other words - use the resistors (in the cathodes of the LEDs)! You can probably get away with 180 ohms, though to be truthful, the total permissible current rating of a mega2560 is hardly greater than a UNO as far as I understand it. The circuit described uses the transistors as emitter-follower mode, so no base resistors are required and in fact you should connect the collectors to the unregulated supply of 7.5V, 9V or whatever that feeds the Mega, but if you want serious current drive, you really should have another 16 transistors in common-emitter mode on the negative side of the LEDs with 1k resistors in series with their bases. Then you can get a bit wild with the current and (experimentally determine a resistor value to) drive the LEDs as 100 mA or so for the 1/16 of the time they are on.

Paul__B:
...the total permissible current rating of a mega2560 is hardly greater than a UNO as far as I understand it.

This has been discussed a few times on the forum. I believe CrossRoads contacted Atmel for confirmation. The processor limit is 200mA * the number of VCC/GND pairs. 5200 for the 2560 processor. 2200 for the 328 processor. There are, of course, also port and pin limits.

Given the subjective nature of the phrase, you will have to decide if 1A vs 400mA constitutes "hardly greater".