Wednesday, September 18, 2013

Dear Aunt Catherine

Does anybody else enjoy their nightmares?  I actually do, at least as I've gotten older.  As a child I often had extremely vivid dreams that I didn't enjoy at all.  One that I had repetitively that actually scared me the most involved nothing more than me traveling through some infinite expanse of space, not floating or flying necessarily, but passing through this space that I knew would never end.  It scared the shit out of me! Something about knowing that the space was boundless was just terrifying at the time.  Looking back, I think it's kind of interesting, though. Maybe the concept of infinity was too much for my young mind to grasp. It was a very specific kind of fear, one that I have only felt and immediately recognized in a small number of situations.  Once, while snorkeling I was swimming in an area where the sea floor was gradually dropping away from me the farther away from shore I swam.  At one point, the floor dropped dramatically though, and I was suddenly suspended about 50 feet from the "ground".  That familiar sense of panic set in, and my instinct was to turn right the hell around.  I also feel a small tickle of that sensation sometimes on a clear day when I look up at the sky, and it's nothing but blue from horizon to horizon, no stars or moon shining through. If I stand there long enough, looking at the big blue boundary, realizing that there's no boundary at all, just an illusion of color created by scattered light, and that the only thing keeping me from hurtling through the stratified layers of gasses and out into the nothing is an extremely weak, relatively speaking, physical force, well, it's hard not to feel just the tiniest bit anxious.

Nowadays, I like that feeling, though.  Whether it's because of the inherent nostalgia, or the fact that fear is just one wavelength in the broad spectrum of human emotions (all of which I think should be experienced occasionally to keep things in perspective), I'm not really sure.  I do know that when I have terrifying dreams these days, I wake up excited, kind of like I've just gotten out of a movie.  The instant I know that I'm not dreaming anymore, a switch is thrown and I know that I can go from being scared stupid to remembering all of the crazy, fucked up things that happened in the dream to scare me stupid in the first place. I'm not saying that all of my nightmares are enjoyable, as there are certainly some dreams I've had that tap into more emotional topics, leaving me feeling rather exhausted when I wake, and in need of a hug and a blanky.  But the dreams I have that are just downright scary are awesome!  Unfortunately, the details of these dreams usually fade fast, and while I've told myself that I need to start writing them down, I have neglected to do so up to this point. I'm hoping that having an avenue to write now will motivate me to start archiving them in the future.  There is one, though, that I've managed to hold onto for a few years now without needing to write down.

I was visiting my aunt Catherine one day for an early dinner.  Now granted, I don't have an aunt Catherine, but for some reason in this dream I did, though she did look a little bit like my grandmother Evelyn.  It's funny how your subconscious fills in all kinds of holes when you're dreaming.  Not only were there things happening in the dream in present time, but I had memories of this fictional person, as well as an entire family history to go along with them.  I often wonder if things like that, memories in a dream, are created spontaneously in the moment when they're recalled, or if these dream "characters", some of which I'm often playing, are scripted at some other point during REM sleep.

The two of us were sitting in her kitchen nook, discussing family and recent events.  It was a friendly conversation, not staggered and awkward like I remember of all my childhood interactions with her. Catherine had always struck me as bit of a stern woman, one who had perhaps grown up too fast and forgotten how to lighten up. I sometimes thought when I was younger that she looked like someone who hadn't cracked a real smile in years.  But this supper chat was completely changing my perception of the woman. During the conversation we got onto the subject of Catherine's twin sister Janice.  I didn't know much about Janice; she wasn't as close with me and the rest of the family as Catherine was.  There had been some recent correspondence between the two of them, though; some sort of reconciliation of a falling out from years before. I was happy for her.  My brother and I have stayed in close contact, for our family at least, over the years since I moved out of the house, and it's a relationship that I hold very high, so I was glad for Catherine to be able to have an open and friendly dialogue with her sibling again.

The conversation went on for what seemed like hours, at times turning serious and heavy, and occasionally inciting rounds of hysterical laughter from either or both sides.  This was the first time I had felt really close to Catherine, like she was a true family member.  It wasn't that I wasn't fond of her before, but we had just never spent enough time one-on-one like this to really open up and get to know each other.  There were so many parts of her character that I had been oblivious to.  I'd never heard her guffawing to the point of exhaustion, never heard the stories of how hard it was growing up for her, and I'd never noticed the distinct difference in the color of her eyes; brown on the left, and blue/green on the right.

