Monthly Archives: March 2019

WS2811 expander part 4: Boards and Parts!

After a bit of waiting, the boards showed up from OSHPark. they looked fine as far as I could tell.

I had all the other parts to do a board, but I needed a paste stencil. I went into pcbnew, chose File->Export, and then chose to export the F.Mask (ie solder mask) layer to a SVG. I cleaned it up a bit to remove non-pad elements, went out to the laser cutter and cut a stencil out of 4 mil mylar:

IMG_9495

Everything looked pretty good; there was good alignment between the board and the stencil. The spacing between the pads looked a little tight, but it’s a fairly fine pitched board, so it was mostly what I expected.

I carefully aligned the stencil and taped it on, got the solder paste out of the fridge, and applied it. Pulled up the stencil and it looked crappy, scraped it off, did it again, and got something that looked serviceable though there was more paste than I expected. Hmm.

Got out the components:

  • 1 WS2811
  • 1 33 ohm resistor
  • 1 2.7k ohm resistor
  • 6 10k ohm resistors
  • 3 1k ohm resistors
  • 3 NPN transistors
  • 3 MOSFETS
  • 1 100nF capacitor

and it took about 5 minutes to do the placement. Here’s the result:

IMG_9496

I didn’t look at the picture at the time, but that’s a *lot* of solder paste.

Into my reflow oven (Controleo 3 driving a B&D toaster oven), let it cycle, seemed fine, here’s the board:

IMG_9499

Not my best work. Frankly, it’s a mess; there are obvious places where there is no solder, and obvious pins that are bridged together. I spent about 15 minutes with my VOM testing for continuity and there were 3 solder bridges and 7 unconnected section.

Something clearly went wrong. And I went back to PCBNew and it was *really* obvious.

The layer you should choose for your stencil is F.Paste, not F.Mask. Here are the two next to each other (Mask left, Paste right):

imageimage

The Mask layer sizes are positively giant compared to the paste ones. So, what happens if you use the Mask layer is that you have:

  • A *lot* more paste on the board, especially the small pads which must have double the amount
  • Solder paste with much reduced clearances.

What that means in reality is that when you put the components on, it squishes the solder paste together and connects pads that shouldn’t be connect. And then when you head it up, you either get bridges or one of the pads wins and sucks all the paste away from the other pad (how it wins isn’t clear, but it is clear that the huge MOSFET pads pulled all of the paste from the transistors next door).

This makes me feel stupid, but it is actually quite good news; it means that the design is fine and I just need to remake a stencil with the correct layer.

Anyway, after a lot more rework than I had expected, I ended up with this:

IMG_9500

It’s still an ugly board, but does it work?

Well, I hooked up 5V, GND, and data in to one of my test rigs and a LED to the LED outputs.

And it works; the LED is on when I expect it to be on and off when I expect it to be off. All three outputs are fine.

The next test will be some testing to see how it fares with switching high current. And I’ll probably want to make another one using the correct stencil and hook it up for 12V operation to verify that.





New kit: LED Candy Cane part 1

My first kit – the Dodecahedral Light Engine – has been selling about as well as I expected a very hard to construct project with limited usages to sell, which is not very well. I primarily did it because I was going to do them anyway for my decoration project and wanted a project I could learn on.

I’ve just started working on my second kit, which is going to be a lot easier to build, cheaper, and more widely useful.

One of my favorite displays is a “tree of lights”, which is a tree with custom LED ornaments on it:

The ornaments are made of small sheets of plexiglass with high-power LEDs inserted into the holes, wired up, and waterproofed.

They are really bright; note in the photo that all of the dim lights are normal brightness LEDs, and even at that level the ornaments overpower the camera sensor. They are bright enough that – and I am not making this up – they cast a shadow about 50 feet away when they were at full brightness, so I dialed them back a little in brightness.

These ones are driven directly from 120VAC as that is what the controller provides.

