Diorama LED lighting

BobTPH

Joined Jun 5, 2013
11,515
I assume two the the 2 C cell packs in parallel for 3v would be the best way to go for longevity? (in the photo they are in series for 6v)
No, the 3V are likely just at the edge of lighting the LEDs at all. As the cells deplete, the voltage will drop quickly to a point where they are too dim, long before they are completely depleted. For example, the 3V battery will be about 2.3V when half depleted, a that probably will not light the lights at all.

3 cells at 4.5V (with different resistors) would likely give you better runtime than 4 cells at 3V. The 4.5V battery will still be around 3V when fully depleted and the lights will still light, though dimmer because of the higher resistors.
 

Thread Starter

Doane2u

Joined Sep 2, 2023
42
No, the 3V are likely just at the edge of lighting the LEDs at all. As the cells deplete, the voltage will drop quickly to a point where they are too dim, long before they are completely depleted. For example, the 3V battery will be about 2.3V when half depleted, a that probably will not light the lights at all.

3 cells at 4.5V (with different resistors) would likely give you better runtime than 4 cells at 3V. The 4.5V battery will still be around 3V when fully depleted and the lights will still light, though dimmer because of the higher resistors.
Thanks, Bob
That makes sense, but wouldn't 4 C cells in series (6v) be even better, or is the extra voltage wasted on a higher ohm resistor for the LED?
I was calculating that a 4.5v (3 C cells in series) with a 3v 15mA LED and 100 ohm resistor would be at about 3v and 15mA and full brightness
I then did it with a 6v (4 C cells in series) with the same LED and a 220 ohm resistor and it would be near full brightness, but about 13.7 mA, wouldn't it last longer?
Maybe my figures are wrong?
Thanks,
 

djsfantasi

Joined Apr 11, 2010
9,237
Thanks, Bob
That makes sense, but wouldn't 4 C cells in series (6v) be even better, or is the extra voltage wasted on a higher ohm resistor for the LED?
I was calculating that a 4.5v (3 C cells in series) with a 3v 15mA LED and 100 ohm resistor would be at about 3v and 15mA and full brightness
I then did it with a 6v (4 C cells in series) with the same LED and a 220 ohm resistor and it would be near full brightness, but about 13.7 mA, wouldn't it last longer?
Maybe my figures are wrong?
Thanks,
The extra voltage is wasted in the resistor.

While your second experiment looks like is used a lower current, you can get the same current with 4.5V. You just have to calculate the resistor needed with your LEDs, 4.5V and the lower current. You can also do this experimentally, by substituting resistors of a value higher than 100Ω until it looks right.

Excuse me, Bob, for interjecting
 

BobTPH

Joined Jun 5, 2013
11,515
The extra voltage is wasted in the resistor.

While your second experiment looks like is used a lower current, you can get the same current with 4.5V. You just have to calculate the resistor needed with your LEDs, 4.5V and the lower current. You can also do this experimentally, by substituting resistors of a value higher than 100Ω until it looks right.

Excuse me, Bob, for interjecting
No problem, 3 of us have been involved all along.

At the same current, the 4 cells in series will have nearly the same run time.

If you would just do the simple measurements I suggested before, we could be more accurate.

We need to know the current and voltage when operating your LEDs at the brightness you want. The easy way to do this, requiring only one meter, is to measure the voltage across the led and the voltage across the resistor. The voltage measurement on a multimeter interferes with the circuit far less than a current measurement would. With the voltage across the resistor you get the current from Ohm law, and the current in the LED is the same.

If you could do this for the higher and lower brightness that you want, we could estimate the runtime quite accurately. My guess is that the 3 C cells will last 20 hours or more, and 3 AA cells would do better than 5 hours.
 

Ya’akov

Joined Jan 27, 2019
10,235
NOTE: I have more to address in your question, but unfortunately there will have to be a part 2 because I’ve run out of time for now. I intend to follow up soon but if I don’t please don’t hesitate to poke at me, since I might lose track for which I apologize in advance.

I’m also not familiar with these pin connectors and tool, but would like to know more. Most of my wires are 28-30 AWG and I solder connections and then use those shrink wrap tubes. The 0402 SMD LED lights have hairlike wires; my wire strippers can’t handle them as they are much smaller than 30 so I resort to using nail clippers and it’s really difficult. They are also difficult to solder onto resistors or extension wires and too thin for distribution blocks. Would these pin connections solve my problems or is there some other solution?
Thanks
Sorry I missed this.

I think it is worth starting with the connectors since that would have immediate benefit. I will try to make this relatively short, but with enough information for you to try it and see how it works for you.

