Can I use a schottky to get around this level transition issue? - Page 1
Forum section: electronics / beginners

author: NaDobraNich
author_rank: Regular Contributor
timestamp: January 13, 2025, 07:11:25 pm
content: I have an addressable LED that takes in 5V VDD. I want to drive it with my 3V3 micro. The datasheet warns about needing 0.7 * VDD to guarantee the data line will register a high value.* I've tested with 3V3 and"it works on the bench". Which is to say I can be sure it would work all the time, after age and along all temperatures (-20C to 50C).* I saw some people say the same, it works "mostly" and the problem goes away when a scope is applied. Meaning it is on the ragged edge of working. But makes me think a discrete component change could help.* One thought is a 1bit level-translator. Small and cheap, but will cost at least $0.30 between itself at volume, and capacitors, and placement. Not to mention the real estate and extra BOM parts. This is a worst case.* Another most interesting thought I had was to not drive the two LEDs at 5V, rather 4.7V by putting a series schottky diode on the VDD. Ideally this would be .3V drop... But I fear it wouldn't be linear. That is when the LED is "off" it still draws 1mA, and the schottky might not be linearly dropping .3V. When I am on and drawing 20mA, I could see it being more reliable. If it works mostly at 5V, it seems like 4.7-4.9 would only help.Is the schottky idea worth doing? I don't think it would heat up much, the cost is reasonable, I don't "need" it on both LEDs but I might want it to ensure the 4.7V LED is the same color as the 5V LED.Addressables are weird and I don't have a lot of experience with them.

author: Benta
author_rank: Super Contributor
timestamp: January 13, 2025, 07:26:32 pm
content: Not a good idea.How about sharing some info on which LEDs and MCU we're talking about?Makes quality of answers much better.

author: PGPG
author_rank: Frequent Contributor
timestamp: January 13, 2025, 07:37:47 pm
content: Quote from: NaDobraNich on January 13, 2025, 07:11:25 pmWhere do you get your supplies? I see HCT1G17 at Mouser for about $0.05 for 100pcs order.As you write 'and capacitors, and placement' I understood that your $0.30 is for IC alone.

author: NaDobraNich
author_rank: Regular Contributor
timestamp: January 13, 2025, 09:17:10 pm
content: Quote from: PGPG on January 13, 2025, 07:37:47 pmI mean $0.30 for parts, placed, stored, handled, etc. So maybe $.20-25 for that part all said and done. My concern with a 1bit translator is size after cost. I think this part might be too large at 2x2mm but I didn't put it down on the board. Just a gut that I'll want one dimension to be sub 2mm, so probably a lead-less part.

author: inse
author_rank: Super Contributor
timestamp: January 13, 2025, 09:25:16 pm
content: If you can invert the datastream by software and if the data rate is not too high, a digital transistor and a pull-up might do the job

author: NaDobraNich
author_rank: Regular Contributor
timestamp: January 13, 2025, 10:02:55 pm
content: Quote from: Benta on January 13, 2025, 07:26:32 pmHopefully more than "Not a good idea" will be coming.https://www.we-online.com/components/products/datasheet/1312121320437.pdfThis is not an uncommon issue with addressable LEDs though. People often get away with in, and for some it only shows up with additional heat. I'm looking for ways to increase the margin of safety for me without needing a level translator. Putting the two LEDs at 4.7V seems like a nice option though. Cheap and I can re-use a BOM component I already have.I should probably note, I have two leds, only about 1" from the MCU.

author: NaDobraNich
author_rank: Regular Contributor
timestamp: January 13, 2025, 10:06:08 pm
content: Quote from: inse on January 13, 2025, 09:25:16 pmI thought about that too. The issue is that because the data line is low 99.9% of the time, that I'd always be wasting power through that pullup. And it isn't "unfast"... The data line relies on 300ns minimum pulses. So, about 833kpbs with it's return to zero pulse system (annoyingly all the Chinese mfg's say "NRZ" which no it certainly is not).