What I want from this project.

  1. A fun, easy-to-assembly ornament
  2. The ability to run off of 5V or 12V (*maybe* 120VAC with a big disclaimer that you shouldn’t really do it)
  3. Tunable brightness
  4. The ability to drive them as WS2811 nodes (see my WS2811 expander posts…)
  5. A frame/armature that is easy to produce automatically (the originals were done with a 5mm end mill in a drill press and took a *long* time).



How do I become a better skier? Stance and Turn Shape

I’ve been seeing a common question recently – how do I become a better skier? – and I’m immodest enough to think that I have something useful to say on that topic. This is a summary of how I approach skier improvement for adults when I’m teaching.

I guess I should start by defining exactly what I mean by better. It’s one or more of the following:

  • Able to ski a wider variety of terrain
  • Able to ski a wider variety of conditions
  • Able to ski more efficiently – with less effort and/or for a longer period.

Prerequisites

There are a couple of prerequisites that are required for you to learn efficiently, which I call “happy and casual”…

Your happy place

Skiing is inherently a physical skill, and I can’t physically make your body parts move the way that I want to see them move. The best that I can do is try to provide you with opportunities through which you can discover better ways of moving.

To improve the chances of that happening, you need to be able to pay attention to what is going on, process what is going on rationally, and be able to explore modifications to your current technique.

For that to work well, you need to be calm and focused, which I just label as “happy”.

For us to reach that state, we need to feel safe, and it helps a lot of we are also having fun. If you feel scared or distracted, it is very hard to make progress.

Spending a lot of time skiing slopes that are too hard for you is a great way to be in a mental state where it’s hard to improve, and it’s also a great way to develop bad habits.

However, having said all that, you don’t learn to ski bumps on the bunny hill. Part of learning to ski off piste is getting used to skiing off piste so that you can be in that situation and stay in your happy place, or at least not in your very sad place. A little challenge is good as long as you track your mental state and are functioning well in it.

Your casual place

Compare two scenarios. In the first, you are doing a turn every 5 seconds. In the second, you are doing a turn every second.

Which one is easier to analyze and pay attention to?

The first one is obviously much much easier to analyze.

Part of this is terrain choice – choosing a terrain where, at our current ability, we can make turns that are what I would label as “casual”. They’re easy, I don’t have to work very hard, and most importantly, I’m not scared that I’m going to fall.

The second part is about technique; finding ways to modify your technique so that a given terrain becomes more casual for you.

Note that “casual” is about how you feel in a specific situation. Some people are casual on easy intermediates. Some are casual on black diamond bump runs.

Foundations

There are two topics that come up all the time, often enough that I consider them to be foundational. And by foundational, I mean that not addressing issues will limit your ability to improve. Those two things are stance, and turn shape.

Stance

If you ask 10 ski instructors what the most common technique issue for skiers is, 9 out of 10 will say “leaning too far back/not leaning forward enough” (the tenth is daydreaming about skiing). And from that comes the common advice:

  • Lean more forward
  • Keep your hands up in front of you
  • Don’t look down.

Does that work? Well, it can work, but it often doesn’t work great.

It helps to go back to what instructors call “ski/snow interaction”. What are we trying to achieve with ski/snow interaction? WRT stance, it’s two things:

  • We want to be able to load (put pressure on) the skis so they will bend and we can therefore use the sidecut to do the turning for us.
  • We want to have our weight centered over the skis so that we are going down the slope at the same rate the skis are, so they are not trying to speed up and get away from us.

That boils down to “have enough weight/pressure on the front of the ski so that I can get it to bend and keep up with it”. And the way we exert pressure on the front of the ski is only though the shin pressing on the front of the boot.

Which means there is one bit of anatomy that matters more than the rest: the ankle. If the ankle is flexed and there is pressure on the front of the boot, there is pressure on the front of the ski. If it is not flexed, it doesn’t matter how you are leaning or where your hands are, there isn’t pressure on the front of the boot, there won’t be pressure on the ski.

Here’s an example of  the kind of stance that I commonly see:

image

Note how the ankle is loose, but also note that the skier is a) leaning forward and b) has hands in front. Those “lean forward, hands up” cue is not working for this skier.

I want that ankle joint to be tighter, something that looks like this:

image

The ankle joint is tighter – the shin leans forward – but note that the skier is leaning forward less and has hands that are closer to the body.

Looking at the joints in the two images, where are there big changes? The knees have moved forward quite a bit, but the biggest change is in the hips; they have moved forward immensely in the second image. Which leads to my first cue to correct stance; stand up taller and move your hips forward. And also try to keep the angle of your back the same as the angle of your shins.

Not only is this a more functional stance, it’s also a more comfortable stance as it relies more on your skeleton to hold your weight and less on your muscles. Great stuff all around.

That is the stance that I’m searching for.

However, there is something problematic here. Let’s say you are skiing something that is challenging for you to ski and you find yourself in the first position. To get to the preferred, you need to stand up, get your hips forward, and do this while your skis are trying to run away from you. That is generally hard to do because it’s a lot of mass to move, so “stand up and move your hips forward” doesn’t work so great in a dynamic situation.

What is the minimal thing we could do from the first position to get pressure back on the front of the skis? What would be the quickest move? Focus on the ankle…

image

If we can pull our feet back 5 inches, we can regain the pressure on the front of our skis and get them working properly again, and we can make that move much faster than trying to move our whole body forward. It’s not a perfect stance; it’s still too hunched and is going to burn out your legs faster, but it goes us back to a place where they skis are actually working.

I think that move is foundational in off piste and bumps.

Finding the right stance

Remember the part earlier where I said that my job is to put you in situations where you can discover a better way of moving? The following is what I recommend to so you can discover what the right stance feels like and ingrain it into your neuromuscular connections. It has four steps.

Step 1: Sideslip

In a sideslip, we start with our skis across the hill and roughly equal pressure on both of the skis, and then roll our ankles and knees down the hill until our edges release and we start to slide downhill. Try it facing both directions, and roll your ankles and knees back into the hill to stop.

Here’s a video of what it looks like.

You don’t have to be perfect at sideslip for the purposes of this, but if you have trouble with steps 2 or 3 come back and practice this more.

Step 2: Falling leaf

Start in a sideslip where you are moving straight down the mountain, and slowly shift your weight forward and back on your skis. When you have the weight forward, your sideslip will move sideways down the hill and go forward at the same time. When you have your weight backwards, your skis will go sideways and backwards at the the same time.

Here’s a video of what it looks like. Start by doing it more slowly than the video shows. Pay attention to what your legs and ankles feel like as you are going forward.

Step 3: Diagonal forward sideslip

This is the forward part of the falling leaf held for much longer. Start by going across the hill, and then roll your ankles and knees down the hill slightly to sideslip at the same time. You will need to be in the “forward falling leaf” position for this to work, with ankles flexed and pressure on the front of your boot, and it will feel weird when you first do this. Play around with your stance. Try to stand tall.

It looks like this.

The feeling you get in the forward part of the falling leaf and in the diagonal forward sideslip is the foundation position you want in your stance.

Step 4: Diagonal forward sideslip with turn

Take the diagonal forward sideslip, and add a turn at the end of it. Make sure you are in the sideslip as you start the turn, and then as you exit the turn, get back into the diagonal sideslip. You should find your turns to be much easier.


Turn Shape

We talk about this foundation as “turn shape”, but I think that is probably the wrong way of looking at it. What we really care about is not the shape of the turn, but the direction that your skis are pointing during the turn compared to the direction that your body is moving. Perhaps a few diagrams will help. Let’s say you are skiing the following path:

image

That looks like a nice smooth turning shape. Let’s overlay the direction the skis are pointing in two different turning techniques:

image

In what we call “Z” turns, at the beginning of the turn, the skis are pivoted quickly across the path of travel and then held relatively straight until the next turn, where they are pivoted quickly across to the other direction. Z turns are problematic because:

  • They require big movements and therefore a lot of energy
  • Because the turning is quick, they ask more from the condition of the snow; if the snow is scraped off or a icy, they feel much more precarious.
  • The motion is so fast that you can’t actually feel what they skis are doing. Remember my part earlier about turns feeling casual so you can focus on what your skis are doing? Z turns make it hard to do that.

