what about charlieplexing?
OMG -- I wasn't even aware of that technique -- I just looked it up on the Wikipedia (https://en.wikipedia.org/wiki/Charlieplexing)
Using Charlieplexing, we could drive 306 LEDs with our 18 pins (although the circuit and control would make our eyes water), but it's tool late to add that in now.
So let's pretend that what I MEANT the quiz question to say was ""What is the maximum number of LEDs we can individually turn On and Off without affecting any other LED and WITHOUT USING CHARLIEPLEXING?" LOL
Why all the extra resistors in series with the LEDs ? With the Arduino, I always avoid the series resistor by modulating the LED on / off using an interrupt routine and keeping the maximum duty cycle to 50%. Never lost an LED yet.
Hi Charlie -- I guess I just always use current limiting resistors so I can turn the LED on and forget about it. I would be interested to know if over-driving a LED for a 50% duty cycle degrades its operating life. I'll save this question for the next time I'm talking to a "LED Head" :-)
Why isn't the first answer correct? There are 18 outputs, so if you wire the IO lines to one LED each and the other end of the LED to the PSU ground (not an Arduino I) then you can switch 18 LEDs on at the same time - assuming of course the Arduino can source 360mA across all its outputs.
Hi there -- if the main question was "what's the maximum number of LEDs we can have on at any one time?" then -- as you say -- the first answer would be the correct one.
However -- the main question actually read: "What is the maximum number of LEDs we can individually turn On and Off without affecting any other LED?" The answer to this is .... well, I don't want to say because I don't want to spoil the quiz for others (if we ignore the "Charlieplexing" technique mentioned in the earlier comments).
I then went on to add a subsequent question, which was: "Based on the solution to the main question, a follow-on question is, 'What is the maximum number of LEDs we can have fully On at any particular time?'"
furthermore, the ATmega328P (afaik the MCU used on the Arduino Uno) can only sink/source via Vcc or Gnd maximum 200mA. This limits further the maximum current drawn ...
I think the question is faulty because of the phrase "without affecting any other LED". If one can't turn on any LED without turning off another first it would seem to violate that requirement. Which of course extends to being able to turn on ALL the LED's simultaneously.
Also "fully on", which suggests that any version of multiplexing * is not allowed, because anything less than 100% duty cycle isn't fully on. When clearly you did have multiplexing as the answer. Even if you forgot Charlieplexing.
You are correct -- I should have phrased this better (I hang my head in shame :-)
To post reply to a comment, click on the 'reply' button attached to each comment. To post a new comment (not a reply to a comment) check out the 'Write a Comment' tab at the top of the comments.
Please login (on the right) if you already have an account on this platform.
Otherwise, please use this form to register (free) an join one of the largest online community for Electrical/Embedded/DSP/FPGA/ML engineers: