Long Time No See    Posted:


Hello again everyone! Soooo much has happened since I last posted on my blog. I figured it was about time to check in and actually be active on my own site again. What follows is just a summary of what has happened in our lives since the beginning of February this year.

Leaving ScienceLogic

First of all, my wife and I decided toward the end of 2011 that it was time for us to move away from Virginia. For reasons that we did not quite understand yet, we both wanted to move to Utah. I applied for my first Utah-based job opportunity just before Christmas 2011. Several of my friends in the Salt Lake City area were kind enough to get me a few interviews here and there, but none of the opportunities were very serious.

Probably about the time I wrote my last blog post, I was contacted by a recruiter in Boise. I would have loved to move back to Idaho, but my wife would have nothing to do with me if I did that. When I shared this information with the recruiter, he said he had a recruiter friend in the SLC area and that he'd pass my information along to him. Within a day, his friend had me set up with a screening problem for a company just outside of SLC.

I was a little hesitant about that particular opportunity, because it was a Ruby on Rails development shop and an advertising company. However, our timeline was getting smaller and smaller--we had to be out of our apartment by the 1st of April--and I didn't see any other serious opportunities on the horizon. So anyway, I completed the programming problem in both Python and Ruby and had a few video chats with some guys with the company. I guess they liked my work, even though I hadn't touched Ruby in several years.

