Tuesday, March 27, 2012

CPLDs, and the importance of knowing when to quit.

As an engineer, I can have a natural tendency to become obsessed with problem solving. Every problem I come across is a personal test, "If this problem is solvable, I will be victorious, I will conquer it". I think the hard thing can be recognizing when the solution isn't worth the effort. The ability to spot this before others is what can make a great manager, that's not what this post is about, however.

Let me tell you a little story about CPLD's:

Now if you ask my wife, she'll tell you I'm the cheapest, stingiest man alive, if you ask my mother, well she'd probably agree, but if you asked me, I'd tell you I just take pride in being resourceful. I've always had a hard time paying someone to do something I could easily do myself.

Friday, March 23, 2012


As a technophile, I think we're living in some pretty exciting times. (Wait, does "technophile" mean I like glow-sticks and pacifiers, or gadgets and software?). I think we've only hit the tip of the iceberg so to speak, in human progress, I often wonder what life will be like 500 years from now. Will this blog be archived on a microscopic chip containing all web content of the 21st century? Will a server in a city in a Martian colony house such a chip? Who knows? I probably wont, unless the secret to immortality is unlocked in the next 50 years or so (not necessarily so far fetched, either, wow!)

Anyways, there are some pretty big hurdles to overcome before we achieve total technological enlightenment as a species, and I think currently, there is no bigger obstacle than power and energy. The predominant technology in use for alkaline batteries has not changed significantly in over fifty years. What other area of technology has progressed that slowly? Oh wait I know, the other predominant portable energy-store, petroleum based fuels. Gasoline is pretty much the same thing folks were using 100 years ago. Why has nothing better come along? Well, the old technologies have a lot of benefits that have proven difficult to exceed in all aspects: simple, cheap, safe(relatively speaking), and dense. It's hard to beat the energy density per dollar of a AA battery or especially a gallon of gas. The problem is that they are not good enough, and will only hold us back. I don't have the answer. If I did, I'd probably not be putting it on a blog, but programming atmegas sipping mojitos on a Martian colony financed with the trillions I made cashing in on my solution (maybe I'd even break down and buy a Windows Phone, I do want one).

Somehow this post developed into an offbeat segue into what I really wanted to mention in a short post...

In researching mobile power options and designs for future projects, (2012 is the year of the robot, I mean it this time!), I ran across this on Hack a Day. A clever device utilizing a boost converter to suck the last drops of juice from a pair of AA's. This is not unlike, in principle, the myriad "Joule thief" type circuits various people have built and documented on the Internet, but I'm particularly impressed with this guy for a) putting together such a well thought out design, and b) turning this idea into a product. Check out his his blog about it here.

The utility of the device is extremely well thought out, you can use it as a raw power source, but there are also placeholders on the pcb to turn it into an led flashlight, or a breadboard power supply. There's an on-off switch as well as a switch for selecting 5 or 3.3 volts from the regulator. There's also an led power-on indicator.

The fact that he turned his passion into a marketable product, however is probably the most inspirational thing to me. I'd love to turn my hobbies into something that is financially rewarding as well as soul fulfilling. I'm going to pick up a few of his converters with next my next hobby budget cycle.


Wednesday, March 21, 2012

Android ADT r17 released today.

[Updated, it's the ADTr17 that's was released]

Google released the final/stable version 17 of the ADT today. There are a number of fixes and improvements that almost make me feel that the fine folks at Google read my blog, or at least are inside my head, reading my thoughts - which is entirely plausible too.

Check out the full release notes here

