31 December 2008

Xbee Shield Kit Schematic V2.0

I've been getting a lot of Google hits on the blog looking for the Arduino Xbee Shield Kit V2.0 schematic. I had a hard time finding V2.0 also 'cause NKC Electronics seems to only have V1.0 posted. NKC's Support Forum link is also 404'd. I emailed them in October about the bad link but when I checked a few bits ago, it was still a dead end.

I ended up getting my V2.0 schematic copy (that's only a partial shot over on the left) from NKC support via an email exchange and have uploaded the pdf to: http://www.mediafire.com/?zjtykjtohji

Let me know if the link doesn't work for you. Or leave a comment if it does. Tell me what you're using the shield for. Or look around at the rest of the blog. It's free ...

26 December 2008

Cheatham Shooting

After the presents were all ripped open, we went up the hill to shoot things. I brought along my Ruger Mini-14, Kimber Tactical .45ACP, and a cheap little Bersa Thunder .380.

Not to be outdone, pop-in-law had his Mini-14 with a new Tapco collapsible stock (Christmas present), his Ruger 44mag revolver, Ruger Luger .22, and a Browning .22. That and a box of clay pigeons, we were good to go.

Well almost good to go. I forgot my bag of ear/eye protection in the garage so we had to go to Bass Pro Shop in the Opry Mills Mall first. What a zoo. No one told these people that there was an economic down-turn. The mall and every parking spot was pack-o'd. On the way to Bass's (Basses?), pop-in-law mentioned that we needed to go to the "gittin place". Huh? In Tennessee, the place to "git" things is called a "gittin place".


Comic #142

You laughed and yes, you are going to hell. AnotherRandomDay.com

We went to Cheatham WMA range in Middle Tennessee just like the year before. But this time, they had a sign posted that required a shooting fee. It's an unsupervised outdoor range with trash and spent shotgun shells everywhere. I don't know what they plan to do with the shooting fees. I hope they clean up the place.

On the 50yd section, we tossed a bunch of clays on the side of the hill and went at it. I shot pretty decent with the Mini-14 (.223) and really well with the 4" Kimber .45ACP. I'm a good shot with a pistol but I was thrilled that I was shattering clays at 50yds. I think it was more due to the pistol quality than my shooting talent. With the Bersa .380, I was hitting the side of the hill and that was about it. If you're further than 25yds from the bad guy, the Bersa isn't going to be much use. Of course, if you're more than 25yds away, you probably should be running instead of shooting.

My son mostly shot the Browning .22 rifle, the Luger .22, a few times with the Bersa .380 and had a great time. He gets so anxious and shoots really fast instead of taking his time and enjoying each shot. Instant gratification is his game. But he's only 10yo so I guess waiting more than a second between shots is waiting an eternity.

25 December 2008

Nike+ with Linux

When we left town for Christmas, I wanted to bring my Xbee and Arduino stuff with me. I made decent progress during the Turkey break but then work took over my life again and I did nothing with 'em for the next 3 weeks. With almost two weeks of pending freedom, this seemed like a perfect chance to get working again. But as I was packing two shoeboxes full of junk, my wife said "ah ... no". Damn. I hope Santa brings me something fun or I'll go nuts.

He didn't disappoint. For Christmas I got a Nike+ which is a piezoelectric accelerometer that slips into your shoe and then transmits data to a receiver on an iPod. Yes, this is just a fancy pedometer but it's something to mess with on Christmas break and keep me sane. I used to run a lot. Now I run when I can. My problem with running (besides not having much free time) is that I'm obsessed with my stats. Sometimes I have to run without a watch else I stress myself out over my splits, my pace, what I did last time, what I should of done this time. I'm a mess. I'm better now with this obsession than I was 15 years ago. But I'm also fatter and slower so I've had to lower my expectations of myself. I guess age not only makes you wiser, it makes you feel mortal.

Anyway, Santa brought me a Nike+ thing that will only feed my stat obsession because it tracks my runs by distance, time, pace, and calories burned. Sounds cool. Since the Nike+ sensor requires an iPod, Santa also brought an iPod Nano.

Not so good. See, I'm not an Apple fanboy. Not at all. I pretty much hate Apple, iPods, iPhones, iTouch, i-whatever. Not that I think the products are crap, it's just the whole Apple religion that the fanboy freaks sign up for. And I hate that punk in the Windows vs Mac commercials.

So I have an iPod. Which means I need iTunes to run the thing. Oh joy. Last time I ran iTunes for my daughter's iPod, it completely trashed my mp3 library and "optimized" it so that I couldn't find a damn thing. Task 1 - Look for an iTunes replacement that runs on Linux. I googled around a bit and tried a few alternatives. My favorite so far is the freeware Floola which can run without installation on Windows, Mac, or Linux. This app is pretty nice and hasn't disappointed yet. I loaded up 7.3GB of music, slipped the Nike+ sensor in the shoe and went for a run. Besides struggling with the headphone cable that wanted to choke me and trying to find a comfortable spot for the iPod armband, the first run went well. The interface couldn't be easier. Select a work-out, choose music and go. When done, click a button.

Nike has a website that good little fanboys/girls are supposed to use for syncing the workouts and tracking progress. What a piece of crap. The website is all in flash. It requires iTunes to upload the run. I wanted to be fair and see what it was about so I booted into Windows, installed iTunes and fought with it for about an hour. Did I mention that it was crap? The latest iTunes is better than the crap I had used a few years ago but still crap. The iTunes - Nike Plus link is very fragile. On the first run, you have to have a nike+ account already established else iTunes fails to upload your run and then won't ever ask for your website login info. Very crappy. I'm not the only one with this problem. Many people rant about it in the Apple forums. For me, the fix was simple. Using Explorer, I accessed the drive directly and copied the workout XML file from the sync folder to the latest folder. I made sure I was logged into the Nike+ website, then re-opened iTunes and clicked sync on the Nike+ tab. The result wasn't worth the effort. Crappy interface showing my run. woo hoo.

There's gotta be a better place that manipulates the Nike+ data, it's just XML. One of the first alternatives that I checked out was Runner+. This is pretty decent but only two options for syncing the data. Pull the data from Nike Plus crap website or use a Yahoo Widget that only runs on Windows or Mac. Next, I looked into Runometer. To sync data on this website, no widget or ActiveX control is need, all you need is the XML file. You can upload runs from your Nike/iPod kits, Garmin devices, or use KMZ files generated from MyMotion-enabled Windows Mobile devices. Very linux friendly since it only cares about the data. I also like the ability to publish my most recent run/runs like the image above.

I'm wondering how long the sensor will go before the battery dies. When it does, I'm going to give this instructable a try: Replace battery in Nike+ sensor for under $5

05 December 2008

Xbee Chat

OohRah! I now have two Xbees chatting. I hadn't messed with the Xbees for a few weeks because work was crazy and the Holidays, etc. After a few days of vacation, I dusted off the junk and tried to remember where I was.

One Xbee is in an AdaFruit Adapter connected to an Arduino Duemilanove and the other Xbee is in an Xbee Explorer USB.

The Arduino is wired to the Xbee Adapter Kit with only 4 wires. I used wire and connectors from the Wide Screen Salvage project.
  • Arduino Gnd -> Adapter Ground
  • Arduino +5V -> Adapter +5V
  • Arduino Tx -> Adapter Rx
  • Arduino Rx -> Adapter Tx
Note that the Tx->Rx and Rx->Tx. Since the Arduino and Adapter are talking to each other serially, this makes sense. But for the first few attempts, I had Rx-> Rx, Tx->Tx and of course it didn't work.

Digi's X-CTU was used to upgrade firmware. I originally had Coordinator firmware on the Explorer board but communications seemed spotty. Once I put ZNET 2.5 Router/End Device AT firmware on both and configured them like I wrote last month, things started coming together.

The Arduino is running a real simple sketch - it simply writes "Testing" to the Xbee which gets transmitted and then received by the Xbee connected to my PC. I used the X-CTU terminal tab to see the incoming message's. Kinda basic but I needed something to save my sanity.

Here's the next plan. Upgrade firmware on the PC Xbee to API (ZNET 2.5 Router/End Device API) and then use xbee-api - A Java API for Digi XBee/XBee-Pro OEM RF Modules and see if I can start programmatically working with these things.

01 December 2008

Wide Screen HDTV Surgery

Our Sony 46" Rear Projection HDTV had a good life. We bought her new in 2003 and had only minor problems. A few months back, she suffered convergence issues that I just didn't want to pay to have fixed. It was a good excuse to look for an LCD wide screen. So the old Sony was banished to the garage to make room for the new Sony Bravia.

With the convergence problems, I couldn't sell the TV except for parts so what to do with it? Crack it open and see what can be salvaged, of course!

After carefully removing 753 (or so) screws, the rear panel, speaker grille, front panel (beznet) and mirror cover pop right off. The first interesting thing I found was 4 sensors around the perimeter of the beznet. These are pointing in, away from the front. It took me a second to realize the coolness of this design. Your average couch potato points the remote at the screen. The IR goes thru the screen, bounces off the mirror, and gets picked up by one or more of the perimeter "bounce-back" sensors. This, in effect, makes a 46" IR sensor. Very cool.

As I stared at all the various boards and wire harnesses, I figured a Service Manual might come in handy. After much Googling, I located a manual at:
forum.electromaniacs.com - Downloads - Service Manuals - Sony - SONY RA6 CHASSIS KP46WT500 PROJECT

I posted a thread on Make Magazine's blog to see if anyone had ideas on tasty parts to take and/or suggestions to do with this thing. The best response was actually what I expected. Maybe some good wires, connectors, and capacitors. But basically boring.

Other than the IR sensors I mentioned above, I haven't seen any cool things. The bulbs were disappointing as they are actually CRTs which don't appear to have any obvious secondary use. The speakers are a keeper as well as the magnifying screen. When the weather cooperates, I'll go back to the garage and see what else has promise.

21 October 2008

Xbee Adapter Kit

I'm still having problems with the Xbee Arduino Shield. I struggled with building the darn thing and am now wondering if I fried a component. I only applied soldering heat for max of 3 seconds and then waited 5 seconds before trying again. But some leads were troublesome and I applied, applied, and re-applied heat many times. I'm not getting my Xbee in the Xbee Explorer USB to successfully chat to the Xbee in the Aruino shield connected to the Pololu LV-168 Orangutan. I'm a man of action so after wasting hours debugging, what do I do? Buy something new!

Lady Ada's XBee wireless modem adapter looks interesting. Like the Xbee Explorer USB, it can can be quickly hooked to a USB port but it also has headers exposed that can used for prototyping.

Like the Xbee Arduino Shield, it's also a kit but it's only about 10 parts, only $10, and dirt simple to build.

It took about 1/2 hour to build, no troubles. Within an hour, I had both Xbee's associated with each other. Here's what I did:
  • Xbee 1. Put it in the Xbee Explorer USB and plugged into my laptop. It shows up as /dev/ttyUSB0.
  • Xbee 2. Put it in the new shiny Xbee Adapter with an FTDI USB TTL-232 cable and plugged into my laptop. It shows up as /dev/ttyUSB1.
  • Used Digi's X-CTU to setup Xbee 1 as a ZNET 2.5 Router/End Device AT
  • To use X-CTU, I had to first setup User Com Port COM10.
  • Named Xbee 1 to PINK by setting the Node Identifier (NI)
  • Set PINK's destination to Xbee 2 by entering this command in the terminal: ATDNWHITE
  • Left X-CTU running and started another X-CTU instance for Xbee 2
  • Used Digi's X-CTU to setup Xbee 2 as a ZNET 2.5 Router/End Device AT
  • To use X-CTU, I first had to setup User Com Port COM11.
  • Named Xbee 2 to WHITE by setting the Node Identifier (NI)
  • Set WHITE's destination to Xbee 1 by entering this command in the terminal: ATDNPINK
After that, each endpoint was linked to the other. A quick quick to confirm: In the terminal tab of each Xbee type:

+++
ATND

The Xbee should reply with the association information of the other. In PINK's terminal, I saw info about the associate WHITE:

1FEC (MY - 16bit Network Address)
0013A200 (SH - Serial Number High)
403E2174 (SL- Serial Number Low)
WHITE (NI - Node Identifier)
FFFE (? - Signal Strength?)
01 (?)
00 (?)
C105 (?)
101E (?)

Next, I'm planning to connect the Xbee Adapter to the Orangutan and have it send a simple test message to XBee in the Explorer.

12 October 2008

X-CTU with Linux

Update: There's been a few reports that digi's X-CTU has been targeted for a malware exploit.  I personally have had zero problems but wanted to share the warning.  Practice safe coding!

There is a Python X-CTU replacement that works well.  Read about it at the RoboSci Blog:

http://www.dudek.org/blog/180 

Gregory Dudek's download link for his xbee-gdxctu.py tool is midway down the article.  Also read the article comments for a list of required python libraries.

-----------------------------------------------------------------

X-CTU is the utility to use for setting up an Xbee. What the acronym stands for is a mystery. What isn't a mystery is that it's a Windows app.  

This quick post will explain how to run X-CTU with linux.  If you find this post useful, please consider leaving a comment.

From Digi's Knowledge Base:
X-CTU is a Windows-based application provided by Digi. This program was designed to interact with the firmware files found on Digi’s RF products and to provide a simple-to-use graphical user interface to them.

X-CTU operates strictly for Windows Platforms. The versions of Windows which are compatible with X-CTU are as follows:
Windows 98, 2K, ME, XP

X-CTU is NOT compatible with the following versions and Operating Systems:
Window 95, NT; Unix; Linux
Bummer. I ran the installer with Wine and the app seems to run but X-CTU can't find my USB COM port. I spent a few minutes on it and gave up.

For the past week, I've been booting into Windows XP to use X-CTU. That got old really quick so I went back to see if I could get X-CTU to work in Linux.

After running the X-CTU with Wine, the program is installed in

~/.wine/drive_c/Program Files/Digi-MaxStream/XCTU


Save up to 70% on Inkjet and Toner Supplies!
Just go there and run the X-CTU.exe program and it'll start right up. Except it won't recognize your USB serial port.
When I plug in the Xbee Explorer USB to my PC, it shows up as

/dev/ttyUSB0

A quick way to see your port name is to run this command:

ls -lt /dev/tty*

This will list all serial devices sorted by date with the newest at top.
I just needed a way for Wine to see that port.

While poking around in the .wine folder (see the above image), I noticed a folder called dosdevices. According to the Wine wiki, this folder holds device info.

For Wine to see a COM port, you simply have to create a soft link in the Wine dosdevices folder which is:

~/.wine/dosdevices

I created the soft link like this and randomly chose a high port (com10):
ln -s /dev/ttyUSB0 ~/.wine/dosdevice/com10

Then run X-CTU, go to the PC Settings Tab, User Com Ports Tab, type your new com soft link (in my example above, I used com10) in the Com Port Number box, and click Add.


Works great. Or at least it acts the same way as it does under Windows.
In the Select Com Port list, select your port, setup the correct serial params and click Test.

You should see a dialog that says "Communications with Modem .. OK". If not, make sure that your soft link points to the correct com device. Another occasional problem is the firmware version that is loaded on the Xbee.

If the API firmware is installed, you need to go to the PC Settings tab and click the Enable API checkbox.

My only problem now is that X-CTU doesn't remember the User Com Ports between runs so I have to re-enter it each time. Minor annoyance since it's easier the booting into Windows each time.

BTW - The X-CTU User Manual can be found here.

What do you think? Leave a comment.

01 October 2008

Xbee Arduino Shield Kit

Yow. I've soldered a few things in my day but I kinda struggled putting together the NKC Electronics Freeduino Arduino Xbee Shield V2.0 Kit. Sure laugh it up, look at the very few parts in the picture. But this took me almost 3 hours of intensive labor, smelling caustic fumes, and burning fingers. I clearly over estimated my solder-foo.

The kit is great, well marked, pieces are minimal, the assembly instructions are clear, I just need practice soldering the many header pins. I'm so glad there wasn't any Surface Mount (SMT) because I couldn't have done it.

Now that it's built ... Now what? I need to interface this thing to the Pololu LV168 Orangutan Robot Controller. The shield is intended to work with an Arduino not an Orangutan. Both are based on the Atmel ATmega168 microcontroller but different form factor, different layout. Hmm ... Did I buy the wrong Xbee thing? Why was the shield thing the way to go? This click-to-buy option on web pages is starting to get me in trouble. I buy before I really know if it's the right solution. Hell, at least I got to practice my soldering skills.

The great thing about an Arduino shield is that it lines up with the sockets on the Arduino board and makes all the necessary electrical connection auto-magically.

The bad thing is that an Orangutan isn't the same form factor as an Arduino and that shield wasn't going to just line up and plug in. I need to connect the pins myself.

The best that I can tell, the Xbee really only needs 4 pins connected. Many other options but in the dirt simple mode, just these four:
  • +VCC
  • Ground
  • Din (Tx)
  • Dout (Rx)
The shield has a TLV2217 voltage regulator that takes the Orangutan's +5V and outputs a nice +3.3V for the Xbee. I knew that I wanted that shield for something. So, I need to power the shield with +5V but where? Where does the voltage get applied? Looking at the schematic, it was still not clear. The only place I see +5V is to the ICSP. Could that be it?

I posted a few forum questions at various boards and received the usual RTFM responses. Those are really helpful. I'm struggling, just have a question that I can't find the answer to anywhere, I really have read the flippin' manual and searched till I'm blue, and the experts don't help. Instead they write, "If you look at the pins on an arduino, you can see which pins get connected to what". Great, thanks much.

In the ICSP link above, the Tinker It Now dude says "connect the 5v only if you want your Arduino to power the target board". That was the first clue (thanks Tinker It Now) that I found about how a shield gets powered.

So I hook +5V to the shield's ICSP pin 2, GND to the shield's ICSP pin 6. Half way there.

What about Rx/Tx (Din/Dout)? What pins do they get hooked to? On an Arduino, digital pins 0/1 are Rx/Tx. Are they the same for an Orangutan? Pololu's excellent docs come to the rescue yet again. TTL-level communication are with pins PD0 (RX) and PD1 (TX).

But it can't be that easy, can it? After I hooked it up, I didn't seem to transmit. Something's wrong. Stupidity is what's wrong. Don't hook Rx to Rx and Tx to Tx. The Rx from Xbee goes to Tx on the Arduino/Orangutan. The Tx from Xbee goes to the Rx on the Arduino/Orangutan. That's better. Make the right connection and the damn thing works. Cool. What's next?

22 September 2008

Xbee Sounds Good

Although the Orangutan has an 8-character x 2-line liquid crystal display, I'm finding it tough to debug my AI and sonar troubles. I write messages to the screen but without history, I miss the important stuff and end up having to repeat the test over and over and over. I'm looking at using the serial port for writing debug messages.

I tried Atmel's AVR Studio that's an Integrated Development Environment (IDE) for writing and debugging AVR® applications in Windows® 9x/NT/2000/XP environments. But since I use Linux, not Windows I've had a few difficulties getting it going using Wine. I need to spend some time getting this going cause I'd much rather use an IDE than an editor, Make files, and print statements. On my to-do list.

In the mean time ... Why spend time fixing a problem when another interesting gadget is waiting to be played with?

When I was mucking with the Gumstix controller, the idea of using Bluetooth and/or Wi-Fi to remotely communicate was pretty cool. Alas, the Orangutan doesn't have cheap wireless options. Or does it?

Digi's Xbee RF Modules sound really interesting. Low-cost, low-power mesh networking for about ~$25 each. Sparkfun has a good selection of the various Xbee flavours. The 2mW Series 2.5 Wire Antenna version has a 400' range and is the one that I have my eye on.


Here's today's plan:
The Xbee shield is cheap, about $14, and will allow me to interface the +3.3V Xbee to the +5V Orangutan. The Explorer will run with my PC. As the Hummer-bot moves around, I'll have the Orangutan send status messages so I can understand why it turned and slammed into the wall. I'll use the PC bee to view the status and then be able to remotely send control commands to Hummer-bot.

15 September 2008

Orangutan - Sonar Struggles

I admit. My AI skills are lacking in both skill and quality. My attempt to make a ex-RC car into the super Hummer-bot has been less than successful (so far). After frickin' amazing success on the first fews days of using the shiny new LV168 Orangutan Robot Controller, I've come back to Earth and have been struggling.

My bot is a cyclops with a single sonar range finder mounted on front. I'm doing a very simple algorithm that drives straight until it detects an object closer than 24". It slows and does a random 15 degree turn to either right or left. If the object is still closer than 24", it continues to turn in the same direction. If the coast is clear, the wheels straighten and speed increases. Pretty simple. In mostly open areas, it works well. In my hallway, it's a deathtrap. Hummer-bot gets caught on the first or second corner and the car absolutely flips out, spinning wheels and turning back and forth until I rescue it.

For the first few days, the Sonar Range Finder appeared to work spot on. Now it needs a dog and a cane 'cause the damn thing can't see anything. Could be due to Hummer-bot smashing into the wall repeatedly during a spastic frenzy of very un-AI behaviour. My sonar acts either completely dead or randomly sends wild readings.

This is a code snip of the Analog-to-Digital Conversion (ADC) code for reading the sonar. I tried for an hour to setup the Google Syntax Highlighter so that the code would look pretty but I failed. Instead you get a screenshot.

As you see, the sonar reading code is simple. Most of it (all?) is stolen re-used from LV168 resources that are available on Pololu's great project pages.

The Maxbotix LV-MaxSonar- EZ1 Sonar Range Finder detects objects from 0 – 254 inches (6.45 meters) with 1-inch resolution for distances greater than 6 inches. My finder suddenly seems to only see objects in a 6-12 inch range and very sporadically.

I've tried different analog pins with the same results so I'm suspecting I have a damaged device. They're fairly cheap at $25 but I hate to buy the same thing. I may need a new shiny.

23 August 2008

Pololu Orangutan - New Shiny

A while back, I bought a Gumstix with the hope that I'd interface it to an RC car. I wanted to see if I could make a pseudo-autonomous car that would zoom around the yard and I'd monitor/control it via Bluetooth or Wi-Fi. After spending a few hundred dollars on various pieces, parts, and expansion boards, I had a pretty cool setup. The Gumstix motherboard runs Linux, has great community support. But it was overkill for my hobby needs. I got frustrated with attempting to interface it with a simple PWM motor controller. No progress == boredom, so Mr Gumstix was soon put on a shelf.

On a recent break from work, I pulled out the Gumstix and wanted to try again. My motor controller kit came from Pololu so I went back to their website to try and remember where I was. And there I saw the next shiny thing that I must own. A shiny new LV-168 Orangutan Robot Controller.



So ... Out came more dollars and the Gumstix has gone back to the shelf. The description of the Orangutan is great, seems to have what I need:
(from Pololu's website)
The Orangutan robot controller is a complete control solution for small robots. It includes an 8-character x 2-line liquid crystal display, two bi-directional motor ports, a buzzer, three pushbuttons, and up to 12 user I/O lines, yet the compact module measures only 2.00" x 1.85" and weighs less than 1 ounce. Because of the complete feature set, very few additional components (such as sensors or motors) need to be added to complete the electronic portion of a small robot. The small package allows for greater flexibility in incorporating the electronics into the mechanical design of a robot.

The Orangutan is based on Atmel’s ATmega168 microcontroller, which features 16 Kbytes of flash program memory, 1024 bytes of SRAM, and 512 bytes of EEPROM. Up to 8 channels of 10-bit analog-to-digital conversion are also available. Because the user has direct access to the microcontroller, any development software for Atmel’s AVR microcontrollers, including Atmel’s free AVR Studio and the WinAVR GCC C/C++ compiler, is compatible with the Orangutan. An in-circuit programmer, such as our Orangutan USB programmer, is required for programming the Orangutan.

The Orangutan input voltage is 5-10 V, making it well-suited for use with small DC motors and 5- to 8-cell NiCd or NiMH battery packs. The motor driver can supply up to a maximum of 1 A per motor channel, subject to power dissipation requirements. Total power consumption (with motors and buzzer off) is under 15 mA.
Sounds great, what can I lose by trying it out? Um, $50.

I ordered on Friday night after midnight. I couldn't just order the controller, I needed the USB programmer also. The combo meal deal is what I needed. After shipping, it was $84.90.

I live in a small town, mail is sometimes slow so I was amazed when my package arrived Tuesday, 2 business days after ordering. Very nice.

Unpacked around 7pm and by 10pm, I had both RC motors hooked up and under programmatic control. By 11pm, I had a Pololu Sonar Range Finder (left over from the Gumstix days) working. Not a bad night's work. Much more to do but for now, the car drives down the hall until it sees a wall and then randomly turn right or left. It soon gets hung up on a corner, spins its wheels, and wildly turns the front wheels like a spastic creature. This is fun stuff.

The code is written in C with Orangutan-lib and AVRDUDE to program the Atmel ATmega168 microcontroller. Really, no learning curve, this has been dirt simple. The resource page on Pololu's LV-168 page has been great as well as their support forums.

15 July 2008

Money 04 - 21% Return with Prosper

I'm now 4 months with Prosper. So far, so good. All loans are still current with an average interest rate of 13.75%. I've invested $1000 about 4 months ago and my account is at $1069.70. That works out to about a 20.9% annual return. My stats are below:

The average loan interest rate has actually gone down since last month because some of the higher interest loans have been paying down their principal.

I have a cash balance of $49 and $59 of payments in transit. In the next few days, I'll make two more $50 loans using my so far so good strategy: bid only on 100% funded and soon ending listings.

28 June 2008

Education 02 - Help Yourself

The boss called the other day and told me about an applicant that didn't fit any of our open job reqs. She had experience but it was from several years back. I think she had taken time off to be a stay-at-home mom or something like that. He called to ask for ideas to suggest to applicants in similar situations. Rather than just saying "thanks, but no go", he wants to give suggestions to how they could help themselves. And then say "thanks, but no".

What can applicants do to make themselves more employable when they don't have recent experience? What can they do to show potential employers that they still are technically sharp and that they have employable skills?

A few months back, I ranted about how so many engineers fail to maintain their edge. I whined that there's so many free options that people can use to self-educate themselves and stay sharp yet they do nothing. So when the boss asked if I had any ideas, I said "sure, I have a few opinions".

Of course, every good geek should be doing what I'm suggesting below, but my main point of this writing is to emphasize that if you're looking for a job, you need to show the employer that you're active in the field, that you care and are willing to go the extra mile.
  • Read Technical Books. Don't just sit in front of the television, night after night watching another stupid reality show. Go to a bookstore. Go to your library. Search Google for eBooks. I usually ask interviewees "tell me about the last few books that you've read". I had one guy say "Harry Potter". That in itself wasn't bad but when I asked "anything else?", he had nothing. We didn't hire him. Not because he read Harry Potter, he just didn't show me that he cared about "bettering himself".

  • Take Free College Courses. Many many colleges are now sharing webcast/podcasts of great courses. Here's a very small selection. Just search and you'll find gobs.

  • Join a User Group. Many cities have a Linux User Group (LUG) or a Java User Group (JUG) or a whatever. My small city even has a 2600 meeting - not sure if I'd put that on my resume but the people that you meet are definitely interesting.

  • Contribute to an open source project. Search the SourceForge help wanted system and join a project.

  • Subscribe to Tech Related Websites. Add tech site's RSS feeds to your favorite reader so you can stay current with the latest poop. A few of my daily must reads are dzone, and Artima. Look over there on the left side of the blog and you'll see a few other good ones.

  • Attend Seminars. There's bound to be seminars in your area that are free or next to free. Check out your local college. Pick up a continuing education catalog. Google for "free seminar". And while you're at the seminar, talk to the person sitting next to you. Be social. Besides learning something neat, you may run into a potential employer or meet someone who can tell you about an opportunity.
  • Write a blog. Your blog doesn't need to be super tech-geek. It doesn't need to be competition to Joel on Software. It just needs to be a place to capture your thoughts - technical, non-tech, geek, life, whatever. Just write. Share a piece of code, write about a movie you just saw. Anything that keeps you involved. The blog doesn't even need to have readers (as evidenced by Buck Up Chinny). Just write.
  • Do a 7 in 7. Identify 7 mini-projects that can each be completed in a day. And then do 'em. As you complete each, do a short write-up to document what you did and what challenges you encountered. Better yet, blog about each project. Each project can be something easy, just make it a challenge. Make an LED blink. Convert a table based webpage to CSS layout. Interface something to an Arduino Nano.
Just do something and talk about it at the job interview. Show passion when describing it. If you don't care about what you do, I surely won't.

22 June 2008

Quotes 03 - Limitations

A man's got to know his limitations - Harry Callahan, Magnum Force (1973).

We were watching the Olympic Trials this past weekend and a gymnast stepped out of bounds twice during her floor routine. My wife said "those girls need to know their boundaries". I immediately replied with "A man's got to know his limitations". She looked at me like I was a complete idiot (a common look in my house).

15 June 2008

Money 03 - Prospering

Last March, I wrote about taking a chance and investing a few dollars with Prosper. After the initial investment of $600 appeared to be doing well, I added an additional $400 for a total of a $1000 investment. I've received a $25 new lender bonus and so far have collected almost $28 in interest payments for a total account value now of $1058.42. For a three month investment, that's around a 23% annual return. Not bad. It beats the 3% that my ING savings account brings or the 3.3% that my last 12-month CDs offered.

Check out my account status as of 15 June 2008. My average loan is around 14% but I just made another loan at 15% so the average will raise a hair.

I'm staying pretty faithful to my strategy: bid only on 100% funded and soon ending listings. I've also stuck with bidding on B or better credit ratings except for once when I was first setting up my loan portfolio.

I'm happy to report that *every* loan has been paid on time or early. Several lenders have made extra or additional payments. If a few months, I'll post my account again and we'll check the progress.

26 May 2008

Books 01 - Pillars of the Earth

My Favorite Book of all-time, no competition, is Ken Follett's Pillars of the Earth.

I first read a Ken Follett a few years back when I found Hornet Flight on the trader table at work. It was great, so of course I had to then read every Follett book that I could find.

Most were pretty darn good (Eye of the Needle, A Dangerous Fortune, and Jackdaws).

Others were not so great (Whiteout or The Modigliani Scandal).

Pillars was probably the 10th Follett book that I read but I had saved the best for last. I loved this book. The characters are so real. I hated the bad guy with every ounce of my body. Some of the scenes are so moving, I really had tears at time.

My daughter was reading Pillars the other night at a ballgame when the lady next to us asked about it. I attempted to explain "Well, it's about this family that's struggling thru 12th century England and the father is obsessed with building a church." I could see it in her eyes - "Wow. How interesting ...".

When World Without End was released last fall, I quickly grabbed a copy and read it within a few days. It's definitely a good read. It's set in the same general area as Pillars but about 400 years later. The characters are good, the bad bad guy is bad. For me, it just didn't have the same feeling. I'd include World as a favorite book but probably not in the top 25.

01 April 2008

Quotes 02 - Plan For It

De inimico non loquaris, sed cogites.
Do not wish ill for your enemy, plan for it.

I saw this quote recently in either a Vince Flynn, Brad Thor, or Lee Child book (I can't recall which author/book because this summer I've read all of their books - which are all great!). The quote really fits the Mitch Rapp / Scot Harvath / Jack Reacher persona. I've spent a few minutes on a Google search but haven't been able to find the origin of the quote.

It's quickly become one of my favorite quotes - It just sums up the world today.

15 March 2008

Money 02 - Making The Money


Today I hit 300 page impressions since I added adsense to this blog. Check out the earnings over there on the right. Yes! I have made exactly $0.01 for having those well placed, audience targeted ads all over my blog.

I've had the ads for almost two months now, so lets see ... $0.01 * 6 months * 17 = ~$1.00. Could it be true? In 17 short years, I'll make $1.00 !!! And mom said I'll never amount to anything.

08 February 2008

Groovy 01 - SOAP Server

As much as I like BeanShell (bsh), once I found Groovy, I don't think that I've done any new bsh development. I'm going to follow up on my earlier bsh blog entry where I promised to show cool bsh features but first I really want to lay the ground work for an Enterprise Service Bus (ESB) -like tool that I've been playing with called XMLBlaster. Now XMLBlaster doesn't call themselves an ESB. Instead they say they're MOM (Message oriented Middleware) with a lot of features.

They're website says XmlBlaster is a publish/subscribe and point to point MOM server which exchanges messages between publishers and subscribers. The message is described with XML-encoded meta information. Messages may contain everything, GIF images, Java objects, Python scripts, XML data, a word document, plain text. Communication with the server is based on CORBA (using JacORB) or RMI or XmlRpc, clients are free to choose their preferred protocol. Other protocols like email, socket or SOAP may be plugged in.

Like usual, I'm starting to get ahead of myself as I want to talk about Groovy. If you're not familiar with this great language, you must pick up Groovy In Action (GINA) as this is the Groovy Bible.

I have a Groovy SOAP Server as one "end point" or client and a number of other legacy app nodes. I'm currently using Groovy 1.0 but 1.5.4 is the latest. This new version brings features like Java 5 annotations, generics and enums, it provides significant performance gains, new meta-programming capabilities, new and improved tooling support like the new joint Groovy/Java compiler, the new interactive shell, or the Groovy Swing console, and a few other additions in its syntax, like the new Elvis operator or the ability to omit parentheses in methods with named arguments to make DSLs even more readable. Sounds great. I'm convinced so I'm upgrading as I'm writing this entry.

Grab the Groovy download and give it a try.

All installed? Great, let's move along. SOAP is a lightweight protocol intended for exchanging structured information in a decentralized, distributed environment. Groovy has a SOAP implementation based on Xfire which allows you to create a SOAP server and/or make calls to remote SOAP servers using Groovy. Get the Groovy SOAP jar and drop it into the $GROOVY_HOME/lib folder.

[edit 19 Feb 2008]
The Groovy website seems to have a broken link to download the soap jar. Try to get the jar at the link mentioned above but if that fails, try this:
http://momupload.com/files/77499/groovysoap-all-1.0-0.3-snapshot_jdk1.5.0.jar.html
[/edit]

First we're going to make an incredible simple SOAP server and then test it with the browser. Create a file named LogServer.groovy that looks like this or grab a copy here.

---------LogServer.groovy---------

import groovy.net.soap.SoapServer

// define the API
void log(logTime, logMessage) {
// real code goes here but we're just printing to stdout for now
println(logTime + ' : ' + logMessage)
}

// start server on localhost.
// use whatever port you want
def server = new SoapServer("localhost", 6980)
server.setNode("LogServer")
server.start()

-------------------------------------------

One of the great things with Groovy is that you can call Java classes from Groovy and Java can call Groovy. Because Groovy is Java. With this in mind, your SOAP server can invoke any Java legacy app. In the example above, we're just writing to std out.

Start it up by typing: groovy LogServer.groovy

In your browser, enter: http://localhost:6980

And you should see an XFire page of the available webservices at that port:

Available Services:
  • LogServerInterface [wsdl]

  • Generated by XFire ( http://xfire.codehaus.org )
Pretty neat, huh? Click on the Web Service Definition Language (WSDL) link and you'll see all the wsdl that was generated auto-magically from our very simple SOAP server.

Next time we'll write a quick SOAP client and test this server out. Until then, buy the book and read the Groovy.

07 February 2008

BeanShell 01

I first ran across BeanShell (bsh) in early 2006 while looking for a way to better automate an Ant build. For the first few months, it was pure love. I couldn't get enough and I drove everyone at work nuts with my constant white board examples and endless emails. JSR 274 "The BeanShell Scripting Language" had recently been passed and I was sure that everyone would soon be loving Beany. Wikipedia says "BeanShell is an open source project and has been incorporated into many applications, such as OpenOffice.org, Apache Ant, BEA WebLogic Application Server, jEdit, and many others". Unfortunately, I haven't seen anything new written about bsh. The developer of BeanShell, Pat Niemeyer, hasn't updated the website not made a new release forever. I've sent Pat a few emails to ask about status but haven't received a reply. I guess the project is dead which is too bad because they're some really cool things that you can do with bsh.

So... what cool things can be done you ask? Patience grasshopper. Let's first get it installed. It'd be great if you'd review the "Getting Started" section of the bsh manual, but in a nutshell:

Grab the latest bsh jar which is currently 2.0b4. Either drop the BeanShell JAR file into your Java extensions folder or add it to your classpath:

Install as an extension. Place the bsh.jar file in your
    $JAVA_HOME/jre/lib/ext folder
Or add BeanShell to your classpath like this:
   nix: export CLASSPATH=$CLASSPATH:bsh-xx.jar
   windows: set classpath %classpath%;bsh-xx.jar

You can then run BeanShell in either a GUI or command line mode:
    java bsh.Console // run the GUI
or
    java bsh.Interpreter // run as text-only on the command line
or
    java bsh.Interpreter filename [ args ] // run a script file

It's also possible to call bsh from within native Java applications, to reach it in a remote server mode for debugging (very cool), to use it as a servlet, or even in an applet.

Let's check that it's installed and do some basic stuff. From a cmd line, type java bsh.Console and you should see the GUI start up and then have a workspace like the picture to the right. If not, check your classpath and try again.

I'm a hacker at heart so one of the first things that I did was to fire up the class browser (in the workshop, type classBrowser(); ) and started explorer classes in my classpath. This simple tool has helped me understand APIs and undocumented methods for many classes. Just select a package and then class and the browser will reveal the constructor(s), method(s), and field(s). Plus you can see the file system path of the class which has helped me several times when I had classes loaded multiple times.



There's much more to talk about but this entry is getting long. Next time, I'll discuss more Console commands and some bsh examples. In the mean time, download bsh and read thru the manual. I think you'll agree - BeanShell has so much potential.

02 February 2008

Quotes 01

Robert Heinlein wrote "A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects."

Now that's a great quote! When I first read those words in high school, I had to scribble them down in my notebook. I wanted to live those words. 25 years later, I still can't conn a ship, design a building, write a sonnet, and probably would fail at the invasion planning but I think I'm doing alright on the others. As a married man, I'm near expert on changing diapers, taking orders, fighting, and pitching manure!

30 January 2008

Stay Sharp - Free College Courses

I'm really floored when I hear about the lack of reading and self-help effort that the average engineer does after graduating. I recently saw a survey that showed most engineers read one technical book per year. Wow. That's incredible - how can an engineer survive? I know, some (most?) will say that they get their info on the web and who has time to read a book? But didn't you become an engineer because you have that drive to learn, to make things better? What happened?

I'll never forget a meeting about 12 years ago with department heads and the VP of Engineering. The topic was upgrading the office PCs from Windows 3.11 to this thing called Windows 95. We had the budget to upgrade but no funds for user training. I was an unknown geek at the time and spoke up "Why don't we buy a few books and let the users learn on their own? Windows 95 isn't very difficult". The VP glared at me and said "These people are adults, we can't expect them to learn on their own". Floored. I was absolutely floored by his comment. I kept my mouth shut and the company stayed with Windows 3.11 for another two years. That experience though has stuck with me. Too many adults think they need a training class for everything. Very
few are willing to try a new application on their own. Is it fear of failure?

This fear also stops many from bettering themselves by taking random college classes at local schools. I love to look thru the current catalog and see if I can fit in a class. Last year I took a robotics class and an advanced design patterns class. My job will pay for tuition if the class is even remotely related to my job. And if a passing grade is obtained. I know a few engineers that won't take a class because if they don't pass, then they're out of the bucks. What an attitude. Take the class, participate, learn, and it's darn near impossible to not pass.

I'm trying to encourage people at work to take a few of the free web classes that many great schools are sharing. I know a few guys (including me) that have recently taken the excellent Java Passion on-line courses. I've been saving off the links to these web classes in my del.icio.us education tag but now that I've stumbled across Online Education Database's wrap-up post Skip the Tuition: 100 Free Podcasts from the Best Colleges in the World and 200 Free Online Classes to Learn Anything, I think I have enough to keep me busy.

For the past year or so, I've trying to watch/listen to at least two class sessions a week of the various free web courses. This isn't hard to do. I rarely watch or listen to one straight thru. Usually start one late at night and then finish it in bits and pieces over the next day or so. The key is just do it and make it fit into what time I have available. Right now, I'm doing a few from MIT's Aircraft System Engineering course which was put together by shuttle astronaut and MIT Professor Jeff Hoffman and Professor Aaron Cohen, who was the Space Shuttle Orbiter Project Manager.

Many people have said to
me "I'm too busy, how can you find the time to do those?" I always want to reply "How can you afford not to?"

If you enjoyed this post please use the links below to add it to StumbleUpon, Delicious, or Digg
stumble upon | delicious | digg

29 January 2008

Kits

I'm looking for something to help get my youngest interested in making/engineering. He's a young geek, reads lots of books, watches MythBusters, SmashLabs and such. I want to find a something to pique his interest in building stuff.

In this month's Robot magazine, he saw a two-page ad for Tamiya robocraft kits. He's really been pushing for me to spring for the racehorse. It looks kinda cheap and I hate to waste the money. It's only $14 so I guess it won't drive me all the way to the poor house but I hate buying crap. I can finds lots of places selling these kits but haven't seen a review.

When he's a few years older, I hope he's interested in building stuff like the nerdkit. When I was a kid, my dad occasionally would build things from HeathKit. He made a heath kit oscilloscope around 1973 that was still working great at least 20 years later. I loved watching him make circuit boards, fix broken motors, etc.

For myself, I bought a gumstix kit with the dream that I'll build an Unmanned Ground Vehicle (UGV) that will roam my backyard. So far I've managed to spend lots of money, destroy my son's Hummer R/C, and make a very large pile of crap on the garage bench. And I've enjoyed every minute of it.