author: Benta
author_rank: Super Contributor
timestamp: January 13, 2025, 11:08:25 pm
content: Quote from: NaDobraNich on January 13, 2025, 10:02:55 pmAn idea would be an MCU with open-drain outputs. But as you're still in "secret" mode, I'll retire from here.

author: NaDobraNich
author_rank: Regular Contributor
timestamp: January 14, 2025, 12:56:13 am
content: Quote from: Benta on January 13, 2025, 11:08:25 pm"Not a good idea", "You haven't answered questions I haven't asked so I quit". You don't have to be like this you know?I have an STM32U5, but I am not sure I see the advantage of an open drain output here. I would need a 5V pullup right? And that pullup would be 99.999% driven low through my open collector all the time, so I would need a pullup that is large enough to not care about the loss, and small enough that it won't mess up the rise/fall times on my 300ns pulses. I am skeptical that is ideal. I suppose I could relax on the data line being driven low all the time and instead do the reset hold low just before I need to output data. I'm also not bit banging out data here... I would need to see if the TIMER peripheral can output toggle with open drain on match driven from DMA, an unknown. And I'm certain the SPI peripheral in TX only with no clock would no longer work.But yes, open drain is an idea.

author: inse
author_rank: Super Contributor
timestamp: January 14, 2025, 02:27:37 am
content: I‘m not familiar with this MCU, but can you really configure an output as real open drain?For all I know, there is still an ESD diode to Vcc.

author: Swainster
author_rank: Frequent Contributor
timestamp: January 14, 2025, 05:12:32 am
content: Some anecdotal findings:Scenario: MCU at 2.8V talking to a short string of SK9822 addressable LEDs based on 3 alkaline cells (loss of colour reproduction as the battery drained was considered acceptable for this application). Due to a footprint error on the first iteration, the level translator had to be bypassed. The observation was that the LEDs worked when part used cells were used, but not with brand new ones. As I recall, the threshold between working LEDs and non-working was at 4.65V (with 2.8V MCU). Note that this voltage will vary with ambient temperature and quite possibly from part to part. Our temporary work around (till the next layout iteration) was to swap out the MCU regulator for a 3.3V part.So will a 3.3V MCU drive a 5V LED - quite probably yes. Will it do so reliably? Absolutely not - I have personally come across 2 cases where this type of mismatch has caused failures in the field. In one case, the affected outdoor device would fail more often in cold weather, and it took months for this correlation to be noticed (and resulted in a recall on a government supply contract. Oopsie). In the second case, the device was part of a temporary lighting display (driving strings of WS2812 this time), and resulted in some of the displays going "psychedelic" at random intervals. This latter issue was more of a noise sensitivity problem (and indeed, would disappear as soon as a scope was attached). Luckily in both these cases, I was brought in as the troubleshooter, not the original designer.If I really couldn't use a level translator to handle this issue then I guess that I would try to reduce the LED supply (as you propose) and bump up the MCU supply voltage, just so as to get a bit more margin.

author: inse
author_rank: Super Contributor
timestamp: January 14, 2025, 05:44:16 am
content: It appears you can run the MCU safely from 3.6V, of course this will have an impact on power consumption which seems to be relevant for you.

author: NaDobraNich
author_rank: Regular Contributor
timestamp: January 14, 2025, 06:07:49 am
content: Quote from: inse on January 14, 2025, 05:44:16 amSMPS is immovable and outputs 5V0 and 3V3 fixed.

author: NaDobraNich
author_rank: Regular Contributor
timestamp: January 14, 2025, 06:11:07 am
content: Quote from: Swainster on January 14, 2025, 05:12:32 amDo you think a schottky would do it? And because the output from the first LED would be close, do you think there would a noticeable color difference between two LED units, one at 4.7 and the other at 5.0?

