Thursday, July 10, 2014

Dark Matter

After watching the season finale for 'Cosmos: A Space time Odyssey', I was contemplating that strange stuff called 'Dark Matter'.
A little background is in order, I believe.  The whole issue stems from the fact that scientists observing the heavens see the affect of there being much more matter in the universe than they can account for.  This sounds very mysterious, until we remember how we can see anything in space.
Astronomers can only detect matter in three ways: something emits energy (light or radio waves), something blocks or bends energy (think 'black holes'), or something causes one of the first two to 'wobble' causing a shift in the energy.
Right there, you can see the crux of the issue, and why it is called 'dark'.  It isn't because it is evil, or sinister, or even ask that mysterious.  It simply isn't putting out any energy.
So really, we have a bunch of 'Dark Matter' right here, under our feet.  The Earth only produces energy from three sources: man-made, radioactivity, and weather.  If we were over on Andromeda, listening to the energy coming from the  solar System, it would be difficult to pick out the energy coming from the Earth from all of the energy being blasted out from all of the active stars in the Milky Way, much as it is hard to distinguish what one guy is shouting in a stadium full of people.
  We can even include dark matter in our stadium example, where it would be everything not shouting- the building itself, the seats, the clothing, etc.  Black holes would simply be people walking in front of the fans, not shouting themselves, but blocking some of the noise with their bodies.
    The intent here is not to detract from the mysteries that astronomers are attempting to solve.  There are very real and observable effects of dark matter, and as they said in 'Cosmos', many are very surprising.  'Dark Matter' is just a shorthand way of saying 'All of the stuff that doesn't produce energy but still has mass'.

Tuesday, August 20, 2013

'Tomb Raider' Game Review

This year, Square Enix and Crystal Dynamics released a prequel.  To the uninitiated, the original Tomb Raider tapped into the power of the first scene from Raiders of the Lost Ark, where our intreped hero is traveling deep into the jungle, navigates various traps, gets the treasure and has to escape.
   Tomb Raider took Indy, brought him to modern times, replaced his whip with dual wielding pistols, and turned him into an acrobat - able to leap and flip around the environment.  Oh, yeah - and turned him into a buxom British hieress.  With a ponytail.  Named Lara Croft.
  The original game didn't have a lot of backstory.  Lara, daughter of Lord Richard Croft, had lost both of her parents, and now pretty much lives out the dream of 'archeology' - mostly running into tombs, grabbing the treasure, and getting it back out again.  None of the slowly sifting through sand for pot sherds for her!  Also, every tale ends with some mystical power being behind everything, usually something evil that she has to defeat, proving that Lara is even tougher than your run-of-the-mill demigod.  Past games have tied Excaliber to the Norse Yggdrisil mith, explored various aspects of Greek mythology, and more.  Later games tried to fill in the back story, with the last trilogy explaining that Lara lost her mother at a different time than her father, which if you kept track contradicts the Tomb Raider comic, which claimed that the butler caused the plane that Mum and Dad were on to crash, and he was somehow going to inherit all of the fortune.
   This definitely put Square and Crystal into a tough position - more and more women are playing games, Lara has always been accused of being a teen fantasy (sorry, Angelina Jolie) and a bit too ready to blow away other treasure hunters.  What could have turned her from an English archaeologist to a cold blooded, tomb raiding, killing machine?  This game is the answer to that question.
   Keep in mind, that for all of the complaints about the design of Lara, she came out in that time when we were just getting games that were slightly better than Doom, in terms of graphics.  Go back and look at the original Quake, for a comparison.  I had a Pentium 586, and it struggled at times to keep up with even the low polygon count that Lara  displayed.  So her over-endowed assets were also just an attempt to make her not look like a dude.  With the character established, the massive proportions entrenched, it became clear as the polygon counts rose that she would probably have backaches most of the time, and almost certainly not be able to backflip off an incline to grab a ledge behind her.  This game also attempted to give Lara more realistic proportions, and a more realistic reaction to all of the craziness going on around her.
    Is it a good game?  Yes.  Is it a good Tomb Raider game? Well... kind of?  There is definitely enough of Lara here to feel like it is Lara.  And I am glad I played it.  But, I always enjoyed the puzzle solving aspects of the Tombs, and those are mostly gone.  There are optional tombs, but those generally have only one or two puzzles that need to be solved.  The rest of the game is a linear exploration with multiple set-piece battles.  While the Uncharted games was born out of Tomb Raider, this game seems to have borrowed the ambush and clear motif back from Uncharted.  Multiple times I'd walk into an area that had convienent cover spots, and know that I would be fighting a battle there.  One time, I avoided the obvious trigger, and explored the rest of the area, with no sign of any bad guys.  Once I hit the trigger, it was as if the entire 101st Airborne had landed and had to be killed before I moved on.  That was some great hiding, guys!
    This is a very mature game - but not as bad as the pre-release hype.  It definitely falls into the 'dark, dirty, gritty' camp, with the first portion of the game leaving me wanting to turn up the gamma somehow.  I ended up having to adjust the lighting in my game room b/c it was so dark that my normal lighting made it hard to see what was going on.  After a climactic sequence, the game brightens noticably, as sort of a subtle cue that Lara has emerged from her fear, and is becoming stronger and more confident.  But this is a game that throws in your face that something very wrong is going on here.  There is one moment where Lara is emerging from a pool, covered in blood, evoking the last scene of Apocalypse Now.  I found it a little odd that with all of the death and decay on this island, that there wasn't a huge stench and an overwhelming amount of flies!  I think perhaps there was, but that was probably removed during development.
   Bottom line, was it good?  Should you get it?
  Honestly, it is hard to say.  I have one game console that is not in the family area, so I was able to exercise 'parental guidance' judiciously.  This game could give kids nightmares at some of the more intense scenes.  If you like puzzle games, like the old Tomb Raider' games, this is not one of those.  You will not get lost, because in addition to the linear nature, with a touch of a button you get a glowing blue pillar of light that shows you where to go.  If you liked the Uncharted games, this might be a good game for you to play, as it has the fighting sequences, the environmental acrobatics, but not the same sense of humor.