First of all, there are three broad classes of connectors:

  • Wire to Wire
  • Wire to Board
  • Board to Board

They are pretty much as they sound, with the first two being relevant to you and the third being something you are unlikely to use. Let’s start with a little bit of general information, then take the first and second in order because that’s how I suspect you will apply them.

General Properties of Connectors
All connectors share certain attributes and it’s very helpful to know what these are so you can understand how to read descriptions and how to look for what you need. I am not going to cover everything, just a few key points.

Pitch
Connectors that use linear contacts, that is, have their connections in a row or rows, have a pitch. This is, like thread pitch the space from one feature to the next—in our case the pins or sockets in the connector.

We are going to stick to connectors with a pitch of 2.54mm (.1”) because it is the most common pitch for the space provided for connectors on the sorts of modules you are likely to use. This pseudo-standard size comes from the early days of electronics when the center of IC production was the US, and .1” was settled on as a pin spacing standard. This lead to a .1” grid for PCB layout, and as a result 2.54mm is now everywhere.

The modules will have a set of pads for inputs and outputs and it is most likely they will be on 2.54mm centers

Locking Tabs
Connectors come in locking and non-locking types. The cheapest, most common type of connector in the world of DIY modules is the non-locking pin header type. This is just a row of pins (as you can see in photos of the modules). The pins have a pitch of 2.54mm, and they mating connector is just a simple socket.

For historical reasons that (surprisingly) I will not get into here, the mating connectors are often called “DuPont”. This is especially true in the case of prepared jumpers called DuPont Wires. This is the default connector in the DIY world, but practically, it is best for experimentation, not production and it us particularly unsuited for wire-to-wire use in that case.

There is a great utility to locking connectors in the case of a device that will be handled by a customer. Connectors being inadvertently pulled off can be a support nightmare. It also insures the connectors will not work themselves loose as the device is being transported.

So we are going to look for a locking variety for you.

Polarization
Some connectors can be plugged in backwards, by default pin headers are like this. This can be very bad if it reverses power leads or puts a high voltage signal on a low voltage input. You can mark the connector shell and mating header with a color to show the correct orientation, but this can be ignored. Pin headers can also be inserted “off by one” (or more). That is, the regular spacing allows the insertion off center and similar hard-to-troubleshoot or even smoke-generating results are possible to the reversing problem.

On approach to mitigating this is to use an extra position on the female connector that is blocked. A corresponding missing male pin (cleverly placed among the other pins, not just on the end where it can easily be shifted off) allows proper insertion but prevents insertion where there is a pin present in the position that should be empty.

This can work very well, but in our case, the luxury of laying out the pads on the PCB is absent and unless the module has such an arrangement (it won’t) or happens to have a pin or pins that we won’t use (it very well might) we can’t use this method. Because it is likely to be available only sometimes, when there is a disused pin, it’s not a good thing to standardize on.

Instead, by choosing a locking type connector, as above, we get the added bonus of polarization since it will only allow instertion in one direction. There are some non-locking variants that also provide polarization by offsetting the pins from the center line of the connector and providing a tab (that may “lock” but not very well) so the connector will only fit one way around. This type can prevent reversal buy not offsets while a true locking type will require proper alignnent.

Termination
The way the contact is connected to a wire is called termination. In our case, there is really only one sort that makes sense: crimping. There might be a few instances where soldering is an option, but it should be avoided in the applications we are talking about.

In other sorts of connectors you might find screw terminals, spring tension terminals, and possibly others that are not coming to mind. But crimping is the right path for us.

Crimping takes proper tools and some practice but that should be intimidating or a barrier for you. On the other hand, there is a good chance that for you first use, we can find premade pigtails which are connectors already attached to wires making things much easier for the neophyte. You can then take these pigtails and solder them to the leads or pins of the component being connected and insulate them with heatshrink tubing. This may well be your best way to start.

Pin Count
Some connectors are best suited to, and most likely to be seen in a two-pin configuration for connection of +V/0V (power), signal/common (sensors), and the like. They are almost always available in more than two-pin versions, but they will be most often seen with just the pair.

If you are going to use the premade assemblies, it is particularly helpful to choose something that will most likely be available with the right number of pins for your application. We’ll explore this, along with the idea that you should use different connectors for power outputs than signal inputs to prevent mistaken connections and to make it more obvious what goes where.

