Tag Archives: coco

The Agony of The Feet

plutarch on rail

If, bit by bit, you replace the parts of a store-bought pirate parrot with 3D printed components and electronics, is it still the same parrot in five years?

Another Halloween has come and gone, and no, I did not festoon the house with an Arduino-controlled lightshow as I had planned to do in July.

Nor did I design and print that glowing Riddler sword cane I’ve been wanting to get to, and I also failed to make any headway on that EL wire and fog-machine witches’ cauldron I was so pumped up about two years ago.

What I did manage to do was stay married to the lovely and talented Mrs. Zheng3, who in addition to being lovely and talented also had the foresight to order us up a couple of relatively inexpensive pirate costumes from some online retailer.

See, here’s the thing about Halloween costumes. A store-bought costume is all well and good, but I gots ideas, man. Next time you and I are having a beer ask me about my plans for a two-person piñata donkey costume. If you whack us with a stick we’ll drop a bunch of candy out through a trapdoor in the belly. It’s-a-gonna-be-awesome.

pinata

Of course, I don’t have the time to make this. I also must make peace with the idea that I will never, ever, learn how to do DIY vacuum forming and craft myself a suit of Dr. Doom armor. The probability of my constructing an animatronic tarantula the size of a Great Dane approaches zero. Halloween’s an annual exercise in abandoning fun projects before they get started.

But you’ve gotta have a costume, right? Especially since we annually attend a spectacular haunted house/halloween party thrown by good friends of ours out in the boondocks of Hortonville, Wisconsin. Can’t show up there wearing my usual costume of cargo pants and free trade show T-shirts.

As she’s done so many times in the past, the lovely and talented Mrs. Zheng3 pulled my bacon out of the fire with an assist from Amazon prime and MasterCard, and now we’ve got pirate gear aplenty.

But what about next year? And the year after that? We’ve decided that our best option is to commit to the pirate life completely and upgrade our costumes by degrees. This year’s our baseline, and at some point in the next twelve months I’ll buy a nice set of leather boots to replace the cheap vinyl boot-tops that go over my dress shoes.

(The costume has a little tag on the inside that says, I kid you not, DO NOT WASH. Need to replace the shirt ASAP.)

do not wash

Maybe next year I’ll find a flouncy pirate shirt that can do double duty at the renaissance faire. And the year after that I can fall off my wallet and get a nice steel cutlass. And so on and so forth and in five years I’ll have a really great pirate costume just hanging in the closet.

We also bought a polystyrene parrot accessory. He doesn’t look too bad for $10 but the UX could use some love. At the most basic level, it’d be nice if I didn’t have to worry about my bird falling off to join the choir invisible every time I reach for the guacamole.

Plutarch’s original feet have two problems. First, they look nothing like actual parrot feet. Parrot feet are weird, and these are clearly sparrow feet repurposed by an overworked factory manager in Guangzhou.

original feet

Second, the feet don’t ship with a convenient way to attach to the wearer. Plutarch ships with a shoelace-like strap that’s halfheartedly hot-glued to his sole, intended to loop under his owner’s armpit. You’ll see from the Amazon reviews that this is a less-than-optimal solution.

Magnets are my go-to solution for holding things together. A while ago I bought a passel of tiny neodymium magnets for some long-forgotten purpose, and I still have about fifty of them left. A few minutes tweaking a cube in Maya gets me a pair of parrot feet with little sockets for the magnets. The magnets are friction-fit, but being a belt-and-suspenders type of hominid I’ve super glued them in.

feet magnets

A steel tuna fish can lid, easily hand-bent to be convex, hides under my clothing. I’ve covered the lid in athletic tape because it’ll be under a white shirt eventually and I don’t want it to show through.

feet pauldron

Besides, I’m nursing a rotator cuff injury, again, and have no other use for my athletic tape for at least a month. Feh.

Also, Coco gives approximately 6.02×10-23 f_cks about this parrot.

These feet are printed flat in ColorFabb signal yellow PLA/PHA, which is easy enough to deform post-print with a little bit of heat. A few months ago I bought this great little heat gun for heat-shrink tubing and it does a fine job helping me mold Plutarch’s toes to my shoulder.

plutarch shoulder

In the long term I’d like to put some motor control into Plutarch’s head so that he can swivel to look at stuff. And a webcam. And a speaker. And wireless control so that I can control the parrot from across the room.

I’ve already got a wee servo on order from Adafruit, so that’ll be next weekend’s project.

Like I said, I gots ideas. Check back in a year and we’ll see how far I’ve gotten.

Why Plutarch? Ship of Theseus, grandfather’s axe, and all that.

Lao Zheng out.

All About That Base Are Belong To Us: Controlling an LED with an NPN Transistor

unforeseen problemFull disclosure: I have no idea what I’m doing. If you arrived here by googling CONTROL LED NPN TRANSISTER then you probably know only slightly less about electronics than I do.

Frankly I’m not real clear on exactly what voltage is. People keep telling me charge is like a swimming pool, and the voltage is how much water pressure you have, and the current is how much water flows out of the pool, and resistance is how big the pipe is that the water’s flowing out of, but honestly that makes no intuitive sense to me. No sense at all.

Apparently resistors have something to do with Buddhism because ohms? What. Evs.

I’m a huge fan of getting things working first and understanding them later, so let’s just barrel right ahead and be willing to break stuff for science. These components are relatively inexpensive, so even if you burn a few bucks you’ve gained some knowledge from the carnage.


Here’s what you’ll need:

parts

One. A power source. I’ve got an old 7.5V wall wart power adapter scavenged from what I’m guessing was a D-Link router at some point in the past. You can use any power source you like for this, just so long as you’re pushing somewhere around 5V. Four AA batteries will work great for this. Don’t get your power directly from the wall unless you’re seeking a new career as a fried ham.

The leads on this power supply are stranded wire, which doesn’t jam into breadboards very well. I’ve soldered them solid– not strictly necessary but helpful. If you do this yourself please don’t solder the leads while the power supply is plugged in. Is bad idea.

I’ve used blue painters’ tape to indicate the positive lead on this. Red’s the conventional color, but I ain’t got no red tape, son. Blue it is.

Two. An LED! You can buy these guys by the dozen for cheap, and some places will even sell you resistors in the package. I’m using a green LED. These tend to run somewhere around 3.3V (this matters, and you’ll see why in a moment.)

Any DIY project is improved by adding LED’s to it, so you really ought to have a few thousand of these at the ready. Making a Halloween costume? LED’s. Grade school diorama? LED’s. Bran muffins? LED’s, baby.

Three. Some resistors! Here’s why that 3.3V matters: remember that the power supply I’m using is 7.5 volts. Hook that puppy up to a dinky little 3.3V LED and kablooie– the LED will flash briefly and then die forever. The resistor’s going to limit the amount of juice flowing to the LED by turning excess electricity into heat and dissipating it into the air.

Trenchant insight alert: THIS IS WHY ELECTRONICS GET HOT WHEN YOU USE THEM.

I’m using a 12K and a 5.6K resistor for this project, which I picked at random from a pile of bent resistors in the bottom of my toolbox after a 100K resistor blocked too much current to light an LED.

Voltage calculations and predictions as to whether I will eventually burn up my components are left as an exercise for the reader. EE’s are free to leave helpful comments below.

Fo’. An NPN transistor! It’s tough to buy just one of these. Here’s a pack of one hundred, so you can screw up a bunch of times. We’re going to use one transistor as an electronic switch. What you do with the other 99 is up to you.

Five. A short length of hookup wire. Pretty much anything conductive will work for this– don’t worry about gauge as we’re not exactly building a space probe here. Use a paper clip if you’ve got nothing else.

Six. A solderless breadboard! (not pictured) You’ll probably want at least three of these in your house so that you can leave half-finished projects assembled while you attend to more pressing duties, but you only need one for this project.

The Basic LED Circuit

Let’s assume that you’ve never done this before. We’ll wire up a basic LED circuit to build confidence and then move on to adding the transistor.

Step 1: Connect the power to the breadboard. Plus to plus, minus to minus.

power hookup

Step 2: Connect the 12K resistor to the + strip and somewhere else on the breadboard. We’ll use a second resistor later when we want to avoid frying the transistor.

add resistor

Step 3: Connect the long lead of the LED to the free end of the 12K resistor.

add LED

Step 4: Connect the short lead of the LED back to ground with a piece of hookup wire.

LED circuit

And if all goes well, you should have glowing LED, with brightness dependent on your combination of resistor and power source.