Sunday, April 14, 2013

Slow progress

The wire wrapper is complete, and works pretty much as designed.  I did have to add a guide bar, which the Stewart-Macdonald one has, because I kept having the wire 'jump' out of the bobbin.  At more than a revolution per second, that made a mess quickly.
The main problem I'm having now with the coils, is that I haven't succeeded to get a good contact solder between the lead and the starting end of the wire.  Magnet wire is coated to prevent shorting across the coil, but the coating has to be removed to make a good solder contact.  Unfortunately, while I can get good solder flow, I don't seem to be getting through the coating with heat alone.  This has meant a number of redos.  After the first redo, I replaced the servo with a motor controlled by the ardumoto shield, which boosted me from 1 rev per second to almost 2.  There was an even faster motor, but as speed goes up, stall torque goes down.  This comes into play because the motor is driving a spinning, weight (my bobbin) and that weight is increasing as wire is laid down.  I also geared the shaft down a bit, to try to give myself an additional buffer.  Even with this, I've found that if I pull too hard on the wire, I can stall the motor.
On the other side of the project, I've definitely figured out why jointers were made.  A jointer is used in wood working to establish two flat, perpendicular sides.  Then the opposite wide dimension is made parallel using a surface planer, and the opposite narrow dimension is set using a table saw.  Well, I didn't have a jointer, so after cutting apart my maple billet, I used a hand plane to establish a good joint, and glued the two halves together.  I am now in the very slow, manually intensive process of using a hand plane to get the resulting board flat.  I have to push through and do it manually (or buy another billet) because most jointers only have a little over six inch wide blade.  Also, because I got excited and cut out the shape, it no longer has sides parallel to the grain.

Sunday, October 23, 2011

Arduino explorations, part three : Research and design

