WS2812B LED, wrong baud rate? #467
Replies: 24 comments
-
Posted at 2014-04-15 by DrAzzy When using naked WS2812Bs, you need the 0.1uf capacitor between ground and power right next to the LED. This capacitor (acting as a so-called filter capacitor) serves to prevent the brief voltage drop when the LED is turned on from resetting the controller inside the WS2812B. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-04-15 by moka So that will help it to be OK through USB? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-04-15 by DrAzzy Yeah. Without the caps, it likely won't work on battery either once you start stringing more of them together |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-04-15 by moka Thanks a lot. This is awesome, enjoying how easy is to put them together and here we go. Thanks for helping out :) |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-04-16 by DrAzzy Depends what else you're doing besides updating the leds, but you don't need to refresh that often. The ws2812 remembers what you told it until you tell it otherwise. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-04-16 by @gfwilliams Yes - you should be fine for sending the data out... The issue is creating the patterns at that speed - but you could move between a set of pre-made patterns at 60fps if you needed to. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-04-17 by moka My idea is to create a remotely controlled controllers. So the idea that espruino will only get binary data from wireless or through some other wired method from laptop, and will render it on led arrays. Then after this base is done, will look into Web Audio API in Chrome of FF, so I can extract frequency spectrum data, and them do some real-time rendering based on ranges of frequencies. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-04-17 by moka But for real-time renderer from software, and pretty visualisation, is what we want to achieve, is new buffer every ~16 ms (60Hz). Just for the beauty and experience of the picture. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-04-20 by @gfwilliams Well, it shouldn't be too hard. The main thing is to be able to push data buffers around, rather than explicitly setting every element in Espruino. For example, if you send data as a base64 encoded string, then converted it with |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-04-22 by moka For We will have many of panels, each 16x16 (256) leds. Then software on laptop will do rendering and send data. WS - would be the best of course. Idea is to make modular node-webkit app, so people will be able to write own WebGL renderers and UI plugins to control panels. We already have some soldered and tested, some tests on boards, and already printed parts to match them properly. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-04-23 by @gfwilliams To be honest, websockets are a bit heavyweight. I guess ideally there would be support for simple UDP sockets, and then you could send a packet of data over UDP (which would be nice and efficient). Honestly if you're going that far I'd consider using the WIZnet wired ethernet - trying to do everything over WiFi could be painful! Also you could consider having a raspberry pi to handle ethernet, and then connecting Espruino boards via USB and using them to drive the WS2811s. It's probably significantly cheaper than buying multiple WiFi/Ethernet interfaces as well. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-04-23 by moka WebSockets has extra framing around each message, on top of pure TCP sockets including handshaking - which is string based message (HTTP headers). UDP is unreliable especially on embedded systems. What about just streamed TCP? Pure binary TCP stream? As starting point I believe is a good thing, will allow other developers to implement their data protocols on top of it. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-04-24 by @gfwilliams Yes, pure TCP would be a good idea. I don't think there's any reason for UDP to be unreliable though - on a wired network you could expect almost no packet loss I imagine. It's not like it matters though, because if it's lost, it's just a single frame at 60fps - I doubt anyone's eyes would notice. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-04-24 by Sacha Yes, Yes, Yes, i know that this is a repeat ;-) Pure tcp socket support, mybe a subset or something like http://nodejs.org/api/net.html Sacha |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-04-24 by @gfwilliams Yes - IMO it's probably more important than WebSockets... |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-04-24 by moka Indeed! |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-04-25 by ZeroEcho Sorry but "Put 0.1uf capacitor between ground and power right next to each LED." isn't overly clear to me but I am a complete newbie so I am a little afraid to 'wing it' without checking with someone who knows what they are on about first :-) By "Each LED" we are talking about LED Strip rather than individual LED right? I've got Ground (White) and Data (Green) from the Espruino to the WS2812B (waterproof), and Power (Red) and Ground (Black) from a 5V power supply. The espruino is going into the JST socket (Green > Green, White > White) which then meets up with Ground (Black) and Power (Red) in a sealed section at the end of the WS2812B but turns 4 wires into 3 connections: GND (Black), Din (Resistor but then white), 5V (Red) I would have guessed the proposed solution it to stick a 0.1uf between the 5V and GND lines on the end of the WS2812B but a)I can't it's sealed b)given I can't do it at the LED end, if I did it at the end of the wires where the power supply came in, that would create a short circuit, no? Obviously given these are sensitive components I don't want to blow anything up I've actually got the WS2811 LEDs that came with the espruino kit and they are working fine without this, I did try to plug these WS2812Bs into the end of the WS2811s but nothing happened other than the initial flicker that happens when the LED strips get a bit of power but they are powered from the wall rather than battery so it'll be the same issue no doubt! |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-04-26 by DrAzzy I'm a little confused about how you are hooking it up. So the WS2812B strip has... 4 wires coming out of the input end of it? Red/Black/Green/White? As I read your post, you have it connected like: And Red and Black are +5v and GND (I would agree with this assumption) - and the others would thus be ground and data. Barring documentation to the contrary, I would assume that the white wire would be data, and green ground - it sounds like you're doing it the other way around. You can, of course, check with a multimeter - either the white or the green should be connected to the black wire if it's wired the way we think it is. (it sounds from your description like there's no chance there could be a fourth wire in the strip. If there was, it's conceivable that, particularly in a waterproof strand, they might run Dout from the end of the strip back to the start of it, to aid in chaining them. In this case, you would need to connect GND on espruino to GND of the power supply for the LEDs, and whichever wire was Din to the espruino) Your issue is unrelated to the caps. The caps need to be next to every individual led (per datasheet), so the led strips and arrays already have the caps in them. You just need to think about the cap if you're working with naked 2812s. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-04-26 by ZeroEcho Right, sorted! Thanks DrAzzy! I incorrectly labelled my JST connector above "Green > Green, White > White" was in fact "Green > Black, White to White" as apparently the JST connector on the WS2811 is different than the JST connector on the WS2812B When I had the WS2811 working, I had Green out of B15, White out of GND which then correctly went into Green and White wires. When I picked up the WS2812B I thought the only difference needed to be unhooking the JST connector and changing the power input. I was wrong! I've now swapped GND and B15's Green and White wires around and they are working as expected. Looking at the LEDs in detail I can also see the tiny caps between them. My LiPo battery arrived as mentioned in the other thread and works perfectly by the way, so now I've got my PIR, LED strip and battery powered espruino all working as I expect, the next step is to make it efficient so it can run on batteries for most of the year, hurrah! :-) |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-04-27 by moka Those little caps - are capacitors. Your problem is different. I've got slightly other problem now. It is plugged to espruino (power, data, ground). |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-04-27 by DrAzzy You should definitely be powering it off of an external source if you want to drive that many LEDs! If running it on an external power supply, you need to tie the ground of the LED power supply to that of the Espruino. The fact that it's getting dim at the end (it's expected that as voltage sags, blue and green would go first), though, implies that the voltage drop is not happening at the source (that would dim everything) but rather along the string. If the issue persists after switching to an external power supply (I have no idea how you're making it work without one now, quite frankly!), your power and ground connections within the array are insufficient for the current involved. At full blast on 5v, WS2812's are spec'ed to pull 60ma each, so 256 of them will pull a whopping 15A! It sounds like you have power and ground running alongside data (so power to the one on the end is going back and forth along the whole array, rather than taking a more direct route) - tying supply power and ground to the power and ground of the string at multiple points along the string should help. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-04-28 by moka That is a great explanation! I've looked into external power supply options, they look rather serious :) But If I want to have 18 in total of those panels, then it will be up to 600W (5v 270A), that is like a good PC with next-get GPU card. I will go for an external power supply option. Will let you know how it will perform. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-04-28 by DrAzzy 15A/panel * 18 panel = 270A That is not 600W, that's... 5*270=1350W.... You can't use a computer supply for that even one rated at 1350W - computer power supplies are a whole bunch of supplies sharing a common ground, sized in the appropriate ratios for a desktop computer. The wattage on the box being the wattage of all these supplies summed together. If you look at detailed specs, you will find that the +5V output is rated much lower than you expect. Most of that power is only on the 12V side. You are going to need to get more creative with your power source if you're going to run a 1.35 KW LED array |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-04-28 by moka Ouch :D 1.35 KW LED array, lol, that will cost a bit of energy :) |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-04-15 by moka
Trying to connect single individual WS2812B, and control using this code:
So it suppose to fade one color from 0 to 255, from dark to bright.
But what it does it kinda starts from blue (0-16) and then starts blinking and shifts to red and blinking there as well.
So looks like something wrong with bits, is it baud rate, or is it different format of data?
Any assist would be great.
Wiring is simple, B15 goes to data, power to power, and ground to ground. Nothing more or less.
Is capacitor here essential, or it is not related?
EDIT:
When connecting using battery (without USB) then it's OK!
So what am I missing here?
SOLUTION [ DrAzzy ]:
Put 0.1uf capacitor between ground and power right next to each LED.
Or consider already soldered solutions.
Beta Was this translation helpful? Give feedback.
All reactions