Sunday, June 7, 2015

The Devil is in the Details

Comparing version 1 and version 2: the new version isn't substantially larger, and looks a whole lot better.
I really thought I was pretty close to finished at this point. Just a few more things to do, but then it occurred to me: how do I get these two case halves together? I had left out screw posts for this on purpose, but now I was wondering if the enclosure was large enough.

My original plan was to mount the screen from the back with screw posts. And this worked just fine. If I were using a more sophisticated CAD package, I could have just gone back and maybe increased the size of the enclosure a bit, whacked in some screw posts, and called it a day. But in 123D, it's hard to revisit early design decisions unless you save lots of versions. Which brings be to my next piece of advice: Save early, save often, and save lots of different versions. In fact, every time I make a major design decision, I save another version. This is because sometimes a design iteration doesn't pan out, and the best course of action is to go back to an earlier version, and work forward again. 123D will allow you correct your mistakes sometimes, but other times it arbitrarily doesn't.



But then there was the question of buttons. What to do with those? And what about the main board? How to mount all of this stuff?


Decided to switch to my black PLA to print out the next iteration. It looks good in black.


I decided to abandon the idea of attaching the screen to the bottom from the back. Instead, I made some clips to hold the screen to the top of the case. This worked better than I was expecting it would. I also made a custom 30mm knob for the encoder.


Unfortunately, my screw post placement definitely caused some issues for mounting the main circuit board to the screen. There just wasn't enough clearance. Also, I need this thing to be at least somewhat weather resistant. It's going to be perma-mounted to the bike, and it will get wet. The button cut-outs just seemed like they'd be hard to seal up.

I decided to try an experiment. Version 1 of the remote needed a little maintenance. After 9 months of being permanently mounted to the bike, the buttons had fallen off, some of the mounting tabs had broken, and rubber I had mounted to seal the button holes was peeling off. Since my CAD skills had improved greatly since I'd done that version, I decided to redesign the enclosure again, and try a little experminet while I was at it.

 I took an entire packet of Sugru and pressed it through the back side of the enclosure to form a membrane. It used a dowel to sculpt the underside of the sugru, to help make it flex the way membrane keyboards do.

This turned out not to work very well.

 I did my best to sculpt the buttons in to button shapes, but in the end the texture of my fingers and the unevenness of the material give you a very DIY look. Not good.

Still, I would have lived with it for a while if it had worked mechanically. But it didn't. Sugru is basically silicone caulk with some talcum powder added to it to give it some ability to hold its shape. The problem with this is that it makes the cured product very brittle. The silcone had the right springiness to it, and actually worked as buttons. But after about 3 or for test presses, the Sugru cracked. Oh well, back to the CAD package.

I had bought a roll of Ninjaflex a while back. I decided to see if I could 3D print a button membrane. I also 3D printed a test fixture and started playing around with different designs. My first test didn't have enough give to it, but my second test worked pretty well. It had enough give to it to provide good feel with gloved fingers, and at the same time it sprang right back to its original position.









I went through a bunch of iterations on this, varying the wall thickness and shape to get a feel for how the material behaved. It's not quite as soft as neoprene, or silicone. What I learned is that the wall thickness needs to be at least 1.0mm to get a successful print. But a 1.5mm wall thickness results in too stiff of a membrane. I also found that I could vary the sensitivity of the membrane / switch system by varying the depth that the membrane has to be flexed to actuate the tact switch underneath. Good. This means I can tune the system. It gives me flexibility to mount the tact switch at almost any reasonable depth under the main cover.

I also figured out that it works best with a slight interference fit: i.e. the outside dimensions of the membrane should be identical to the dimensions of the hole they pass through. This gives a nice snug fit that's not too difficult to insert or remove.

Meanwhile, I was still struggling with how to get the buttons into the enclosure I had designed



Originally, I was going to make a membrane that could be pressed through the enclosure from the back side. The trouble with this is that you basically have to glue it in place, and as Ben Heck says, you need to "build things you can take apart." So I decided to make little covers that can slip into place from the front side. Here's another piece of advice: make test pieces when you're trying out new ideas. This is because the test piece can be only as large as needed.


