Back Original

Orb of the Pact Keeper

If you just want to see the finished product, skip down.

Happy Halloween!

This week, my D&D group had a special one-shot; given the occasion, we were asked to come in costume. I started with just two costume pieces for my character, T’paa:1 an old cloak I had from a theatre production, and 3D-printed chain-link circlet.

That didn’t seem quite enough, so I reviewed my resources. I found:

So I decided to make T’paa an arcane focus. This article is “the story”; all the software and 3D design I have done for this project are in the public domain, and are available at https://cceckman.com/r/tpaa.

Material components

In D&D, a spellcaster can use an arcane focus in place of material components when casting a spell. A wizard’s staff or wand is the typical example, but an orb (e.g. crystal ball) or rod (favored by Harry Dresden) are also options. I pondered a bit; then went with an orb

Size: Tiny

All the buttons, LEDs, and connectors are on one side of the Circuit Playground’s PCB. I figured I’d put the board centrally in the orb, and shine the LEDs through the upper half. The first version of the design came together pretty quickly.

The lower hemisphere had a hole for the battery, a channel for the battery cable, and a pin for each hole on the Circuit Playground. The pin has a “standoff” section, larger than the hole, and a higher “pin” section to pass through the hole; the standoff section supports the PCB slightly above the hemisphere’s “floor”.

I divided the upper hemisphere in two, down the center line. My thought was that each hemidemisphere could flex or rotate inward slightly to activate the buttons on the Circuit Playground. I included a cut-out for the JST socket on the Circuit Playground, which I found was the highest point; this let me keep the “roof” of the electronics compartment low, closer to the buttons.

Both hemispheres had a solid main body with an additional “lip”, to form the electronics compartment. The lips have a total of eight small notches in them, to allow magnet wire to pass through. Finally, each hemisphere has a few square holes in it, forming two squares that transit the equator. These allow the hemispheres to clip together…

…via two button-like clips that press in at opposite ends. I parameterized the design for either two or four of these clips, but only printed with two.

Uncommon (+1)

To the library! I sliced the model, loaded the gcode, and set a 3d printer running.3 The print went smoothly, but the aftermath was less pleasant.

I had sliced the design with each sphere “round side up”, i.e. with the printer bed at the equator. I had set the slicer to use grid supports, so the cavity of each hemisphere had a lot of material to remove. And I had to be pretty careful – the lower hemisphere ’s fill was interspersed with the pins/standoffs. Still, I managed to get the parts cleaned off…

…only to find they wouldn’t fit the electronics.

The largest problem was fitting the Circuit Playground. I thought I had used the hole-to-hole spacing from the Circuit Playground datasheet. However, I had just guessed at the angle of the several holes. It seems both the distance and dimension were wrong – the Circuit Playground simply would not fit on the pins.

While I was cleaning off the hemispheres, I found a nice gold-metallic filament for the clips, and set it running. When they came off the printer, I found the hemispheres did clip together well:4

I had been careful with adding tolerance to the clip holes. I wanted the holes for the clip’s pins to be slightly larger than the pins themselves, but only on the “outside”, away from the axis that runs through the clips. That way, the clips could flex out slightly, but would provide a little tension/friction to hold them all together. And it worked!

I had not added tolerance to the battery compartment, though, so inserting the battery was a bit of a squeeze. And, the split of the upper hemisphere was not very effective: the halves could “wobble”, but I realized without a more careful lip / standoff design they wouldn’t contact the Circuit Playground’s buttons.

Rare (+2)

I had just enough time to do a second run of the hemispheres, with a slightly revised design.

To fix the pins, I realized I didn’t need a pin for each hole in the Circuit Playground. I could put a pin through the leftmost and rightmost holes, and have a couple just-standoffs to keep the Circuit Playground from rotating.5 In this case, “a couple” means three: one under the USB connector, and two near the JST connector, next to the battery-cable channel.

I pulled out my trusty calipers: 0.125" for the holes, 1.950" for the distance between the holes’ outer edges, so a center-to-center distance of 1.825". I added some ease tolerance to the battery compartment, and joined the upper hemidemispheres into one hemisphere.

Finally, when I sliced the new models, I switched the orientation to put the equator up, and turned on “organic supports.” My hope was that this would make the supports easier to remove. I didn’t re-print the clips: I hadn’t changed any of the relevant parameters, I liked the ones I had.

The second-revision hemispheres fit great! The Circuit Playground fit perfectly onto the pins and standoffs, and the battery dropped easily into its compartment. The battery-wire channel turned out to be unnecessary: the battery’s wire had to run in the space made by the standoffs in order to make the distance. But there was just enough space for it to make it to the JST connector.

I had set the upper hemisphere to fill to use the “lightning” pattern, to avoid the LEDs needing to shine through extra material. It worked pretty well!

