Driving a WS1228B LED Module(With Minimal Extra Parts)

Hello all, I am trying out the aforementioned module on a PropBOE for the first time.

What circuits must I wire to achieve this? The guide says I can use a data buffer, a transistor, or a silicon diode to run this thing with the propeller. Can I use a simple 220 ohm resistor? Or do I need this at all?

Also, the source code is giving me confusion. Which program of the supplied code do I use(Code is obtained from the "Downloads and Documentation" tab of the product page.)

That's not an explosion! That's an unscheduled rapid disassembly!


  • Code is in Propeller1 Spin.
    That's not an explosion! That's an unscheduled rapid disassembly!
  • I'm assuming you are actually referring to a WS2812B LED module, which can be wired as shown in the attached image.

    If you have downloaded the "WS2812B RGB LED Module Propeller Spin Code" zip file, its Spin code defaults into using P14 as the I/O pin to be connected to the WS2812B LED Module.

    The Spin code is one of JonnyMac's excellent examples. Load the "jm_ws2812_ss_demo" file and change the contstant "STRIP_LEN" to be set to 1 "STRIP_LEN = 1", if you are only connecting a single WS2812 LED Module.

    You can connect a strip of these modules together by connecting the SO output of each module to the SI input of each additional module. Be sure to change the "STRIP_LEN" constant to match the number modules being used.
    963 x 524 - 120K
    Along with 'Antimatter' and 'Dark Matter' we've recently discovered the existence of
    `Doesn't Matter`, which appears to have no effect on the universe whatsoever.
  • Thank you! Yes it is the LED module.
    That's not an explosion! That's an unscheduled rapid disassembly!
  • AwesomeCronk,

    According to the Propeller Board of Education guide, there are 5V supply pins on the right side of the header at the top of the breadboard (Page 2),

    You could use a Silicon diode such as a 1N4148 or 1N4007 to drop the voltage by approximately 0.7 volts as shown on page 2.
    Or use a 2N3904 transistor to act as a diode and drop the voltage as shown on page 4.

    This is the Spin code for the module.

  • I have the spin code. I don't have diodes. I have generic resistors. The example images here show a prop driving four of these with no extra components.
    That's not an explosion! That's an unscheduled rapid disassembly!
  • @JonnyMac
    I need your help with your ws2812 spin code. I have found that the demo program turns the led on and sets it to red. I looks like it should be cycling the rainbow, judging by the code.(I'm really no genius with spin yet.)
    That's not an explosion! That's an unscheduled rapid disassembly!
  • Here it is.
    That's not an explosion! That's an unscheduled rapid disassembly!
  • Cronk, I just tried out the code in the zip file - it works fine for me.

    I tested using a Quickstart board and a short strip of WS2812 LEDs.

    The code repeats the color chase for 10 times, then goes to the next repeat loop and cycles all the LEDs through various colors endlessly.

    Check your connections - note that the data pin for the LEDs is 14 (in the con section labelled { io pins } ). This can be changed if needed.
    San Mateo, CA
  • Still stuck on red. Will try and solder up another unit, see if this one may be defective.
    That's not an explosion! That's an unscheduled rapid disassembly!
  • AwesomeCronkAwesomeCronk Posts: 542
    edited 2019-02-15 - 19:49:43
    What the!!!???
    I left it on for about 1 minute, then switched it off. When I switched it off again, it went to green. When I cycled power again, it turned red again.
    That's not an explosion! That's an unscheduled rapid disassembly!
  • The data sheet said something about lowering the power voltage slightly to allow signals to go through. Both units are giving the same problem.
    That's not an explosion! That's an unscheduled rapid disassembly!
  • Well, odd results. I daisy-chained the two units, Then set the STRIP_LEN constant to two. The first module was red, the second was orange.

    I predict that if I connect a third and try again, the third will be yellow.
    That's not an explosion! That's an unscheduled rapid disassembly!
  • STRIP_LEN sets how many LEDs are in the entire strip of WS2812s. The demo code is set for a strip of 6, so the effect will work across them all in sequence.

    If you only have one or two WS2812s, then set it to 1 or 2.

    So to understand this line:
    strip.start_b(LEDS, STRIP_LEN)                                ' start led driver

    LEDS sets which pin the strip of WS2812s is connected to - this sends the commands to them.
    STRIP_LEN is how many WS2812 LEDs are in the strip. (It's short for "strip length").
    San Mateo, CA
  • Thank you for help understanding. I have strange results coming from these guys. I now have to cycle power several times to get these guys to even turn on. once they do, the first turns red, the second orange, and the third stays blank, even though STRIP_LEN is set to 3. Or they turn varying patterns of white, green or blue.
    That's not an explosion! That's an unscheduled rapid disassembly!
  • Do you have WS2812 or WS2812B? Go to this page and scroll down to "hardware overview:"


    Look at your module with a magnifier and see whether it's as WS2812 or WS2812B. If it's
    a B, just power it from 3.3V -- it will work and you need no additional components
    between the signal pin and the Propeller.
  • Also, depending on if you have WS2812 or WS2812B parts, the command will need to change...
    strip_start     ' WS2812 pixels
    strip.start_b  ' WS2812B pixels
    San Mateo, CA
  • AwesomeCronkAwesomeCronk Posts: 542
    edited 2019-02-15 - 21:06:12
    I have a B unit. The code is running strip.start_b.

    @localroger I have been running this module on 5v the whole time. I just tried 3.3v, and only got a brief burst of light from the second unit.
    That's not an explosion! That's an unscheduled rapid disassembly!
  • Here are my results.
    3024 x 4032 - 3M
    3024 x 4032 - 2M
    That's not an explosion! That's an unscheduled rapid disassembly!
  • I don't have those modules, but I think you want both the power and the ground to enter the module on the same side as the signal in. So look for the little arrow that points in towards the chip, and have your power and ground connect there. It looks like you're connecting on the output side. Then daisy chain from the power and signal out on the right side of the chip, to the signal in on the left side of the next chip, and so forth.
    San Mateo, CA
  • I was looking on the bottom of the chip, both grounds and powers are connected.
    That's not an explosion! That's an unscheduled rapid disassembly!
  • The datasheet says the WS2812 requires a minimum of 0.7Vdd for a logic high, so is not 3.3V
    compatible when powered at 5V. Any 74HCTxx family logic gate will translate 3.3V signals to 5V, but you
    can probably get away with a diode voltage shift, which is what I think you are talking about in the initial
    posting. Note HCT, not HC.

    Its worth having a few logic level shifters to hand when working with the Prop as quite a few things
    are 5V only.

    Popular and capable though the WS2812 is, its design missed several obvious tricks like 3.3V compatibility,
    and auto-baud-rate that would make it much more flexible.
  • You probably won't have much luck powering the LED modules from 3.3V. The reason is the high forward voltage of the blue LED. Power from 5V, and use a 3.3V->5V translator on the logic input.

    “Perfection is achieved not when there is nothing more to add, but when there is nothing left to take away. -Antoine de Saint-Exupery
  • OK.

    How the heck was it done in these pictures and video?

    It looks like it was wired the same way I am trying.
    That's not an explosion! That's an unscheduled rapid disassembly!
  • AwesomeCronkAwesomeCronk Posts: 542
    edited 2019-02-16 - 00:03:03
    Excerpted from this document:
    "For 3.3 volt microcontrollers, including the Propeller P8X32A, there are two typical approaches. Either boost the microcontroller's data signal to at least 70% of the supply voltage for the WS2812B module, or reduce the WS2812B module’s supply voltage so it is no more than 45% higher than the data signal. "

    It also says this unit takes 3.5 to 5.3v. I shall try using a 220ish ohm resistor to bring this to 4.5v.(that 45% being 4.78v)
    That's not an explosion! That's an unscheduled rapid disassembly!
  • There is one difference between the example and your setup...the GND in the example goes into the left side of the bottom module. Yours goes in the right side of the top module. I know it seems like it shouldn't matter, but see if matching the example exactly makes any difference - try moving your GND connection from the board to the left side of the top module.

    Also, the example picture is wired bottom to top, and yours is wired top to bottom.
    San Mateo, CA
  • AwesomeCronk,

    I think part of the problem is your soldering but you did bring up a good point about Parallax being contradictory in their use.

    This diagram shows the same setup as the picture.

    Same setup again.

    What solder did you use and what type of soldering iron?

    The 5V pin of the 1st module looks to be the best because the header pin is still visible and the joint has a volcano-like shape.

    Take a look at this:
  • AwesomeCronkAwesomeCronk Posts: 542
    edited 2019-02-16 - 00:43:34
    @Jeff Haas
    The module in the example is upside-down on top. I have inverted the data, inverted the power, inverted the ground. No luck.

    60/40 tin/lead solder, 1.8% flux. A $15 christmas gift soldering iron. Would using longer pins maybe help? I have the ones that Parallax included on them.

    I am testing voltages from different resistors, having little luck. None of them have changed the voltage at all.
    That's not an explosion! That's an unscheduled rapid disassembly!
  • GenetixGenetix Posts: 1,397
    edited 2019-02-16 - 02:22:04

    Ugh, 60/40, well that explains the bad looking joints.
    60/40 has a 'pasty' range so as soon as you remove the iron you will notice it takes a moment before the joint solidifies.
    Do you know if it's Rosin-core or No-clean flux?

    Since you are using good old tin-lead solder then your joints should be 'smooth and shiny' but it's difficult to see with all that flux residue.

    Do you have what are known as 'acid brushes' or high strength alcohol which is above 90%?
    Clean connects are key to good solder joints.

    Also do you have a sponge or one of those brillo-pad looking tip cleaners?

    How big is the tip of that iron compared to the header pin and solder pad around it, and what is it's shape?

    The diagrams on the Parallax Learn website don't use anything so the problem must be the soldering.
  • AwesomeCronkAwesomeCronk Posts: 542
    edited 2019-02-16 - 02:30:25
    It is you chuang brand. I don’t know about rosin core. Amazon site. What would be a good choice for good solder? This roll is nearly gone.

    I do not have acid brushes, and I do not have alcohol. I do have a tip cleaner sponge.

    The iron tip is needle-shaped, about the same size as the pins. It’s the smallest tip I have that hasn’t been toasted by the iron.(these tips are cheap)
    That's not an explosion! That's an unscheduled rapid disassembly!
  • AwesomeCronk,

    First line in the description - Fine Rosin Core Solder

    Old school 63/37 eutectic solder (thicker than what you have though).

    Acid Brushes - Don't forget to use a 20% off and Free Multimeter coupon at Harbor Freight.
    You can never have too many multimeters especially when they're free.
    Cut down the tips of the brushes to make them stiff so you scrub off the solder flux.

    Alcohol dispenser.

    I don't see good prices on alcohol but I swear I've seen a bottle of 91% at the local Wal-Mart for $3.

    These are used to clean up the alcohol dissolved flux residue but any lint-free cleaning wipes will do.
    You could use good quality paper towels or those blue disposable shop wipes.
    If you don't sop up the dissolved flux it will leave little white dots all over the place.

Sign In or Register to comment.