Sometime in the middle of February, the company extended me an offer letter, which my wife and I considered for a few days before accepting. My last day with ScienceLogic was the 30th of February. My first day with the new company was the 12th of March, so we had a couple of weeks to pack everything up and drive across the country. Packing was ridiculously stressful, but the drive was actually quite enjoyable (my wife wouldn't agree). I drove my Mazda 3 with my 2 year old son in the back, and my wife drove the Dodge Grand Caravan with our 7 month old twins.

The New Job

We arrived in Utah on the 10th of March and immediately fell in love with the little town house we're renting and the surrounding community. It's a really nice area. We spent the first couple of days exploring the area and learning our routes to various locations.

My first week on the new job was interesting. They didn't have much for me to do, and we were all scheduled to go to a local tech conference for the last three days of the week. Very appealing way to begin a new job!

As time went on, I did a bit of work here and there, but most of my time on the job was just spent warming a chair in between requests for things to do. Eventually, I just got fed up with the amount of work I was (or, rather, wasn't) doing. By the beginning of May, I was already looking for another job where I could feel useful.

I got in touch with a guy I worked with for a couple of weeks before he quit working for the company that brought us to Utah (I'm intentionally avoiding the use of the company's name). This guy was only able to stand working for that company for about 3 weeks before he quit and went back to his prior company. He referred me for an interview with his managers, and by the middle of May, I had a new job lined up.

The Better New Job

While I was initially hesitant about the job (test automation), I looked at it as a major step up from what I had been doing since March. That and it cut my commute in half. And they provide excellent hardware. Anyway, I started working for StorageCraft Technology Company at the end of May as a Senior Software Engineer in Test.

My task was to build a framework to make the jobs of the manual testers easier. I had no requirements document to refer to, or any specific guidance other than that. I was simply asked to build something that would make lives easier. StorageCraft had recently hired another test automation developer, and the two of us worked together to come up with a design plan for the framework.

We built a lot of neat things into the framework, gave a couple of demos, and it seems like people are really quite pleased with the direction we've gone. I gave a demo of the (Django) UI just the other day, and my supervisors basically gave me the green light to keep building whatever I wanted to. Since the other test automation guy got the boot for being unreliable, I will get to see many of my plans through exactly the way I want! I'm really excited about that.

Enough About Work

Aside from all of the excitement in my career decisions, things are going very well with the family. We live about 3 hours away from my mom, and we've been out there to visit a few times already. It's really fun to see the kids playing with their grandma! The last time we were out for a visit, for my grandmother's 80th birthday, my son and I took my dad's Rhino for a spin. We got stuck, and it was sooo much fun!

Mudding in the Rhino

The twins are growing so well too. They're crawling and getting around very well now. Jane has started to stand up on her own, and she tries to take a step every once in a while. Claire prefers to sit, but she loves to wave, clap, and repeat noises that she hears.

My wife is planning on starting up a new website soon, and she keeps taunting me with the possibility of having me build it for her. Yes, taunting.

Okay, Back to Hobbies

My wife also picked up a Dremel Trio for Dad's Day. To get used to it, I made some little wooden signs with the kids' names on them. Being the quasi-perfectionist that I am, I'm not completely satisfied with how they all turned out. I suppose they'll do for a "first attempt" sort of result though!

First project with the Dremel Trio

I've still got various projects in the works with my Arduino and whatnot. A couple of months ago, I finished a project that helps me see where I'm walking when I go down to my mancave at night. The light switches for the basement are all at the stairs, and my setup is on the opposite side of the basement. I typically prefer to have the lights off when I'm on my computer, and it was annoying and horribly inefficient to turn the lights on when entering the basement, go to my computer, then go back to turn the lights off.

To solve that problem, I re-purposed one of my PIR motion sensors and picked up a LED strip from eBay. I have the motion sensor pointing at the entrance to the basement, and the LED strip strung across the ceiling along the path that I take to get to my desk. When the motion sensor detects movement, it fades the LED strip on, continues to power it for a few seconds, and gradually fades them out when it no longer detects movement. It's all very sexy, if I do say so myself.

Lazy man's light switch

I've tried to capture videos of the setup, but my cameras all have poor light sensors or something, so it's difficult to really show what it's like. The LED strip illuminates the basement perfectly just long enough for me to get to my desk, but the videos just show a faint outline of my body lurking in the dark. :(

One project that is in the works right now is a desk fan that automatically turns on when the ambient temperature reaches a certain level. The fan's speed will vary depending on the temperature, and there will be an LCD screen to allow simple reporting and configuration of thresholds and whatnot. I'm pretty excited about it, but I want to order a few things off of eBay before I go much further with it.

Obviously, much more had happened in the past months, but this post is long enough already. Things are calming down quite a bit now that we're settled in, so I hope to resume activity on my open source projects as well as this blog.

Comments

PIR Motion Sensor + LCD Screen + Arduino Uno    Posted:


For one reason or another, I've recently had the urge to follow in my father's footsteps and start tinkering with electronics. He's basically a wizard. He has fixed a lot of appliances that others tossed out the door without the slightest bit of investigation. I think he did this with the monitor I had hooked up to my very first computer. He just popped open the case, found the problem, soldered some solution in there, and that monitor worked for probably a decade afterwards. Amazing stuff.

Anyway, I have an itch to create a laser trip wire (don't ask). I took a basic electronics class my freshman year in college, so I am already familiar with resistors, capacitors, ICs, breadboards, soldering, etc. It doesn't seem like a very daunting task to create that trip wire, but I'm starting fresh with electronics (it's been a good 8 or 9 years since I last soldered or anything like that).

One of my co-workers mentioned the Arduino as something to get me started on the trip wire, so I started doing some research here and there. The more I read, the more excited I got. I wanted soo badly to buy all of the junk that I'd need to start tinkering with an Arduino, but I didn't think my wife would appreciate that--especially around Christmas time.

Several of my awesome relatives sent me very generous gift cards for Christmas this year, which finally gave me the opportunity to buy a load of stuff for the Arduino without feeling bad. So I ordered loads of stuff. Most of it is here, some of it is still on its way. My Arduino Uno arrived around noon today, and I haven't been able to stop tinkering! It's really a lot of fun, and stupid easy even if you're not a programmer!

I started with the basic "oooh, blinking LEDs!" sort of projects (or "sketches" in Arduino parlance). Then I moved on to tweak those to work with multiple LEDs. There were a few different scenarios I ran though because two of my LEDs weren't lighting up very well. I guess I either hooked them up wrong or I didn't seat them properly... whatever.

The next project was when I hooked up a PIR (passive infrared) motion sensor ($9.99 at RadioShack) and installed a demo sketch that I found on the Arduino wiki. I wasn't quite sure how to wire everything for the PIR sensor, so I took a look at this Make Magazine video to see one way of setting up the circuit. That one simply lights up an LED and makes some noise. I just made mine light up and LED since I don't have a buzzer (yet).

Next I moved on to the LCD display. The package came with a 20x4 green-on-black backlit LCD display, a 2.2k Ohm resistor, and a set of pins to connect the LCD to my breadboard or whatever. I actually soldered the pins onto the LCD display board (wow, was that ever more difficult than I remember!) so I would have less of a hassle getting all of the contacts working. Getting the LCD to work was pretty easy after that.

Then I took those two projects a bit further. I'm certain others have done this years ago, but I didn't use a sketch that was completely written for me this time so I felt special enough to share :) I added the PIR circuit from before less the LED, merged pieces from both demo programs, and came up with a motion sensor that would flash "INTRUDER ALERT!!" on the LCD screen a few times when triggered. Based on my testing, the sensor works extremely well (once calibrated!!), and it will detect motion well across the open area of my apartment (maybe a bit further than 20 feet)!

I'm quite happy with my work, especially for not having "dealt with" electronics for such a long time. When I tried to share my success with some of my friends, they wanted a video to prove I'm awesome (I guess?). So here it is. Trust me, I know the video is horrible--I speak too quietly (baby sleeping in next room), I stumble over my words (that's just me), and I neglected to even offer you some music to rock out to as I blabber about this stuff.

Here's the program I wrote/modified:

  1  /*
  2   * //////////////////////////////////////////////////
  3   * //making sense of the Parallax PIR sensor's output
  4   * //////////////////////////////////////////////////
  5   *
  6   * Switches a LED according to the state of the sensors output pin. Determines
  7   * the beginning and end of continuous motion sequences.
  8   *
  9   * @author: Kristian Gohlke / krigoo (_) gmail (_) com / http://krx.at
 10   * @author: Josh VanderLinden / codekoala (.) gmail (@) com / http://www.codekoala.com
 11   * @date:   3 Jan 2011
 12   *
 13   * kr1 (cleft) 2006
 14   * Released under a creative commons "Attribution-NonCommercial-ShareAlike 2.0" license
 15   * http://creativecommons.org/licenses/by-nc-sa/2.0/de/
 16   *
 17   *
 18   * The Parallax PIR Sensor is an easy to use digital infrared motion sensor module.
 19   * (http://www.parallax.com/detail.asp?product_id=555-28027)
 20   *
 21   * The sensor's output pin goes to HIGH if motion is present. However, even if
 22   * motion is present it goes to LOW from time to time, which might give the
 23   * impression no motion is present. This program deals with this issue by
 24   * ignoring LOW-phases shorter than a given time, assuming continuous motion is
 25   * present during these phases.
 26   *
 27   */
 28 
 29  #include <LiquidCrystal.h>
 30 
 31  int calibrationTime = 10;   // seconds to calibrate PIR
 32  long unsigned int pause = 5000; // timeout before we "all" motion has ceased
 33  long unsigned int lowIn; // the time when the sensor outputs a low impulse
 34 
 35  boolean lockLow = true;
 36  boolean takeLowTime;
 37 
 38  int flashCnt = 4;  // number of times the LCD will flash when there's motion
 39  int flashDelay = 500; // number of ms to wait while flashing LCD
 40  int pirPin = 7;    // the digital pin connected to the PIR sensor's output
 41  int lcdPin = 13;   // pin connected to LCD
 42  LiquidCrystal lcd(12, 11, 10, 5, 4, 3, 2);
 43 
 44  void setup() {
 45      // Calibrates the PIR
 46 
 47      Serial.begin(9600);
 48      pinMode(pirPin, INPUT);
 49      pinMode(lcdPin, OUTPUT);
 50 
 51      digitalWrite(pirPin, LOW);
 52 
 53      clearLcd();
 54 
 55      // give the sensor some time to calibrate
 56      lcd.setCursor(0,0);
 57      lcd.print("Calibrating...");
 58 
 59      for(int i = 0; i < calibrationTime; i++){
 60          lcd.print(".");
 61          delay(1000);
 62      }
 63 
 64      lcd.print("done");
 65      delay(50);
 66  }
 67 
 68  void clearLcd() {
 69      // Clears the LCD, turns off the backlight
 70      lcd.begin(20, 4);
 71      lcd.clear();
 72      digitalWrite(lcdPin, LOW);
 73  }
 74 
 75  void alertLcd() {
 76      // Turns on the LCD backlight and notifies user of motion
 77      lcd.setCursor(2, 1);
 78      digitalWrite(lcdPin, HIGH);
 79      lcd.print("INTRUDER ALERT!!");
 80      lcd.setCursor(2, 2);
 81      lcd.print("================");
 82  }
 83 
 84  void loop() {
 85      // Main execution loop
 86 
 87      if(digitalRead(pirPin) == HIGH) {
 88          // flash an alert a few times
 89          for (int c = 0; c < flashCnt; c++) {
 90              alertLcd();
 91              delay(flashDelay);
 92              lcd.clear();
 93              delay(flashDelay);
 94          }
 95 
 96          if(lockLow) {
 97              // makes sure we wait for a transition to LOW before any further
 98              // output is made:
 99              lockLow = false;
100              delay(50);
101          }
102          takeLowTime = true;
103      }
104 
105      if (digitalRead(pirPin) == LOW) {
106          clearLcd();
107 
108          if (takeLowTime) {
109              // save the time of the transition from high to LOW
110              // make sure this is only done at the start of a LOW phase
111              lowIn = millis();
112              takeLowTime = false;
113          }
114 
115          // if the sensor is low for more than the given pause,
116          // we assume that no more motion is going to happen
117          if (!lockLow && millis() - lowIn > pause) {
118              // makes sure this block of code is only executed again after
119              // a new motion sequence has been detected
120              lockLow = true;
121              delay(50);
122          }
123      }
124  }

Comments

Perpetual Motion System May Become A Reality    Posted:


Today I was browsing Slashdot and came across a story about a Canadian college drop-out named Thane Heins who has possibly unlocked the secret to perpetual motion systems. I don't fully understand everything about it, but it seems to be a pretty solid deal to me. He has demonstrated the device at several universities and it seems that most professionals in the industry are speechless afterwards. No one seems to be able to explain what is happening using conventional physics laws. Even Markus Zahn from MIT, the foremost expert in electromagnetic and electronic systems, has yet to come up with an explanation for what happens within the device.

Considering that this man is a college dropout, do you suppose that no college graduates who go on to study these things could make this breakthrough because educational programs lock you into long-accepted ideas instead of embracing "thinking outside the box?" Why couldn't Zahn or any other leading expert in the industry construct a perpetual motion device with all of their resources? Heins has reletively nothing in terms of resources in comparison to university programs.

That train of thought makes you think at least twice about enrolling in classes at a university (if you have the enthusiasm to do something on your own).

Anyway, the story is here and you can watch the first two parts of a seven-part video demonstration on YouTube.

Comments