In progressive turns, things happen *slowly*, so you can easily tell what is going on.

So, if progressive turns are so much better, why do so many people do Z turns? It’s very simple; if you try to do progressive turns with a rearward stance, your skis take off downhill when they are pointed at the fall line, and you fall over.

My experience is that you can fix your stance, it’s generally fairly straightforward to move towards more progressive turns, but if you want an exercise, I think shuffle turns work pretty well. They are also good because you can’t do them if your stance is too far back.


WS2811 expander part 3: PCB Revisions again…

More revisions.

I posted the design to /r/PrintedCircuitBoard, and of the comments said:

“Do you need pullups on the outputs of WS2811?”

And of course, I was confident the answer was “no”. For about 5 seconds. And then I measured the WS2811 I have in my breadboard; it gave a nice solid sink when it was on, and when it was off, just a fraction of a volt. Clearly not up to sourcing current to the NPN transistor.

The most likely explanation is that it’s an open collector output:

The collector on the output transistor is just left hanging – it’s only collected to the external pin. The voltage on an open collector can float up above the internal voltage of the IC as long as you don’t exceed the maximum voltage of the transistor

Open collectors are really useful if you want to have a bus architecture with multiple components able to pull the bus low, or if you aren’t sure what voltage of the output is going to be. Since the WS2811 can be used to drive LEDs tied to either 5V or 12V, it makes perfect sense. And it is confirmed by the internets.

Which means that the circuit needs to get a tiny bit more complicated:

image

Another pullup resistor is added to the mix. Really not a problem from the cost and assembly perspective as the design goes from 9 resistors to 12 resistors.

But, can I fit it in the current board layout without making it bigger?

I should probably add a parenthetical note here that says it’s often easier to go with a bigger layout, and in fact if you are going to hand solder a board, you *should* go with a bigger layout. Though I’m not sure how practical it is to solder the MOSFETS by hand since the base pad is so big…

Anyway, here’s what the board looked like before:

I need to put a resistor between each of the traces that head from the WS2811 over to the transistors. Hmm.

I initially just tried to fit them in there, and with a big of rerouting, I was able to make it fit. Technically.

Then I decided that it would be a lot easier if I moved the vertical ground trace underneath the transistors and used that to provide the ground connection to the transistors. That meant I could move the VCC vias around more easily, and could do the following:

image

The fit in reasonably well.

I *think* it’s ready to order the first version of the board, but there’s one more step. I now have on hand the WS2811 ICs and both kinds of transistors. So, I printed out a design with the copper layers shown, and did a test to see if the components really fit on the board.

image

That shows the WS2811 on the left, the MOSFET on the right, one of the NPN transistors and then a tiny 0805 10K resistor at the top. Everything looks like it will fit fine.

I ordered 3 boards for $7.10 from Oshpark, which is my usual supplier for prototype boards if they are small.


WS2811 expander part 2: PCB Revisions

I’ve done quite a few improvements on the board. Let’s look at before and after:

imageimage

My usual flow is to do some changes, and then load the board into OSHPark and see how it previews. And then make changes.

I’ve probably redone the majority of the traces on the board. The big changes are:

  1. I replaced the 0603 resistors with 0805. I’m going to do the components by hand, and the larger resistors are easier to place. And I have a set of 0805s sitting in my drawer.
  2. I realized that I hadn’t planned for chaining together more than one board. After 3 or four revisions, I settled on a single 1×6 header to hold both sections. You can either use two 1×3 headers or one 1×6.
  3. The big headers for power and the LED output were bigger but not a standard connector, since I just wanted them to be easier to solder to. That was stupid. They are now spaced to use standard 3.96 mm spacing (Molex KK line if you want branded stuff), so you can either solder or use a connector. This made the board just slightly taller.
  4. The transistors and resistors have been moved, aligned, spindled, and mutilated.
  5. Added holes for mounting, though it’s probably not needed with a board this small. But I had space.
  6. Added some more labels.

Updated schematic

image

Board shots

I’m thinking this is probably good enough to get my prototype versions built.