1.21 Gigawatts!

Posted in Weather on November 1st, 2009 by nisburgh – Be the first to comment
Lightening, Corpus Christi, TX -- 2009, Nathan Isburgh

Lightning, Corpus Christi, TX -- © 2009, Nathan Isburgh

Lemonstein!

Posted in Comic on October 30th, 2009 by nisburgh – Be the first to comment

Cyanide and Happiness, a daily webcomic

My kinda racing

Posted in Interesting on October 27th, 2009 by nisburgh – 2 Comments

This looks absolutely awesome!

http://www.24hoursoflemons.com/

I think I might try and enter one year..  =)

Finishing the Power Supply

Posted in Electronics, Power Supply on October 25th, 2009 by nisburgh – Be the first to comment
This is part 4 of 4 in the series Variable Power Supply

I now had a power supply that delivered two independent, variable outputs – but I had no easy way to hook up to the outputs, know their voltages or switch them ( without unplugging the cord ). So, to round out the final product, I added some 3 amp breakers, voltmeters, switches and binding posts.

Drilling complete

Drilling complete

Here’s a shot of the project box after drilling holes for four binding posts, main power switch, power input cord and the breakers.

Connected together - lots of wires!

Connected together - lots of wires!

In this shot, you can see that I’ve installed the breakers ( long black devices on the left side ), the main power switch ( red switch on left ), the power input cord feeds into the blue screw-down terminal block and the individual control switches on the lid which allow you to control each output. A whole mess of wires, but not unmanageable. BTW, I found some great strain relief grommets at Fry’s. Just drill a hole in your box, put your wire in the strain relief grommet, snap the top in place and shove it into the hole – it provides a very secure and robust wire connection that prevents putting any strain on the screw-down terminal on the PCB. Definitely keep an eye out for those.

Binding posts!

Binding posts!

Binding posts installed, cover secured – and pumping out a near perfect 5 volts! The last step is to add the voltmeters.

Cutting in some windows

Cutting in some windows

Cutting out the holes for the digital panel meters. The meters I found were Velleman units from Fry’s. Easy to use and install, but not isolated like I mentioned before. Follow the instructions included with the unit to move the decimal point jumper ( blob-o-solder ). Most digital panel meters are shipped from the factory ready to read 0-200mV. That’s not too useful for our application, so we need to follow the instructions to create a voltage divider on the input so we can display in the range of 0-20VDC. It’s actually quite simple – you remove a couple of 0402 SMT resistors, then solder in some new ones ( SMT or PTH – connections are provided for both ) – a 10M and a 100k for the 0-20VDC range, if I recall correctly. After that, hook up a battery and the sensor leads. Use your calibrated multimeter to dial in 10 VDC on your power supply, then adjust the trimpot on the back of the panel meter until it reads 10.00 VDC. Now your new panel meter is calibrated and all that’s left is mounting it in the project box!

Finally!  My own dual-output variable power supply!

Finally! My own dual-output variable power supply!

Final product! You’ll notice that the main power switch changed – I had to do this so I could switch the power to the supply and the voltmeters with one switch ( DPST ). That wraps up the series on building a dual output variable power supply for the home workbench. Feel free to leave questions or suggestions in the comments!

Wireless is GO!

Posted in Electronics on October 22nd, 2009 by nisburgh – 2 Comments

I got my wireless link online several weeks ago and am just now posting.  Lame, I know, but after it was up I immediately set about working it towards something useful.  I’ll save that for another post; right now I want to detail what was involved in getting the RF link up.
First off, the hardware: two arduinos and two Nordic radios. I used the Arduino USB boards, one RP-SMA board and one chip antenna board.  Why two different RF configurations?  To test range, sensitivity and see what they look like.  Anyhow, the Nordic chips on these boards ( nRF24L01+ ) interface via the Serial Peripheral Interface bus standard, or SPI for short.  SPI is a fairly simple protocol, but the timings can get tricky.  Fortunately, the Arduino has an SPI interface built in, so all we need to do is download and install the SPI library from the Arduino Playground.  Better still, someone sat down and wrote a small interface library for the Nordic chips which encompasses a subset ( the important ones ) of the command set!  Find details and download Mirf.zip here.