Of special interest to me are:

  • Better, automated jar dependency support: link
  • "Added a feature that allows you to run some code only in debug mode. Builds now generate a class called BuildConfigcontaining a DEBUG constant that is automatically set according to your build type." While this does not address my grievances, it's a step in the right direction.
  • Hardware virtualization support for emulator images based on x86, link. I haven't tried it out yet, but I'm keeping my fingers crossed that this gives a much needed shot in the arm (see what I did there?) to emulator performance. *And yes, I know my pun didn't really make sense.
  • Support for hardware GPU on the emulator: link. This is a big one!   Maybe the openGL support is better on the emulator now too.
  • Fixes for Proguard, with the "Conversion to Dalvik format failed with error 1"issue fixed. I wasted an entire evening and then some on that once, though I eventually fixed it by splicing a newer version of proguard into my local ADK.

I have a new version of Sedition almost ready to go, with only minor tweaks needed (most of the time needed will be QA'ing my tweaks). I think I'll wait until I publish again before kicking the tires on this release.


Sunday, March 11, 2012

MRF24WB0MA Wifi board update.

(For various values of  'success' at least)

I finally have the board physically put together:

Not pretty, but I think it will work.

After drilling the pcb holes for the .1" headers, I am now certain that surface mounting was the way to go for the daughterboard. I never would have been able to get the accuracy needed with my uber cheapo drill press, it actually moves about 0.5mm when you apply too much vertical force to the press, so about half way through the job I realized that slow drilling was the key to better accuracy. Still, I don't think I could pull off drilling holes for 0.05" headers.

To do a surface mount solder, I "pre-soldered" the pads where the board would be sitting:

Thursday, March 8, 2012

Perfectly etched Wifi host board

I did a second take at doing a toner transfer. This time it came out flawlessly. I did a few things differently. I dont know if any or all of these thing contributed, but I really could not have hoped for a better result.

Here's what I changed:

  • Used a part of a glossy magazine that was mostly white space. The first printing was on top of a color image in the magazine.
  • Once the magazine was lying on the copper, I covered it with a small piece of laser printer paper, instead of ironing directly
  • Maxed the iron setting, and waited a good 10 minutes before starting to iron.
  • Used constant motion of the iron, and made sure that all parts of the iron visited all parts of the copper, so that whatever "sweet spot" that was yeilding good transfer was hitting all parts of the copper.
  • Ironed until I did 300% of what I thought was necessary, basically ironed the crap out of it.
  • Let it soak in water for 2 hours before even attempting to remove the magazine paper from the copper.

 I dremeled and etched the board this evening, and even let my kids watch from a distance.

Fresh etched board. It's not soldered yet.

Tuesday, March 6, 2012

Microchip Wifi update.

My wifi board project has moved kind of slow lately. When I last left off, before the holidays last year, I had ordered 1.27 mm headers needed to make my planned adapter board to a more reasonable 2.54 mm pitch. I've been working with the awesome KiCid to design the adapter. While KiCad is amazing in what it lets you do for free, the user interface is not the most intuitive (I common phenomenon it seems in software designed be hardware people). It turns out that I think I may forgo the 1.27 header and try to mount the Wifi daughter board surface mount. I have a low-end pcb drill press for drilling through-holes, but I have serious doubts that I would be able to drill with the precision needed.

Anyways, I took the plunge this evening and decided to attempt a toner-transfer to a copper-clad. The result is this:
Try again!
I find myself trying to remember some Edison quotes about failure and perseverance. When I was ironing the thing I was convinced it was going to come out perfectly. I thoroughly washed clad ahead of time, I found the glossiest magazine paper I could find, and I ironed it for so long that I thought I was going to scorch the paper. Yet you can clearly see in the top traces where the steam-holes in my iron where. 

I was doing this late night, my whole family was asleep, so I tip towed through the house, fruitlessly searching for my wife's nail-polish remover, to remove the toner. 

As far as my final plans for what I'm going to actually do with the board, I'm leaning toward trying to make my own device inspired by openPicus. It is a general purpose standalone Wifi/tcp/http enabled I/O board. My only problem is that the pic chips I have are not nearly powerful enough to run the openPicus firmware, and I'm having a hard time finding dip PIC24's with 256k of flash, so I may peruse the code and see if I can use a subset of it.