Connector Types
Wire-to-Wire
These connectors are designed to connect wires to each other. Both mating parts terminate on wires (sometimes called inline), which, until you start to use modules, or maybe even design your own PCBs*, is what you will be dealing with. There is nothing preventing a wire-to-wire connector from having a wire-to-board configuration though.
*yes, you could do that—and its cheap and completely within your reach. Designing a board for power distribution that doesn’t even have active components on it, just connectors, would be a great thing. Maybe you will look into it as you go on.

Wire-to-Board
These connectors have one part that terminates to wires and the other designed to be soldered to a board. When you are using modules this is the type you will be using. They very well may be the same type as above, just with the two different parts.

Board-to-Board
This connectors allow you to stack PCBs and have connections from one to the other. Not something you are going to be likely to need in the foreseeable future but if you see this designation, you are looking at the wrong thing.

Choosing Connectors for Now
There are a few de facto standard connectors that have the advantage of being readily available from places like AliExpress and Amazon, and often as pigtails. The also show up in consumer gear which means you can often find things like battery packs already terminated in them which means less work—a good thing.

Your immediate needs including connections for power, for switches, and for LEDs. So, let’s take those in order and pick something out. I am going to focus on premade pigtails for your first application. I do encourage you to buy and learn to use a crimping tool and connector kit for future work. The pigtails might still have use, but if you have wires to terminate, it is better to crimp on the contacts then to solder a pigtail to the wires.

Power Connections
Your power connections, for the foreseeable future, will be low voltage at low to moderate current. It would be surprising to find you using more than 14.4V, and depending on the voltage, more than 5A. So, we‘ll look at that general range.

Battery and AC adapter connections should probably use something that is more likely to turn up already in place. So, for external connections of an AC adapter, I would choose the bog standard 5.5 x 2.1mm coaxial (or barrel) connector.
1694594853099.png
you can find these, and mating plugs everywhere, just search 5.5 x 2.1
For internal power connections (e.g.: battery packs) I would choose the JST XH connector. JST is a manufacturer, and the products have been embraced by the DIY and low cost consumer goods markets. XH is the connector designation. It has a 2.54mm pitch and is available in configurations up to 20 pins, in both wire and board types. It is inherently polarized and uses friction locking which is fine though not as convenient as a proper locking tab.
1694595390576.png
there are many options for pigtails, this one uses silicone wire,
a great advantage as the insulation will not melt back
while soldering like PVC, and it is very flexible

You can easily find battery packs already terminated with the XH connector as well. So this is a solid choice for your power connections.

Switches
Your initial use of switches will probably be restricted to power control. That is, turning on and off the power supply. For that reason, I would use the XH connectors, just like the power connections. You will probably mostly be making a sort of switched extension cable for the battery or power input. So, XH in and XH out.

LEDs
The LED connections should probably use a unique connector to make working out how to hook things up clearer. For the power going to groups of LEDs, I am going to recommend the JST XM connector in a three-pin configuration. Yes, you only need two pins (now) but even if you ignore one of the pins, there are advantages to this option.

This particular connector is almost universal for addressable RGBW LED strips. That makes them readily available and already associated with LEDs. The three pins also means you can use such LEDs, or use them for two distinct circuits.

For individual LEDs, I would deviate from the 2.54” mm pitch and choose a JST style connector that is also extremely common in 1.25mm pitch. The reason is that they take up much less room, and are less likely to be attached directly to a module with its 2.54mm limitations. Otherwise it is a half-sized XH connector, but it won’t be confused with one, and can’t be plugged in to the power connections you make with them.
 

Thread Starter

Doane2u

Joined Sep 2, 2023
42
No problem, 3 of us have been involved all along.

At the same current, the 4 cells in series will have nearly the same run time.

If you would just do the simple measurements I suggested before, we could be more accurate.

We need to know the current and voltage when operating your LEDs at the brightness you want. The easy way to do this, requiring only one meter, is to measure the voltage across the led and the voltage across the resistor. The voltage measurement on a multimeter interferes with the circuit far less than a current measurement would. With the voltage across the resistor you get the current from Ohm law, and the current in the LED is the same.

If you could do this for the higher and lower brightness that you want, we could estimate the runtime quite accurately. My guess is that the 3 C cells will last 20 hours or more, and 3 AA cells would do better than 5 hours.
Okay, I think I remember you saying that the extra voltage is wasted in power because of the larger resistor needed.
One problem is that my multimeter is a cheap analog 10k ohms/volt, so may not be that accurate, but I will try to get a reading tomorrow and get back to you on it. Thanks,
 

Thread Starter

Doane2u

