Driving a WS1228B LED Module(With Minimal Extra Parts)
AwesomeCronk
Posts: 1,055
in Propeller 1
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.)
Thanks!
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.)
Thanks!
Comments
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.
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),
https://www.parallax.com/sites/default/files/downloads/32900-Propeller-BOE-Documentation-v1.1_0.pdf
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.
https://www.parallax.com/sites/default/files/downloads/28085-WS2812B-with-Propeller-v1.0_0.pdf
This is the Spin code for the module.
https://www.parallax.com/downloads/ws2812b-rgb-led-module-propeller-spin-code
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.)
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.
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.
I predict that if I connect a third and try again, the third will be yellow.
If you only have one or two WS2812s, then set it to 1 or 2.
So to understand this line:
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").
https://learn.sparkfun.com/tutorials/ws2812-breakout-hookup-guide/all
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.
@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.
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.
-Phil
How the heck was it done in these pictures and video?
It looks like it was wired the same way I am trying.
"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)
Also, the example picture is wired bottom to top, and yours is wired top to bottom.
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.
http://learn.parallax.com/tutorials/language/blocklyprop/light-it-ws2812-leds-and-blockly
Same setup again.
http://learn.parallax.com/tutorials/language/blocklyprop/halloween-flaming-pumpkin-display-project/pumpkin-assembly-and-coding
http://learn.parallax.com/tutorials/language/blocklyprop/halloween-skull-window-display/skull-mounting-and-coding
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:
https://learn.adafruit.com/collins-lab-soldering
The module in the example is upside-down on top. I have inverted the data, inverted the power, inverted the ground. No luck.
@Genetix
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.
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.
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)
First line in the description - Fine Rosin Core Solder
Old school 63/37 eutectic solder (thicker than what you have though).
https://www.amazon.com/Kester-24-6337-0027-Solder-Alloy-Diameter/dp/B07KWFLHBD/ref=sr_1_1?s=hi&ie=UTF8&qid=1550288592&sr=1-1&keywords=kester+44+rosin+core+solder+63/37
Acid Brushes - Don't forget to use a 20% off and Free Multimeter coupon at Harbor Freight.
https://www.harborfreight.com/36-pc-12-in-horsehair-bristle-acid-shop-brushes-61880.html
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.
https://www.amazon.com/Portable-Plastic-Dispenser-Computer-Cleaning/dp/B07M7KQW58/ref=sr_1_2?s=hi&ie=UTF8&qid=1550289112&sr=1-2&keywords=alcohol+dispenser+push+down
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.
https://www.amazon.com/gp/product/B0013HT2QW/ref=ox_sc_act_title_1?smid=APZ6KY51K4CVC&psc=1
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.