We continued talking as it began to grow dark outside.  I was seated with my back to a large window out into the back yard.  She had a small garden with these giant sunflowers looming over it. She had scolded me once when I was about 5 for trying to chop the sunflowers down with a set of branch loppers I had found in her shed.  Catherine began clearing off the table, and I got up to stretch my legs, turning around so I could peer out the window at the sunflowers, remembering how angry she had been and what a little shit I could be when I was that age.  She turned the light on in the kitchen, and the her reflection became subtly visible on the glass surface.  As she was walking back towards the table, her reflection was facing me, and I noticed something about it that was concerning.  It wasn't an entirely clear image, but I could tell there was something different.  She looked so serious all of a sudden.  We had ended our conversation on a high note, her offering coffee before I headed for home, me mentioning that I'd like to meet Janice if she ever decided to visit.  Maybe their reconciliation still had a ways to go.  I hadn't meant to upset her, so I turned around to ask if she was okay.  She stood before me, with two cups of coffee in her hands, holding one out towards me, with a large smile on her face.

She began to speak, but I wasn't really listening, just looking at the way the wrinkles formed around her mouth and eyes, unmistakable in their shape.  I was confused and unsure why.  Sipping my coffee, I turned back around to look out the window again.  There was her reflection, standing behind me, still talking, no smile to be seen, not even a hint of a smile line with the corners of her mouth pointed slightly downward.  It could have just been a trick of the reflection, that's what it had to be.  I was probably just more tired than I thought, seeing things, or the glass was distorted somehow, subtly curved enough to distort the features of her face in a way to make is seem like she wasn't the jovial person I'd spent the entire evening talking to. The view from outside could also be altering what I saw in the reflection too, explaining why I saw someone with two dark brown eyes looking back at me, dour and sad.

"I guess we talked for too long, I was hoping you wouldn't see her," Catherine said to me, my back still to her.  I didn't know what she was talking about, and didn't have time to reply, as she reached around with one hand and placed it over my mouth.  I was frozen in place, and beginning to panic.  The person in the reflection was there, one hand over my mouth talking to me from behind, but it wasn't Catherine's face, as I could see that her lips weren't moving anymore, even as I heard Catherine's words in my ear, spoken quietly from only inches away.

"It's an odd thing being a twin.  There's a bond between my sister and I that seems as difficult to define as it is unbreakable."  Her voice seemed so close I thought it might be coming from inside my head.  "All those years we were apart, not speaking, separated by thousands of miles, I could still feel her misery.  She had a family, a family that included her in their lives, and she still managed to be so serious and loathing of life.  She was completely unable to let go of the past, and I could feel it every day.  It made me sick how someone could have so much and feel so little."

"I came back to try and put her out of her misery.  I've always wanted a family of my own, and I saw no reason why hers couldn't be mine."  I could feel her moving around behind me with her one hand still over my mouth.  In the reflection, I saw her free hand go up to her face.  As the hand came back down, the face mouthed a single word.  "We weren't identical, but it's easy enough for some simple magic to convince everyone I'm her, provided I have just the right thing of hers.  It's just too bad I had to keep her body in the basement for this glamour to hold.  Though I don't think I could have buried her far enough away to keep her from appearing and meddling with my new life."

It dawned on me just then, the word that the face in the window had said.  "Sorry," the last word that went through my mind, just before Janice reached around my face and removed her hand from my mouth to slide Catherine's dark brown eyeball inside.


Friday, September 13, 2013

Helmet Required: Self balancing unicycle, part 1

2nd post!  I'm blogging like a real boy now, though hopefully this second go around is along the lines of an Empire Strikes Back/Godfather II, as opposed to a Two Towers/Boondock Saints II.  It's pretty jargon heavy, though, just to warn anyone who's not intrigued by microcontrollers, serial communication interfaces, and feedback control systems.

A little less than a year ago I was killing my lunch hour at work by sifting through the various posts on Hackaday when I came across a project that I found very intriguing.  A self-balancing unicycle is not a novel project anymore (a quick search on Hackaday yields about half-a-dozen similar projects), but I liked the look of this one; the handlebars would give it a motorcycle feel while zipping around on one wheel, cool! After reading about this project and a few similar ones, I decided that I wanted one.  More importantly, I wanted to build one. I had started a project the year before that involved using a motor controller and a PID feedback loop to control a small robotic arm that never got finished for a lack of time and money. It wasn't my robotic arm, but one that belonged to the Robotics and Automation Society at Portland State, and has since been absorbed into another project. The unicycle will be highly reliant on a well-tuned feedback system, however, so I can still experiment with PID and build something that is potentially harmful to those who use it, namely me...perfect!

The project from Hackaday was built using an Arduino microcontroller, a pre-built inertial measurement unit (IMU) from SparkFun.com, and a SyRen 25A motor controller.  In other words, the fundamental electronics alone are going to run about $170.  This seems a little spendy, especially considering that some of the IMUs from SparkFun are just the gyro and accelerometer ICs on a small PCB with some minimal bypassing caps and pull-up resistors.  By laying out all of the necessary ICs and passive components from the above three units on a single custom PCB, one could have all of the same features with a smaller overall footprint, less interconnect wires, and also some cool peripherals for probably 2/3 the price.  Granted, this means a massive amount more time to look up the right component values, build parts and footprints in EagleCAD, and layout a board, but that's kind of part of the fun of doing a project like this myself. So I decided early on that I would design my own PCB that incorporates a microcontroller, 3-axis accelerometer, 3-axis gyroscope, appropriately sized motor controller, and terminals to wire up lighting, a display of some sort, safety interlocks, and maybe some shooting flames...intentional ones!

Now to choose some components.  For the microcontroller, I had initially decided to go with the Atmega328P, mostly because I've done some projects with it before, both on Arduinos and as a stand-alone chip, so I'm fairly familiar with it's architecture, how to wire it up, and laying it out. It also has a relatively inexpensive programmer/deubugger in the AVR Dragon. I've also done some projects with some of the microprocessors from the LPC family of ARM devices from NXP, though I've never done any of the programming for these, so I may switch further down the road to get more familiar with an ARM device.  I think at this point I want to stick with what I know, though, or the learning curves on too many fronts (PID, I2C, IMU, AVR/ARM...FML) may appeal to my intrinsic laziness and keep this project from ever happening.

The ICs that will make up the IMU are a L3G4200D 3-axis MEMS gyroscope by ST Micro and an ADXL345 accelerometer from Analog Devices. I have no knowledge of either of these types of devices to make much of an intelligent decision, but they will both operate on a 3.3V I2C bus, and they can output data at rates in excess of 100Hz, which is the read rate of a Segway.  With a maximum gyro resolution of 2000 dps (5.56 revolutions per second) and an accelerometer with a tunable full scale range of 4g to 32g, bi-polar, I should have lots headroom for dialing in the PID loop. To assist in working with an IMU for the first time, I want to put in some kind of graphic display to view the output of the two ICs in realtime.  Newhaven makes a 2x20 character LCD display that also operates over I2C for $10...done.

That takes care of the core components for the unicycle's 'brain'.  The drive system is something that I haven't entirely pieced together yet, other than looking at some hefty H-bridge ICs.  I think a conservative approach that will lend itself nicely to prototyping sans hematomas will be to use a scaled down battery and motor with a test jig that will allow me to work on getting all of the components to play nice-nice.  Ideally, the jig will only allow the scaled down vehicle to tip in 1 dimension as well as translate in that same dimension, removing the need for a rider to make balance adjustments in the second horizontal dimension.  Once I get something balancing in the jig, then it will be a matter of scaling to a system with more torque (bigger motor, bigger battery, more current) and a higher moment of inertia (me on a padded seat).

That's the game plan so far.  A quick look at Digi-Key and OSH Park for the devices mentioned above and they're related necessary circuitry puts the price at about $72.00.  For the next part of this series, I hope to have some electronics in hand and a better idea of how the jig is going to work.  Grad school is starting soon, and work is getting a little crazy, so it's possible that this has to sit on the back burner for a while.  On the other hand, fall is nearly upon us in Portland which means the amount of time spent inside due to inclement weather is going to be going up sharply soon.