![]() (Had we been in a face-to-face class we would have just switched them). The issue with this mix up has much more to do with us being remote than it does with any actual problem with the LEDs. These differences reveal some interesting patterns that, while a bit advanced, are useful to think through. They require different wiring - and sending the same code code to one channel of each leads to opposite behaviour. However, in terms of inner connections and electrical setup they are quite different in fact, they are mirrors of each other. So, from these perspectives, common anode and common cathode are fully interchangeable. We are going to make the most of this glitch and take this opportunity to think about different ways to control LEDs.Ĭommon cathode (from class - ‘expected / normal’) and common Anode ( from class - wonky) LEDs are virtually identical in appearance and there is no difference in their spectrum of color output. That is the purpose of the ULN2803.As you are all aware I was surprised by the fact that, while most of the 2021 kits have common cathode RGB LEDs, a significant number have common anode RGB LEDs. It doesn't matter that your "loads" are connected to the higher voltage. ![]() Of course the inputs to the ULN2803 will come from your microcontroller and could be powered from 3V3 or 5V. This long wire has inductance and will cause a lesser effect to the relay coil but nevertheless is worth absorbing. Although the leds would not normally require a catch diode, it is a good idea to use those provided by the ULN2803 because you have a long length of connecting wire to the leds. The diode at pin 18 would then be across the relay coil so that when the relay's connection to ground is released, the otherwise dangerous back emf voltage is absorbed by the diode. This then connects all of the catch diodes within the ULN2803 package so that each is in reverse parallel with their own load. Pin 10 of the package would in this case connect to the +12 volt power supply. I understand the base and collector labeling, but the COM should be my positve input voltage, correct?įortunately I only need 8 pins total for my IC - 2 for reading PWM signals which will correspond to the position on the color spectrum for front and back, and then 6 for my RBG output pins (front + back).īelow is how the ULN2803 would be connected if you needed to operate a 12 volt relay and a bunch of leds. I didn't realize these sort of multi-line drivers existed (can you tell how new I am to microcontrollers?). I wanted to have 6 buses (R/G/B front and back of the craft). I'm actually using this for a RC multirotor craft. Thank you both so much for the in depth reply! You actually hit on the issue before I even brought it up. It was reasonably cheap to do, didn't take any extra board space (the dimensions were constrained by other factors, which meant that space was not particularly at a premium). The only resulting design limits were that only a certain number of (sub-)LEDs could be lit at once, but that was a limitation of the power supply, and could be finessed with multiplexing. The most heavily loaded components were the three PNP transistors, and the 4403 is rated for 600 mA - plenty for 10 LEDs. The color select lines from the controller were inverse-logic (easy to handle in software). Each transistor base got a 4.7 k resistor, which insures they're saturated. The three cathodes of a single LED were tied together and went to the collector of an MMBT3904 acting as a low-side switch. From each of those busses, each LED (and here I mean each individual sub-led of a particular color - 30 in all) got an individual current limiting resistor (this is critical!). I used MMBT4403 PNP transistors as high-side switches creating a red, green and blue Vcc bus. They were controlled by 13 pins from the controller - 3 color selects and 10 LED pins. I ran through this whole exercise some time ago in designing a little board for someone that had 10 RGB LEDs (which really just means 30 LEDs).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |