Shop OBEX P1 Docs P2 Docs Learn Events
Propeller Powered Costume Element Controller — Parallax Forums

Propeller Powered Costume Element Controller

JonnyMacJonnyMac Posts: 8,912
edited 2018-01-01 02:32 in Customer Projects
A tad out of focus, but this little dude can read four PWM outputs from a wireless DMX LED dimmer and turn those values into animation and brightness controls for a costume element that uses APA102C LEDs.

The good news is that the DMX device uses open-drain outputs so I just chucked pull-ups on four pins and used counters to read the inputs. I've attached my Spin-only (no PASM required) code for reading PWM. The only requirement is that the sample window is at least 1x the PWM period, and should probably be a multiple of the period. In my case the PWM frequency is 20kHz so I used a 5ms sample window. This also works well in that DMX updates outputs every 23ms, so I'm sampling 4x times between DMX updates -- it's plenty responsive.

The costume element has strips of LEDs, the longest being eight pixels. The original device simply divided the 0..255 range into eight zones -- the output looked a little chunky, and sometimes fluttered around pixel-to-pixel threshold values. Rick (yes, Galinson, the paintball mini-gun guy) asked if I could fade in/out LEDs to create a smoother look. It took a little work, but it looks great (excellent call on his part). The controllers and new LED PCBs have been installed and everything looks great. Rick did a fantastic job with new mechanical pieces. Everything looks better, works better, and is serviceable.

Since ObEx wouldn't seem to let me post new objects, I've attached my PWM reader and APA102C objects here. Funny, I wrote the APA102C object for another movie project.