So that’s LED’s 101. I still don’t know how this relates to swimming pools.

The Transistor Circuit

Let’s complicate things just a bit by adding the NPN transistor. Pro tip: It’s always helpful to remove all cats from the work area.

cat

Let’s not dwell on the difference between NPN and PNP transistors: there are plenty of other places on the internets to explain that, full of confusing diagrams and weird-ass equations. For morons at our level it’s enough to understand that when electricty touches the middle pin of an NPN transitor, current flows through the transistor. Otherwise, the transistor acts like a closed gate, and no electricity passes through it.

I’m using a 2N4401 transistor, but any NPN should work for this little tutorial.

Step 6: Take out the LED and hookup wire and insert the transistor so the curved side is facing away from you.

add transistor

Step 7: Connect the long lead of the LED to the rightmost leg of the transistor. Wire the transistor’s leg back to ground with your little piece of hookup wire. If you’re fortunate, nothing will happen.

wire to ground

The LED should still be dark, but if it’s glowing dimly then (I guess?) a little bit of current is passing through the transistor. You can use a more powerful resistor or lower your input voltage by swapping out your power supply.

Or just plow on ahead and don’t worry about incinerating your components. That’s what I’d do.

Step 8: This is where the magic happens! We’re going to apply current to the transistor’s middle leg, which will permit current to flow through the transistor and light up our LED.

transistor circuit

Just to be on the safe side I put my 5.6K resistor in between the source voltage and the transistor’s middle leg. Of course you could read the datasheet and know for sure how much voltage that middle leg can handle (spoiler: it’s 6V read Andy’s comments below) but reading datasheets is for suckers who didn’t buy a 100-pack of transistors.

This Circuit is Stupid

Yeah, I know. But it’s a proof of concept, right? Instead of keeping an LED lit (lame) one might be using this transistor with an Arduino digital pin wired to the middle leg. One could toggle massively interesting circuts by writing HIGH or LOW to the circuit from the Arduino.

Or, OR! In theeeeeeeeeeory, one could use this basic circuit to resolve conflicts among I2C devices with identical hardware addresses by interrupting the SCA signal, if one had accidentally purchased A TSSOP multiplexer and SOIC breakout boards and had a week to kill while the proper components were being shipped to his lab and needed to feel like he was making forward progress on some front for the love of Pete, because none of us are getting any younger, you know, and Time is the enemy.

I’m not saying that happened. But it could have. In theory.

#staytuned, my friends. Lao Zheng out.

Faltering Kickstarter Offers Steak Knives In Obvious Bid For Relevance

It’s not quite the eleventh hour, but we can see the trembling minute hand from here. A fortnight to go and we’ve just crested 18% funding. Faire Play 2 could be doing much better, and Coco haz a sad.

Everyone who hasn’t backed so far has made a little kitten cry.

You monsters.

tears

But! all is not lost. All is never lost, not so long as one dwarf in Moria still draws breath. Creativity reigns here at Zheng Labs, and WE WILL FIND A WAY.

So I reach down into the Bag of Holding, rummage around, and pull out a Hail Mary backer reward that will surely save this Kickstarter from the ash heap of crowdfunding history. I call forth…

STEAK KNIVES?

steak knife

Whatever, I’ll run with it.

IF YOU BACK NOW, you will receive, absolutely FREE, this fine set of digital steak knives, suitable for printing on any 3D printer.

sparky knife

Forged from the finest free-range polygons! Once printed, these serrated knives are sharp enough to slice the toughest of warm lards and are absolutely guaranteed to warp in any household dishwasher.

And that’s not all! They’re not food-safe, either!

But! Amazing as these digital steak knives may be, they are only available to people who have backed Faire Play 2 at any level. Robots are standing by to take your contribution. Help kittens now.

pledge now

Yes, I used Comic Sans. Desperate times, desperate measures.

Building Rome in a Day for a Kickstarter video

There’s a Kickstarter statistic that says you’re something like 50% more likely to get funded if you’ve got a movie attached to your project. Currently we’re at about 14% funding for Faire Play 2 in less that a week, which is a nice start.

Here’s our movie, and after you’ve watched it head down below the embed to see a little behind the scenes movie magic.

If you haven’t backed, pop over to Kickstarter and drop a couple bucks on the project. Let’s see if we can’t get to 20% by the end of the day. Share the following link with friends and family on Facebook and Twitter, too! That helps a lot. http://kck.st/1FQ7FZf

Thanks. And now onto the show.

Fun, right? Here’s how Emperor Sparky’s world is done IRL. The title of the post is a little misleading– it takes days— plural– to make a video like this. Weeks, really.

We’re not even talking audio editing, which be a whole ‘nother can o’ worms.

The short answer to “how’d he do that” is Photoshop. Lots and lots of Photoshop. Zheng Labs kicks it old-school with Photoshop CS2, the last version of Photoshop that runs on our 32-bit Mac Pro tower. (hence the Kickstarter– more operating capital==better equipment and software to crank out fun projects like this more quickly.) I’m shooting almost everything with a battered old Canon G11, except for a few quickies I take with an iPhone here and there.

And cardboard. Lots of cardboard and a matte knife. No laser cutting here, not yet anyway.

The first step is to make and paint the most important part of the set, Sparky’s balcony. I’d been saving paper towel tubes for use as columns for months.

This piece of the set is mostly made from spray paint, old Amazon Prime boxes, masking tape, and crayons. One can accomplish a lot with these simple tools if one drinks a lot of cheap coffee and mainlines Science Friday podcasts in the basement at 4:30 AM on Saturday before anybody else in the house is awake to bother you.

001

It’s all set up on my workbench down in the basement. Sparky’s stuck into the scene for reference purposes only– he doesn’t show up in the final shot.

Next, I start duplicating pieces of the background arches to hide the basement in the background. Sparky disappears behind a piece of background created straight-on in another shot and deformed to match the perspective of the arch behind him. Apparently I wasn’t happy with that blue pennon on the right sticking out, because I replaced it with a duplicate of the pennon on the left.

003

Continue to fill in background pieces here and there, making sure there aren’t any gaps and the perspective and lighting more or less match.

004

My basement is slowly disappearing as I copy and paste pieces of virtual cardboard into the background. All throughout this process I’m making little tweaks with Photoshop’s cloning and healing brushes too. Also dodging and burning as appropriate and redrawing crayon lines where needed in an attempt to keep the artwork as organic as I can.

Faking shadows is really important, too. Lots of fake shadows with a bit of Gaussian blur on them help pieces of the set pop visually.

005

Here we’re finished adding background and a blue sky, which definitely doesn’t exist in my basement. Adjust the final lighting and paste in the LEGO gladiator. He’s a foreground element so he’s shot in a lightbox, isolated with Photoshop’s extraction tools, and then pasted in.

006

Aesthetics are far more important than reality in a venture like this, so darkening the archways was an important step towards achieving a pleasing image. As a final flourish, hand-draw the laurels on the red pennon with one of Photoshop’s custom brushes to simulate crayon.

So that’s basically how the inside of the cardboard Colosseum was made; repeat that basic process for about 47 more shots and you’ve got yourself a video, buster.

The establishing wide shot of the Colosseum is another matter entirely. It’s not so much Photoshop as Autodesk Maya. First, a background plate so I can get the perspective close enough.

standin

I’m using the Lincoln Logs can as a stand-in for the final Colosseum.

Photoshop’s warping and lighting tools leave something to be desired, so for this shot I created a rough 3D model in Maya and then mapped the cardboard textures onto it.

wireframe

The 3D model is just a little too perfect (and stable-looking) when it’s rendered out, so the Maya image gets pulled into Photoshop again for tweaking, slicing, and dicing. I blow out the saturation and move some background and foreground elements around, too. Note the addition of a d20 in the foreground. I loves me some gratuitous icosohedrons.

That electrical outlet isn’t there in real life, either; I added it to improve the final composition and set the scale of the scene in the viewer’s mind.

opening

Thanks for reading this far! If you haven’t already done so, please back the Faire Play 2 Kickstarter. With your help, I’ll be able to take the budget for the next Kickstarter video well into double digits.

D’Oh! Almost forgot to mention! Those capitals and plinths on the paper towel tubes that turn them into Ionic columns? They’re available for free download right here. They’re printed in Filabot’s Carbon Fiber ABS, which makes them nigh indestructible and probably overkill for an application like this, but then again I’m a belt-and-suspenders sort of hominid.

Also, Coco says hi.

column

Meow!