author: PGPG
author_rank: Frequent Contributor
timestamp: January 14, 2025, 12:06:28 pm
content: Quote from: NaDobraNich on January 14, 2025, 12:56:13 amI have made generator using LVC2G14 (feedback resistor 1M and 100nF) triggering few times per second other LVC ICs. These other ICs did all their job in less then 20ns consuming max 15mA and than stayed in state with no current consumption. There were two time constants differing 2ns and circuit task was to detect when difference between time constants changes sign to opposite (it just latched that info few times per second in D latch).I expected average current consumption about 15mA * 20ns/100ms = 3nA plus max 3uA for 1M resistor. I was surprised that the circuit draws about 5mA on average (thousand times more than I expected).The answer is at figure 6 in:https://assets.nexperia.com/documents/data-sheet/74LVC2G14.pdfIf you care about loss you should take in count that CMOS digital inputs when driven with voltage in between GND and VCC tent to consume VCC current. And using diodes you are going in this direction.

author: Zero999
author_rank: Super Contributor
timestamp: January 14, 2025, 12:18:53 pm
content: Just use a BJT.Incidentially this will work in both directions, but it's not needed here.If the MCU has a push-pull 3.3V output and you're just driving an input (single direction only) then you don't need R1.

author: NaDobraNich
author_rank: Regular Contributor
timestamp: January 14, 2025, 05:57:01 pm
content: Zero, that looks good, but can you show it in the 20ns range? I'm concerned it might not be fast enough considering the soft edges I can see at 5us range.

author: Zero999
author_rank: Super Contributor
timestamp: January 14, 2025, 07:10:54 pm
content: Quote from: NaDobraNich on January 14, 2025, 05:57:01 pmWhere did you get 20ns from?The data sheet specifies rise and fall times of 250ns and 100ns, respectively, for DOUT. The circuit I posted should have no problem with the fall time. If the rise time is a little low, then reduce R3 to 4k7.https://www.we-online.com/components/products/datasheet/1312121320437.pdfHere's a copy of the LTSpice file, if you want to simulate it. LTSpice can be downloaded freely from Linear Technology. I would try simulating it with shorter pulse, but I don't have time at the moment.Level shift bi-direc BJT 3.3V 5V.asc

author: NaDobraNich
author_rank: Regular Contributor
timestamp: January 15, 2025, 05:45:05 pm
content: Quote from: Zero999 on January 14, 2025, 07:10:54 pmAs I read it, those are the internal PWM rise and falls, which I think they list out and are "soft" because they're showing it's not a massive noise generator. I'm talking about the data line. I have 220us pulses at a min, I figure I need the rise to be pretty fast on those to count for the full bit time for the protocol to count it as a high. I can go out to 300-380ns on those, but I figured if I could see the edges rolling over on your picture a tiny bit at 5us divs, that it might be nice to see at 20us divs.

author: Zero999
author_rank: Super Contributor
timestamp: January 15, 2025, 10:41:02 pm
content: I wouldn't say a rise and fall time of hundreds of ns is soft.It doesn't specify minimum rise/fall times of the date input. I doubt it needs to be as fast as 20ns. The fact it's working with a Schottky diode indicates it's more tolerant to slow rise times than that.Anyway, just for fun, I changed the input for a push-pull voltage source, removed R1, added a capacitor in parallel with R2 and reduced R3, to get a rise time of 20ns. Reducing R3 to 1k will increase the speed, but then V2 (your MCU output) will need to sink 5mA.I strongly recommend building it on a small piece of strip board, before finalising the design.

author: eugene
author_rank: Frequent Contributor
timestamp: February 14, 2025, 05:55:45 pm
content: Quote from: NaDobraNich on January 13, 2025, 07:11:25 pmWhat volume are you talking about? So long as the LEDs are powered by 5V, then you will need only ONE level translator that bumps the 3.3V logic output of your MCU to 5V for the DIN pin of the first LED. From there the LEDs are chained together ...