Monday, June 13, 2016

Heartbreak in Orlando





One again we mourn the victims of another brutal attack, this time on our own soil. Once again the innocent suffer. Once again, I really, really want to climb up on a soapbox and scream about the senselessness of it all. But once again I remind myself that the people who need to hear it won't listen, and the people who'll listen don't need to hear it.

My thoughts and prayers are with the people of Orlando, Florida, USA.


If you read this blog with any regularity, then you know that I'm just a geeky engineer. But you should also know that I love this particular bit of poetry, which is as appropriate now as it was when I put it up after the Brussels attacks:

The Law of the Jungle
(From The Jungle Book)

by Rudyard Kipling

Now this is the Law of the Jungle --
as old and as true as the sky;
And the Wolf that shall keep it may prosper,
but the Wolf that shall break it must die.

As the creeper that girdles the tree-trunk
the Law runneth forward and back --
For the strength of the Pack is the Wolf,
and the strength of the Wolf is the Pack.

Stay strong. Stay united. Watch each others' backs. Remember, you don't have to agree with each other on every issue - or even like each other, for that matter - to live in peace together. People from one corner of the globe to the other have forgotten this simple truth. Americans, in particular, ought to remember this tidbit from the end of the Pledge of Allegiance:

With Liberty and Justice for All

Tuesday, April 19, 2016

DIY Hack: A Better Marquee (Part I)


Lighted marquee decorations are very popular at the moment. A stroll through the aisles of just about any craft store (locally, we have Hobby Lobby, Michael's, and A. C. Moore) will prove that out. You can get letters, symbols, words, snowmen, stars, and who knows what else. You can get them in chipboard, galvanized tin, wood, plastic, and more.

I'm not sure why they're so popular, but I like them, especially the galvanized tin. It has a well-used industrial feel to it, which isn't quite a cool as Steampunk, but cool just the same. There are two problems, though. The first is that they're ridiculously expensive, considering what they are. That 'C' at the top of this post? It's only about 10" high and costs about $25. Fortunately, Hobby Lobby is always running sales of that kind of stuff, and I got it for half that.

The second problem is that these decorations are very monochromatic. The lighted ones almost always have warm white LED illumination, which is great because they look more like incandescent bulbs that way; that suits the Industrial aesthetic well. But even if I could forgive the lack of color, there's no motion either. Give me a flicker. Give me a wave. Just don't put me to sleep!

My wife, Tammy, gave me a couple of letters last summer for my birthday, an 'M' and a 'D' (my initials). I decided to do something cool with them, but that project isn't quite ready for prime time just yet. That will be the subject of another post or two. Or three.

And my daughter, Anna, found herself a marquee snowman this past Christmas. It's very similar to this guy right here. It's cute, but boring. That's when I decided to hack a marquee piece, and spice it up a bit. I wouldn't dare take apart my daughter's snowman. That just wouldn't be nice.

As luck would have it, my friend Cole turned 50 in early March, and she had a party to celebrate. I hadn't seen her since we graduated from college waaaay back in 1988 (shame on me; she doesn't live that far away), and decided that I was going to her party. Keeping in touch on Facebook just isn't the same as seeing someone in real life!

And speaking of real life: Cole is a Social Worker by day, but by night, she's a wildly creative artistic type. She beads and makes jewelry and all kinds of cool stuff (see her Etsy shop here). Her tastes are very eclectic, always have been, and that makes getting her a gift a very daunting task. What's an engineer to do? Well, make her something, of course!

I would never presume decorate someone else's walls, but Cole provided the perfect inspiration for my Marquee Hack. My daughter's snowman is safe for now; I went out and bought the "Galvanized Tin Lighted Letter C" you saw at the top of this post, went down into the Man Cave, and started getting creative.


The Concept
My friend Cole is more than just colorful - she's a whirling, twirling, endless kaleidoscope of color. This project cried out for animated, colored lights. Simply tinting the globes of the existing lamps just wouldn't do - too static. No, this project required some simple high-tech to bring it to life. I didn't have time to re-invent the world, though, so I went to my bread-and-butter solution to this sort of problem: neoPixels and an Arduino. My plan was to strip out the lamps that came with the marquee and replace them with neoPixels, and I'd use glass marbles to give the appearance of bulbs. An Arduino would run the show. It would need a pushbutton to select among a variety of light patterns, and a potentiometer to control the brightness. Because neoPixels can be power-hungry (up to 60mA per pixel if each of the red, green, & blue elements is on at full brightness), I decided to also remove the battery holder and use a 5V wall-wart power supply instead. Easy enough.


I can't even count the number of projects I've done using neoPixels and Arduinos. Most often, I've used the 5V, 16MHz Pro Mini for the brains of the operation. I've also used the Uno and the Mega, but the Pro Mini is tiny, powerful, and so inexpensive as to be almost disposable. The name-brand version is about $10, but I've found good-quality clones domestically for $5 and overseas (from China, usually) for $2.50 or less. As usual, the more you buy, the lower the price. I usually keep a bunch handy for just these types of spontaneous occasions. The Pro Mini is also available in a 3.3V version, but I don't use it for neoPixel projects because neoPixels require 5V.

Be very careful when buying from places like ebay, especially from overseas vendors. Many times, the description of the item doesn't match the title, and you may end up with a 3.3V board instead of a 5V. There's a lot of cutting and pasting going on, and not enough reading and understanding. When in doubt, ask!

I've also found neoPixels available in many different forms both domestically and overseas. Adafruit has perhaps the best selection domestically. The prices are a bit steep, but the service is excellent and fast. When I need a neoPixel ring, Adafruit is the best (and perhaps only) game in town. For discrete pixels or for strips, though, there are many choices. Just search ebay for "WS2812" and you'll find thousands.

When I need a small, flat footprint, but don't want to make or assemble my own circuit boards, I especially like the pixels shown in these photos. It's a single neoPixel on a 10mm PCB (the pads are on the back). I buy these still panelized, making them even less expensive - about $17 per 100, the last time I ordered. That's WAY less expensive than Adafruit - but it might take 3 weeks for them to arrive from China!

The lamps that come with the marquee letter are LED versions of 3V flashlight bulbs. They have a threaded base and glass envelopes (approximately 16mm in diameter) around the warm white LEDs, and are reasonably high quality replacements for incandescent bulbs. I happened to have clear, glass marbles on hand (from an entirely different project) that were just about the perfect size to replace the bulbs.

Next Time...

Rather than try to cram details of the entire project into a single, huge post, I've decided to split it into multiple parts. The next installment will cover the Mechanical & Electrical parts of the project: removing the original guts of the marquee, and installing the replacement electrical components. Lastly, possibly in a separate post (I'll decide once I've written it), I'll cover the software that brings the project to life.


Stay Tuned!

Wednesday, April 13, 2016

Embedded Systems Conference, Boston 2016

From left to right, we have Tammy, Max, Mark, and Jack
Yes, we're all standing. Max is really that much taller than the rest of us!


Unfortunately, I'm not able to attend the Embedded Systems Conference in Boston this year, which is on April 13 & 14. Just too much going on at work right now, and I can't get away. You'd almost think I was important or something!

Now, I'm a big fan of Clive "Max" Maxfield, who happens to be the Editorial Director at Embedded.com. He's a wizard among engineers, and we have a bunch of similar interests and have both done some wicked cool projects. He's also a gifted writer (I have a couple of his books and read his columns regularly). Anyway, hero worship aside, we've corresponded numerous times, but had never met face-to-face. So when I read that he was going to be attending this year's conference, I sent him an email inviting him to dinner. He had already made plans for his evenings up here, catching up with colleagues and friends, so he, instead, invited us (my wife Tammy and me) to join him at City Bar Boston Harbor at the Westin Boston Waterfront Hotel. As it turned out, there was a private function going on there, so we instead went to M. J. O'Connor's Boston Pub, also located in the Westin. It's a very comfortable Irish Pub with a friendly, laid back atmosphere and excellent food. No one had any trouble at all finding their way, and before long we had maybe two dozen folks catching up, swapping stories, and generally having a good time.

My wife, Tammy, isn't an engineer, but she does speak geek. She's a Pediatric Physical Therapist, but we've been together long enough that we speak each other's language to a fair degree. She had no trouble conversing with my fellow geeks, and Max especially made a point of including her in the conversation.

Also in attendance was Jack Ganssle, who was one of the very first Embedded Systems gurus I ever ran across. I was reading his column in Embedded Systems Programming way back when it was actually printed on paper! These days, I follow him on Embedded.com. I've had the opportunity to meet him in person a bunch of times over the years, both at Embedded Systems Conferences and at training classes he's held. He's a very nice guy and super knowledgeable.

Max was diligent in introducing folks around, but I'm afraid I don't remember everyone. That's my bad, and a real pity because it was a great bunch of people. Among those I do remember:

Peter Anderson is an Embedded HW/SW Engineer whose first experience with microprocessors was the Intel 8008 in 1974. Mine was with the 8085 way back in 1985.

Duane Benson is another luminary I'd hoped to meet, and I did, shortly before Tammy & I left for the evening. I first ran across his work when Max mentioned a project they were collaborating on. He's a veritable font of information on things like PCB layout and DFM.

David Gerber is a writer and editor who has also handled legal, technical, and business responsibilities for Gerber Scientific. Yes, that Gerber - his dad, H. Joseph Gerber, is the man behind the Gerber file format. If you've ever made a printed circuit board, you ought to know the name. David is presenting "The Incredible Story Behind the Gerber PCB File Format" at ESC, but was kind enough to tell us the story last night.

I also found out that David's time at RPI overlapped with mine for about a year; he graduated the year I started. Definitely a small world! He also spoke with Tammy for a while about her work with kids (she works in a school system providing physical therapy to students with a wide range of medical, cognitive, and physical issues). He asked some very insightful and probing questions, the kind you don't normally get in a casual conversation, like, "What have you learned from your patients?" and, "How do you handle working with patients that have progressive (or terminal) conditions?" Tammy was very impressed that he took such an interest in her work.

Well, there you have it. I think I can safely say that a great time was had by all - and before the Embedded Systems Conference even started! I once again lamented that I wouldn't be attending this year, but I promised Max that I'd do my best to attend ESC Minneapolis in September. During our walk back to the car, Tammy even told me that I ought to go! Well, geez, now that I have her blessing, there's really no excuse not to, is there?

Wednesday, March 30, 2016

DIY Toys: Charlie I




