Shop OBEX P1 Docs P2 Docs Learn Events
Fun With WS2812(B) LEDs — Parallax Forums

Fun With WS2812(B) LEDs

Duane DegnDuane Degn Posts: 10,588
edited 2015-06-14 19:14 in Robotics
Edit:
The code used in the video below is attached to post #2 of this thread.

Gerber files for three different PCB in this thread.

The file attached to post #10 is to the "squarish" PCB with four attachment points. I thought this design might be useful when used with conductive thread.

The file attached to post #23 is a breadboard friendly design which closely matches Parallax's new WS2812B Fun Boards (think the pins arrangements are the same). These boards can be linked together with jumpers as shown in this post.

The file attached to post #49 has 16 LEDs laid out in a ring. IMO, one is better off purchasing one of Adafruit's rings since they are very reasonably priced. My board holds the LEDs a little closer together than Adafruit's ring and IMO, my ring is a little easier to chain together.

************* Original Post Below ********************************

After JonnyMac told me about NeoPixels, I decided to give them a try.

I purchased three NeoPixel Rings from AdaFruit. Each ring has 16 NeoPixel LEDs.

While I have done several different RGB LED projects and I think I've come up with some fun patterns to display on LED strips and arrays, I wanted to come up with some algorithm to take advantage of the circular configuration of these rings. I was hoping to come up with something with a hypnotic feel.

Here's my attempt.

I had a tough time recording these LEDs. I found the colors as seen through the camera looked washed out. I found placing a piece of white paper over the LEDs helped preserve the color a bit. I'll need to break down and read the manual on my camera to see if there's a setting which would allow me to better control the exposure.

I'll post the code I used in post #2 of the thread. The circular rotating effect is my own algorithm. I'm sure the algorithm could be simplified a bit. My algorithm uses the "wheel" algorithm JonnyMac translated to Spin from an Arduino sketch (I believe he found the code on the AdaFruit site). I used JonnyMac's WS2812 driver to send the color information to the LEDs.

Thanks again JonnyMac for sharing your driver code. Having your code as a starting point has made writing code for many of my LED projects much easier.

Though I'm marking this project "Completed", I'm going to reserve a few extra posts in order to leave some room for possible future updates to this project. I'll add any other interesting algorithms or applications I may come up with for these NeoPixel rings to this thread.
«13