Now that you have the necessary software, you need to hook up the hardware.  The bare minimum to get the radios talking is described at the top of the example files from Mirf.zip.  Just open the ping_client and ping_server example files to get started.  Connect Vcc and Ground to your radio, as well as the 5 pins listed at the top of the example files: MISO, MOSI, SCK, CE and CSN.  Set up both Arduinos, and install the client code on one, the server code on the other.  Use a wall wart to power one while you watch console on the other.  You’ll see the round trip times displayed on the client, and packet messages on the server!

One thing I immediately noticed in testing was that the client code would hang if the connection dropped a packet.  That made testing range rather cumbersome, so I looked at the code in ping_client and found this:

while (!Mirf.dataReady()) {
  //Serial.println("Waiting");
}

Hrmm, if he didn’t get the packet back from the server, he’d hang forever, since the server only replies once. Let’s put a timeout in here:

unsigned long time = millis();
while(!Mirf.dataReady()){
  if ( ( millis() - time ) > 3000 ) {
    Serial.println( "Timeout!" );
    break;
  }
  //Serial.println("Waiting");
}
You can't hear it, but they're talking

You can't hear it, but they're talking

Simple! Three second timeout. Now we can do some range tests, and when the connection drops, it will automatically attempt to reestablish after the timeout. You can barely see on the monitor console messages regarding their communication! Perfect!

Well, not quite. I don’t really want to walk around the house with a laptop, arduino, breadboard, nRF module and wires all over the place just to see the output on the console! Let’s interface a serial LCD so we can see real time RTT’s right on the LCD.

/**
 * Example code to run RTT tests between nRF modules and display results on serial LCD
 *
 * Pins:
 * Hardware SPI:
 * MISO -> 12
 * MOSI -> 11
 * SCK -> 13
 *
 * Configurable:
 * CE -> 8
 * CSN -> 7
 *
 * LCD Serial In -> 2
 */

#include 
#include 
#include 
#include 
#include 
#include 

// Scott Edwards BPP serial lcd backpack on pin 2
LCDSerialBackpack lcd( 2, SE_BPP, 9600 );

void setup(){
  Serial.begin(9600);
  lcd.begin();
  lcd.clear();
  lcd.home();
  lcd.blOn();
  lcd.print("Starting wireless");
  /*
   * Setup pins / SPI.
   */

  /* To change CE / CSN Pins:
   *
   * Mirf.csnPin = 9;
   * Mirf.cePin = 7;
   */

  Mirf.init();

  /*
   * Configure reciving address.
   */

  Mirf.setRADDR((byte *)"clie1");

  /*
   * Set the payload length to sizeof(unsigned long) the
   * return type of millis().
   *
   * NB: payload on client and server must be the same.
   */

  Mirf.payload = sizeof(unsigned long);

  /*
   * Write channel and payload config then power up reciver.
   */

  /*
   * To change channel:
   *
   * Mirf.channel = 10;
   *
   * NB: Make sure channel is legal in your area.
   */

  Mirf.config();

  Serial.println("Beginning ... ");
  lcd.cursorTo( 2, 0 );
  lcd.print( "Done" );
  delay(500);
  lcd.clear();
  lcd.home();
  lcd.print( "RTT: " );
}

