LED Tree kit question - Page 1
Forum section: electronics / beginners

author: kalel
author_rank: Frequent Contributor
timestamp: July 28, 2017, 10:41:02 pm
content: There's this interesting tree kit called "Three-Dimensional 3D Christmas Tree LED DIY Kit Red/Green/Yellow LED Flash Circuit Kit Electronic Fun Suite"It seems to have 4 flashing segments, according to the description:QuoteI'm curious how simple would it be to bypass the flashing circuitry in order to put in slow changing RGB LEDs? I think it would look more relaxing than the flashing.The seller I'm looking at doesn't provide a schematics. Maybe another does.So the remaining question is if you believe this would be relatively simple to do based on the PCB images. If it's a complicated endeavor, it might not be worth it (plus, I have no idea other than the assumption if it actually looks better that way).Edit: Based on the 9v battery thing (I see 4.5v from batteries or 5 from USB), I'm not sure if the rest of the description is correct either. I assume the images are probably correct.According to some comments, not all LEDs work properly due to forward voltage difference and parallel connections, and according a comment, this might be the schematics:http://www.haoyuelectronics.com/Attachment/CTR-30C/CTR-30C%20Flashing%20Christmas%20Tree%20Instruction.pdfI understand that in such a circuit, the resistors and capacitors will determine the flashing frequency. But is there a simple way to make it zero, e.g. replacing the capacitors with resistors? Andifthat works, is there a better way?

author: MK14
author_rank: Super Contributor
timestamp: July 28, 2017, 11:02:50 pm
content: There is no real point to the kit, if you are going to use your own automatic colour changing RGB LEDs.Just use verostrip or something (maybe even your first simple custom PCB), placing the LEDs in your favorite Christmas Tree configuration.If you insist on using the Kit, you can just leave out all the components, and make sure the RGB leds are connected to the ground and positive supply rails, via a suitable resistor (ideally one per Led).

