Saturday, June 25, 2016

Backyard Landscaping - Gravel Removal Complete

I finished this up a few days ago after the sun had gone down and thus had to wait to get the picture.


Next up, hack in a few extra sprinkler heads to kind of get some water in the now removed court. This is going to be temporary as I'm planning to redo the sprinkler system as a whole but that won't be for a while.

Tuesday, June 21, 2016

Backyard Landscaping - Gravel Removal

Progress from last nights efforts. You can take pictures like this at 9pm in the evening when you live up north. Also, you can stay up later to work as well. I guess that's a bit of a two-edged sword.


Maybe another hour or two and I'll have it all out.

Saturday, June 18, 2016

Backyard Landscaping - Basketball Court Asphalt Removal

When we purchased this house, the backyard was mostly a basketball court. Wanting to have more than asphalt to enjoy in the summer, we have been planning on how to improve things. A few weeks ago, that process began.

First, here's a very mediocre picture of what we were starting with.



I was getting some help with the asphalt (and gravel) removal and wanted to estimate how long I thought the job would take so I marked off a small fraction of the court and timed how long it took me to get it done. Verdict, 24 man-hours of labor to removal the full 30' x 40' court.



The help came and over the course of two evenings we got all the asphalt up; they weren't interested in sticking around for the gravel so that's what I've been working on infrequently over the past week or two.


We decided to keep a key-sized piece of the asphalt along with the fancy, very sturdy, and expensive basketball hoop. As I've been removing the several inches gravel that was laid beneath the asphalt I've been piling it in the key for use later in the project. The area on the left that is mostly brown has had the gravel removed (more or less); the area on the right that is gray has yet to be addressed.  I'm guessing is will be another two hours to get it done.

Stay tuned for further pictures of the yard as the project slowly evolves.

Thursday, May 19, 2016

Canonical OK Go Videos

You know OK Go; they're the band that does the creative and adventurous music videos. I've linked to their videos in the past and I will do so again but this time in a much more rigorous manner. Which is to say I intend to provide a chronological and canonical list of their videos. Note that this list will not include all of the music videos attributed to them, just the real ones, if you know what I mean.

A Million Ways


Here it Goes Again


This Too Shall Pass (Marching Band)


This Too Shall Pass (Rube Goldberg)



End Love



White Knuckles



Last Leaf

All is Not Lost



Needing/Getting

The Writing's on the Wall


I Won't Let You Down


Upside Down & Inside Out









Saturday, April 16, 2016

Status Light

When moving into our new building at work, we were all given little status lights to place on the top of our cubicle walls; they looked like this:


You plug on end into your computer and it looks at your Lync status to determine if you are available, busy, or away from your computer. They are a handy way to determine at a glance if somebody is available for an impromptu meeting.

And they only work on Windows' computers. Having a Mac, I've been out of luck.

Recently fed up with the performance of Lync as my softphone, I requested a desk phone and the one I got (Polycom CX600) logs into Lync from the phone. Furthermore, it has a little circling arrow icon on the phone that lights up with the appropriate status color. 

And that's when I decided to make my own version of the status light.

In what is surely the least attractive way of doing this, I've mounted a color sensor over that double-arrow icon and use it to determine my current status. With that information, I drive a string of RGB LEDs to the appropriate color. My cube looks something like this and I've installed the LEDs so they shine on frosted glass above my desk.

Details:

  • Color sensor is TCS230. You toggle two control (S2 and S3) pins to select the color to measure and it varies the frequency of a square wave depending on the intensity of that light. You can reduce the overall frequency of the device (pins S0 and S1) to a few different levels and I choose the lowest scale to help make the measurement easier. Measuring frequency is done by...
  • ... Arduino's have a pulseIn function that can be used to measure the length of half a period of the output frequency. When a given color is very dark the output frequency is low and the pulse length is long. When the color being measured is bright, the frequency is high and the pulse length is short. Based on these measurements, I can classify the input color as red, green, or yellow and set the output PWM period of three transistor driving those colors on..
  • ... two meters of RGB LEDs. These are 12V LEDs and they are all one color, different than those that I used for my Lorenz project. I used some higher-power transistors I have laying around MPT16N25E to drive them.  Maximum current for these lights is 2A which is being split across three transistors. That current would only show up for maximum bright "white" light (full red, green, and blue power) so I don't really have much to worry about. 
  •  I used a a 250V 2A polyfuse for protection on the 12V supply. The power supply plugs into the Ardiuno barrel jack and then I tap the "Vin" pin for the 12V I need for the LEDs. The on-board polyfuse protects the Arduino but not the transistors and LED string. 
The system has been running for a week or two without much incident. The only tricky part was getting the sensor firmly attach to the light on the phone so the color measurements were consistent. I've been getting good feedback from my co-workers, especially those that realized it was more than decoration. Overall, I think we could call this a success.