Truth be told, I didn't set out to use the Arduino on this application, because I had only seen the Arduino used for robotic applications.  My original intent, therefore, was to use circuit logic, i.e. AND and OR gates.  Because I wanted a display, I figured I would need 10 of the 7-segment displays, 5 for the target windings, and 5 for the current winding count.  Additionally, I would need a bank of decade counters, some way to set a target count to compare against, and a bunch of AND gates, and either a 7segment driver, or even more gates.  I was beginning to get discouraged, when the Arduino was recommended to me. Suddenly, all of my logic problems could be solved in code - and a whole slew of compatible items were available. Display The first order of business was to find a suitable display - since my original idea had been scuttled by the complexity of the seven - segment display integration, I was concerned that I would have a similar problem.  My sister, and arduino mentor, pointed out the LOL Shield- a nifty set of leds that are designed to fit directly on top of the arduino board. This came as a kit, which maent that one of the purposes it served was as practice in remembering how to solder - 120 leds with two leads apiece makes for a lot of practice. Finally, all soldered, and the test patterns not creating strange blinkiness due to badly soldered joints, amd I discovered that it didn't have enough resolution to display the text I needed to display. Another delivery from Sparkfun got me a two line lcd display. This I happily soldered wires to, got displaying text, and was pleased with the result. Readable text, scrolling and wrapping, a nice font, all good. But I had a mess of wires coming out of my Arduino, because I wasn't using a breadboard. I then desoldered the wires from the lcd, soldered in header pins, snuggled it down in my breadboard... and swapped voltage in and ground. I didn't realize my mistake at first, except for a strange smell, until I couldn't get anything to display. After checking my wiring, my heart sank as I realized I'd fried it. Another shipment from Sparkfun and I got the replacement. User Input Reviewing the stated requirements, I could see that I had three different types of input needed. I needed a numerical input for entering the target, a dial input for controlling the rotation speed, and button inputs for starting and stopping. The numerical input was solved by a purchase from Sparkfun of their 12 key number pad, which gave two non-numerical inputs ( * and #) that may end up being the 'enter' and 'reset' buttons. I had a bit of difficulty getting the test sketch to work with the numerical keypad, so in frustration I took a pair of wirecutters, popped open the case, and figured out from the circuit board how the key-to-lead wiring worked. Suffice to say that I had incorrectly read the sketch and both the sketch and the cookbook were right. A potentiometer from Radio Shack became the dial input. Next will be the mechanical engineering portion of the winder

Saturday, October 22, 2011

Arduino Exporations: part four - mechanical engineering

The purpose of this project is to wind the pickups, so the main requirement is to have a method of spinning the bobbin. All of the electronics are just to help out. This means that there needs to be a method to mount the bobbin to a shaft, and spin the shaft. Because of the electronic integration, I wanted a rotary encoder to be able to count the number of windings. From, I purchased: A quarter inch shaft, Two thrust washers, ABS plastic, Two bearings, A wheel hub, A servo mount gear, A shaft mount gear, And a shaft collet. The idea I had was to have the shaft supported on both ends by passing through panels - wood in the prototype, and so the bearings were to ensure smooth turning. The thrust bearings were to ensure that the collet, which would hold the shaft in place on one side of the interior support panel, wouldn't rub during operation. The second thrust bearing, coupled with a spring I bought from Ace Hardware, would go on the other side of the interior panel, with the spring between the thrust bearing and the shaft mount gear. The idea was to both hold the shaft in place, and to allow the user a way to unseat the gear, rotate the shaft manually, then reseat the gear when ready to operate. I'm not sure how well that idea will work out, since the rotary encoder has to remain in a small slot between the IR emitter and detector. The nice thing about the spring is that, since it doesn't rely on a set screw to hold it in place, I can be pretty confident that it won't slip. The ABS plastic became my rotary encoder, with some slots carved in with the Dremel tool. I debated about how many to put in, since this was only going to count rotations, rather than be a robot inertial guidance system. I wanted more than one, since there was no way to determine where the slot might be when starting, and so the count could be off by a whole turn. As a friend pointed out, when you're winding 5,000 times, what's the big deal with +/- 1 turn, but I wanted to be a bit more accurate. Therefore, I decided on 5 slots, since I found a Binary Coded Decimal (BCD) chip in my dad's electronic parts. This is a base ten, or decimal counter, but uses a four bit binary register to count. This means, that instead of the four bits counting from 0 to 15 as in normal binary, the four bits count from 0 to 9. The design of the chip also allowed me to react to a state change when the count hit five and ten. The main reason for using the chip was to allow the Arduino to only be interrupted on each full rotation, rather than on every slit. Thin plywood was chosen for the prototype enclosure, with the main box being 9" x 11" x 11". The 11" width will hopefully counter balance the weight of the wire. The remaining dimensions were mostly chosen to ensure that the bobbin wouldn't stick out, and the rotary encoder wouldn't rub inside. With the wood cut out, I hope to have some pictures soon of the assembled prototype.

Thursday, October 13, 2011

Arduino explorations, part two: requirements

First I decided that I would approach this as if it was a project for work- namely before I srarted soldering parts, I would determine what I wanted it to do, then use that to guide what I would work on researching.
1. System shall be able to wind pickup coil on a spindle of a standard configuration
2. System shall count the number of windings as spindle rotates
3. System shall allow the user to ready the spindle for winding, and account for any windings manually applied.
4. System shall allow automatic winding, with user able to control the speed.
5. User will be able to stop the winder through a 'panic' type button
6. User will enter a desired number of windings, and system shall stop automatically winding when the number is reached

Secondary requirements
Possibly to be added:
a. System may include guide to ensure windings are neatly laid on the spindle.
    This one is inspired by the winder from Stewart MacDonald, their winder has a smooth bar with set screw collets that act as the manual limit stops.

Design Elements
Some of these I had in mind writing the requirements, but in some cases I have ended up with something different than what I was thinking of when I wrote the requirements.  That's one of the advantages of requirements-driven design.  As engineers, we want to jump in and start coding, soldering, or assembling, but by working out what we're really trying to do first, then we can be open to solutions that may be easier, cheaper, or better than our preconceived notions.

1. User will be able to set target winding number - some type of numerical keypad needed
2. User will be able to see the current winding and their target - some type of display needed
3. User will be able to start, stop, and adjust the speed of the winding.  Buttons and a potentiometer
4. And of course, a motor to wind with.

Saturday, October 8, 2011

Arduino explorations

I have been asked to blog about my current project, that has led me to start exploring and experimenting with the Arduino microcontroller.
First, alittle background as to why I chose the Arduino.
This project actually started with a request from a co-worker fuor an Electric Upright Bass - his daughter is currently attending university as a music major, and he wanted something easier to transport across campus than a full size acoustic bass.  This led me to start researching how musical instruments are designed and built, and how electric guitars/basses transform the string movement into sound.
Suffice to say, that I quickly realized that the electric pickups to support a bowed instrument are not readily available, so I began looking for what I would need to be able to design/make pickups that supported a curved fingerboard.
There were two basic designs and one fancy design for translating string vibration into electrical signals. Piezo-electric, magnetic, and for the fancy one, light.  I could only find one manufacturer for the light based, and they only offered it built in to their own guitars,  so quickly rejected that option.  Piezo seems best-suited for pizacatto (plucking), and magnetic pickups seem better for arco (bowed) styles.  This led me to consider having both built in to the instrument.
The most flexible onfiguration for the magnetic pickups seemed to be the humbucking layout.  If so-called 'coil taps' are added, the musician has additional options within the instrument for tonal production, before the amp begins processing the sound.  The next issue that I had to deal with was how to produce the two coils necessary for proper humbucking - ideally both coils would have the same amount of windings to ensure that the common noise (hum) is cancelled out between them.  Coil winding machines are available, and there are many low-tech ideas of coil winding as well.  One involved clamping a drill to a workbench, mounting the coil spindle in its chuck, then using another clamp on its trigger to start and control the speed.  Another added an enclosure and a shaft, plus a counter to show how many turns had been put on the spindle.  Using the second as my inspiration, I began designing..