Wednesday, November 30, 2016

Bird

I can stumble through a tune now on the fiddle.

I take it to work with me. I don't always get the two scheduled breaks, I can't always practice on those breaks (sometimes I need to use the time to make a call or have a snack or something), but I still average fifteen minutes of practice every day.

Not a lot. But that's every weekday, plus I pick it up at least once on the weekend. And it adds up, bit by bit. Eventually even Diamond Mountain gets ground down.

Now all I need is more things with a good Bird Quotient. Unfortunately programming and writing don't make it. Fifteen minutes isn't even enough to figure out where you left off.

Tuesday, November 29, 2016

Stark Envy

There is a lot to envy about Tony Stark. But what I mean in this case...well, several scenes (in the first movie especially) sum this up well. He's in his man cave, elbow-deep in the high-tech equivalent of grease. He's unshaven, he hasn't eaten, he's pretty much only keeping himself going on beer and hard rock.

But he's still going. He's thinking, he's innovating, he's building.

I can get about four hours at a stretch. Maybe six hours total in any given day. The rest of the day I'm spinning my wheels. I can stare at the screen or sketchpad, shove my nose into the books...doesn't matter. That four to six hours is all that I have available to actually, creatively, problem-solve.

Last night I got hauled off to an unexpected rehearsal. Before it started and between acts I worked on the misbehaving Holocron software. It took me something like an hour of actual hands-on-keyboard to see where I'd screwed it up this time.

There's a flag that sets the pulse direction, up or down. Two blocks that test for flag condition then execute various things (mostly, setting a new target value for the LEDs, either max bright or min bright). Oh, yeah. And when everything else is done they flip the flag.

Except I was getting worried about undefined behavior in some of my "if/else" loops. So I switched out the "else" block for an implicitly defined "if" block.

Strip out everything else, all the interior loops and tests and function calls. What did I just create?

if (toggle == 1)
{
toggle = 0;
}
if (toggle == 0)
{
toggle = 1;
}

Yes; in this case, "if/else" was a better logical construct, exactly because the "else" statement isn't evaluated. It doesn't run unless the conditions to run the "if" statement are false.

And that's the sort of stupid error I'm trying to fix in my Holocron software. Because most of that work has not happened in those four golden hours, but during time when I'm struggling to try to concentrate at all.

Sunday, November 27, 2016

Ozzie who?

A quiet Sunday morning. Will be meeting friends for brunch in a few hours. I put on some coffee, grabbed the apple turnover I purchased on impulse yesterday at the bakery cafe across the street, and flipped a Wes Mongomery CD from my binder of random jacketless CD's into the player a neighbor gave me when she moved.

And...perfect. Sunlight is breaking through the overcast, there's just the slightest nip of fall in the air, and I've got the day off to relax. I'm happy.

This is what we give thanks for. These moments of grace. It is never the life you expected, certainly not the life you planned, but it is the life you have and, all in all, it isn't bad.

I've been lucky enough to travel a little, and there are certainly those moments of awe and those moments of connection with the rest of humanity. I've spent much of my working life in live theater and have had the experience of being part of creating those moments when the emotions and the lighting and everything comes together and time stands still at the cusp of that final chord. But I am especially thankful that I have family and friends, and as wonderful as the times of lively debate are those moments of quiet comfort when everything that really needed to be said is already said.

Rich or poor, sickly or robust, farmer or philosopher-king, eventually we are all Ozymandias, the legacy of our life but a pair of broken and confounding feet. So treasure those moments of grace. And it is not a bad thing, either, to live your life in a way that allows them to happen to others. Share kindness, and friendship, and love. Share music and art. Know that in the simplest act of boarding a bus or serving a cup of coffee you may be part of some other person's perfect moment. Take pleasure in the pleasure of others because, that, too, is a moment of grace.

Thursday, November 24, 2016

Whadaya mean, "too sensitive?"

Monday I did a long workday, went to the gym, worked on the Holocron, went out for dinner, and still had time for a few minutes of fiddle practice.

Tuesday I was sore, nor did it help that I had to climb the walls of the theater (pretty much literally, using rock-climbing moves up the unistrut to get to the things I needed to adjust). But still got the Holocron work and the fiddle practice in.

But I am so glad Wednesday was a short day and the next four days are off work.



I needed to dial in the sensitivity on the touch sensor before I moved on to the last parts of the software. And that took four days. And the solution is a software cludge. 