Here's the schematic, picture of the board as completed, and source code:

   
 // Used to measure the status light color off a Lync-enabled desk phone and drive RGB LEDs to the same color  
 // 2016 Trevor Hardy  
   
 const int pinTCS230_S2 = 3;  
 const int pinTCS230_S3 = 4;  
 const int pinTCS230_Out = 2;  
 const int pinRedLed = 9;   
 const int pinGreenLed = 10;  
 const int pinBlueLed = 11;  
   
 const unsigned int max_width = 65000; //determined experimentally.  
 unsigned int PW_divisor = 0;  
 unsigned int pulseWidth = 0;  
   
 int TCS230_red = 0;  
 int TCS230_green = 0;  
 int TCS230_blue = 0;  
   
 int red_out = 0;  
 int blue_out = 0;  
 int green_out = 0;  
   
 // the setup routine runs once when you press reset:  
 void setup() {  
  Serial.begin(250000);  
  // declare pin 9 to be an output:  
  pinMode(pinRedLed, OUTPUT);  
  pinMode(pinGreenLed, OUTPUT);  
  pinMode(pinBlueLed, OUTPUT);  
  pinMode(pinTCS230_S2, OUTPUT);  
  pinMode(pinTCS230_S3, OUTPUT);  
  pinMode(pinTCS230_Out, INPUT);  
   
  PW_divisor = max_width/256;  
 }  
   
   
 // the loop routine runs over and over again forever:  
 void loop() {  
    
  read_TCS230();  
    
  Serial.print("Red: ");  
  Serial.println(TCS230_red);  
  Serial.print("Green: ");  
  Serial.println(TCS230_green);  
  Serial.print("Blue: ");  
  Serial.println(TCS230_blue);  
    
   
  if ( TCS230_red > 200){  
   //Red  
   red_out = 127;  
   green_out = 0;  
   blue_out = 0;  
   Serial.println("Red\n");  
  }  
  else if (TCS230_green > 120 && TCS230_red < 120 ){  
   //Green  
   red_out = 0;  
   green_out = 127;  
   blue_out = 0;  
   Serial.println("Green\n");  
  }  
  else if (TCS230_red > 150 && TCS230_green > 150){  
   //Amber  
   red_out =200;  
   green_out = 63;  
   blue_out = 0;  
   Serial.println("Amber\n");   
  }  
  else {  
   red_out = 0;  
   green_out = 0;  
   blue_out = 0;  
   Serial.println("Off\n");   
     
  }  
    
  analogWrite(pinRedLed, red_out);  
  analogWrite(pinGreenLed, green_out);  
  analogWrite(pinBlueLed, blue_out);  
  //delay(1000);  
 }  
   
 void read_TCS230()   
 {    
  digitalWrite(pinTCS230_S2, LOW);   
  digitalWrite(pinTCS230_S3, LOW);   
    
    
  //pulseWidth = pulseIn(pinTCS230_Out, digitalRead(pinTCS230_Out) == HIGH ? LOW : HIGH);   
  pulseWidth = pulseIn(pinTCS230_Out, LOW);  
  if (pulseWidth == 0){  
   pulseWidth = max_width;  
  }  
  //Serial.print("Red pulsewidth: ");  
  //Serial.println(pulseWidth);  
  TCS230_red = 255 - (pulseWidth/PW_divisor - 1);  
    
    
    
  digitalWrite(pinTCS230_S2, HIGH);   
  digitalWrite(pinTCS230_S3, HIGH);  
  pulseWidth = pulseIn(pinTCS230_Out, LOW);  
  if (pulseWidth == 0){  
   pulseWidth = max_width;  
  }  
  //Serial.print("Green pulsewidth: ");  
  //Serial.println(pulseWidth);  
  TCS230_green = 255 - (pulseWidth/PW_divisor - 1);  
   
    
  digitalWrite(pinTCS230_S2, LOW);   
  digitalWrite(pinTCS230_S3, HIGH);  
  pulseWidth = pulseIn(pinTCS230_Out, LOW);  
   if (pulseWidth == 0){  
   pulseWidth = max_width;  
  }  
  Serial.print("Blue pulsewidth: ");  
  Serial.println(pulseWidth);  
  TCS230_blue = 255 - (pulseWidth/PW_divisor - 1);  
    
 }  

Tuesday, March 15, 2016

Antenna Pre-amp - Part 3 - Switch Board and Antenna Jacks

Last time I left-off having built a second version of the pre-amp proper using the designers suggested layout and the circuit worked much better (as measured by the steady-state current).  Now onto the rest of the pre-amp box.

Again, taking cues from the original design, I decided to include attenuators, both before and after the amplifier. To do this, I used one of many calculators online to calculate the resistors for a T-style attenuator. The resistors were ordered as a part of the original pre-amp parts order. Metal film, 1%, still pennies a piece. I also decided to include an antenna switch in the design.

When it came to construction, wary of my previous inattentiveness to layout, I wanted to do the best I could to keep the leads short and provide a solid ground plane, even just for the attenuators. I decided to use a strip of PCB scrap as the common ground throughout the signal path. I also decided, in what is likely an abundance of caution, to use RG-316 coax between the attenuators.

The attenuators would be switched, and I used the leads of the switch as mounting points for the resistors. The switches were DPDT, bypassing the attenuator in one position and routing through it in another. Only the signal side of the attenuator was switched, the ground side was directly connected to the PCB strip.

Using an existing enclosure needing to finally have a project to house, I prepped the front plate for mounting the switches, punching guide holes for all the switches and drilling them out with a hand drill. The results were not the prettiest but most of the failings in my handiwork are hidden by the switches mounting hardware.

Here are the results as seen from the inside of the enclosure.





The back side of the enclosure was used to mount the three input antenna jacks, the output jack, and the power jack.  This was all much simpler; just drilling holes and mounting the hardware; the coax connections come later.



The final step comes next, completing the final assembly.

Saturday, January 16, 2016

Fixing the Vacuum Cleaner

Our vacuum cleaner stopped running for more than a second or two at a time so I tried fixing it.



After all of this work, I determined the motor was overheating for unknown reasons, even when no external load was being applied. Verdict: dead vacuum cleaner.

And I don't even get any spare parts out of this mess, just a pile of plastic to put in the trash.