Comments

  • Duane DegnDuane Degn Posts: 10,588
    edited 2013-08-23 21:54
    Attached in the source code used to produce the effects seen in post #1, video.

    I think the "guts" of the algorithm are in the "Mirror" method.
    PUB Mirror(initialColor, finalColor, localPtr, position) | localIndex, scratchBuffer[HALF_RING]
    '' Fill long buffer at "localPtr" with a mirrored colors.
    
    
      repeat while position > MAX_RING_INDEX
        position -= LEDS_IN_RING
      MergeColors(initialColor, finalColor, @scratchBuffer, HALF_RING)
     
      result := position - 1
      repeat localIndex from 0 to MAX_HALF_INDEX
        if result < 0
          result += LEDS_IN_RING
        if position > MAX_RING_INDEX
          position -= LEDS_IN_RING
                 
        long[localPtr][position++] := scratchBuffer[localIndex]
        long[localPtr][result--] := scratchBuffer[localIndex]  
     
    
    
    

    The above method fills a buffer with colors which transitions from "initialColor" to "finalColor". These transitional colors are then moved to positions in the LED buffer as to produce a mirror image of the pattern on two sides of the ring.

    Here's the "MergeColors" method used by the "Mirror" method to create the transitional colors.
    PUB MergeColors(initialColor, finalColor, distinationPtr, localSize) | tempColor[3], {
        } colorMultiplier, localIndex, initialColors[3], finalColors[3], pseudoIncrements[3]
    '' localSize should include the initialColor but not finalColor.
      
      BustColors(initialColor, @initialColors)
      BustColors(finalColor, @finalColors)
       
      ' find incremental color change
      ' use the "PSEUDO_MULTIPLIER" mulitplier to reduce rounding errors
      ' Note we divide by multiplier prior to assigning color
      ' to expanded pattern buffer.
      repeat result from 0 to 2   
        pseudoIncrements[result] := ((finalColors[result] - initialColors[result])* PSEUDO_MULTIPLIER) / localSize 
      
      colorMultiplier := 1
       
      ' assign initial color
      long[distinationPtr] := initialColor
       
      ' assign between colors
      ' final color not copied here. It will be copied as the
      ' initial color of the next loop
      repeat localSize - 1
        distinationPtr += 4
        repeat result from 0 to 2
          tempColor[result] := initialColors[result] + ((pseudoIncrements[result] * {
                             } colorMultiplier) / PSEUDO_MULTIPLIER)
        ' assign altered color
        long[distinationPtr] := Strip.Color(tempColor[0], tempColor[1], tempColor[2])
        colorMultiplier++
    
    
    

    To use the code with fewer than three rings (or more than three rings), change the constant "RINGS_IN_USE" to the appropriate value.

    It should also be possible to use the code with rings of NeoPixels differing numbers of LEDs in the ring. The constant "LEDS_IN_RING" should be changed to indicate how many LEDs are in the ring.
    LEDS_IN_RING = 16
      RINGS_IN_USE = 3
    

    Edit(3/11/15): Warning, the code attached is an old version. There are likely better options available.
    I plan to upload this program or an improved version to my GitHub account
    If there isn't code similar to what is attached here on my on GitHub, send me a message and I'll make and check for any improved versions of the code.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2013-08-23 21:55
    Here's one way of linking the small PCBs together.

    attachment.php?attachmentid=111440&d=1413235351

    I'm using these jumpers from ElectroDragon. They're just over a penny each.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2013-08-23 21:55
    3 of 4 reserved.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2013-08-23 21:56
    4 of 4 reserved.
  • JonnyMacJonnyMac Posts: 8,929
    edited 2013-08-24 12:36
    Cool! I've actually started on a ring PCB of my own that will be the basis of a JonnyMac Arc Reactor prop for Halloween -- no make-up required.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2013-08-24 13:16
    JonnyMac wrote: »
    Cool! I've actually started on a ring PCB of my own that will be the basis of a JonnyMac Arc Reactor prop for Halloween -- no make-up required.

    How many LEDs will be in the ring? I look forward to seeing it in action. It's always fun to see what you come up with.

    I was in the process of laying out a PCB design for a ring of LEDs (single color) with an AS5055 magnetic encoder chip in the center. I thought I'd use the LEDs are position feedback of the magnet's position (kind of like these). I'll probably still make my version of a LED ring but these AdaFruit rings make it easy to add a ring of LEDs to a project.

    As I rewatch the video I notice there are a lot of little glitches in the LEDs. They seem particularly noticeable starting at 0:24. I thought the glitches were caused by a bad solder connection but I remembered some discussion about using level shifters with NeoPixels and I tried adding a level shifter to my project. The level shifter immediately cleared up the glitches. The glitches hadn't been bad when I was powering the LEDs from the USB connection but when I started using a switching regulator the glitches were much worse. As I recall, the person posting about problems using NeoPixels on a PropBOE didn't have trouble until they switched from USB power to using a battery pack through the PropBOE's switching regulator.

    I haven't used level shifters on any of my WS2801 projects but I think I'll need to use them on my WS2812 projects.
  • JonnyMacJonnyMac Posts: 8,929
    edited 2013-09-16 16:12
    I have 10 in the current design. This is kind of a back burner project that needs to move to the front if I'm going to get the board in time for Halloween. I think I'll order a group of those WS2812Bs as the footprint allows for more flexibility in layout. Having just re-opened the design files I see that I need to update them for the B variant.

    I do tend to use level shifters when I'm controlling off-board strings. For the WS2801 (doing another project for Steve Wang with it) I use the TC4427 as it's cheap, easy, and delivers a punch. For my JM Arc Reactor I'm using a "Tiny" gate just to bump the signal up. I'm also adding IR in and out so I can have fun with it.

    Geez... now I have to get back to work on that dude!
  • Duane DegnDuane Degn Posts: 10,588
    edited 2013-09-17 13:46
    JonnyMac wrote: »
    I think I'll order a group of those WS2812Bs as the footprint allows for more flexibility in layout.

    These seem like a reasonable price for the "B" version (though I didn't search very long). I ordered 100 yesterday. I still need to figure out what I'm going to do with them.

    I'll need to make sure and add some TC4427 to my next Digi-Key order. What do you mean by a "Tiny" gate?

    I think I'll make it standard practice to add some sort of level shifter with these LEDs even on my own personal projects.

    I look forward to seeing your JM Arc Reactor.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2015-11-05 20:45
    Gary's thread about adding LEDs to a jacket got be thinking about how to make these NeoPixels easier to use.

    If I had done just a little more research before designing my own PCB I would have found AdaFruit sells individual NeoPixels for just this purpose.

    attachment.php?attachmentid=111670&d=1414470828

    In hindsight, I should have just ordered some of AdaFruit's NeoPixels.

    Not having any experience with wearable electronics I attempted to guess at hole sizes. I decided to use two hole sizes.

    attachment.php?attachmentid=104736&d=1383430741

    The three holes in each corner are (obviously) electrically connected. I was kind of going for an eight petaled flower look. I think I like AdaFruit's design better.

    In case any of you would like to have some of these made for yourselves, I'm attaching the gerber files. These are the same files I submitted to OSH Park to have the PCBs made. The PCBs cost $2.85 for a set of three. The LEDs cost me about $0.26 each (at 100 qty). The 0603 0.1uF cap cost $0.0065 (at 1000 qty). The completed single pixel ended up costing me $1.27. AdaFruit's pixels costs about $1.99 each. As I mentioned earlier, I doubt I would have had this PCB made if I had known about AdaFruit's individual pixels. Still, it's always fun getting one of OSH Park's purple envelopes and there is something cool about having a board I've both designed and soldered myself.

    Here's a video showing the little pixel doing it's thing.



    I'm still trying to figure out what I'm going to do with my other 99 WS2812B LEDs. I'll likely populate the other five PCBs but that will still leave me with 94 LEDs to find a use for.
    447 x 621 - 104K
    970 x 728 - 378K
  • garyggaryg Posts: 420
    edited 2013-11-04 17:21
    I like your OctoPads and AdaFruit adventure.
    I'll be checking out OshPark to find out if I can use them to make me some
    breakout boards for my Tandem Bicycle Directional development thing.
    The way I currently make circuits is very time consuming.
    Are the OctoPads single sided circuits?
    I'm just guessing, but am assuming they are single sided.
    I'll be checking out OshPark this evening, to see what types of files they can directly use to
    be able to produce very short run circuit boards.
    So far, all of my circuits are drawn using AutoCad.
    I print them and either screen print or do Iron on transfer laser printer thing.
    I always like your comments and frequently source my forum searches
    by checking your "Index of my projects and interesting forum posts.
    The program used to run the Adafruit ring looks interesting to me.

    Thanks for any comments
    GaryG
  • Duane DegnDuane Degn Posts: 10,588
    edited 2013-11-04 20:40
    garyg wrote: »
    I like your OctoPads and AdaFruit adventure.

    Thanks, these are fun LEDs to play with.
    garyg wrote: »
    I'll be checking out OshPark to find out if I can use them to make me some
    breakout boards for my Tandem Bicycle Directional development thing.
    The way I currently make circuits is very time consuming.
    Are the OctoPads single sided circuits?

    I like OSH Park for small PCBs but there are less expensive options for larger boards.

    These boards did end up being single sided but it wasn't by design. All the traces were pretty direct so I didn't need to use the back side of the board. I had to look for myself to see if all the traces were on one side or not.

    There's not a price difference between two side boards and single sided boards at OSH Park.

    Here's a larger image of the PCB layout.

    attachment.php?attachmentid=104769&d=1383625181
    garyg wrote: »
    . . .So far, all of my circuits are drawn using AutoCad. . . .

    I originally used Eagle as a PCB layout program but there was a post to the forum about Parallax using DipTrace. I tried DipTrace and found it much easier to use than Eagle. I really like it. I don't recall what the limitations of the free version are but I think the free version will let you do a lot. I wanted to make some four layer boards and I also wanted to be able to sell my boards so I purchased a license for DipTrace. I don't regret the purchase at all.
    garyg wrote: »
    I always like your comments and frequently source my forum searches
    by checking your "Index of my projects and interesting forum posts.

    That's good to hear. I made the list mainly for myself but I'm always glad when I hear it's useful to others.
    garyg wrote: »
    The program used to run the Adafruit ring looks interesting to me.

    JonnyMac wrote the low level driver. I did write the code to place the colors in the right place on the wheels and to merge and spin the colors. Writing code to display LED colors is a fun way to learn to manipulate memory buffers in the Propeller.

    I thought I'd try another small PCB for these LEDs. This version should make it easier to chain the LEDs together. It's also smaller than my earlier version.

    attachment.php?attachmentid=104770&d=1383625182

    If you decide to try DipTrace and you'd like either of these files, let me know and I'll post them or send them to you.
    867 x 850 - 44K
    631 x 477 - 22K
    628 x 438 - 21K
  • garyggaryg Posts: 420
    edited 2013-11-04 21:21
    I looked at OSH Park information.
    The OSH Park people are using, according to their website, Eagle CAD to
    Process their boards.
    I figured that trying Eagle would be a good way to start.

    I downloaded the Eagle software, but can't figure out how to start using it.
    I'm very familar with AutoCad software, but the Eagle is different to me.

    I sent a message to the Eagle people in an attempt to get me started in some manner.

    If I don't hear from Eagle with suggestions, I'll look into DipTrace.

    If I start up a new drawing program and don't have a usable menue or any other clue of what to do next
    I start questioning if the software is good. I've spent many $$$ over the past 20 years or so on programs that
    are not exactly what I can use.

    Circuit board layout programs have always interested me and I think my Tendem Directional project would be a good
    place to start.
    I'm wanting to build a breakout board for Propeller Mini , Parallax Remote and 6 Parallax MosFets.
    My Cad drawings are getting pretty close to what I'm needing.

    and

    Are all of the LED's you are using on your OctoPads Multicolor?

    Thanks
  • JLockeJLocke Posts: 354
    edited 2013-11-04 21:57
    You might check over at Sparkfun for some tutorials on using Eagle. Here's the link to their 'Tutorials' section. https://learn.sparkfun.com/tutorials Look under the 'Skill' heading and you'll see: "How to Install and Setup EAGLE", "Making Custom Footprints with EAGLE", "Using EAGLE: Board Layout", and "Using EAGLE: Schematic". That should get you started.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2013-11-04 23:07
    garyg wrote: »
    I looked at OSH Park information.
    The OSH Park people are using, according to their website, Eagle CAD to
    Process their boards.

    One of the ways OSH Park lets PCB designs be submitted with an Eagle file. They also accept gerber files from other PCB design software. It only takes a minute or so to export the needed files from DipTrace. I just use the default settings on the gerber files and the drill file. The most time consuming part of the getting the files ready to submit is zipping them up into a single zip file (which doesn't take long at all).

    OSH Park lists recommended names for the various layers but I don't bother changing the default names DipTrace uses and OSH Park accepts the files without any problem.

    OSH Park's submission policy just barely favors Eagle over DipTrace but the difference in convenience is so small, it shouldn't effect your decision of which PCB software to use.

    One think Eagle does have going for it is SparkFun generally publishes footprints for all the parts they sell. Parallax publishes many of its board layouts in DipTrace.

    I used the tutorials JLocke linked to in order to learn to use Eagle. When I saw the post by a Parallax employee stating the reasons they were switching to DipTrace I decided to give DipTrace a try. I was reluctant to abandon Eagle since I had spend a significant amount of time learning to use it. I was really surprised how much easier DipTrace was to use. It didn't take long for me to be more proficient in DipTrace than I had ever been with Eagle.

    DipTrace has some getting started videos I watchrd. I thought they were really helpful in learning to use the software.
    garyg wrote: »
    Circuit board layout programs have always interested me and I think my Tendem Directional project would be a good
    place to start.

    It's been a lot of fun to be able to design PCBs and have them professionally made. It sure bets trying to etch my own.

    The OSH Park boards look really nice but they're more expensive than some of the other options.

    For my 8x8 RGB LED array project, I eventually used Itead Studio's 5cm x 5cm service. These boards cost about $1 each, where the same boards from OSH Park cost over $6 each.
    garyg wrote: »
    Are all of the LED's you are using on your OctoPads Multicolor?

    Since there is only one "OctoPads" design the answer is yes. I was trying to think of some name for e-textiles based on the Propeller. The "Octo" was for the eight cogs of the Propeller and the "Pads" was so it would sound similar to "Lilypad". I was kind of hoping to find an eight petaled flower to name the boards after but I didn't really like the names of the flowers I could find.

    I doubt there will be any other "OctoPads" designs in the future. I'm not going to try to compete with LilyPads or AdaFruit's "Flora" PCBs. I'll just make unbranded PCBs for my own projects and occasionally to sell.

    I do have an encoder PCB design which uses mono-chromatic LEDs (red). I haven't finished the design yet.

    I like the way these WS2812 LEDs can be chained together. I've also done a lot of LED projects using shift registers. The single data line of these RGB LEDs make them much easier to use than trying to route all the lines needed when using shift registers. I still think there are lots of applications where shift registers offer an advantage over these individually addressable LEDs.

    The WS2812B chips I purchased cost $26 for 100. I thought this was a pretty good price for RGB LEDs but these are a lot more expensive than the cost per LED than the 8x8 arrays I'm using.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2013-11-05 00:37
    I used MS Paint to cut and paste a few copies of the most recent PCB design next to each other (as you can see, it took me several attempts to get things pasted where I wanted them). I'm please with how well the edges line up.

    attachment.php?attachmentid=104774&d=1383640031

    I'll likely have a few of these made. Hopefully these little PCBs will make it easy to create chains of these LEDs without much trouble.

    Maybe my wife would like a LED bracelet for Christmas? (I think I may have pressed my luck too far with giving her robots as gifts.)
    1024 x 543 - 76K
  • Duane DegnDuane Degn Posts: 10,588
    edited 2013-11-05 10:01
    I decided to move the copper pour away from the edges next to the data and power pins. I didn't want to have to rely on the solder mask to protect conductive thread or bare wire from shorting with the ground.

    attachment.php?attachmentid=104779&d=1383674156

    I just submitted these to OSH Park. They cost $0.30 each. I'm having 24 made for $7.20. These will end up costing me $0.57 per board once they're populated.

    I think I like this design even better than AdaFruit's single NeoPixels. I'm hoping these will be easy to chain together.
    639 x 437 - 22K
  • xanaduxanadu Posts: 3,347
    edited 2013-11-05 11:58
    Very nice. I'm working on a way to make them into christmas tree style lighting :) Less than two months to go... oh no...
  • jonesjones Posts: 281
    edited 2013-11-05 13:10
    Duane Degn wrote: »
    I had a tough time recording these LEDs. I found the colors as seen through the camera looked washed out. I found placing a piece of white paper over the LEDs helped preserve the color a bit. I'll need to break down and read the manual on my camera to see if there's a setting which would allow me to better control the exposure.
    FWIW, it might be that the LEDs are being overexposed because the meter is averaging the scene and the darker background is causing it to use too long of an exposure (or a wider f/stop) than it should. While it might seem counterintuituve, you might try increasing the ambient light levels so the camera uses either a smaller aperture or a shorter exposure. Sometimes even cameras that don't allow full manual control will also allow exposure compensation. If you used that to decrease the exposure a stop or two I think it might help though the background will probably become nearly black. Naturally the best option would be full manual, where you could simply adjust the shutter speed and aperture to get what looks best.
  • garyggaryg Posts: 420
    edited 2013-11-08 22:44
    jones
    your suggestion seems to be very good.
    It makes sense to me.
    I've always had trouble with photos with both light and dark in the same frame.
    I'll be trying your suggestion.

    Duane and JLocke
    I received a reply from someone at Eagle and checked out the Sparkfun tutorials.
    I also started checking out the DipTrace website.
    I think I've started on yet another new adventure.
    After I attempt to find the proper Parallax forum search term concerning circuit board drawing and manufacturing
    I think I'll attempt to start a thread that will be better suited to that discussion.

    Thanks for starting this message thread
    It's good food for thought, similar to pomagranite, one of my favorites, although I may not have spelled it correctly.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2013-11-19 21:05
    I received the PCBs from OSH Park yesterday.

    attachment.php?attachmentid=105114&d=1384918940

    I populated a few boards and they tested out okay.

    I'm trying to figure out the best way of link them together. The curved edges fit against each other very nicely. I tried using some bare copper wire to link them together with limited success. The boards wouldn't pass the power and signal unless they were held in very specific orientations. It was too easy for one or more of the copper wires to lose connection with one of the PCBs. I'll need to figure out a different way of linking the boards.

    Here's a close up on one board (I need to remember to clean the flux off before I take the pictures).

    attachment.php?attachmentid=105116&d=1384918944

    I personally like these new boards. I think I even like them more than AdaFruit's design. I like the way they're easy to chain together (or so I hope). As you can see in this next picture, the new design is smaller than my previous one.

    attachment.php?attachmentid=105117&d=1384918946

    I decided I'd rather have the data in line on the left side of the board so I rotated the LED to move the leads closer to their corresponding header location. Here's picture which shows the various traces.

    attachment.php?attachmentid=105120&d=1384920214

    I didn't want to have to wait another three weeks (it turned out to only be two weeks) to get more of these if the first three worked so I upped my initial order to 24 boards. Fortunately I didn't make any errors in the design (I'd hope not with such a simple circuit). I'm still not sure how I'll use these boards or if I'll order more.

    Even though AdaFruit's price for the 16 pixel rings is very reasonable, I wanted to design my own 16 pixel ring.

    I submitted this design on the 15th.

    attachment.php?attachmentid=111668&d=1414470396

    I'm thinking they would look cool on the wheels of an ActivityBot. Of course getting power and signal out to the rotating wheel will be a challenge. I haven't done this before, but I thought I'd attempt using a combination of brushes and rings to deliver the needed power and signal.

    attachment.php?attachmentid=111669&d=1414470397

    The three rings above will be mounted on the inside of the ActivityBot's wheel and the ring with the 16 LEDs will be mounted on the outside of the wheel. The holes around the outside of the three rings should align with the larger holes of the wheel. I'll use some wire to bring the power and signal through these holes and out to the LED ring.

    Maybe it will work?

    The images I posted make the two rings look the same size. They are not; the ring with 16 LEDs has a diameter about 36% larger than the transfer rings board. The transfer rings cost $6.55 for a set of three, the 16 pixel ring cost $12.15 for three PCBs. These two boards cost a lot more than most of my OSH Park orders.

    It's a lot fun to get custom PCB delivered to your mailbox. I'm going to try to get one PCB design submitted a week just so I can have the fun of receiving them two weeks later. (At least until I run out of board idea.)

    As I mentioned above, the little WS2812B PCBs only cost 30 cents each. I'm also having some small encoder boards made which were also very inexpensive.

    I'll figure out a fun way to use these new WS2812B boards and make (and post) a video of them in action.
    698 x 434 - 129K
    803 x 461 - 132K
    588 x 554 - 155K
    666 x 368 - 98K
    711 x 479 - 147K
    200 x 200 - 29K
  • garyggaryg Posts: 420
    edited 2013-11-19 22:34
    Duane
    What radius did you put on your newer design.
    I'm just wondering what the smallest diameter circle you could make with these.
    If, after you have completed developing these, are you planning on selling them?

    Thanks
    Garyg
  • Duane DegnDuane Degn Posts: 10,588
    edited 2013-11-20 07:26
    garyg wrote: »
    Duane
    What radius did you put on your newer design.

    I'm not sure what you mean by radius since these aren't really round.

    According to OSH Park, they are 0.53" x 0.36".

    attachment.php?attachmentid=105132&d=1384957807
    garyg wrote: »
    I'm just wondering what the smallest diameter circle you could make with these.

    This would depend on what kind of connectors you'd want on the board. I suppose it would be possible to make a board 0.3" in diameter.

    Here's a 0.3" blue circle on top of my latest board (without the copper pours).

    attachment.php?attachmentid=105134&d=1384960049

    I included a smaller design below my latest design to show the size of a an even smaller board which still had headers and a capacitor.

    The headers on the top design (which were just delivered) have headers spaced 0.4" apart. This makes them easier to use with a breadboard or a perf board.

    The smaller design is just to show the size of the smallest board I think would be practical while keeping the side headers. I don't plan to have the small board made.
    garyg wrote: »
    If, after you have completed developing these, are you planning on selling them?

    I'm usually willing to sell my PCBs but if I charge enough to make it worth my time to put the boards together myself, I don't get many interested buyers. I'm not really interested in trying to compete with AdaFruit on these sorts of boards. IMO, AdaFruit charges very reasonable prices. I think my 16 LED ring will end up costing my $8.22 in parts. By the time I solder all those part together, it would have been smarter financially to have purchased AdaFruit's rings for $10. I made my version "just because."

    There isn't anything very original about these designs. They'd be trivial to reproduce by anyone with a bit of PCB design experience.

    I'm attaching the gerber files for the single LED boards in case anyone would like to have these made. This is the same zip file I submitted to OSH Park to have these boards made. Be aware if you order LEDs to populate the boards, there are two types of WS2812 LEDs. These boards are designed to use the "B" version (which has four leads).

    If anyone has some made, I hope you let me know.

    Edit(3/11/15): It's possible there's a more recent version of this design on my GitHub account
  • xanaduxanadu Posts: 3,347
    edited 2013-11-20 12:05
    Sweet, those look great. I remember a long time ago I got U shaped jumpers with no insulation on them. They were for jumping two adjacent breadboard holes. If you can find them they would be an easy way to chain your boards together.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2013-11-20 12:28
    xanadu wrote: »
    Sweet, those look great. I remember a long time ago I got U shaped jumpers with no insulation on them. They were for jumping two adjacent breadboard holes. If you can find them they would be an easy way to chain your boards together.

    Oh, one of the virtues of never putting things away. I had some right next to me (even though it's been years since I used them last). They work about the same as the copper wires. I need to pinch the open end of the "U" in order to get a good connection. If the wires just hang loose the connection isn't secure enough to get good power and data transmission. I need some springy rings that would pull the connection tight.

    I don't think I'll get a good board to board connection without soldering (though I'm not sure). I don't think I have any conductive thread to try.

    I used some solder paste and hot air to populate a few more of these. The solder paste and hot air makes a nicer looking board and the combo is faster than using a soldering iron.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2013-12-02 02:29
    Buck Roger's recent post about experimenting with NeoPixels reminded me I needed to update this thread about my most recent NeoPixel PCBs.

    I received the 16 pixel ring PCBs a few days ago. I've got to say, I really like it. I think I like my design better than AdaFruit's design (and I like AdaFruit's design).

    attachment.php?attachmentid=105341&d=1385974994

    (The ring I purchased from AdaFruit is at the top of each of these two photos.)

    I really like having the LEDs closer together. Even though the rings in these pictures are different sizes, they both have the same number of LEDs. You can see how the two different rings compare in size to a US quarter.

    attachment.php?attachmentid=105342&d=1385974996

    The AdaFruit ring leaves a lot space around the quarter while quarter just about fills the opening in the center of my ring.

    While the diameter of my ring is smaller (39.3mm vs 44.4mm), the distance between the inside of the ring and the outside of the ring is greater (6.9mm vs 6.3) on my version. I was able to group the LEDs closer together by rotating the LED 90 degrees. This moved the leads to the inside and outside of the ring instead of having the leads in between the LEDs.

    I copied AdaFruits design and included a capacitor in between every other LED. The design of the pin outs was a bit different on my design than AdaFruit's design. Like AdaFruit's ring, my ring has a single "data in" hole and a single "data out" hole near the top of the PCB. But unlike AdaFruit's design, my PCB has multiple 5V and ground holes. AdaFruit's ring only has a single 5V hole and a single location to connect ground. My ring has three locations each for 5V and ground connections. Since there were capacitors between every other LED, I used the eight vacant openings between LEDs for connections. I think the additional 5V and ground connections will make it easier to daisy chain the rings.

    You can see the back side of the PCB in this next picture.

    attachment.php?attachmentid=105343&d=1385974999

    I was surprised to see the circular area inside the ring PCB still connected. If I had know they weren't going to cut the center section all the way out, I may have tried to use the area for a small PCB design.

    Here's a short video of the ring in action.

    I really need to figure out a way of recording these rings so the colors are captured properly. I really like the way I got the colors on these rings to swirl around but the hypnotic effect is lost when seen through a video camera. The rings look much better in real life than they do in the video.

    I still have plans of mounting these rings to an ActivityBot's wheels. I still need to figure out how to properly transfer the power and data to the rotating wheel. I have a couple of ideas I plan to try.

    I've seen these NeoPixel rings used as a watch in some YouTube videos. I know AdaFruit now sells 12 pixel rings but I think I may try to use my 16 pixel ring as a watch. I figure I'll use two LEDs for the 12, 3, 6 and 9 o'clock positions. I'm not sure if I would want the Propeller chip on a small PCB in the center of the ring or if I'd rather have the Prop in the band someplace and leave the center of the ring open.

    I've also seen the NeoPixel rings used on goggles. I'm not sure if I want to try to copy that particular application myself.
    712 x 601 - 194K
    718 x 604 - 194K
    736 x 782 - 197K
  • David BetzDavid Betz Posts: 14,511
    edited 2013-12-20 14:55
    How did you provide the 5V power to your LED rings since the Quickstart doesn't provide a 5V output?
  • Duane DegnDuane Degn Posts: 10,588
    edited 2013-12-20 15:16
    David Betz wrote: »
    How did you provide the 5V power to your LED rings since the Quickstart doesn't provide a 5V output?

    I generally power the QuickStart with 5V either from USB or a battery back of four NiMH. I just run the power from the WS's Vin line to the NeoPixels.

    I have better luck if I use a level shifter on the logic to the LEDs. The 3.3V logic is kind of hit and miss with these. I think small variations in the 5V power source can greatly affect whether or not the 3.3V logic is read correctly.
  • David BetzDavid Betz Posts: 14,511
    edited 2013-12-20 15:18
    Duane Degn wrote: »
    I generally power the QuickStart with 5V either from USB or a battery back of four NiMH. I just run the power from the WS's Vin line to the NeoPixels.

    I have better luck if I use a level shifter on the logic to the LEDs. The 3.3V logic is kind of hit and miss with these. I think small variations in the 5V power source can greatly affect whether or not the 3.3V logic is read correctly.
    Thanks! What circuit do you use as a level shifter?
  • Duane DegnDuane Degn Posts: 10,588
    edited 2013-12-20 15:28
    David Betz wrote: »
    Thanks! What circuit do you use as a level shifter?

    I used this one from SparkFun. In the future I'll use the IC suggested by JonnyMac in post #8.
  • David BetzDavid Betz Posts: 14,511
    edited 2013-12-20 16:00
    Duane Degn wrote: »
    I used this one from SparkFun. In the future I'll use the IC suggested by JonnyMac in post #8.
    I saw Jon's recommendation of the TC4427 but I'm ashamed to admit that, being mostly a programmer, I'm not sure how to go about wiring this up. :-(

    I'm slowly starting to understand what your code is doing. It's very clever. I hope you don't mind if I convert it to C.
Sign In or Register to comment.