void loop(){
  lcd.cursorTo( 1, 5 );
  unsigned long time = millis();
  unsigned long time2;
  byte fail = 0;

  Mirf.setTADDR((byte *)"serv1");

  Mirf.send((byte *)&time);

  while(Mirf.isSending()){
  }
  delay(10);
  while(!Mirf.dataReady()){
    if ( ( millis() - time ) > 3000 ) {
      lcd.print( "Timeout!        " );
      fail = 1;
      break;
    }
    //Serial.println("Waiting");
  }

  if ( !fail ) {
    Mirf.getData((byte *) &time);
    time2 = millis();

    Serial.print("Ping: ");
    Serial.println(time2 - time);
    lcd.print(time2 - time);
    lcd.print( " ms        " );
  }

  delay(1000);
}
Wireless goodness!

Wireless goodness!

Here we go. Output to LCD, status messages and we’re mobile with a 9 volt battery! What’s this LCDSerialBackpack.h though? Well, I use serial LCD’s a lot, and so I’m putting together a library to simplify their interface into a standard Print interface with special commands like clear() and blOn(). Makes the code easier to write, and I don’t have to remember the command sequences every time I need an LCD. After I clean the library up some more, I’ll put it up here for anyone that’s interested. If you’re following along at home, just rip out the lcd.* statements and put in the necessary code to display to your LCD.
Anyhow, simple to put together wireless connection. I’m very pleased. Like I said, I immediately set about making this thing useful ( RTT’s are nice and all, but let’s start pushing some real data over the airwaves! ), so expect future posts with more meat!

Pirate Radio

Posted in Movies on October 22nd, 2009 by nisburgh – Be the first to comment

This looks like a great movie:

Arduiniana

Posted in Recommendations on October 14th, 2009 by nisburgh – 2 Comments

This is probably the coolest gift idea I’ve seen.  Mikal, you rock.  And also, thank you for NewSoftSerial.  =)

The Pennybacker Bridge

Posted in Bridges on October 14th, 2009 by nisburgh – Be the first to comment
The Pennybacker Bridge, Austin, TX -- Nathan Isburgh, 2009

The Pennybacker Bridge, Austin, TX -- © Nathan Isburgh, 2009

Temporary prototype to permanent prototype!

Posted in Power Supply on October 12th, 2009 by nisburgh – Be the first to comment
This is part 3 of 4 in the series Variable Power Supply

Now that I had a working system, I needed to make it a little more permanent.  First of all, I wanted dual outputs, so here’s the new schematic I put together.

Simple variable power supply schematic

Simple variable power supply schematic

You’ll notice that the voltmeters are run off a separate battery.  This frustrated me to no end.  Basically, most digital voltmeters *require* an isolated power supply.  You can get high end units that self isolate, but they’re about $100 each.  I wanted digital for accuracy ( this problem only affects digital VM’s – analog would have worked as is ), so I just decided to go with the battery option and see how long it lasts.  I’d be curious what it might have taken to separate off a 9V supply and isolate it from the variable outputs.. I messed with it for a while, but the closest I got was a voltmeter with a pretty heavy bow in it’s accuracy curve. :)


Coming along nicely

Coming along nicely

Anyhow, off to Radio Shack and Fry’s for a few more pieces!  Proto board, plastic enclosure and extra parts to build a dual output power supply.  After I cut the board down and drilled mounting holes, I started moving components from the breadboard to the more permanent proto board.  Here’s a shot shortly after starting to solder.  I mostly used the long leads from the components to bridge everything together.  It’s not the prettiest option, but the cost/speed beats a one-off custom PCB.  Note the beefy heatsinks for the regulators.  An absolute must!  I was reading 145 °F on the heatsink just powering a stamp, LCD and PING))) sensor.


Not easy to use, but it works!

Not easy to use, but it works!

After a couple hours of soldering, fabrication and connecting parts, I had the beginnings of a working lab supply!


Up next, switches, voltmeters and binding posts!

A new friend

Posted in Insects on October 12th, 2009 by nisburgh – Be the first to comment

I found this guy just chill-axin’ on one of the patio chairs.

I seeeeeeeee you

I seeeeeeeee you

"What are you doing there?"

"What are you doing there?"