It was at this point – after about four hours of print time – that I realized the resemblance to a PokéBall. Oops!

Concentration

Most of the “organic supports” were easy to remove with a knife. But there was a lot of material left near the extremum of each hemisphere – the result was a little flatter than I wanted it. I had expected this, and planned on running over it with some sandpaper to smooth out the shape.

That was, it turns out, not a great plan.

I started with a coarse (80 grit) sandpaper. With that, I promptly broke off sections of filament from the top of the sphere, leaving a scar that no amount of sanding could truly address.

A 120-grit sandpaper, and more careful directional control (slightly diagonal to the grain), got more of the effect I wanted. That, and more patience.

Within the time I was willing to spend on it, I wasn’t entirely able to get the top hemisphere to be spherical. I’m not entirely dissatisfied with the uneven finish, but it’s not really what I’d intended or envisioned.

Very Rare (+3)

I had just enough time to do another print run and fix a few of the previous issues.

Inverting the spheres had been a bad move; though cleaning out the supports in the first revision was annoying, it’s fine to leave the inner surfaces a little poorly-finished or scuffed. Smoothing out the spheres is a lot harder.

In the third attempt, I took a third approach. I split the sphere into three parts: upper and lower hemispheres, and a central electronics compartment. Each had a flat surface, so they could print flat on the bed.

I tidied up the electronics compartment. I got rid of the misplaced channel for the battery cable, and instead made the battery compartment half-depth; this was enough space for the cable to sneak out and connect to the JST plug.

I also changed the shape of the clips to arcs, to get rid of the PokéBall resemblance.

The clip design still needs some revision; it does not hold the parts together as well as “button” clips. I tried to address this by gluing the lower section to the electronics compartment… and then dropped the whole thing, breaking the glue bond, just as I was leaving for my session.

A more magic item

As a prop, sure, an orb is fine. But this is a magic item: it has to light up. Luckily, I’ve been blinking Arduino LEDs since I was Lexi’s age; though it turns out I had a lot of Arduino conventions to review!

Range: Touch

The Circuit Playground examples include one using the GPIO pins as capacitive sensors. That is, the pads around the edge act like a touch sensors, and can be used as buttons.

I liked this idea a lot! I lined up the eight pads with eight of the LEDs, and created an accumulator for each. Touching the pad would quickly “charge up” the corresponding LED, and leaving the pad untouched would slowly “drain” the LED. I figured I could use a “fully charged” LED to trigger a spell.6

What does “trigger a spell” do? Well, the onboard speaker can play a square wave; I could have a melody for each spell. Data-structure wise, this is pretty simple: the spellbook is an array of such melodies, each melody being an array of tuples of (pitch, duration). Or going in the other direction, tones compose tunes in the tome.

I didn’t fully wire together the “charged LED” and “spell tune” halves of the code. Instead, as a prototype, I used the Circuit Playground’s slide switch to select one of two spells, and a button to activate the spell. The eldritch blast tune is just a few low-pitch pulses, evoking the multiple bursts of force the spell produces. The other tune, many folks my age will find familiar.

Somatic components

I liked the LED effects in the prototype, but as the physical design progressed, I realized:

  1. the buttons would not be usable while the focus is assembled
  2. the GPIO pins would need additional circuitry to bridge to the outside

I wasn’t going to be able to do anything about (1) without more design time than I had. I figured I could address (2) by running magnet wire to the outside surface of the sphere, extending the button’s capacitive “domain” to something I could touch. But I couldn’t find any magnet wire in brick-and-mortar distance, and I able to get the wire and hook it up and reprogram before my session.7 What other inputs could I use?

The Circuit Playground has an accelerometer! I wrote some code to classify the orientation into one of six orthogonal vectors (up, down, left, right, forward, backward), and a little bit more code to keep a history of the last few orientations.

The “up” (default) or “in between” orientations, I assigned an idle animation: blue and green LED channels gradually fading in/out.8

Relax. Nothing bad is going to happen. I don't even know Explosive Runes.

I also assigned each school of magic an “incantation,” a sequence of positions that would activate it. Each incantation terminates with “forward”, the position in which the Circuit Playground’s LEDs face away from me… and towards my fellow players. Each school also got its own color / LED effect, and its own tune.9

Audio contains noise as well as music. Sorry-- my cat was playing with some fabric.

Legendary?

What’s next?

Well, this is probably going to sit on a shelf until next Halloween. I might try to add the magnet wire as a third control mechanism.10 The model, especially the clips, could be cleaned up. But I’m probably just going to leave this on a shelf until next year.

This whole project is quite similar to the one that I originally got the batteries for, which makes me optimistic that I can knock that out soon. Stay tuned!

If you want to make one of these, or have advice for the next revision, drop me a line!