Notifications
Clear all

3v to 5v logic converter and power requirements

37 Posts
3 Users
2 Likes
2,238 Views
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2507
 

@zander 

It's gonna keep you from sneakin' into the fridge late at night 🙂

Anything seems possible when you don't know what you're talking about.


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6895
 

@will Not something I do.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
MadMisha
(@madmisha)
Member
Joined: 4 years ago
Posts: 340
Topic starter  

LEDs are here. Positives and negatives are all connected to each other. It looks like they are just simple bus bars. I will try and run it off of 3 volt logic for now until I find a suitable comparator. Any suggestions would be greatly appreciated.


   
ReplyQuote
MadMisha
(@madmisha)
Member
Joined: 4 years ago
Posts: 340
Topic starter  

Ok, so I read that most 5050 LEDs have issues with 3v logic. There seems to be a trick of feeding the first LED a slightly reduced voltage but in between the 2 voltages that makes it send out a stronger signal that is close enough to 5v for the next to read and then resend at 5v. I did not want to compromise the IP rating so I just went ahead an bought this level shifter. It was listed on another project for LEDs using an ESP32.

I have always planned out my project to were I never needed a logic level shifter, but it's not a bad thing to have on hand since they are so cheap. @will I was hoping for some advice since I don't remember ever using one wire communication (details on the communication protocol is kind of sketchy but that is what I believe these LEDs use) and I really don't know a lot about it. I don't even know if the one I ordered will work with it. It's just high low pulses but I don't know how the shifter works.


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6895
 

@madmisha I have been involved in electricity a lot in my life, but never heard that

the first LED a slightly reduced voltage but in between the 2 voltages that makes it send out a stronger signal that is close enough to 5v for the next to read and then resend at 5v.

A LED can send more Volts than it receives. Sure.

 

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
MadMisha
(@madmisha)
Member
Joined: 4 years ago
Posts: 340
Topic starter  
Posted by: @zander

@madmisha I have been involved in electricity a lot in my life, but never heard that

the first LED a slightly reduced voltage but in between the 2 voltages that makes it send out a stronger signal that is close enough to 5v for the next to read and then resend at 5v.

A LED can send more Volts than it receives. Sure.

 

The IC detects high/low signal based off of its supply voltage and then retransmits the message down the line in series. So if the cutoff for things like Neopixels are .7*vdd. So, if you take .7 * 5v = 3.5, so the high signal with 3.3v will be too low to trigger. But if you supply the voltage of 4.7 you get 4.7 * .7 = 3.29, it will trigger. The output from that LED will be 4.7, high enough to trigger the next LED but since that one is running on 5v, it's output will be 5v.

 

The first LED will be slightly dimmer but the rest would run reliably.


   
ReplyQuote
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2507
 
Posted by: @madmisha

I have always planned out my project to were I never needed a logic level shifter, but it's not a bad thing to have on hand since they are so cheap. @will I was hoping for some advice since I don't remember ever using one wire communication (details on the communication protocol is kind of sketchy but that is what I believe these LEDs use) and I really don't know a lot about it. I don't even know if the one I ordered will work with it. It's just high low pulses but I don't know how the shifter works.

That's beyond me, I've always used them with an Arduino, so 3.3V never came into play. Normally I put a 300 ohm (or so) current limiting  resistor on the signal line from the Arduino and run the lights from a separate 5V supply. In your case, I believe that you're using an ESP32 as the processor. I think you should be fine without the resistor on the output line (and yes, it is one wire signalling).

