12/27/2023 0 Comments Arduino rgb led joystick controllerIf two LEDs were lit, they would be half as bright as if only one led was lit. The brightness would then depend on how many LEDs were lit at the same time. I don't like your idea of jumping from lit led to lit led. So it would make no difference in this circuit. If only one led was lit at any instant, the multiplex ratio would be 1-in-16, but the instantaneous current could be increased to compensate, by reducing the series resistors, maintaining the same average current and therefore brightness. I'm suggesting that two RGB LEDs will be lit at any instant (if required for the desired pattern). You can change that by not going through the display by row and column and just jump from lit to lit but you'll have to write that into happening. All 3 junctions, RGB, may light at the sme time but only one led lights for some brief time before the next led has a chance. ![]() ![]() Multiplexing should only light 1 led at any instant. Would this parameter make multiplexing difficult?ĭo you know any resources I could use to learn about multiplexing? The grid probably won't need every led lit at the same time, very likely only about 2 - 7 at time. I just realized I didn't explain something, sorry about that. Is this possible with available pins, or do I need to use a chip? My grid project idea also needed two standard joysticks(x y pots, 1 button), so I'd really be pushing a Nano to it's max. Since this grid would only be used inside, I don't really need brightness. This is a very interesting idea! I was dreaming about multiplexing the grid without a chip, but being a builder who hasn't ever multiplexed, I didn't think it was possible. To allow for my current-boosting ideas, I suggest you choose common-anode rgb LEDs. ![]() bc337) later to boost the current, or a chip such as uln2803 (a bit old-fashioned but will do the job) or a tpic6b595 (which will also save 5 Arduino pins, but will require code changes). But if you find you need more brightness, you can add 8 transistors (e.g. With 5 mA per channel and a 1-in-8 multiplex ratio, the average current per channel will be 0.625mA, which does not sound much, but modern LEDs are very efficient, and this may be ok for indoor use. ![]() The values of the series resistors must be chosen to avoid overloading the digital pins with too much current (aim for 30mA in total, 5mA for each of the 2 X 3 channels). By multiplexing between the 8 digital pins, you make the whole matrix appear to be lit at once. You would use 8 digital pins (some or all of the the analog pins can also be used as digital pins on most Arduino) to select which pair of LEDs is lit. You would use the 6 pwm pins that most Arduino have, with 6 series resistors (not all the same value) to drive a pair of rgb LEDs at once. The result won't be super-bright but might be bright enough I think. In fact, at full brightness, they will be eye-wateringly bright, close-up, and you will probably need to turn the brightness down for the comfort of the players.īut you can drive a matrix of 4x4 ordinary RGB LEDs without any extra chips. But you will need an external 5V, 1A power supply because the LEDs can draw a lot of current. I agree 100% that using ws2812b or apa106 LEDs will be the easiest and best way.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |