Category Archives: The Forge

Yaaar! Here there be décolletage.

So, to recap for those among you who don’t breathlessly follow the twists and turns here at the blog, I’ve been working feverishly on finishing parts of pirate costumes for myself and for the lovely and talented Mrs. Zheng3. Here’s the latest: it’s a Arduino-enabled pirate pendant.

Heads up for readers under the age of 18: this post is rated arrrrrrrrr.

pendant

hurrr durrr heavin bazooms

You can Grab the model and the code from The Forge if you want to give this a go on your own. You’ll need a few other things gathered from around the Internet:

Casting the skull in resin

This pendant presented an opportunity to demonstrate once again that Everything’s Better With Skulls. In hindsight the better solution to this would have been to purchase some transparent PLA and charge forward with a 3D printed skull, but I’d been wanting to try some molding and casting after a couple months’ worth of nonstop 3D printing with Kickstarter backer rewards fulfillment.

(Pro tip: There is no surer way to suck the pleasure of experimentation out of 3D printing than to turn your basement into a production facility with hard deadlines.)

Print the skull as a positive, glue it to a piece of cardboard, and use some Oomoo and a plastic cup to create the mold. The white cruft on the positive is regular old silicone caulk used to smooth out the 3D printing lines before casting.

skull

A few hours of curing later and the mold’s ready.

3dprint and mold

Like all good projects this pendant has been a series of compromises, trying to cram lots of objects into a small, wearable volume. To that end, the skull’s got a fairly low profile, and fitting a pair of LED’s into the space behind the eyesockets requires a little bit of finagling. You can file down the tips of LED’s and they still work just fine. Don’t breathe in the dust, though.

file down LED

Once the LED’s are soldered together in series they can be suspended in liquid epoxy. Mixing up epoxy resin is generally an easy-peasy 1:1 operation but it might take a couple of tries to get the dye proportions correct. Too little dye results in anemic color. Too much and your resin never cures past the cold maple syrup stage.

LEDs in mold

cast skull

Stealing and modifying code

The entire casting process takes a day or two to finish, but it’s mostly sit-around-and-wait-for-things-to-harden time. So while chemical reactions be combobulatin’ in the basement there’s plenty of time to print the pendant body and program the Trinket. Nothing fancy here, just some basic PWM on pin 0. The exact values require some tweaking to get a suitably menacing fade in/fade out of the LED’s.

The code is in the zip file along with the 3D model if you came here looking for info on PWM in general.

pwm test

Charging the battery

First, go grab yourself a Micro LiPo Charger from Adafruit.

warningJST connectors can be difficult to plug and unplug, so I homebrewed a male-female connector out of some headers I had kicking around in the toolbox. BE CAREFUL WITH THIS, especially with LiPo batteries. You do not want to accidentally swap your polarity, overheat the battery, start a fire, and incinerate your family and pets.

lipo charger

Or maybe you do. You monster.

seriously brah you should probably just go read this LiPo safety guide right now.

Again, we want to keep the profile as low as possible so rather than solder a female header directly to the Trinket the headers are soldered to wire and then attached to the board. This allows connections to be moved off to the side when vertical space is at a premium.

crammed

It all fits in there– the battery’s tucked underneath the Trinket. Be careful that you don’t puncture the battery casing with a solder joint when you press everything together. Punctured LiPo==bad gnus. (You read the safety guide, right?)

The back of the pendant press-fits onto the body, but unfortunately I didn’t have the foresight to include an off switch. You’ve got to plug and unplug the battery directly. Next time, maybe.

On the plus side, the battery will run for hours and hours on a full charge. The exact runtime is left as an exercise for the reader.

Adding surface detail

Again with the caulk, smoothing out all the cracks and joins in the multi-part print.

caulk

We can’t very well have the lovely and talented Mrs. Zheng3 wearing a caulked-up bright blue pirate pendant with the rest of her Halloween costume, so we bust out the gold leaf and an hour later we’ve got this:

gold leaf

The shiny gold’s juuuuuuuust a little too fancy for our pirate lass, so quick wash with some diluted black acrylic paint is in order, and we’re done here.

distressed

The Trinket has about a half dozen more free pins than this project requires, so if we ever get around to designing version 2.0 we can put some sensors in and turn this pendant into jewelry that reacts to its environment. I’ve been having some fun driving servo rotation with multiple-microphone input for Plutarch the pirate parrot, so #staytuned for something along those lines.

Lao Zheng out.

Arduino Audio with the WTV020SD-16P

There are plenty of ways to play sound on an Arduino– at the most basic you might burp out some bleeps and bloops with the tone() command, or perhaps drop some coin at Adafruit and get yourself a multifunction music shield.

Our current passion project at Zheng Labs is an audio-enabling upgrade to Plutarch the Pirate Parrot. For this application neither of the above options will quite fit the bill. We want a board that’s inexpensive, light, and small enough to fit inside a roaster chicken’s body cavity while leaving room for a battery pack, microcontroller, and an ever-increasing number of servos.

Enter The WTV020SD-16P. ‘Tis a picky, tricksy little board, but once you get it up and running it’s scrum-diddly-fun to use.

rex

#RAWR! you can download Rex for 3D printing over at the Forge.

To the tutorial!

GATHER YOUR PARTS

  • a WTV020SD-16P
  • a SanDisk 1GB MicroSD card: apparently the WTV020SD-16P can be a little picky about which brand and capacity of MicroSD card will work.
  • a speaker: This one comes with micro-JST connectors, which you can just snip off and plug into your breadboard. I soldered some jumper wires onto mine to make working with the breadboard easier.
    some jumper wires

And of course an Arduino and a breadboard. I dusted off an ancient Duemilanove for this project, but I’d imagine any Arduino will do.

GET THE SOFTWARE

You can get the sample code and the software library you’ll need at the Arduino forum.

Oh God. Forums.

I can’t be the only one who dreads wading into technical forums seeking assistance. In my experience one can find tiny nuggets of precious content only by softing through the dross, dregs and slag of misinformation, know-it-all-ism, and half-baked do-my-homework-for-me questions IN ALL CAPS from engineering undergrads in Gdansk.

Every now and then a patient, knowledgable member with a willingness to shepherd a n00b through a confusing and contradictory information maelstrom will emerge, but more likely than not a cheeto-crusted basement dweller will snidely inform you that a B+ in Electrical Engineering 101 at Carnegie Mellon is a prerequisite for posing a question to your betters.

Thankfully, the Arduino forum’s friendlier than most, and it’s a decent place to start looking for information about the WTV020SD-16P. There’s still a lot to unpack and sort out before you get your board talking, though.

Once you’ve gotten the sample code from the forum you’ll no doubt come across this image in all its JPEG-compressed glory. It’s the second post on the forum. You can’t miss it.

schematic

I can’t stress this enough: do not use this image as your Virgil to guide you through this particular circle of Arduino Hell. There’s nothing inaccurate about it, but there’s too much information here for those who want to just plug this thing into an Arduino without having to first procure an EE degree, and some of it is misleading.

This schematic will get you a WTV020SD-16P that works in standalone mode with some pushbuttons, to be sure, but if all you want to do is control the board with Arduino code this wiring diagram is overkill. For one, the pins in this schematic don’t match the pins specified in the sample code right above it, which is one of those Things You Don’t Know You Don’t Know if you’re just starting out.

My edited schematic is a little simpler and balls-on accurate, I promise. Behold!

schematic simple

You’ll note that the sample code includes a declaration for a Busy pin. It’s used for asynchronous audio play but we’re keeping things simple and not using it in this tutorial. Also, you’ll see several pins on the WTV020SD-16P labeled as NC: they’re Not Connected to anything and can be safely ignored.

If reading schematics ain’t yo thang, here’s what it looks like IRL:

wiring

To recap:

  • Arduino 3V3 to pin 16 (top right of the board)
  • Arduino pin 2 to pin 1
  • Arduino pin 3 to pin 7
  • Arduino pin 4 to pin 10
  • Speaker + to pin 4 (usually this is the red wire)
  • Speaker – to pin 5 (usually the black wire)
  • Arduino GND to pin 8

ACQUIRE AUDIO:

You can download the commonly used sample .ad4 files here, or use mine which IMHO are better for diagnostics and have the added benefit of not dancing on the knife’s edge of fair use and international copyright law violation.

If you’re visiting the blog from abroad you also can use my files to learn what a nondescript northeastern American accent sounds like. No charge.

Unzip the archive and drop the files into the root directory of your FAT16-formatted MicroSD card. Files must be named 0000.ad4, 0001.ad4, 0002.ad4, etc. The WTV020SD-16P supports up to 512 audio files, which should be enough for all but the most loquacious of parrot puppets.

Creating your own .AD4 files from WAV or MP3 of AIFF is brain-dead easy with this OSX tool, but you’ll need to install the JDK first.

Be sure to have your source audio sampling rate set at 32kHz or the software won’t produce any output and (not helpfully) any error messages indicating that there’s a problem.

SOFTWARE:

On OSX, drag the library folder into ~/Documents/Arduino/libraries/

The sample code on the forum shows off everything the library can do, but it’s too much for a proof of concept and has some English errors that introduce ambiguity in the comments. Let’s do some minor surgery.

  1. Cut out everything in between the curly brackets of the loop() function.
  2. Paste the following between the now-empty curly brackets after loop():
int r=random(0,6);
wtv020sd16p.playVoice(r);
delay(1000);

Power up your Arduino, upload the new code and you should be good to go. Good luck, and please post in the comments if I screwed anything up in the tutorial.

Watch this space for news on Plutarch 2.0’s evolution over the next few months. He’s scheduled to debut on Halloween 2017. You might consider watching his progress on Instagram or Twitter: that’s where the microupdates get posted first.

Lao Zheng out.

You’ve Got Fail!

TLDR; I released suspect geometry into the wild. Also 3dprinting.fail is now a thing.

failed citadel

Despite rumors to the contrary, it’s not all mimosas and backrubs here at Zheng Labs. There are times, thankfully few and far between of late, when we fail to make the proper sacrifices to the 3D printing gods and models go kablooie on the print bed.

To wit: these Eyrie caps that bought the farm before they could reach their full potential.

eyrie cap

The bottom surface of the Eyrie cap is a thin circle and occasionally won’t adhere to the build platform. Double woe if one gets ambitious and prints multiple models at a time; one failed print can catch on the extruder nozzle and get dragged into its doppleganger, causing a calamitous cascade of failure.

The printer, being blind, deaf, and completely lacking in agency besides, has no idea that this failure is happening and if left to its own devices will merrily continue extruding hot plastic into thin air.

Fail.

A quick primer on 3D printing for those of us who don’t live and breathe this stuff. One can break the process down into three basic steps, about which one could proceed to write volumes of details.

Step 1: Creation! By some mystic means, a 3D model is created. My weapon of choice in this arena is Autodesk Maya because I use it in my day job, but there are scores if not hundreds of software packages that will export a 3D printable model. Amazingly, even Minecraft can do it with the right mods. Tell your nine-year-old niece.

Step 2: Slicing! Before it can be printed a model must be divided up into a vertical series of horizontal layers. If you’ve accidentally introduced wonky geometry in Step 1 the slicing process will create toolpaths that kinda work, but might result in a less-than-optimal print in the real world. More on this and a mea culpa in a bit.

Step 3: Printing! A tireless bot with a melted plastic-filled hot glue gun draws successive layers on top of each other. The plastic cools and before you can say Bob’s your uncle you’ve got a brand new Dice Citadel. Usually it works, and sometimes this happens:

The reasons for print failure are legion, but I’m guilty of letting an avoidable one slip through my quality-control network with the Classic Citadel. Back to slicing and the aforementioned mea culpa:

Here at the lab our preferred slicing software is Cura. Cura has been churning out perfectly usable G-code for months and I’ve printed dozens of citadels with nary a problem. But here’s the rub, mein grübenses: not everyone out there uses Cura.

Printing problems started cropping up once the Citadel was released into the wild. Users of slicers Simplify3D and slic3r were shocked to find that their printed citadels, walls too thin to withstand an assault even by Marshmallow Mangonels, were crumbling to the touch– see the photo at the top of the post.

Mea maxima culpa, I really should have run the models through several slicers before releasing them. Parallels may easily be drawn between the current state of 3D slicing and the early Web when different browsers would render the same HTML in completely different ways. 1996 was a great year for flannel, but damned if I enjoy the return to crossing one’s fingers and hoping that WYS is truly WYG.

Wizzywig. Now there’s a term I’ve not heard in a long, long time.

But! Thanks to the heroic and dogged troubleshooting efforts of Strongholds backers Chris Yohe and Nate Johnson, the problem’s been fixed as far as I can tell. I’ve uploaded a new Citadel to Pinshape and alles gut. Print, my friends. Print LIKE THE WIND!

Other backers have been busy printing Eyries and plinths a-plenty. If you’ve got a print you’d like to show off to our little tribe of medievalists, send it my way.

backer prints

Unexpected creative output: There’s plenty of downtime to be filled while the printer is producing Citadels and Eyries for physical rewards backers, we’ve been thinking about failure a lot lately, and here at Zheng Labs we’re certainly not ones to let a good domain name go unclaimed.

So I went and registered 3dprinting.fail, polished up my JavaScript-stealing chops, and made a nice slideshow of some of the spectacular messes my printers have created over the years. Tell your friends. Tell your mom. Tell your mom’s friends at the next euchre tournament.

beast fails

(That model’s a Beast Token and you can grab your own at The Forge.)

So! That about covers it for this week. Back to printing backer rewards and obsessing over the Next Thing. Here’s another wee teaser for that project, which I’m hoping to release within a month or so:

wee

Who loves ya, baby?

Lao Zheng out.

I gots new models on Etsy, yo

Kickstarter preparations continue at their frenetic ground-pounding pace here at Zheng Labs. The 3D printers whirrburble day and night, we hear camera shutters flutter in our sleep, and we’re driving the kobolds as hard as half-rations and flickering torchlight allow. We’re sure to hear from Humanoid Social Services if we flog the scaly little bastards any harder.

When last we left our heroes they’d just announced the sale of Dice Citadels on Etsy, and now we’ve got another RPG-related opus out there in the marketplace. Witness for yourself the power of this fully operational RPG Dice Plinth!

plinth gid

This one’s printed in ColorFabb Glow-In-The-Dark PLA/PHA, which is fast becoming my favorite filament. We’ve got ’em in Slate Blue, too. They’re both compatible with Chessex-style dice boxes.

plinth slate

Longtime followers of Zheng3.com will note that these dice plinths are remarkably similar to Dice Plinth 1.0 but there are two important differences to be noted:

First, and I realize this is getting a little deep in the weeds for 95% of the audience, the geometry on the new plinths is way more elegant. It’s been completely overhauled to minimize slicing and printing errors. No wonkiness in the STL, as far as I can tell.

Second, and this is where it gets exponentially more interesting, Dice Plinth 2.0 features a hidden chamber underneath a hinged trap door!

trapdoor closed

The secret compartment is spacious enough to stash a little cash for gaming night. Bust out a Hamilton and summon some mozzarella sticks, baby.

trapdoor open

So! With the completion of the dice plinth I’ve got a couple of backer reward levels done and tested, with solid gCode backing them up. You wouldn’t believe the amount of filament retraction troubleshooting that’s been going on over here.

oh gawd the filament retraction troubleshooting

All that remains now is to make the Kickstarter video, write the copy, and throw this project down on the front step and see if the cat licks it up.

Also I have to get around to designing that tiara I promised. Pinshape! Haven’t forgotten about you guys. Tiara’s gonna RAWK, trust me on this.

#staytuned, my friends. Join the Horde, too, while you’re at it.

Lao Zheng out.

Complicated Selections in Maya

Sometimes geometry comes into Maya with difficult tessellation; the original designer might have never intended the model to be edited in the first place, or, more likely, was a lunatic.

Take, for example, this knurled surface by aubenc (not a lunatic, AFAIK) on Thingiverse. All those edges on the top surface N-gon trace to a single vertex. Performing an extrude on that top surface is going to get messy and difficult to deal with down the road.

ugly

So, how to delete that collection of edges and replace with a nice clean N-gon?

There’s always the brute force solution, hand-selecting each edge by picking them with the selection tool. This’ll work, but it’s tedious and one always runs the risk of accidentally selecting an edge somewhere else on the model.

I can’t count the number of times a stray edge got accidentally beveled because I selected it this way.

Sometimes it’s possible to switch to an orthographic view, drag-select all the edges on a face from the side, and then CTRL-select the edges you dont want from the other side.

select side A

deselect side

This technique will work with a model that’s oriented nicely along the X and Z axes like this knurled cylinder, but what if you can’t get a clean orthographic selection? Like in this (admittedly fabricated for the purposes of this blog post) case? There are no guarantees that a model you find out there in the wild is going to be well-positioned by the time you get to it.

bad orient

Here’s where Maya’s selection conversion tools become astoundingly useful. First, switch to perspecive view and hit F9. This will put you into component selection mode. Select the single vertex that is common to all the edges you want to delete.

single vert

Hold down the CTRL key and then hit F11. This will convert your vertex selection to faces. (CTRL-F10 will convert to edges, by the way.)

Right click and use the contextual menu to switch to face selection.

context

Hold down CTRL again and unpick the faces that you don’t want in your selection.

faces selected

Then delete the unwanted faces.

border edge

With most models, Polygon-> Fill Hole will give you a nice, clean N-gon if you select a border edge before applying it.

clean

With some fiddling and fuddling and boolean magic, Aubenc’s model became the base for the thumbscrews in Zheng’s GoPro Gubbinses.

Zheng’s GoPro Gubbinses

(Free download, it’s in The Forge, support Open Source design by throwing me a bone yadda yadda yadda.)

The Forge 2.0

Too long has it been since the last post here at the blog. Well, there was yesterday’s short fiction about Milton, but that was just an amuse-bouche while I got the last of the unruly ducks in a row on The Next Thing.

So! The Next Thing.

After digging into forgotten tomes of PHP lore and dusting off my HTML and CSS (it’s amazing what one can do with CSS and HTML 5 these days) and taking my first tentative steps into SQL (ye Gods, people make a living programming this? poor bastards), and hacking away at .htaccess goblins and DNS bugbears I’m thrilled to announce The Forge, version 2.0.

It’s still located at forge.zheng3.com. Any links you might have to individual pages in Forge 1.0 will still work, but won’t be updated anymore. It’ll take me a few days to get the redirects up and running.

Milton the Parasaurolophus is the Forge’s inaugural model. He’s a kinda-sequel to Robber Rex and Pip’s Print-in-Place Perambulator. The Island of Catan at Zheng Labs grows ever more thick with low-poly dinosaurs.

Some of the lamer models (cough)shaolinspadewacomnib have been culled from The Forge, and the upload process is much, much more straighforward on my end. My goal’s to reduce the time and fuss required to get a model file from my desk to yours. I’m not 100% thrilled with the way the Forge displays on mobile yet, but it’s functional enough and honestly, there’s only so many hours in the day to attend to every little detail.

I’ll put a B-team of kobolds on it, and maybe it’ll get done someday.

All this Forge work has slowed the production of new 3D models, but the ideas have been piling up in the hopper over the last six weeks. I’ll try and get to them ASAP and we’ll see just how powerful this fully armed and operational 3d model sharing site really is.

As always, #staytuned, friends.

2015 Seej Starter Set Released!

The duergar have toiled in The Forge for months, taking only the briefest breaks for food and drink, hammering out new prototypes daily in preparation for this morning. Exhausted, exhilarated, they present a gift for you.

Oye! Oye! The 2015 Seej Starter Set bursts forth from its bonds!

seej 2015 4x3

Download it here, as a pay-what-you-like download; throw Lao Zheng a $5 bone and we’ll keep the Open Source designs a-flowin’. These models don’t make themselves, y’know.


Much labor, playtesting, and re-engineering was poured into the 2015 starter set, incorporating a great deal of community feedback and addressing many of the original models’ shortcomings.

First and foremost, the interval between downloading the models and playing a game has been shortened considerably. The geometry is streamlined and efficient; the entire 2015 Seej Starter Set is contained in a single megabyte. The Seej engines and bloxen are relatively quick, uncomplicated prints with plenty of surface area to assist with bed adhesion.

The catapult’s been reduced to six individual pieces, three of which are identical dovetailed crossbars. Flagrant stagecraft alert: there’s a piece of hookup wire holding the catapult arm in place.

stonemonger

The throwing arm now articulates directly with print-in-place cams, resulting in a far more accurate and deadly device than the first generation catapult. The faux wheels on the side braces lift the butt of the throwing arm off the ground, allowing it to swing freely for maximum momentum.

The atlas on the original catapult is no more; a little bit of engineering has moved the arm’s pivot center so that it lines up directly with the topmost crossbar at the end of its arc.

We’ve given up on throwing coins and instead have switched to 14mm marbles (A d20 will work nicely in the catapult’s cup, too.) Make sure you have a glazier in your contacts list, because even a ricochet with one of these marbles can crack a window. Eye protection is strongly recommended.

The improved force and accuracy of the new catapult required more robust defenses, so the bloxen now interlock on five sides. They should snap and unsnap with a minimum of fuss. These new bloxen make dandy building toys even if you’re not playing Seej.

Rules for Seej are, as always, at s33j.net.

Have at thee!