author: kalel
author_rank: Frequent Contributor
timestamp: July 28, 2017, 11:11:44 pm
content: Quote from: MK14 on July 28, 2017, 11:02:50 pmThat image looks neat.Still, the kit is well designed, green (if that's actually better) and at less than $3 you get the boards, the USB cable and probably the battery holder too. It's cheaper than or equal to the custom solution, although you can take more pride from working with a protoboard. Custom designing and ordering a PCB for that project is also not especially cheap in comparison with the kit, while it would be a relatively simple and fun thing to design (I'm sure anyone can do it for just some automatic color changing LEDs), it's probably not worth it.

author: MK14
author_rank: Super Contributor
timestamp: July 28, 2017, 11:16:17 pm
content: PCB's can be a pain to rework. I.e. if you need to cut tracks, especially if they are under solder resist. Drilling tiny holes can be tricky as well.But sure, on cost grounds the kit makes lots of sense.These days, with electronics as a hobby, it can easily cost more (or even a lot more), to make something yourself. Which you could have just bought. But if you are doing it for fun and a great learning exercise, and many other reasons. It can be well worth the extra cost.In the old days, you could actually save money by building (electronic) things yourself.

author: kalel
author_rank: Frequent Contributor
timestamp: July 28, 2017, 11:27:01 pm
content: Quote from: MK14 on July 28, 2017, 11:16:17 pmI agree that if it requires cutting tracks and adding jumper wires all over the place, I'm not sure it would even look so great in the end.Unless the wires are all green, of course. I was wondering if there was a simpler solution, e.g. replacing the caps with resistors, or shorting out the transistor traces in some way, or something similar that doesn't make physical modifications to thecircuitPCB.One advantage of the self color changing RGB LEDs is that they do a lot of the controlling themselves (or disadvantage if you want to run your own special color patterns, but that might be a different type of project with an affordable MCU). You could just feed them a reasonable voltage and that's about all that is necessary. Not that a resistor per each LED can hurt.As for the point that buying is cheaper than making, I do wish it was the other way around as an extra incentive. But when you save on cost, you can work on more projects. If we look at it a different way, both making and buying are cheaper than before, perhaps sacrificing some quality. At least when making for fun, you don't have to worry about longevity or use more expensive quality components (unless that is your goal - to make something of superior quality).

author: MK14
author_rank: Super Contributor
timestamp: July 28, 2017, 11:33:44 pm
content: You should be able to hide the 'new' wiring, UNDERNEATH the PCB, where it won't normally show. You might be able to cut one lead of the LEDs shorter than the other, and then solder a resistor on it. Hence the PCB would then just need to supply the supply rails.Like this:Although that would NOT look so neat. It might look better, if you bend the resistor by 90 degrees. So the LED looks almost like it did, before messing with it.Anyway, there are lots of ways of changing it. I've only shown one or two of the ways.

author: kalel
author_rank: Frequent Contributor
timestamp: July 28, 2017, 11:37:45 pm
content: Quote from: MK14 on July 28, 2017, 11:33:44 pmThat's a neat and simple idea for adding some resistance. Thanks for your tips so far.Edit: Well okay, the neat is relative, but functional and simple for sure.

author: MK14
author_rank: Super Contributor
timestamp: July 28, 2017, 11:40:43 pm
content: You could probably hide the resistor, by covering the new lead (with resistor), with heat-shrink, or insulation (sleeves). If you want it to look as neat as possible.

author: kalel
author_rank: Frequent Contributor
timestamp: July 28, 2017, 11:52:41 pm
content: Quote from: MK14 on July 28, 2017, 11:40:43 pmI assume a 1/8 watt resistor is recommended (for the size)?Not sure about the exact calculations for an RGB LED, but 1/8 should still be sufficient.SMD are also out there, but probably a bit complicated to use.

author: MK14
author_rank: Super Contributor
timestamp: July 28, 2017, 11:58:40 pm
content: Quote from: kalel on July 28, 2017, 11:52:41 pmAt a guess (size-wise), the picture looks like a 1/4 watt. But an 1/8 watt resistor should be fine. Since you are likely to limit the current to no more than 20 milliamps (if not less than that), and it is running at 5 volts (more like very approx 3 volts because of the voltage drop across the LEDs).So at most it is:Power = Voltage X Current = 5 x 0.02 = 0.1 watts.But a fair bit less in practice, because of the voltage across the LED(s) and the current you choose, may be a fair bit less than that.

author: kalel
author_rank: Frequent Contributor
timestamp: July 29, 2017, 12:06:19 am
content: Quote from: wilfred on July 28, 2017, 11:54:04 pmThat's an awesome kit well worth mentioning. I don't think he is offering those kits yet, but people have asked.Quote from: MK14 on July 28, 2017, 11:58:40 pmI agree. Something like 100 ohm 1/8 might work. Additional resistance through the wires will add some more (even the USB cable can have a noticable voltage drop). There are always losses that add some resistance, including the simple USB cable.Edit: Or if at night it seems too much, perhaps 220 ohm or such instead. As long as it is sufficient to allow all colors to show decently. But that can be tested first.

author: MK14
author_rank: Super Contributor
timestamp: July 29, 2017, 12:21:05 am
content: Quote from: kalel on July 29, 2017, 12:06:19 amThe resistance of the wires etc, can usually be neglected, unless the currents are very high and/or the wires are extremely long (e..g. many metres).It depends on which RGB colour changing LEDs you use (but 20mA is a common limit). I.e. where you buy them from, should have a datasheet and/or specification on the maximum recommended current for them. When you have them, you can try a few different values of resistance, on a breadboard, to fine tune how bright they are, relative to your room ambient light levels.Yes, 220might be right. It depends on the LEDs max allowable current and how bright you want it.

author: tronde
author_rank: Frequent Contributor
timestamp: July 29, 2017, 01:59:49 am
content: I have played with some of the Chinese "rainbow" colour changing LEDs. They should make a nice tree. You must have one resistor on each LED. They don't fancy being connected in series because of the internal logic circuitry.If you are lucky, the holes in the PCB are large enough for you to have a thin insulating sleeve (strip something from thin wires) on one of the LED's legs. If so, you can mounth the LED's flush to the PCB and use either 1/8W axial resistors or some SMD resistors on the other side.I think you will get the best visual effect if you can find LED's with a milky-white lens instead of the more common water-clear types.

author: Zero999
author_rank: Super Contributor
timestamp: July 29, 2017, 07:56:38 am
content: Quote from: kalel on July 28, 2017, 10:41:02 pmThe circuit in the PDF, which is probably the same as the one used in the kit, is a ring oscillator. It's true that all those LEDs connected parallel won't light uniformly. They should each have their own series resistor.QuoteOmit all the capacitors and resistors, except for those in series with the LEDs and replace the transistors with a wire link between the emitter and collector connections.Quote from: kalel on July 28, 2017, 11:52:41 pmI thought colour changing LEDs generally have the resistor built-in, so you don't need to add an external resistor, but I could be wrong. Check the data sheet for the LEDs you're using.If you don't need resistors, then the series resistors can be replaced with wire links. If you do, then that's a pain because you want one resistor per LED. You could replace the series resistor with a link and add your own SMD resistors by cutting the appropriate tracks and scraping off the solder resist.

author: MK14
author_rank: Super Contributor
timestamp: July 29, 2017, 09:52:54 am
content: Quote from: Hero999 on July 29, 2017, 07:56:38 amI don't know which specific LEDs the OP was planning to use, so it is possible they don't need a resistor.Taking the following one as an example, it says you DO need resistors (except at a specific, low voltage, please see below):EDIT: On reflection. If it doesn't need a resistor at a specific voltage. It makes sense to either get ones rated for 5V (if that is your intended supply voltage), or use a voltage regulator (or something), to give them the exact 3.6V they need. Then you won't need to mess about fixing all those tiny resistors, into the circuit.http://www.ebay.co.uk/itm/10-ULTRA-BRIGHT-5mm-COLOUR-CHANGING-RGB-LEDs-5000-MCD-/400409667498?epid=1888255197&hash=item5d3a46a7aa:g:ffIAAMXQydtTOl4rQuote

author: Zero999
author_rank: Super Contributor
timestamp: July 29, 2017, 12:44:06 pm
content: Quote from: MK14 on July 29, 2017, 09:52:54 amUnfortunately, as with many Chinese products, no proper datasheet is a available.I had a quick look for data sheets and found this. It isn't clear, whether they need a constant voltage source of 3.8V to 5V or the current should be limited to under 20mA and that's the forward voltage. I'd recommend using a resistor to be on the safe side.http://www.optosupply.com/uppic/2016812904937.pdf

author: kalel
author_rank: Frequent Contributor
timestamp: July 29, 2017, 01:40:32 pm
content: Finding the proper datasheet may be possible, but more times than not, you don't have it with the cheapest sources.Some might work on 5v directly as intended.For others, I guess that a step down can/could work.A step down + some resistance might be the safest bet, but also the most complicated/costly. Not that a step down is very costly these days, just comparing.Anyway, without using a resistor per each LED (e.g. with the stepdown solution) would them being in parallel still cause an issue? I mean, if we have 2 LEDs, one is turning "RED" and the other "BLUE" at the same time, will the "RED" "lock" the voltage of the "BLUE" so it doesn't show up fully?Having a step down would probably be a good idea anyway. Most modules have a potentiometer (usually a tiny trimmer, but this can potentially be changed - or left as is), and you can fine tune the brightness. There is nothing bad about being able to make things less bright, or being able to change the brightness a bit without needing an MCU, which really isn't/shouldn't be needed for this case.

author: Zero999
author_rank: Super Contributor
timestamp: July 29, 2017, 03:11:47 pm
content: Quote from: kalel on July 29, 2017, 01:40:32 pmWhat do you mean by step-down? Reducing the voltage? This is different to just adding a series resistor which limits the current.QuoteIf two LEDs with different forward voltages are connected together in parallel, the one with the lower voltage hogs the power and the higher voltage one will either not light at all or be very dim. Red LEDs have a lower forward than blue so, the red would just glow.

author: kalel
author_rank: Frequent Contributor
timestamp: July 29, 2017, 03:17:09 pm
content: Quote from: Hero999 on July 29, 2017, 03:11:47 pmYes, if we wanted to get e.g. 3.x volts from USB, a step down seems like a reasonable method.Quote from: Hero999 on July 29, 2017, 03:11:47 pm

author: Zero999
author_rank: Super Contributor
timestamp: July 29, 2017, 03:26:10 pm
content: Quote from: kalel on July 29, 2017, 03:17:09 pmLike a voltage regulator? If so, that makes sense. You'll need something with a low dropout voltage, such as the TPS76201 but it comes in a small SMT package, which will make soldering a pain but is good because it's easy to hide.http://www.ti.com/lit/ds/symlink/tps76201.pdf

author: kalel
author_rank: Frequent Contributor
timestamp: July 29, 2017, 03:53:03 pm
content: Quote from: Hero999 on July 29, 2017, 03:26:10 pmI meant more along the lines of a buck step down module. They cost less than $0.5 shipped now, and you can set the output voltage with a trimmer. I think that if the source voltage falls or increases, it will affect the output voltage. But with USB, we expect to have a reasonably regulated voltage to begin with, so this should be all right. They claim a maximum (at a specific setting of course) efficiency of 96%.Here's a short clip of what happens when 2 diodes are in parallel, but only 1 (1k in this case) resistor is used in series. So USB > 1k Resistor > 2 LEDs in parallel. The test was done to see if we can see red with other colors at the same time with these. And the answer is yes as expected, at certain points blue becomes very dark.https://streamable.com/3vdxfThe flickering is not visible with eyes.

author: MK14
author_rank: Super Contributor
timestamp: July 29, 2017, 04:43:53 pm
content: Quote from: kalel on July 29, 2017, 03:53:03 pm(Taking assumptions, since you seem to be saying there is no datasheet as such) Then you would need a slightly higher voltage (e.g. 5V, enough to ensure consistent brightness between LEDs and their colours), than the bare minimum they need and a resistor for each to share the current.What voltage was the 1K resistor connected to (if you already said, I did not notice, sorry. Maybe it's 5V, as you mention USB) ?And does one LED on its own, properly light up as regards all colours (specially Blue) at that voltage with the same resistor ?

author: tronde
author_rank: Frequent Contributor
timestamp: July 29, 2017, 04:50:10 pm
content: You must have one series resistor per LED.Mine is 2.9V to 3.6V depending on colour. Calculate for 2.9V and 20mA, and you should be safe. I have been running one from 12V with 470 ohm for several years. They are usually bright, so no problem choosing even a lower current.

author: kalel
author_rank: Frequent Contributor
timestamp: July 29, 2017, 04:54:00 pm
content: Quote from: tronde on July 29, 2017, 04:50:10 pmYes, one resistor per LED is needed of course, just wanted to see what happens when they are in parallel with a single resistor (in this case, e.g. RED and BLUE LEDs just wouldn't work together - Blue would turn off).Several years sounds great. Are you using it in some ornament?Quote from: MK14 on July 29, 2017, 04:43:53 pmSingle LED looks decent with 1k and USB (~5v). Of course, it's not as bright, but in some cases that might be suitable.1k was just for testing, it's probably a bit too much. It (1k) would be good if the thing was battery powered (might also be good if it's running in the dark).

author: Zero999
author_rank: Super Contributor
timestamp: July 29, 2017, 05:15:58 pm
content: Quote from: kalel on July 29, 2017, 03:53:03 pmHow does that compare to one LED and a 1k8 to 2k2 resistor (half the current)? The eye is less sensitive to blue so it's often darker than the other colours but that can depend on the type of semiconductor used to make the LED too.Regarding the step-down: a buck regulator is a good idea and will certainly be more efficient than the linear regulator I suggested but make sure the drop-out voltage isn't too high.

author: MK14
author_rank: Super Contributor
timestamp: July 29, 2017, 05:18:17 pm
content: Quote from: Hero999 on July 29, 2017, 05:15:58 pmHow exactly is that going to work ?I thought we just discovered that it needs 5V (and a suitable resistor per LED) to work well.EDIT: As long as you don't care as to consistent brightness between the LEDS, and if all the colours (e.g. Blue), always work reliably or even at all. You could run it at e.g. 3.6VMy answer assumes you want a quality circuit (as regards the LEDs lighting pattern, and all colours appearing etc), if not, lower the voltage until it barely works, maybe is too dim, possibly unreliable etc and use a switcher, I guess.

author: tronde
author_rank: Frequent Contributor
timestamp: July 29, 2017, 05:21:02 pm
content: No ornamet. Just left it for fun. Gave the rest of my LED's to kid.When you connect several in parallel with only one resistor you loose control over the current in each LED. Might be OK if only a couple, but it might also be that one LED will see more than 30mA. This will depend on how you calculate you resistor, of course. If you play safe with a rather large resistor it might be some of the LED will not start because the current is to low. They are usually quite cheap, so you will not break the bank.

author: kalel
author_rank: Frequent Contributor
timestamp: July 29, 2017, 05:25:17 pm
content: Quote from: MK14 on July 29, 2017, 05:18:17 pmI think part of the question was, could it also work well if two (or more) LEDs are in parallel without series resistors, and a certain constant voltage was fed to them.Or, if all LEDs are each with a series resistor, dropping the base voltage (up to a point) could allow for some brightness adjustment.As for 5v, I tried 2 1000 ohm resistors in series (and 1 LED). That's about 2k. I can see all of the colors still, blue and red being clear, the brightness is noticably lower, but still plenty enough for something working in the dark (if lights are on, you might want something brighter).Edit: Finally added a 10k pot, turned it to the lowest point of brightness, and now:Red is very dim. Green is the brightest by far, and blue is also pretty decent comparing to Red. Obviously, near 10k wouldn't be normally used.

author: Zero999
author_rank: Super Contributor
timestamp: July 29, 2017, 05:31:07 pm
content: Quote from: MK14 on July 29, 2017, 05:18:17 pmThe video did show the blue being dimmer when two LEDs were in parallel, but how do we know that isn't normal, without comparing it to a single LED?

author: MK14
author_rank: Super Contributor
timestamp: July 29, 2017, 05:31:58 pm
content: How long do you want/need the batteries to last ?Do you want it to operate at night only, or both night and day ?

author: MK14
author_rank: Super Contributor
timestamp: July 29, 2017, 05:34:40 pm
content: Quote from: Hero999 on July 29, 2017, 05:31:07 pmYou seem to be answering a different question, to what I asked.I also suggested using a single LED, to confirm the situation, in an earlier post.So as regards that, we already seem to AGREE.(My question was as regards the switching power supply. But don't worry about it. It seems the OP is getting to that bit, anyway. By checking what resistor values they need.).

author: Zero999
author_rank: Super Contributor
timestamp: July 29, 2017, 05:40:13 pm
content: Quote from: MK14 on July 29, 2017, 05:34:40 pmSorry I missed that. There are so many posts.Quote from: kalel on July 29, 2017, 05:25:17 pmYou'll find pretty odd things happen, when running at lower currents. It's not surprising that red is dimmest for two reasons: the human eye is least sensitive to longer wavelengths, when it's dark and red LEDs have a lower voltage drop, than blue and green, hence use less power per mA of current.In any case, whilst it'll probably work with one resistor for all the LEDs, it seems like it's best with each LED having its own resistor.

author: kalel
author_rank: Frequent Contributor
timestamp: July 29, 2017, 05:53:21 pm
content: Quote from: MK14 on July 29, 2017, 05:31:58 pmI just meant to suggest that if it runs on batteries, a higher resistance like 1-2k might be great for a longer life. For the tree, running on e.g. USB is quite sufficient. We're just discussing different possibilities. Operating at night could be an interesting way to add some transistors and photo-resistors, but there's no need in my case.I've added a video where:1 - On the left is 1 LED with 1k Series resistor2 - On the right are 2 parallel LEDs with 1k Series resistor(So, the first LED has 1 Resistor, and the other 2 share the second resistor).It's a bit difficult to film a proper comparison, it might not be useful but it's an attempt. And you need a specific interval where they "interfere" with each other more (when they are not on the same color).https://streamable.com/o8a7eAlso, are some results using a single decimal step down unit (not something to be taken as exact and accurate), 3 LEDs in parallel, no resistors. These are only visual results, I understand that for anything other than visual, current-voltage must be measured.3v -https://streamable.com/63xwm2.6v -https://streamable.com/ho3s5Below that 2.6, at 2.3, for instance, blue is not visible at all.

author: MK14
author_rank: Super Contributor
timestamp: July 29, 2017, 06:11:26 pm
content: So it looks like, having one resistor, of around 1K, per LED (just like you have also just said). Running of the 5V USB or 4.5V (nominal) 3 X AA batteries (optional). Is where we are currently heading for.These "fixed" RGB slow flashing LEDs are great, if they do exactly what you want. But if you want them to be different (even slightly), you are basically up the creak without a paddle (i.e. they don't really allow messing about).The next level up (project wise), would be to use the fully programmable RGB LED varieties. Which would potentially allow you to choose just about any flash/light pattern and/or brightness level (assuming the LEDs allow that). Maybe using an MCU.But that gets a lot more complicated and considerably more expensive.Or even get plain RGB LEDs and use your own LED controller (ideally constant current), and an MCU, to program it to do, just about anything.EDIT: You edited your post, a long time after it was made. So I did not see the lower voltage tests, when I made this post.No blue lighting up (if voltage too low) and/or poor current sharing are not really what you want. So I guess it is best to stick with a marginally higher voltage (e.g. 5V from the USB) and suitable resistor values. One per LED.

author: kalel
author_rank: Frequent Contributor
timestamp: July 29, 2017, 06:17:55 pm
content: Quote from: MK14 on July 29, 2017, 06:11:26 pmResistor per LED is probably the safest bet on it working well. They look good with the slow flash, and yes, modifications are not possible.I agree that the next project could be MCU controlling an RGB array. I assume the possibly most complicated part is controlling a certain amount of LEDs with a limited amount of ports. I understand that there are ICs that can be used to allow this control, but have not worked with them.

author: MK14
author_rank: Super Contributor
timestamp: July 29, 2017, 06:20:06 pm
content: Quote from: kalel on July 29, 2017, 06:17:55 pmYes, you got it EXACTLY!For now, what you are doing, is best. Since it is best to learn to walk, before running.

author: kalel
author_rank: Frequent Contributor
timestamp: July 29, 2017, 06:21:57 pm
content: Quote from: MK14 on July 29, 2017, 06:20:06 pmAnd the result will be (hopefully) enjoyable without many ways to ruin something.