The theory is simple. Let current leak through a high-value resistor into the parasitic capacitance around an input pin and associated antenna until it charges and trips the pin. Measure the time; that's the total capacitance. 

A human body in contact with, or even close to, the circuit changes that time and you can thus detect it. I can get the circuit to detect a hand moving six inches away.

But not in a stable way. The values fluctuate too much, including the sensitivity climbing up steadily over time. The touch I'm looking for is getting lost in the noise.

And two other problems. The sensor wire is inside a sealed acrylic cube. So the ground floats when it is used in battery mode. And the sensitivity goes way up when it is tethered via USB. So my software cludge looks at the detect events and if they are way, way above the default threshold it assumes the Holocron is on USB and flips to the higher threshold setting. And I'm forcing auto-calibration at frequent intervals. And I'll probably write in a masking routing to prevent trips from coming too close together.

(That's more RTOS stuff there, of course. The Holocron is constantly feeding illumination level and color updates to the neo-pixels, meaning you have to use counters and/or interrupts instead of relying on delay() to tweak the timing.)

On to a new "Talk" animation, and take at least a weak swing at the user programming buttons. I've got the first six boards soldered up now and I have at least that many orders waiting to be filled. I'm glad I'm smart about this and have refused to accept payment until I'm ready to ship. (Because I still have to run out to the lasers to cut more pieces, too. At least the designing is finally done on that.)


Oh, and I just ran into the cutest hack on Hackaday. I'm already leveraging the fact that you can reboot the Holocron merely by tipping it far enough to activate the tilt sensor. But with a capacitor on an I/O pin, you can detect if the sleep interval was short or long. Meaning different behaviors depending on whether it has just been turned on, or if the user tips and restores.

And, yes, I was tempted to give up on the capacitive sensor and use this to trigger the sound effects on the "Talking" Holocron. But it made it a little too much like a Moo Can.

Saturday, November 19, 2016

Cold

It's cold out. Rainy also.

Good day to spend inside prop-making. Where I'm chasing down cold solder joints. Perhaps I need to scrub my PCB's before I start soldering on them. Or on the revised board (which I thought was complete until I thought of adding pins for a "talking" version), increase the annular rings on some of the critical pads.

No failure yet on any surface-mount component. But the hand soldering has thrown up two USB jack errors and even a couple of loose joints on the LEDs.

Oh, yeah. Talking. There's an Adafruit board that will trigger 10 consecutive (or random) sound files when a single pin is held low. Unfortunately they discontinued the version with an on-board power amp, which means I need to find space on the Holocron for two additional circuit boards. This, and even more ribbon cable, is so aesthetically displeasing I don't really feel like making this a standard option. After all, this is why I went through all the effort to make a single stand-alone board that combines charge management, USB hosting, and LED controller:


Also aesthetically displeasing is the sound. I experimented with the drivers I had lying around, and I needed to pump up to three watts into a quality driver before it could push its way out of the acrylic box and sound half-way decent. I've gone and ordered another of the surface mount transducers that failed me on the raygun project --


-- because anywhere else would create at the least a nasty shadow and possibly require a hole in the box as well. Besides, sound coming from a hole sounds like sound coming from a hole. It is a better effect if it sounds like the box itself is making the sound.

Pity I happen to know a little acoustics (and cabinet design). Because what this really calls for is a ported enclosure:


But that totally changes the look of the Holocron. And this is not a time to think outside the box. I've spent way too long refining on this particular box. It is time to brave the rain, visit the lasers and cut enough pieces to start shipping complete Holocron kits. (I have just enough to make one complete kit now, and I might assemble it myself just as a final check of the latest round of adjustments).

Or solder up the last of the current run of circuit boards. I stopped dead when I ran into odd USB behavior, but now I know what was going wrong and can fix it. I should probably solder up a complete "talking" Holocron before I order the version 1.1 boards, though. There's just barely space to put a couple more terminals for that...



(Oh, yeah; there's alternates. Best is go with Teensy and the Adafruit audio adaptor daughterboard for it. Skip USB hosting and in-place recharge and just put a string of Neopixels in for lighting. The Teensy does the heavy lifting of not just sound playback but DSP to equalize it. But that's costlier, still messy, takes up even more space, and requires I spend time programming.)

Bunny of the Week

The Great Pyramid of Cholula.

Under a 14th century Spanish Colonial church (a major pilgrimage destination) and covered with so much earth and other structures it looks like nothing more than a tall and regular hill lies a massive pyramid.

Begun somewhere around 200 BCE and built in stages over a thousand years, this elaborate pyramid complex is half a kilometer per side, larger in base and volume than the Great Pyramid of Giza, making it the largest monument in the world. Tunnels and passages wind through the structure; archaeologist have uncovered over six kilometers of passages so far. It is of course richly decorated, including fantastic murals, elaborate stone carving, and there are also multiple human burials.

And it is built on top of a cenote. Which, to add just that extra level of fantastic (something else I learned within the last couple of days) the distinctive cenote of Mexico's Yucutan Peninsula (deep circular pits where the surface has collapsed into massive limestone caves) are concentrated in a ring of shocked and fractured limestone that is itself a remnant of the Chicxulub Impact (the probable cause of the K-T extinction event of 68 MYA). These cenote are often connected in strings of caves, following the flows of an underlying aquifer which extends all the way to the sea.

Oh, yes, and just to put the Ancient Aliens firmly in the mix, an old name for the site is Acholollan (Nahuatl) meaning "place of flight." And, yes, the suggestion has been made that mysterious older inhabitants did just that. Perhaps their planet needed them.


So. Largely un-excavated (although quite well known and, like any ancient monument you've heard of, a major tourist destination), layered down through history from Spanish Colonization to late pre-contact to the height of the Mayan Empire to truly ancient caves to a catastrophe from tens of millions of years ago. Extending deep underground from the modern excavations to excavations by treasure hunters and seekers after building materials back through the Colonial age at least, to deep passages to natural tunnels to deep underground rivers stretching all the way to the sea.

And my only question is; why hasn't Lara Croft already been there to raid it?

Thursday, November 10, 2016

Powered by Brains

There has been a push since at least the Industrial Revolution to offload the rote work -- the repetitive, mindless tasks -- onto machinery. The Maker revolution dotes on this, and my personal props work has paralleled; moving to technologies that let me copy and paste details instead of sculpting them individually, using mills and other power tools to achieve desired surfaces instead of hand-smoothing them, etc.

The downside, though, of getting rid of as much of the mindless drudge work as possible, is you don't have mindless drudge work to do when you are tired, sick, it is hot and you just got off a long day's work, you only have an hour before you need to go off and do something else, etc.

I'm looking at a big task list for the Holocron orders right now. Sure, there's some sanding and patching, and some soldering. Those are mindless; I sanded the last one over a couple evenings while watching YouTube.

But before I can even tear into the stack of orders I need to fix a couple remaining issues. I need to do the next round of PCB corrections in Eagle CAD. I need to edit the new solution to the USB jack into the laser SVG's. I need to dial in the sensitivity on the sensor and write a couple of new functions into the software.

None of this is stuff I can do when sleepy or when my head is fuzzy or when I'm distracted. None of them can I do without several consecutive hours to look through the change orders, re-familiarize myself with the parts/functions/software/layers etc., and still have the time to take careful caliper measurements and run tests and otherwise make sure the work is being done accurately. I can't throw any of this at the wall in hopes it will stick. It requires a free day (or at least a free afternoon) with health and no major distractions.

I can't even make up the rest of the stack of version 1.0 PCBs. Because before I can get to the relatively mindless rote of soldering in the discrete components I have to delicately place the surface mount and run a reflow oven cycle. That takes the kind of steady hand that does not come after the fourth cup of coffee and in any case requires a free hour or more for setup and cleanup.

The line continues to move, of course. Code crunching is increasingly moving to automation now. PCB is automated (if you like the results, which I don't). But of course that merely amplifies the problem. Because then the work that needs to be done so the project can progress is the intense concentration of original insight and artistic thought.

And, yeah, you can (and I've been forced to, on more than one theatrical design contract) reach into your bucket of trite old ideas, recycled ideas, and stolen ideas. And the people around you will still coo and aw about how creative you are.

But it isn't as good and it really doesn't feel right. Every single lighting design I've done for theater has involved me spending at least two hours doing nothing but sitting in a chair in the auditorium staring at the set. My average is a week of back-burner, of thinking off and on about the show, making scribbles, re-reading the script, etc., until the idea finally comes.

Fortunately, that kind of necessary percolation does seem to be entirely compatible with being tired, sick, busy, hot, whatever. It just needs the world to spin a few times before the ideas are ready to take full form.