Off-Grid Travel — Setting Up a Solar System

When you’re living out of a vehicle, or even just traveling out of one, power quickly becomes a big concern. You need it for lights, to charge your various devices, to run your coffee maker and other appliances, and possibly even to store your food if you’ve got an electric refrigerator. You could do what many RV owners do: rely on campgrounds with electrical hookups plus a couple of car batteries to get you from one campground to the next. But, those campgrounds are pricey and often amount to glorified parking lots. Wouldn’t it be better if you had the freedom to camp anywhere, without having to worry about finding somewhere to plug in?

That’s exactly what we’re going to be covering in this article: off-grid power on the road. There are two major methods for doing this: with a portable gas generator, or with solar. Gas generators have long been the preferred method, as they provide a large amount of power reliably. However, they’re also fairly expensive, cumbersome, noisy, and obviously require that you bring along fuel. Luckily, major advances in solar technology over the past decade have made it very practical to use solar energy as your sole source of electricity on the road.

Continue reading “Off-Grid Travel — Setting Up a Solar System”

Closing the Loop on an Artificial Pancreas

Life as a parent is never easy, but when you’ve got a kid with Type 1 diabetes it’s a little harder. Sometimes it feels like a full-time job in itself; there’s never a break. With carb counts and insulin ratios that change throughout the day, every meal is a medical procedure. A romp in the snow or a long bike ride can send her blood glucose plummeting. The overnights are the worst, though, because you never know if you overestimated the number of carbs at dinner and gave her too much insulin. Low blood glucose is easily treated with a few sips of juice, but if it goes unnoticed in the middle of the night, it could be fatal. That’s why parents of diabetics are always a little glassy eyed — we rarely sleep.

Why is all this necessary? It’s because Type 1 diabetes (T1D) is an autoimmune disease that attacks the insulin-producing beta cells in the pancreas. Once those cells are dead, insulin is no longer produced, and without insulin the rest of the cells in the body can’t take in the glucose that they need to live. Diabetics have to inject just the right amount of insulin at just the right time to coincide with the blood glucose spike that occurs after meals. Knowing how much to give and when is why we say we have to “learn to think like a pancreas.”

1-1-2-4_ping
Animas Ping insulin pump, partial teardown. The cylinder on the bottom is the battery, the motor and syringe compartment are on top. Source: Animas

Things are better than they used to be, for sure. Insulin pumps have been a game changer for T1Ds. An insulin pump is just a tiny syringe pump. A small motor moves the plunger on a disposable syringe filled with a few days worth of insulin. The hormone is delivered through a small catheter placed under the skin every few days — painful, but better than a needle stick with every meal and snack.  A computer keeps track of everything and provides safety against overdosing on insulin, so it’s terribly convenient, but we still need to “think like a pancreas” and calculate the amount to deliver.

Even with its shortcomings, my daughter’s pump has been a blessing, and I’ll do whatever it takes to keep her in the latest gear. Pumps generally cost about $5000 or so, and need to be replaced every three years. While I’m not looking forward to paying the bill when her current pump gives up the ghost, I am certainly keen to do a teardown on the old one. I suspect it’s dead simple in there — a tiny gear motor, some kind of limit switches, and a main board. It’ll be painful to see how little my money buys, but it’ll be cool to play around with it.

Continue reading “Closing the Loop on an Artificial Pancreas”

Books You Should Read: The Hardware Hacker

There’s no one quite like Andrew ‘Bunnie’ Huang. His unofficial resume begins with an EE degree from MIT, the author of Hacking the Xbox, creator of the Chumby, developer of the Novena, the first Open Source laptop, and has mentored thousands of people with dozens of essays from his blog.

Above all, Bunnie is a bridge across worlds. He has spent the last decade plying the markets of Shenzhen, working with Chinese manufacturers, and writing about his experiences of taking an idea and turning it into a product with the help of Chinese partners. In short, there is no person better suited to tell the story of how Shenzhen works, what can be done, and how to do it.

Bunnie’s The Hardware Hacker ($29.95, No Starch Press) is the dead tree expression of years of living and working in Shenzhen, taking multiple products to market, and exploring the philosophy that turned a fishing village into a city that produces the world’s electronic baubles.

Continue reading “Books You Should Read: The Hardware Hacker”

Harrowing Story of Installing Libreboot on ThinkPad

As an Apple user, I’ve become somewhat disillusioned over the past few years. Maybe it’s the spirit of Steve Jobs slowly vanishing from the company, or that Apple seems to care more about keeping up with expensive trends lately rather than setting them, or the nagging notion Apple doesn’t have my best interests as a user in mind.

Whatever it is, I was passively on the hunt for a new laptop with the pipe dream that one day I could junk my Apple for something even better. One that could run a *nix operating system of some sort, be made with quality hardware, and not concern me over privacy issues. I didn’t think that those qualities existed in a laptop at all, and that my 2012 MacBook Pro was the “lesser of evils” that I might as well keep using. But then, we published a ThinkPad think piece that had two words in it that led me on a weeks-long journey to the brand-new, eight-year-old laptop I’m currently working from. Those two words: “install libreboot”.

Continue reading “Harrowing Story of Installing Libreboot on ThinkPad”

The Many Faces of JTAG

Wouldn’t it be great if there were just one standard for attaching to, programming, and debugging hardware?  If you could just plug in and everything would just work? Dream on, dreamer! But of course we hobbyists aren’t the only people to suffer from multiple standards. Industry has the same problems, writ large. In response to the proliferation of smart devices — microcontrollers, sensors, and their friends — on any given PCB makes it difficult to test them all, much less their function as a system.

The Joint Test Action Group (JTAG) got together in the mid-80s to make automated testing of circuit boards a standardized process. A JTAG port can be found on almost any piece of consumer electronics with enough brains to warrant it, and it’s also a tremendously useful entry point for debugging your own work and hacking into other’s. You’re going to need to use JTAG someday.

Implemented right, it’s a very cool system that lets you test any compliant IC on the board all from a single connector. It’s mostly used by hackers for its ability to run and halt individual processors, and put them in debugging modes, inspecting their memory states, etc. Essentially every microcontroller responds to JTAG commands, and it’s an incredibly widespread and powerful standard. A victory for rationality and standardization!

The connector pinout was, of course, left up to the manufacturer. The horror!

Five Signals

In principle, JTAG uses five signal lines. They form a chain starting at the debugger, where one device’s output is the next device’s input, until the result is returned back to the debugger.

654px-jtag_chain
JTAG, as imagined by Vindicator CC BY 2.5
  • Test Data In (TDI) is the input from the debugger
  • Test Data Out (TDO) is the return end of the chain
  • Test Clock (TCK) clocks this data along synchronously, similarly to SPI
  • Test Mode Select (TMS) lets the devices know that they’re being debugged — it’s a global chip select
  • Test Reset (TRST) is an optional signal that resets all devices in the chain

Continue reading “The Many Faces of JTAG”

A How-To in Homebrew Design, Fab, and Assembly with Structural Framing Systems

At this point, the internet is crawling with butt-kicking homebrew 3D printers made with extruded profiles, but it’s easy to underestimate the difficulty in getting there. Sure, most vendors sell a suite of interlocking connectors, but how well do these structural framing systems actually fare when put to the task of handling a build with sub-millimeter tolerances?

I’ve been playing around with these parts for about two years. What I’ve found is that, yes, precise and accurate results are possible. Nevertheless, those results came to me after I failed and–dry, rinse, repeat–failed again! Only after I understood the limits of both the materials and assembly processes was I able to deliver square, dimensionally accurate gantries that could carry a laser beam around a half-square-meter workbed. That said, I wrote a quick guide to taming these beasts. Who are they? What flavors do they come in? How do we achieve those precision results? Dear reader, read on.

Continue reading “A How-To in Homebrew Design, Fab, and Assembly with Structural Framing Systems”

Set Your Clocks to Decimal Time

Many stop lights at street intersections display a countdown of the remaining seconds before the light changes. If you’re like me, you count this time in your head and then check how in sync you are. But did you know that if the French had their way back in the 1890s when they tried to introduce decimal time, you’d be counting to a different beat? Did you know the Chinese have used decimal time for millennia? And did you know that you may have unknowingly used it already if you’ve programmed in Linux? Read on to see what decimal time is along with the answers to these questions.

Continue reading “Set Your Clocks to Decimal Time”