The reason the carrier PCB looks a little funky is that I etched it in my kitchen. For simple boards -- especially when there is an emergency -- I use the system from PCB Fab-In-A-Box (https://pcbfx.com/). Thus far I've only done single-sided boards, but I'm going to attempt a double-sided soon. It's great for emergency projects like this.

Comments

  • Jon,

    Very Nice!. I look forward to seeing this in action.

    That looks like a Prop Mini on top of your custom board which seems to keep things in a very small foot print and easy to hide.
  • Jon, what do you see as the advantage of using APA102C LEDs vs. the WS2812s? I see they've got higher PWM, is that what makes them good for movies?
  • JDJD Posts: 570
    I dig it, very cool use of a Prop Mini. It would be great to see a video if possible.

    Do you have any more cool movie stuff you can share? Is there a time limit on sharing something you've worked on that was in production?
  • Jeff Haas wrote: »
    Jon, what do you see as the advantage of using APA102C LEDs vs. the WS2812s? I see they've got higher PWM, is that what makes them good for movies?

    Per the Adafruit description:
    On NeoPixels, the PWM rate happens 400Hz, which works well but is noticeably at lower brightness’s and if the strip is moving in anyway. DotStars have a 20KHz PWM rate, so even when moving the strip around, you will not see the pixilation, the color blending is very smooth.

    I think that what Jon's new software addresses.

  • JonM wrote: »
    Jon,

    Very Nice!. I look forward to seeing this in action.

    That looks like a Prop Mini on top of your custom board which seems to keep things in a very small foot print and easy to hide.

    Indeed, it is. We had to fit this into the same space as the Arduino Mini that was in the original piece. In this case, I oriented the headers vertically so that the assembly can lay on its side on one end of the DMX receiver. Since the receiver has four channel outputs, I made a 4-channel board.
  • Jeff Haas wrote: »
    Jon, what do you see as the advantage of using APA102C LEDs vs. the WS2812s? I see they've got higher PWM, is that what makes them good for movies?

    Yes, higher PWM frequency is better for the movie business (especially slow-mo shots where the frame rate is over-cranked) and the APA102C strips come in white-only variants (warm and cool). Some lighting fixtures combine warm and cool strips with a balance adjustment to set the color temperature without gels.
  • JonnyMacJonnyMac Posts: 8,912
    edited 2017-12-30 03:02
    JD wrote: »
    I dig it, very cool use of a Prop Mini. It would be great to see a video if possible.

    Do you have any more cool movie stuff you can share? Is there a time limit on sharing something you've worked on that was in production?

    Well, I often write bits of code for people and have no idea where it lands until someone tells me. In this case, I was asked to create a PCB for the costume piece. The original uses APA102C strips glued to a piece of craft paper and then soldered together with wire-wrap wire. This was embedded into an assembly that is mounted on the costume, but had problems. Since there was a break for Christmas and Rick was hired to fix the mechanics, he asked the shop to use me for electronics. For the lighting piece I drafted a proper schematic and designed a PCB using the mechanical plan Rick sent (this was taken from his 3D model). I sent the files to GoldPhoenixPCB on Monday morning, had them back on Friday afternoon, did a bit of toaster over reflow soldering on Saturday morning, and then took them to Rick who was at the shop. The shop owner was thrilled at the look of the PCB (photo is of my unpopulated spare with client and character info redacted).

    By the time we knew what we needed to know about output from the DMX receiver it was too late to order the Propeller Mini boards; I ended up etching those in the kitchen. They're simple single-sided boards with a few jumpers.

    I don't have any video of anything. When the project is released I will re-visit this thread to tell people where to look.

    Admittedly, I work in an interesting business. Today I had lunch with my friend Camille who specializes in eyes -- she makes them for the Steve Wang projects that I often put Propellers into. She recently made the eyes for the Annabelle doll in the movie of the same name.

    And a mutual friend of ours who makes costumes has a specialty fat-suit shop -- she's thrilled to have padded Gary Oldman for his turn as Churchill.

    On Christmas eve I was shopping, turned a corner and nearly slammed into a lady's cart; that lady was actress Laurie Metcalf who plays Sheldon's mom on Big Bang Theory. The nerd connection was not lost on me!

    My Pinterest page has a bunch of photos of projects I've worked on (many for the gaming industry).
    -- https://www.pinterest.com/jonmcphalen/techno-art/

    800 x 600 - 516K
    600 x 800 - 278K
  • JonnyMacJonnyMac Posts: 8,912
    edited 2017-12-30 02:52
    I think that what Jon's new software addresses.

    The original code had a very granular output:

    -- All off
    -- Ch 0 on
    -- Ch 0 and Ch1 on
    ...
    -- All on

    Basically, nine steps in the sequence.

    My version -- again, at Rick's suggestion -- does this:

    -- All off
    -- Fade Ch0 on
    -- Ch 0 on, fade Ch 1 on
    ...
    All on

    I also added a dead band to each end of the range (DMX is 0..255) to allow the lighting operator to know that full deflection one way or the other would behave as expected. The second channel controls the 100% brightness level. The third channel acts as a brightness multiplier. These are white-only LEDs which are really bright. We believe that on set they will only use one LED chip per pixel. By adding the third channel they can select one, two, or all three chips. Going from one DMX channel in the original design to three in what Rick and I built gives the DP an director more flexibility on set.
  • JDJD Posts: 570
    JonnyMac wrote: »
    JD wrote: »
    I dig it, very cool use of a Prop Mini. It would be great to see a video if possible.

    Do you have any more cool movie stuff you can share? Is there a time limit on sharing something you've worked on that was in production?

    Well, I often write bits of code for people and have no idea where it lands until someone tells me. In this case, I was asked to create a PCB for the costume piece. The original uses APA102C strips glued to a piece of craft paper and then soldered together with wire-wrap wire. This was embedded into an assembly that is mounted on the costume, but had problems. Since there was a break for Christmas and Rick was hired to fix the mechanics, he asked the shop to use me for electronics. For the lighting piece I drafted a proper schematic and designed a PCB using the mechanical plan Rick sent (this was taken from his 3D model). I sent the files to GoldPhoenixPCB on Monday morning, had them back on Friday afternoon, did a bit of toaster over reflow soldering on Saturday morning, and then took them to Rick who was at the shop. The shop owner was thrilled at the look of the PCB (photo is of my unpopulated spare with client and character info redacted).

    By the time we knew what we needed to know about output from the DMX receiver it was too late to order the Propeller Mini boards; I ended up etching those in the kitchen. They're simple single-sided boards with a few jumpers.

    I don't have any video of anything. When the project is released I will re-visit this thread to tell people where to look.

    Admittedly, I work in an interesting business. Today I had lunch with my friend Camille who specializes in eyes -- she makes them for the Steve Wang projects that I often put Propellers into. She recently made the eyes for the Annabelle doll in the movie of the same name.

    And a mutual friend of ours who makes costumes has a specialty fat-suit shop -- she's thrilled to have padded Gary Oldman for his turn as Churchill.

    On Christmas eve I was shopping, turned a corner and nearly slammed into a lady's cart; that lady was actress Laurie Metcalf who plays Sheldon's mom on Big Bang Theory. The nerd connection was not lost on me!

    My Pinterest page has a bunch of photos of projects I've worked on (many for the gaming industry).
    -- https://www.pinterest.com/jonmcphalen/techno-art/

    That at-home kit is really sweet, less than what I thought it was going to be too. Are those boards transparent and under $100? haha Thats a pretty cool selling point. I have never tried the toaster for soldering, seen a couple videos and project highlights for creating hacker badges that uses an omelette pan; seems straight forward enough and worked like a charm.

    Pretty cool day to day man; that doll is super creepy, i've seen the movie, and have been a total fan since her roll as Jackie on Roseanne. :)

    Nice, I have not setup a Pin account, but visit for build ideas pretty regularly :) I fav'ed your pin and will check it out later.
  • JonnyMacJonnyMac Posts: 8,912
    edited 2017-12-30 16:50
    Are those boards transparent and under $100?

    If you're not accounting for your time, they are well under $100. You can get a package of two single-sided, 8"x10" panels from Digikey for $15. A 10-pack of toner-transfer paper is $12. I'm still on the original roll of green TRF film (this seals the slightly porous toner before etching). The materials are not expensive. For this project I used dry mix chemical tinning agent. That was another $10 but is supposed to be good for six months.

    FTR, I bought the Pulsar kit because the first FireFall project...

    https://i.pinimg.com/564x/74/5c/20/745c20bd40221477bedc1732350166ee.jpg

    ...required me to hand-build a few dozen boards for LEDs -- these were hand cut from perfboard, and then I hand-wired the LEDs (about 1000 in total). Since I knew we were going to build a second display, I invested some of my earnings from the first into the Pulsar system. Yes, the second display was easier for me, and I earned the same amount of money. For me, it's been a worthwhile investment

    The standard PCBs from Pulsar are 0.032" fiberglass so they are translucent, but not transparent. Still, you can see well enough through them that you know when they're fully etched -- you can see clean traces through the board.

    Since I sometimes have to do emergency boards (like this one), I find the Pulsar system worth it. And the owner, Frank, is amazing in terms of tech support.

    Note that his web site says you can do a board in about 8 minutes -- for me it's really more like 30 since I'm not doing it every day. Still, if you have the materials and tools on hand, being able to knock out a PCB that fast is a blessing. Rick and I found this to be true when we did the Black badge for DEF CON two years ago (the 3D face). Instead of soldering wires to the male pin headers required for the servos, I popped back home and knocked out a board design. Using the panelizing tool in DipTrace I was able to make a sheet of them and get them etched in about an hour. I took this back to Rick's shop where he knocked out a little CNC program to drill the holes. We saved at least a day's worth of work.

    I follow the Pulsar steps with a small addition to deal with the dissolved solids in my local water supply (which can interfere with the toner bonding to the PCB copper). After cleaning in the sink with 0000 steel wool and Dawn dish soap, I rinse the board, shake off the excess water, then drop it into a container of distilled water for a final rinse. After that, I pat dry and toss it into a container of 99% alcohol until I need it (always keep 99% alcohol covered). The distilled water rinse and 99% cleaning ensure that the toner bonds to the copper. Before I figured this out, traces would float off with the transfer paper (I think the dissolved solids in my water were creating a film that prevented good adhesion). No matter what your water situation, I suggest these steps because it will ensure a good transfer.
  • Tracy AllenTracy Allen Posts: 6,656
    edited 2017-12-30 20:19
    Jon, if you've seen Guillermo del Toro's new film, Shape of Water, I wonder if you know how they did the bioluminescent chaser effect on the monster? Is that electronics, or is it CGI painted on? The eyes too are really hard to fathom, how they did that.
  • JonnyMacJonnyMac Posts: 8,912
    edited 2017-12-30 22:48
    Jon, if you've seen Guillermo del Toro's new film, Shape of Water, I wonder if you know how they did the bioluminescent chaser effect on the monster? Is that electronics, or is it CGI painted on? The eyes too are really hard to fathom, how they did that.
    I haven't yet -- perhaps I should pop out today. The guy who plays the creature, Doug Jones, is one of the nicest people in the business. I made a lighting element for a denture he wore in another film. I didn't have an impression of his mouth so I took one of mine figuring it would be close enough. I used the Pulsar system to make that board, too. It was three cherry red, 1206 LEDs and a constant current driver. I used wire-wrap wire for the in-mouth stuff. I never saw it installed (Steve Wang's team did the suit, dentures, and make-up), but chatted with Doug sometime later who told me it looked and worked great.

    With advances in LEDs they are often used to create a bit of practical light that helps the VFX team. If you've seen the commercial for Destiny 2 (video game) then you've seen this. Rick Galinson added WS2812s with some programming to the props. This provided practical light to cast shadows on set, and the the VFX team took care of the rest. I also made fingertip lighting elements for Jamie Foxx (Electro) for The Amazing Spiderman 2 -- again, using the Pulsar system. Animating shadows on a moving actor is really difficult, hence expensive. When practical light can be provided on set, it's good for the project.

    I'm going to use this technique myself in a short film where an angel has a glowing halo. An LED ring will cast shimmering light on her hair; VFX will cover the LED ring and remove the halo support. This is new territory for me (VFX), and I'm kind of excited about it. I did another short film with a hidden LED in a guy's hand -- it was used as kind of an ET healing light. That was easy; no VFX required.
  • JonnyMacJonnyMac Posts: 8,912
    edited 2017-12-30 23:00
    I found a BTS video on YouTube. At the 0:43 you can see an artist painting the appliance with a small UV lamp shining on it. I would guess this was used as the reference with VFX enhancements in post as required.

  • JonnyMacJonnyMac Posts: 8,912
    edited 2017-12-31 17:11
    Are those boards transparent ... ?
    I just found the attached image on my phone; this is the carrier sans Propeller Mini. As you can see, the PCB is thin enough to see traces on the other side through it. I use Pulsar's recommend "contact etching" method. Since I already have the PCB in my hand, I can hold it up to some light and verify that all the unneeded copper has been removed.
    800 x 600 - 462K
  • Tracy AllenTracy Allen Posts: 6,656
    edited 2017-12-31 20:57
    Thanks for the link (which leads to many more). I'm a big fan of del Toro's story lines. Do see it if you get a chance. That's funny that you did light dental work on Doug Jones, with wire wrap haha! And that he is a nice guy. He's a regular with del Toro, not nice at all as a character in Pan's Labyrinth, quite a contrast in Shape of Water, much more complex.

    VFX surely does create magic on the screen. It's great to hear from you a bit of what's behind it and how you accomplish what you do.

  • JDJD Posts: 570
    Nice!! that is really clean looking; I like the board semitransparent like that. I have taken note to the directions you provided about getting the best results. There is a wood and led project that I am working on and would be a nice fit. I just want to make a small batch for this project, I don't need anything over the top fancy like silk screening.

  • JD wrote: »
    Nice!! that is really clean looking; I like the board semitransparent like that. I have taken note to the directions you provided about getting the best results. There is a wood and led project that I am working on and would be a nice fit. I just want to make a small batch for this project, I don't need anything over the top fancy like silk screening.

    You can do that, though. What you have to do is make another transfer sheet with your "silkscreen" markings. You bond that to the board with the laminator after it's been etched. I could have done that on the top side of this board to mark the IO headers, but didn't for time. Pulsar also provides a white film to make your markings look like standard silkscreen.

    The key, I've found, is like cooking: have everything put out in advance. I turn on the laminator to heat up and get my containers of distilled water, 99% alcohol (just enough to submerge the PCB), and ferric chloride. If it's cool as it is this time of year I will warm the FeCl in a water bath. Don't forget gloves (I prefer nitril), and some soft foam. I tend to put down some newspapers and do my etching work inside a large, plastic tray used to developing 8x10 photos -- this acts like a catch if I accidentally tip the FeCl container. Once the lamintor is heated, I clean the board and go through the process. The contact etching process is very fast and allows you to get very fine traces (Frank says down to 5 mils, but I always make mine at least 15).

    On my to do list this year is to start making double-sided boards.

    If you have any questions reach out to Frank at Pulsar (mail@pulsarprofx.com) -- an tell him Jon McPhalen sent you! I just had a short exchange with him today about his project. This is not the first time that his product has been helpful with a rush job.

    Happy New Year and have fun making PCBs in 2018!
  • Another costume element for Rick!

    I don't know what will control it -- this PCB (there are two) provides rim lighting for a robot's eyes. Made in my kitchen last night using the Pulsar Pro system.
    800 x 600 - 259K
  • JDJD Posts: 570
    JonnyMac wrote: »
    Another costume element for Rick!

    I don't know what will control it -- this PCB (there are two) provides rim lighting for a robot's eyes. Made in my kitchen last night using the Pulsar Pro system.

    Looks nice; I only see 2 pads for each light, are you going to use RGB or regular leds?
  • Standard white LEDs. Rick soldered them this morning and the piece looks great -- which means I get to etch four more boards for the production on Saturday morning. Rick is heading to Canada with the costume on Monday.
Sign In or Register to comment.