Basic Question about Charlieplex Schematics

Hello!
Firstly, I know tomorrow is Thanskgiving, so to everyone who celebrates it, and however y'all do so, have a good Holiday!

So, re: al of this, I've asked questions, done quite a bit of searching and reading, and was ready to sit down and start plugging wires into my breadboard, but then, I crashed into another question.
What about the connection to Ground...?
A VERY few images show a connection from the LED cluster, to Ground. I think I found maybe three, but they're different from one another in diagramming the actual LED cluster.
Most do not show any connection to Ground.
Does that mean there is no connection between the LED cluster, and Ground...? Should there be one, or not? It's very confusing to me because I'd thought there always has to be a connection to Ground for the sake of safety. So I'm wondering which is correct, because sadly, I just cant tell.

Re: resistors:
Some sources have resistors associated with every LED, some showing them connected to the LEDs' anode pins, others to the cathode pins; other sources show one resistor at the start of each LED cluster/group, and still others put the resistors after everything.

I've thought that the resistor should be between the Voltage source, and the LED's anode, but now I'm confused abut that as well. Any clarification would be great!

Ultimately, I'm wondering:
Is there any sort of published standard, or a paper that's not overly esoteric, which can be followed? I know there are many brilliant people who can do the math and figure all of this out - sadly, I'm far from being one of them. ButI still would like very much to do the fairly-basic project I have in mind. And right now, I'm just totally and completely boggled. So if anyone has a link to a working standard, could you share the link or the book/paper title...?

Well, first of course, whatever you all do for Thanksgiving, I hope it's an enjoyable day tomorrow! :slightly_smiling_face:

  • Kris

The problem is you are looking at everything EXCEPT schematics. Then there is the LED/resistor question. The resistor drops the voltage going to the LED and the voltage drop depends on the current. When you discover Kirkofs(spelling) law, you will know the current in EVERY part of a circuit is identical. So the resistor before or after the LED is irrelevant. The effect is the same. The why the different placement may be for ease of construction.

And we are going to my brother's place for TG. What about you?

Have a good day tomorrow!
We don't have any family here so it's just food, desserts, and quietude.

I'm not sure to call what I've been looking at - some are what I think <?> are called "wire diagrams", some are more illustrative like this one

which is what I understand best (but still, I see no Ground connection); others are photos of people's breadboard setups, and so on.
I don't know what to call the mix of illustrations; I guess "illustrations" would have been best. By whatever name, I've been studying them and the wiring patterns.

Oh!, and some of the illustrations do show a mix of colors, but I'll be using only one color, probably yellow (if the warm white don't test out well). So that part is the easy one. I also did review series versus parallel connections in LEDs just to be sure I had that correct.

For now, though, I don't have resistor values because I assume it would depend upon whether they're to the Anode side of the LED groups, or the cathode side; or before or after each LED. It also appears that each configuration requires different code. That adds to my confusion.
Then there is the question of "To ground or not to Ground".

I feel like I should be able to grasp this more easily.
But tomorrow is "feast and light-hanging day" so maybe letting it all percolate a while will help.

Enjoy your visit tomorrow!

Hello @birdsinmybrain ,

You need to understand

Ohm's law

and

Kirchhoff's circuit laws

These laws are fundamental to all electrical circuits and if you learn them a lot of the mysteries of electricity will become clear. In many cases applying both laws to a circuit will provide whatever answer you are looking for.

Please learn these then apply them to your circuits. If something still does not make sense then come back and ask. At the moment you seem to be making wild guesses that are not based on any knowledge of how circuits work.

The schematics you posted are incomplete, for example the resistors in post #3 are cut off at the bottom and don't go anywhere. It is impossible to comment on a circuit with bits missing.

There must be a connection to ground, otherwise no current would flow and no LEDs would light. You are not seeing that connection because it is not a direct connection to ground. You will not see a direct connection to 5V (or whatever voltage) either but there must be one.

When an Arduino pin is set to OUTPUT and HIGH, that pin is connected to 5V internally inside the chip. Current can flow from 5V through the pin to light LEDs.

When an Arduino pin is set to OUTPUT and LOW, that pin is connected to ground internally inside the chip. Current can flow from the LEDs through the pin to ground.

When an Arduino pin is set to INPUT, that pin is not connected to either 5V or ground internally inside the chip. No current will flow through the pin in either direction.

Charlieplexing uses all 3 of these settings to control where current can flow, and in which direction it will flow, to control which LEDs light up.

Not for safety. There are no high voltages or high currents involved and so no danger. But yes there must be a connection to ground, and 5V, for any current to flow and light the LEDs.

Try
Google search "Charlieplexing", AI mode.
Or Arduino Cookbook chapter 7

AH-HA!!!!
"When an Arduino pin is set to OUTPUT and LOW, that pin is connected to ground internally inside the chip."