Joined Sep 2, 2023
42
Bob: I needed some smaller ohm resistors to do the tests you requested with 4.5v ( I only have 1k and 620) and I also ordered some 3x C cell 4.5v cases with covers ( they were hard to find with covers!) Should have everything by next week so will get back to you all.
Ya’akov: Thanks for all the very detailed and clear info on connectors, etc. I am going to read through all of that more carefully to absorb it. Unless I missed it, will any of the wire crimp ons work on the hair sized SMD LED wires I’m dealing with?
My on-off control for the batteries is a push button on the side of the case.
 
Last edited:

Thread Starter

Doane2u

Joined Sep 2, 2023
42
Okay, I decided to do some measurements this afternoon with the 6v supply and interpolate for the coming 4.5v 3 C cells
The LEDs are the SMD 0402 3v 15mA (20 mA max) and I'm using 2 sets of 2x C cells in series for 6.2 Volts measured and I measured across the resistor and LED for each voltage

1 K ohm measures 3.4v i= E/R I get 3.4 mA and its dim but perfect for the street lights
500 ohms at 4.5v should give me close to this at 3.47mA?

2x 1k in parallel RxR/R+R for 500 ohms I get 2.87V = 6.7 mA Too dim for interiors

620 ohm I get 2.84v = 5.42 mA and its also too dim

2x 620 = 310 ohms I get 3.2v = 10.3 mA and this will work for most interiors and outdoor signs.
150 ohms at 4.5 volts should get me about the same current and brightness?

For really bright lights I figure that 100 ohms at 4.5V will get me about 15mA

Am I doing this all right?
thanks,
 

BobTPH

Joined Jun 5, 2013
11,515
Volts measured and I measured across the resistor and LED for each voltage
You may have measured across both, but you only reported one voltage for each case. That gives us the current, but not the Vf of the LED, we need both to determine the resistors to use at 4.5V.
 

BobTPH

Joined Jun 5, 2013
11,515
2x 620 = 310 ohms I get 3.2v = 10.3 mA and this will work for most interiors and outdoor signs.
150 ohms at 4.5 volts should get me about the same current and brightness?
How did you compute that?

If we assume the battery terminal voltage remains at 6.2V when the LED is lit (it does not, but the drop may be insignificant) then the Vf of the LED at 10.3mA is 6.2V - 3.V = 3.0 V.

So we compute for the 4.5V battery as:

R = (4.5 - 3.0) / 0.0103 = 147 Ohms. So you got the right answer, but I am not sure how.

For really bright lights I figure that 100 ohms at 4.5V will get me about 15mA
We have no data to know what the LED Vf is at 15mA, so you cannot compute that.
 

djsfantasi

Joined Apr 11, 2010
9,237
You may have measured across both, but you only reported one voltage for each case. That gives us the current, but not the Vf of the LED, we need both to determine the resistors to use at 4.5V.
I understand what you are saying, but is it necessary to calculate everything so precisely?

First LED brightness is not linear. So there are ranges of acceptable driving current.

Secondly, he is an artist and primarily interested in appearances. And it seems in his last post, that’s what he accomplished. As far as his maximizing battery life, he can follow a simple rule to choose the largest resistor that results in the appropriate brightness (ie for street lights, inside lighting or sign).

We can assure him that keeping the current below 15mA is s good idea (max. forward current).

The approach he has just taken was suggested by me in post #65. Bob suggested another valid approach in post #64.

All without a lot of calculations which could be confusing. I’d repeat the test with the 4.5V battery pack. Build on basic knowledge and experiments. Don’t try to drink from a fire hose.
 

Thread Starter

Doane2u

Joined Sep 2, 2023
42
I understand what you are saying, but is it necessary to calculate everything so precisely?

First LED brightness is not linear. So there are ranges of acceptable driving current.

Secondly, he is an artist and primarily interested in appearances. And it seems in his last post, that’s what he accomplished. As far as his maximizing battery life, he can follow a simple rule to choose the largest resistor that results in the appropriate brightness (ie for street lights, inside lighting or sign).

We can assure him that keeping the current below 15mA is s good idea (max. forward current).

The approach he has just taken was suggested by me in post #65. Bob suggested another valid approach in post #64.

All without a lot of calculations which could be confusing. I’d repeat the test with the 4.5V battery pack. Build on basic knowledge and experiments. Don’t try to drink from a fire hose.
I probably screwed up the calculations, but the brightness with the different resistors is right. I will repeat when I get the 4.5v setup and resistors new week, thanks.
 
Last edited:

BobTPH

Joined Jun 5, 2013
11,515
I understand what you are saying, but is it necessary to calculate everything so precisely?
Sorry, you are right with respect to getting to an acceptable solution. I just like to have all the necessary information to really do it right.

