News:

LATEST RELEASE:  FPP 8.1 - Download from here - https://github.com/FalconChristmas/fpp/releases/tag/8.1

+-+-

+-User

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+-Site Stats

Members
Total Members: 16578
Latest: grantpatterson
New This Month: 16
New This Week: 7
New Today: 4
Stats
Total Posts: 133511
Total Topics: 16613
Most Online Today: 44
Most Online Ever: 7634
(January 21, 2020, 02:14:03 AM)
Users Online
Members: 0
Guests: 36
Total: 36

Logic Shift a 12v Data Pin to Control 5v WS2812b with Optocoupler

Started by brookedot, May 20, 2023, 03:11:14 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

brookedot

I'm getting an "early" start on building a custom star PCB build for my holiday light show. I built a test board using 5 WS2811b LEDs. The board has a switch to change the data input from an ATTiny85 to use my Pixel Controller (SanDevices E6804). The problem is that the rest of my pixels use 12v logic but the star will use 5v logic.

After blowing up a Tiny85 and 5 pixels by giving them 12v :-[  (oops!) I thought of two solutions:

- Use 12v pixels, but these seems to be hard to find, and doesn't solve the second problem of needing a level shifter.
- Use a voltage regulator to switch the voltage to 5v for the pixels/tiny85 then some type of logic shifter for the 12v data pin.

I think I have settled on the PC817 optocoupler. However, I'm new to optocouplers so having a bit of trouble making sure I'm using it right (or if it's even the right solution here)

I tested using 5v power for my test board with the 12v data pin without an optocoupler and as I suspected the pixel did work, but the flickering indicated that the logic level wasn't happy.

The 12v data pin outputs close to 400mA of power (380 or so) when the LEDs on my board are on. You can ignore the logic on the switch as that is just switching the data pin between the tiny85 and the pixel controller. I've just included the entire line into the first pixel for completeness.

Could someone look at this schematic and tell me if I'm on the right track here? I'm also not sure if I also need a resistor between the controller's data pin and the pixels data in.

You cannot view this attachment.

Here VCC is the level shifted 5v from the LD117 and the 12v is from an external 12v power supply controlling the pixels.

pck

5 volt pixels are very common. You can get them in string, strip or individually. At 100% white brightness they draw between 50 a 60 ma ea. Search Amazon, Ray Wu, yourpixelstore, wallyslights, mattosdesigns. 

Both 5 volt and 12 volt pixel drivers actually run at 5 volts.  12 volt pixels use either resistors or regulators for each pixel to drop the 12 volts down to 5 volts. Both use a 5 volt data line. Min max voltages for the pixel driver are +5.5 to +3.5 volts.

pck

Looked closer at you message above. If your using the San Device as your pixel controller, what is the attiny controller being used for? Is it your sequencing source?

AAH

The logic for all pixels is 5V regardless of whether they are 5V, 12V or 24V. There is no need to adjust the voltage once it's at 5V. A buffer to get from 3.3V logic of anything that has it (Pi, BBB, ATtiny??) up to 5V is all that is ever needed. It's possible to mix and match 5V pixels and 12V pixels on the same output just by breaking the V+ power connection when changing voltages and then providing the required voltage. 12V logic into ANYTHING will kill it.

pck

brookedot

The fastest way to get help with your project would be to go to the Xlights Zoom Room. You can get there by going to xlights.org and clicking on the "Zoom Meeting" box on the top right. There are people there that can help you on the spot. The room usually has experts in Xlights, various controllers, FPP and all kinds of pixel types. Its the off season now and you can get help right away.

MikeKrebs

Getting help in the zoom room doesn't serve the forum purpose of helping everyone. And this is a "simple" understanding issue not a complex problem in sequencing or controllers. If you go go to the zoom room and get some help or understanding, please come back here to document the discussion and the result.

brookedot

QuoteIf your using the San Device as your pixel controller, what is the attiny controller being used for? Is it your sequencing source? --- @pck

There is a switch (S2) that switches the data source between the pixel controller and the Tiny85. This is to allow the pixels to be controlled as part of a light show with other pixels or independently (say i just want to display it without the need for a full pixel setup, or give a finished board to a friend who doesn't own a pixel controller). For the nature of this question the Tiny85 can be ignored, as that portion is working as expected and I have no qualms around getting that to work better.


QuoteThe logic for all pixels is 5V regardless of whether they are 5V, 12V or 24V. There is no need to adjust the voltage once it's at 5V. It's possible to mix and match 5V pixels and 12V pixels on the same output just by breaking the V+ power connection when changing voltages and then providing the required voltage. -@AAH
Humm... It sounds like I need to do more testing. I was thinking this was true as well. However, I tested with 5v on the pixels and data from my controller at 12v and the pixels seemed to be overly bright. It felt like a timing thing but could have been something else.

Here was my setup:
- 5v+ and ground going directly into my WS2812b test board
- Gnd from 5v power supply into gnd of 12v power supply in an attempt to create a common ground
- 12v power supply powering the pixel controller
- data pin from pixels into pixel controller

Now that I'm thinking about it I can actually go straight from the 12v power supply GND to the pixels and see if that helps at all.

What I saw was my nice red test pattern when both the pixel controller and board were running at 5v turned magenta when the pixel controller had a 12v power supply line and the test board had a 5v one.

I can't explain why that's what I saw, but if I could I wouldn't be asking the question here :)


Quote12V logic into ANYTHING will kill it.
Yep learned that! ;D Luckily it was easy enough to recovery, my test board was five pixels so I replaced them.


QuoteThe fastest way to get help with your project would be to go to the Xlights Zoom Room.
Fastest may not be best, but am glad this is an option for sure. I've been curious about the XLights Zoom room and it could be nice to meet some other folks as nerdy about this as I am. Xlights is great software. I'm not sure how comfortable I'd be in a zoom room though and not in a huge hurry to get this solved, so really just looking for various ideas.

@MikeKrebs also makes a great point that there is some advantage to having things written in a text forum that is web searchable because it's likely others may run into this in the future.


Thanks everyone for their input so far and I can't wait to continue working with ya'll to get to the bottom of this.


pck

You may want to look into using WLED and a D1 mini for your star. I'm sure you are already familiar with the D1 Mini (ESP8266 with WIFI). I 3D printed stars that have a pixel on each tip and a space inside for a D1 mini as my controller. The controller is flashed with the WLED software, which sets up a web server that you connect to with your browser. I power the pixels with a spare USB charger. You can create all kinds of effects on the star with the WLED web server or connect to Xlights and have it be a wireless prop for a sequence.

brookedot

Quote from: pck on May 22, 2023, 09:13:34 AMYou may want to look into using WLED and a D1 mini for your star. I'm sure you are already familiar with the D1 Mini (ESP8266 with WIFI). I 3D printed stars that have a pixel on each tip and a space inside for a D1 mini as my controller. The controller is flashed with the WLED software, which sets up a web server that you connect to with your browser. I power the pixels with a spare USB charger. You can create all kinds of effects on the star with the WLED web server or connect to Xlights and have it be a wireless prop for a sequence.
Yep, use WLED on other projects, and have been working on uses the ESP2866 12e as the controller (bare chip) on other projects.  It's just not the right for this one. Part of the fun for me is designing the PCB and working out these bugs ;) 

MikeKrebs

I think you probably know this. But here is my explanation...

Your ATTiny is using and driving 5v logic on the GPIO (data). I assume you connect a 5v line to your pixels when in this mode.

The E6804 will use either 5v or 12v to drive the board and the attached pixels. But the data line will be 5V.

Your ws2812b are 5V devices (both VCC and data) but there are ways you could wire them and lay them out so you can use other voltages. For example, if you have 12V, you could put a resistor or a LDO on VCC to drop the voltage to 5V.

Since you have have separate 5V for your ATTiny, run that same power to the pixels. Connect grounds between the 5V power and the ground on the E6804 (and the 12v power if you want). Run only data and ground for the star from the E6804.

brookedot

Quote from: MikeKrebs on May 22, 2023, 10:32:33 PMSince you have have separate 5V for your ATTiny, run that same power to the pixels. Connect grounds between the 5V power and the ground on the E6804 (and the 12v power if you want). Run only data and ground for the star from the E6804.

Thanks, this gives me enough to go on to try a new board and see what happens. The test boards are relatively inexpensive at OSHPark so worse case I need to go back and try again. However, your explanation makes sense and I feel gives me at least enough confidence to give it another try :D

Support FPP

+- Recent Topics

F8-PB V1.2 by darylc
October 07, 2024, 10:07:09 PM

Composite analog video output on Pi 4 / FPP 8.1 by MikeKrebs
October 07, 2024, 08:48:24 PM

color issues by Poporacer
October 07, 2024, 07:27:35 PM

FPP 8.1 Released! by Santacarl
October 07, 2024, 09:52:08 AM

PiCap V2 Manual by Brenton
October 07, 2024, 06:44:44 AM

Moving from FPP 3.x to 5. Anything to look out for? by breese
October 07, 2024, 04:27:47 AM

Max Outputs per Port - Impact from Refresh Rate by darylc
October 06, 2024, 09:34:59 PM

F16V5 - SRx1v5 Channel 1 Blinking by PIC
October 06, 2024, 04:12:33 PM

FPP 8.0 and 8.1 Issues with HDMI Audio by computermoose44
October 06, 2024, 03:25:53 PM

Upgrading my Kulp controller and navigation buttons don't work by Poporacer
October 06, 2024, 10:21:50 AM

Powered by EzPortal
Powered by SMFPacks Menu Editor Mod