That, I did not know but exactly answers the question!
Hooray!!! And Thank you!
((I did try reading the data sheet but obviously missed that...I have another go at it just for good measure.))

I'm off to do the breadboard preliminary setup while the turkey cooks.
Maybe I shouldn't be so happy about the solution, but I am ;)

__As an addendum:
Tonight I found a video that addressed the topic of where to place the resistors in a way that "clicked" with my brain - even after all of the turkey and so on - so now, with that, the Ground question resolved, the examples are making much more sense now.

Thank you for your patience and assistance :)

PaulRB posted that the connection happens inside the ATTiny85 MCU .
"When an Arduino pin is set to OUTPUT and LOW, that pin is connected to ground internally inside the chip. Current can flow from the LEDs through the pin to ground."

That's exactly what I was wondering about, how/where the connection occurs.
:smiley:
It's probably in the Data Sheet and I just missed it (sadly, old age hasn't really improved the adult ADD).
I had been thinking that there had to be a physical wire connection from somewhere in the LED cluster, to the Ground pin. But it's internal to the chip.

Now for the breadboard test setup!

I'm admittedly a Luddite re: AI, in large part because it's not very discerning about what's included. BUT definitely a big Thank You for the reference to The Arduino Cookbook! I wasn't aware of it; the edition from 2011 is free online, but I'll look for the latest edition just to be sure it's up to day with the IDE.

It will not be. It was written by a member here and not updated to the latest operating system because it deals with basics not specifics.

Where from? A lot of places just steal books and offer them for free, under certain conditions. I know some of my books are available via these crooks.

@birdsinmybrain
You're welcome.
@Grumpy_Mike
I bought my copy years ago and like genuine Arduino products, I like to make a contribution. I guess it's just old school thinking.
I have several other O'Reilly books including Faludi's Building Wireless Networks.
O'Reilly, as you might know issue pdf copies and the accompanying code snippets so maybe these are the source of some of "free" copies.
The Cookbook, well thumbed, is often bedtime reading and in front of me now.
Much appreciated.

The 2011 "cookbook" is on Github, as are a slew of other e-books. So I assumed they're there legally; if legal, I'll of course erase the copy and buy it because it has a lot of good information and explanations, and there is a 2020 edition for sale.

BUT I also would have to find out how/where to report the existence of the e-library...
I don't know that I ought to post the main link here, because that might just compound the problem, which wouldn't be good :slightly_frowning_face:

I'd definitely welcome any insight/advice regarding what steps, if any, I ought to take...

Hello and Thanks!; I did find a couple of examples of code with exactly that. I started trying to figure out how to lay out the breadboard for the test, but the ones I have are too small - I tried to finagle them but , no go. So I have some larger ones arriving (hopefully) Dec 2nd.

In the meantime, it certainly won't hurt me to study this more ;)

I would recommend studying the diagram posted by @Claudio_FF and focus on how to lay that out on the breadboard. I find this arrangement much easier to get my head around, compared to the diagram you posted in #3, even though they are in fact equivalent to each other.

Yes. Looking at that diagram, one can quickly observe that drive line A requires 5 points(resistor end and 4 LED legs), B the same, but C and D require 7 each.

To connect that compactly on a breadboard therefore requires one row each for A and B, and two rows each for C and D, with a short wire jumper connecting two adjacent rows in those cases (of course, that jumper itself requires one point in each row).

So, six adjacent 5-point rows on a breadboard would be the minimum, though for regularity and pattern recognition I might use 2 adjacent rows for each of the 4 lines, using 8 all told.

Hopefully, our OP will recognize what I'm saying, and realize that 6 rows on even the smallest of breadboards is doable.

Look again, each line is connected to a resistor and six LEDs, although the diagram left the shaded circle off the end of one LED on line B, where the LED lead terminates on line B without crossing.

Sigh. Correct. Responding before first coffee is dangerous!

Nonetheless, the approach is still valid, just requires two rows for each of the four drive lines.

Thanks!

Yes, that's a good one - I have that, and the color-coded one open while I'm setting up my breadboard test. The color-coded one is what I've gone back to the most.

I'm sort-of meshing three tutorials that specify 20 LEDs, which sounds nutty but I'm doing it to help me better understand Caudio_FF's diagram and similar ones.
Amazingly enough, it's starting to make sense when I see it explained and look at the Arduino sketches. I definitely could not come up with the sketch on my own, but Arduino people are amazingly generous with all of the examples and answering questions - even from a most-definitely-"right"-brained person like myself ;)

So, back to it!

Thanks!, I do, and yup, I'm able to get the small breadboards holding the array.

I got addled (I blame it on Too Much Turkey, heh! ;) )and thought I needed a larger size, though still not all that large - so they were inexpensive-enough that I'll keep the order for future projects.