A little while back, I wrote a post about a toy my Uncle Steve made for me when I was little (DIY Toys: Uncle Steve's Gift). Well, I never actually told my Uncle how much that little gadget meant to me until a few years ago, when I wrote him a letter explaining it all, and also included my own, slightly updated version of the toy.
 
The picture at the top of this post is just a graphic representation of it, made in Microsoft Word, using surprisingly versatile drawing tools. If only it had been as easy to export the picture as it was to draw it, I might actually come to like Microsoft. But I digress.
 
You might ask why I didn't just post a picture of it. Well, if I had known that I'd be blogging about it years later, I would have done exactly that. But, alas, I wasn't looking that far into the future!
 
Anyway, my updated version of the gadget was largely identical to the original: switch-controlled lamps, with a few small differences:
  • there are now three switches and lamps instead of one.
  • the enclosure is plastic; the cover is removable.
  • the batteries are replaceable (2 ‘C’ cells).
  • the lamps are LEDs (red, yellow, and green).
  • the LEDs are still controlled by toggle switches, but I added red, yellow, and green safety covers to indicate which switch controlled which LED (and to increase the ‘cool’ factor, of course!).
As you might expect, there's really nothing to it, electrically - just batteries, switches, LEDs, and current-limiting resistors.
 

The LEDs are T-1 3/4, diffused, and nothing special - they came out of my spare parts bin. The resistors are 1/4W and appropriately sized for the LEDs I used. You may want a different value depending on the types you use, and possibly even different values for each color, since an LED's forward voltage if often color-dependent. I opted for simplicity, using the same value for all of the LEDs, while making sure the current through each LED was below 20mA.

The switches are all standard-size toggles that mount in a 1/2" hole. I got the toggle safety covers from Marlin P. Jones & Associates (www.mpja.com). Until recently, the covers were available in a rainbow of colors: red, yellow, green, blue, purple, clear, black, and chrome. As of this writing, it looks like they've cut it down to red, yellow, clear, and black. That makes me sad. I haven't found an alternate source, but I'll pass it on if I do!

When I showed the finished product to my wife, Tammy, she thought it was cool (she’s nice like that) and asked what it did. Well, it doesn’t do anything; that’s not the point. My son Nick, ever the button-pusher, understood immediately. As soon as I handed it to him, he just started flipping switches. I don’t know the rated number of operations for those toggles, but he probably reduced the useful lifetime of the gadget long before my Uncle ever got it!
 
I had no idea what my Uncle might actually do with it. It was a solid paperweight, for sure. Maybe he could leave it on the counter in his shop, and see if the customers played with it. Never trust anyone who doesn’t know how to play! Or maybe it would keep their kids amused while the adults did business. As it turned out, there was a much better use for it.
 
My Uncle Steve and Aunt Joyce have two kids, my cousins, Andy and Libby. Both are married; Libby and her husband Dean have two kids, Charlotte and Grace, but at the time I made it, there was only Charlotte. Well, as I understand it, Charlotte was over visiting one day, and my Uncle gave her the gadget to play with. She loved it! Charlotte "adopted" the toy I made, and she and her little friends have put a lot of miles on it since.


Libby sent me this picture of Charlotte playing with it. I've started calling the gadget Charlie I for three reasons:
  • Charlotte turned out to be the ultimate end-user, not my Uncle Steve.
  • I hardly ever call her Charlotte; she's Charlie to me.
  • There's a Charlie II in the works - actually almost complete - and I hope to be writing about it soon. If she likes it half as much as the original, I'll consider it a success!
Who knows? Maybe someday I'll get a letter from Charlotte telling me how much she loved her toy. And maybe she'll even make her own version of it for me in return. But if not, that's ok - just seeing her play is plenty good enough for me!


Tuesday, March 22, 2016

Peace for Brussels


One again we mourn the victims of yet another brutal attack. Once again the innocent suffer. And once again, I must restrain myself from going on a rant about senseless violence and the cowards that perpetrate it.

I offer my deepest condolences to the people of Brussels, Belgium, for your pain and suffering and loss.

I'm no poet; I'm just a geeky engineer. But I love this particular piece of poetry, which is supremely appropriate right now:

The Law of the Jungle
(From The Jungle Book)

by Rudyard Kipling

Now this is the Law of the Jungle --
as old and as true as the sky;
And the Wolf that shall keep it may prosper,
but the Wolf that shall break it must die.

As the creeper that girdles the tree-trunk
the Law runneth forward and back --
For the strength of the Pack is the Wolf,
and the strength of the Wolf is the Pack.

 There's much more to the poem, but these first two verses I've committed to memory. The emphasis on the last two lines is my own. Most folks think that "The Law of the Jungle" means "survival of the fittest" or "every man for himself." Maybe that's true in the jungle, but not here. Maybe it's true of solitary creatures, but humans aren't solitary- well, we're not meant to be, anyway. No, for (most) humans, "The Law of the Jungle" was phrased more succinctly by Alexandre Dumas in "The Three Musketeers":

All for One, and One for All