I create the test pieces by first duplicating the part I'm interested in, and then subtracting away the portion of it that I'm not interested in. Usually I'll delete the test part from the file after I've learned what I wanted to learn.


This experiment proved to work pretty well. Confident I had a way to create a front cover with water-resistant controls, I decided to finally start working on getting all the electronics into the enclosure.

Right away, I hit a snag: my attempts to cut a notch out of the protoboard so it would clear the button openings resulted in a shattered proto-board. I was going to have to design and make a custom board, or wire the controls to the board the old-fashioned way.



Not being an expert in PCB design, I chose the latter approach. I started with a smaller PCB and spent some time just trying different arrangements of boards and components. Amazingly, I managed to squeeze it all in.


Here's a side view showing that by using two right-angle headers, I would have just enough clearance between the screen and the main board.
Testing that the Blend Micro can fit on the under-side of the board.

I knew I was going to need to use some Molex connectors to wire the buttons to the board. But I was dreading having to crimp on a dozen or so of these little itty bitty connectors. I had gone to RadioShack to look for more 3D printer filament, and suddenly I saw the solution: pre-cut, pre-made wires with the female molex pins attached. Perfect!
You just pull the wires out with a small screwdriver, and stick them into your other female molex headers. They don't lock into place in the ones I bought from digikey, so a little dab of hot glue is a good idea to hold them in place.

Testing a couple of button cover designs. One is a dome, the other is kindof more "nipple" shaped, for lack of better word. The latter design is lower profile, but offers a bit more resistance. In the end I decided against it because it was too hard to use with gloves.


I also experimented with a smaller back cover. The electronics actually did fit.

The next sequence shows the circuit board assembly process. I proceed incrementally, and make sure I'm on the right track before moving on to the next phase.





I'm getting better at bodging together circuit boards on perfboard. This only took me about half a day, vs the 2 or 3 days my first project took. Said first project is sitting in the upper-left corner of the image below.

With the board half assembled, I couldn't wait to do a test. I hadn't hooked up the power leads, so I had to run it off USB with the back cover off.

I initially liked the design better in black, but I got a nice surprise when I powered it up for the first time. The LED back-light shines through the natural clear PLA and the result is pretty cool. I kinda wish I had room / time / motivation to throw a few more LEDs in there.

Time to hook up the buttons. This proved to be the most challenging task. As Ben Heck says, wires take up a lot of room in your project. They took up all the remaining room in the case. I wasn't able to use my shorter back cover.
Part of the problem is that I have no choice but to hot-glue things in place, solder the wires, and the cover all the connections with still more hot glue. This makes eats up valuable room when clearances are tight.


But still. I got it done. I mean. Wow. Just look at it. I can even take it apart.

The back cover on. It fits.



Okay, well, if I'm honest, it is pretty funky. Maybe above-average for an initial prototype? But not exactly marketable. Please feel free to comment, critique, whatever. I think it would look better in black, with red buttons, maybe. But I don't have red NinjaFlex.




Also, I do like the glowing translucent effect when the backlight is on, though it might be too dazzling at night. We'll see.

Tragedy

So, having got all that done, I was so excited that I had to try it. And it worked, at first. I had to take it apart to fix a bad ground.

When I re-assembled it, I wasn't paying attention and got power leads reversed, and so dumped 9.6V into the regulator in the wrong direction. And let the magic smoke out of the voltage regulator, and possibly other things.

Whoops. It's a SOT-23 package, so I don't think I'm going to be repairing that micro-controller. I have ordered another one, which should arrive Monday. But I'm going out of town next week, and won't have time to hack on it until the week after next. I am hoping the screen isn't damaged.

But still, for one, brief, shining moment, it was alive. A moment I managed to capture on video. And the rush I get from a moment like that is why I work so hard on these things in the first place.


No comments:

Post a Comment