Jumping to the conclusion that if 150 gives you 10mA, then 15mA would take a 100 Ohm resistor is technically wrong because it assumes the Vf will not change, but will probably be close enough for government work, as they say.

Also, I should warn the TS that the lights will dim considerably as the voltage of the battery drops, and he should design for the dimness not with fresh batteries, but with depleted batteries. There, the Vf becomes more critical. And a little brighter than needed with fresh batteries is probably a better look than too dim a couple hours into a 10 hour lifetime.
 

Thread Starter

Doane2u

Joined Sep 2, 2023
42
John: Thanks, hadn't thought of that dimming problem either. So, another question, not sure if you answered this earlier and I just missed it.. but, relating to that dimming problem and longevity:
If there are two circuits using resistors to give the same equivalent brightness of the same number and type of LEDs, but using 6v as opposed to 4.5v from C cell batteries in series, will one last longer than the other, and will one show less noticeable dimming of the LEDs over the span of time that they are lit?
thanks,
 

Thread Starter

Doane2u

Joined Sep 2, 2023
42
How did you compute that?

If we assume the battery terminal voltage remains at 6.2V when the LED is lit (it does not, but the drop may be insignificant) then the Vf of the LED at 10.3mA is 6.2V - 3.V = 3.0 V.

So we compute for the 4.5V battery as:

R = (4.5 - 3.0) / 0.0103 = 147 Ohms. So you got the right answer, but I am not sure how.


We have no data to know what the LED Vf is at 15mA, so you cannot compute that.
In 88 above I said: " For really bright lights I figure that 100 ohms at 4.5V will get me about 15mA"
I took 4.5V-3V = 1.5V and 1.5v/15mA = 100 ohm ..is that incorrect?

I've got so many notes I'm having a hard time keeping up with this...
 
Last edited:

BobTPH

Joined Jun 5, 2013
11,515
In 88 above I said: " For really bright lights I figure that 100 ohms at 4.5V will get me about 15mA"
I took 4.5V-3V = 1.5V and 1.5v/15mA = 100 ohm ..is that incorrect?

I've got so many notes I'm having a hard time keeping up with this...
Yes, because the 3V is the Vf at 10mA. It will larger at 15mA, maybe 3.2V. Then the calculation is (4.5 - 3.2) / 0.015 = 87Ω. But we don’t know the actual Vf at 15mA without measuring it.
 

djsfantasi

Joined Apr 11, 2010
9,237
In 88 above I said: " For really bright lights I figure that 100 ohms at 4.5V will get me about 15mA"
I took 4.5V-3V = 1.5V and 1.5v/15mA = 100 ohm ..is that incorrect?

I've got so many notes I'm having a hard time keeping up with this...
No, 100Ω is correct… for 15mA. But in Bob’s example, he calculated the resistor for 10.3mA.

The LED behaves a little different depending on the temperature, forward voltage and current. But don’t panic.

In your situation, the minor differences won’t matter. So 100Ω will likely work. At 15mA. Which you can reduce (and increase battery life) with a larger resistor. Running LEDs at their max current isn’t great. Modern LEDs often will work down to 3mA.

There are so many variables*, I recommend determining the resistors to use by experimentation with a small set of values. In your case, providing LED illumination, that will give you a good enough solution.

Variables may include LED manufacturer, temperature, time, minimum current, maximum current, rated current (power supply), forward voltage, supply voltage. resistance, luminance, physical mounting, etc… Have you noticed that with every answer by someone, someone else says, “Yeah, but…”. That’s because each variable affects every other variable.

The other people aren’t wrong. It’s just that they are considering other scenarios that doesn’t mean a whit to your problem. Good enough is, well, good enough. I do not mean to minimize anyone else’s contribution. I don’t disagree with anything said here. But they are engineers and like to recommend the optimal solution. We just want it to look good. It is this difference that leads to model railroaders to recommend a 1kΩ resistor for any and all LEDs with 12V (which is a very common voltage in the hobby). Engineers cringe.
 

Thread Starter

Doane2u

Joined Sep 2, 2023
42
John: Thanks, hadn't thought of that dimming problem either. So, another question, not sure if you answered this earlier and I just missed it.. but, relating to that dimming problem and longevity:
If there are two circuits using resistors to give the same equivalent brightness of the same number and type of LEDs, but using 6v as opposed to 4.5v from C cell batteries in series, will one last longer than the other, and will one show less noticeable dimming of the LEDs over the span of time that they are lit?
thanks,
Is this another dumb question?
 
Top