Archive

Electronics

image

The “Joule Thief” is an LED flashlight that is designed to be run from a half-dead battery. Using a simplistic DC-DC boost converter, it turns the steady c. 1V supply into an oscillating supply sufficient to operate the LED (which requires c. 3V) in enough bright flashes per second that your eye doesn’t perceive the flicker. So, don’t throw away that dead AA just yet…

I haven’t made one just yet, but a CFL in my house just stopped working so I should have all the parts on hand.

On my way to get a haircut that ended up being what one could rightly call “silly” or “mediocre”, I stepped into Radio Shack for a moment. They’ve gotten some press recently for their renewed appeal to the electronics hobbyist crowd that it lost some time ago by downplaying its component offerings and taking a nearly exclusive focus on consumer items that are not that great, too expensive, or both. (And, more recently, on mobile phones.) They must have been on the down tick even before my first encounters with electronics back in elementary school—I recall my dad telling me that it’s usually a bad idea to get something there if it could be found anywhere else. Some of the folks on Usenet like to call it “Rat Shack”.

And it was the truth, because if there was anything slightly weird I needed that they didn’t stock, I was out of luck until I got together enough allowance to place an above-minimum order at Electronic Goldmine or Mouser. (Note that my component catalog of choice is currently Newark, followed by Allied. Electronic Goldmine is still fun if you have patience and a sense of humor.)

Anyway, they’re trying to appeal to the hobbyist again. Even if they don’t end up doing so well with it, their heart’s in the right place. With that in mind, I stepped into the store, politely blew off the salesperson (you know you’ve done it), and checked out what they had.

A lot of it was the same stuff they’ve always had, stuff that might be handy to buy in a pinch but that it’s a better idea to wait out a mail order for.

The first new thing that caught my eye was a series of kits by Velleman, a European company that appears to do kits and oscilloscopes among other things. The offerings were mostly simple light and/or sound circuits based on discrete components, but look like they’d be entertaining to put together, and the very simplest ones come in under $10, which is certainly a fair sell for someone not up to circuit design yet.

They also had a couple of cool-looking kits based on microcontrollers. I don’t recommend that you buy either one, but I’ll describe them before I tell you why.

image

The USB Experiment Interface Board has a set of screw terminals (they accept either solid or threaded wire without a lot of fuss) to I/O pins on the micro (advertised are 5 digital in, 8 digital out, 2 analog in, 2 analog out). If they did the host software correctly, this could be a very fun toy. I know that back when I was 10, the ability to make my circuit talk to QBasic was an extremely cool thing to do. I believe I had managed to get together one circuit that I’d read about in Electronics Now and make it signal to the parallel (or was it serial?) port whether there was something between an IR LED and a phototransistor, but I certainly didn’t know how the code or the electrical interface actually worked.

image

Here’s one with even more mystique: The circuit, by way of its microcontroller, implements a PONG-like game by reading input from on-board microswitches and then modulating its current state into an analog NTSC signal for your (hopefully old enough) TV. In principle, it’s extremely similar to the original PONG itself (the major differences being that in PONG the controllers were analog and the CPU was not a microcontroller but an entire fleet of discrete logic chips).

So, why do I think you should not buy these? Let’s revisit the above with a couple of very important stats:

First: Microcontroller. According to the spec sheets, the USB interface uses a PIC16C745, and the game uses a PIC16C505. That “C” that comes after the “16” means that these chips are single-write only—the program in the micro comes pre-written and can’t be edited. That’s a massive fail on the kit makers’ part in my opinion; the community is all about being able to fiddle with stuff, and you can’t mess with the micros in these kits. Theoretically, you could replace the chip with its related flash-programmed “F” variant, but haven’t you already bought the kit? This brings us to…

Second: Price. The game kit costs $40. The USB interface is $60. Wow. Really?

Okay, so for those of you who aren’t close enough to the community to see the obvious conclusion, please allow me to introduce you to what you should buy instead of either of the above: the mighty Arduino.

I understand that people really like to gush about this thing, but the idea is actually pretty great: You have a hardware platform based on a cheap Atmel micro, then you have a software platform based on a very C-like language via a very easy-to-use IDE. You connect the two together using the onboard USB-serial adapter, and disco—it’s at least equivalent to the aforementioned USB interface (except for the screw terminals, which aren’t hard to add). The price? Without looking too hard, I found one option for $26, and I’m sure it can be found cheaper. Since the hardware designs are free (as in liberty) there are multiple manufacturers of the board itself and clones thereof.

And the community for the thing is live and virulent. If you want help, there’s sure to be someone to give it to you.

(Oh, also: You want PONG? You’ve got PONG.)

Before I take off, here’s something that isn’t a kit:

image

If you’re into accelerometers (a kind of physical motion sensor), RS is selling one from Parallax which is just a Memsic 2125 mounted on a tiny board with pins so mortals can actually use it—the 2125 is an LGA device, thus requiring some equipment to solder than the typical hobbyist couldn’t be expected to have on hand. They sell it for $37. Parallax seems to sell it directly for $30. If you want something similar without the overhead, similar stuff is available at Newark, but most of it is not hand-solderable. The majority are LGA devices, but a select few dual-axis devices are available in SOIC, a surface-mount form which I’ve had success soldering by hand (by slathering on the solder and then wicking the excess back off), starting around $13 in singles. And of course even if you can solder them by hand, you’ll still have to have a board made up to solder the thing onto. If you don’t have the stuff for making PCBs, it’s entirely possible that in this case the Parallax device is worth the extra money.

That’s it. Until later…