I've never heard of, nor tried, juggling the voltage to the first LED so I can't advise you about that (except to say that I've never had any problems running the 5 supply directly to the first LED, without any resistor involved).

Anything seems possible when you don't know what you're talking about.


   
ReplyQuote
MadMisha
(@madmisha)
Member
Joined: 4 years ago
Posts: 340
Topic starter  

@will 

The issue is that the controller is 3.3 logic and the LEDs need 5v. I need to step up the logic from 3v to 5v.


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6895
 

@madmisha Sounds like you need a 'level shifter'

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2507
 
Posted by: @madmisha

@will 

The issue is that the controller is 3.3 logic and the LEDs need 5v. I need to step up the logic from 3v to 5v.

I'm not sure I understand.

You'll be driving the LED + and - leads from the 5 supply. Are you worried about the (output) control line's voltage ? That you can fix by just using a cheap transistor  so you turn on the transistor and it feeds 5V from the supply to the tape. Or, use a logic level converter if it's cheaper or easier to insert in your circuit.

But I would try driving the control line directly from the ESP pin first to see whether it's strong enough to drive the LEDs. You may not need the converter or transistor (unless you're a "belt and suspenders" man 🙂 )

Anything seems possible when you don't know what you're talking about.


   
ReplyQuote
MadMisha
(@madmisha)
Member
Joined: 4 years ago
Posts: 340
Topic starter  

@will 

Yes, it's the control pin that I am concerned about. I was initially going to run it direct and see what happens but once I install it under the bed, I won't be able to access it easily to modify it. I think I should do it now.

 

I did think about using a transistor/MOSFET but I really want something clean in the controller box and not put a prototype board in there.

 

I am worried that the level shifter I bought will not work for one wire communication. 

https://www.amazon.com/dp/B07F7W91LC?psc=1&ref=ppx_yo2ov_dt_b_product_details

I probably should have them around anyways so I'm not concerned that it was a waste of money. It's also cheap. I couldn't imagine it damaging anything using it but I am not really sure. It only lists I2C (I have used the protocol a lot so that's the one I went with).


   
ReplyQuote
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2507
 

@madmisha FYI @zander

I think I found what you were referring to with the first LED in the chain.

The idea is that the control line needs to have a voltage at least 0.7*voltage at the first LED. So it is suggested that one insert a diode between the 5V source and the first LED and connect the 5V source to the second LED directly.

As suggested above, the original circuit requires 0.7*5V = 3.5V for the control line to operate successfully, which is above 3.3V and may render the string inoperable or unreliable.

But introducing the diode reduces the voltage at the first LED to, say 5V-.6V = 4.4V. Now the control line only needs 0.7*4.4V = 3.08V which is well within the capability of the 3.3V processor pin.

The diode drop is why the first LED appears dimmer, because the voltage running it is lower. This could easily be masked by covering the diode (missing one LED out of 300 will rarely be noticed).

I think that's the explanation for this mystery 🙂

Anything seems possible when you don't know what you're talking about.


   
ReplyQuote
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2507
 
Posted by: @madmisha

@will 

I am worried that the level shifter I bought will not work for one wire communication. 

I don't think that's a valid concern, it's just converting 5V to 3.3V and vice versa as the values change on the pin. In this case only the 3.3V side will be changing (the 5V side will always be set from the 3.3V).

The only possible problem is that the level changer cannot switch as fast as the uProcessor pin which will result in unreliable transmission of control pulses.

Anything seems possible when you don't know what you're talking about.


   
ReplyQuote
MadMisha
(@madmisha)
Member
Joined: 4 years ago
Posts: 340
Topic starter  

@will 

Yes, exactly. The only problem with it is that I would have to strip away part of the coating the gives the strip its IP rating. Having done this before, it is kind of messy and not easy. I want to keep the IP rating intact because of the close proximity to cats. I don't need near waterproof, just kitten protection.

 

I know I can program the first LED out but I'd probably have to shrink tube it and I hate covering things like that when it can heat up(although it would be so small since it's not being used). The connections of the main string is a concern to me. I want to keep it in it's factory form. I have room in the controller box for a small PCB based shifter, I just think it'll be easier and cleaner.


   
ReplyQuote
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2507
 

@madmisha 

You could also just keep the first LED inside the control box, then you could strip the top off it and bare the +5 bus bar as long as you didn't corrupt the second LED.

Anything seems possible when you don't know what you're talking about.


   
ReplyQuote
Page 2 / 3