LEGO-compatible Electronics Kits Everywhere!

Within the last few years, a lot of companies have started with the aim to disrupt the educational electronics industry using their LEGO-compatible sets. Now they’re ubiquitous, and fighting each other for their slice of space in your child’s box of bricks. What’s going on here?

Raison D’Être

The main reason for LEGO-compatibility is familiarity. Parents and children get LEGO. They have used it. They already have a bunch. When it comes to leveling up and learning about electronics, it makes sense to do that by adding on to a thing they already know and understand, and it means they can continue to play with and get more use from their existing sets. The parent choosing between something that’s LEGO-compatible and a completely separate ecosystem like littleBits (or Capsela) sees having to set aside all the LEGO and buy all new plastic parts and learn the new ecosystem, which is a significant re-investment. littleBits eventually caught on and started offering adapter plates, and that fact demonstrates how much demand there is to stick with the studs.

Continue reading “LEGO-compatible Electronics Kits Everywhere!”

This Way to the Ingress: Keeping Stuff Dry and Clean with IP and NEMA

When designing a piece of hardware that has even the faintest chance of being exposed to the elements, it’s best to repeat this mantra: water finds a way. No matter how much you try to shield a project from rain, splashing, or even just humid air, if you haven’t taken precautions to seal your enclosure, I’ll bet you find evidence of water when you open it up. Water always wins, and while that might not be a death knell for your project, it’s probably not going to help. And water isn’t the only problem that outdoor or rough-service installations face. Particle intrusion can be a real killer too, especially in an environment where dust can be conductive.

There’s plenty you can do to prevent uninvited liquid or particulate guests to your outdoor party, but it tends to be easier to prevent the problem at design time than to fix it after the hardware is fielded. So to help you with your design, here’s a quick rundown of some standards for protection of enclosures from unwanted ingress.

Continue reading “This Way to the Ingress: Keeping Stuff Dry and Clean with IP and NEMA”

Getting IEC Standards For Free

The International Electrotechnical Commission (IEC) is an international body that issues standards on a wide range of electronics-related topics. How wide? Their mandate seems to span rules for household product safety to the specification of safety logic assemblies in nuclear power plants. Want to know how to electrically measure sound loudness? Test methods for digital door lock systems? Or maybe you’re interested in safety interlock systems for laser processing machines. There’s an IEC standard for that too.

Unfortunately, this information is kept behind a paywall. OK, it’s a lot more like a pay fortress. They really, really don’t want you accessing their documents without first coughing up. This is a shame.

The IEC doesn’t just make the standards in a vacuum, however. Before the scribes touch their chisels to the stone tablets, there are draft versions of the standards that are open for public comment by those knowledgeable in the field. And by “those knowledgeable”, we mean you, dear hacker. Head on over to the public commenting page, sign up, and you’ve got free access to every document that’s currently up for discussion.

Now, it does look like the IEC doesn’t want you sharing these PDFs around — they watermark them with your username and threaten all sorts of things if you use them for anything other than commenting purposes — so don’t go abusing the system. But on the other hand, if you are a private individual who knows a thing or two about a thing or two, we think you’re entirely right to look over their shoulders. Let us know in the comments if you find any gems.

They’ve even got a weekly update feature (in the registration pages) that’ll keep you up to date. And who knows, maybe your two cents, submitted to your country’s chapter of the IEC, will influence future international standards.

Thanks to [Johann] for the great tip!

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 Rebel Alliance for Internet of Things Standards

Back when the original Internet, the digital one, was being brought together there was a vicious standards war. The fallout from the war fundamentally underpins how we use the Internet today, and what’s surprising is that things didn’t work out how everyone expected. The rebel alliance won, and when it comes to standards, it turns out that’s a lot more common than you might think.

Looking back the history of the Internet could have been very different. In the mid eighties the OSI standards were the obvious choice. In 1988 the Department of Commerce issued a mandate that all computers purchased by government agencies should be OSI compatible starting from the middle of 1990, and yet two years later the battle was already over, and the OSI standards had already lost.

In fact by the early nineties the dominance of TCP/IP was almost complete. In January of 1991 the British academic backbone network, called JANET (which was based around X.25 colored book protocols), established a pilot project to host IP traffic on the network. Within ten months the IP traffic had exceeded the levels of X.25 traffic, and IP support became official in November.

“Twenty five years ago a much smaller crowd was fighting about open versus proprietary, and Internet versus OSI. In the end, ‘rough consensus and running code’ decided the matter: open won and Internet won,”

Marshall Rose, chair of several IETF Working Groups during the period

This of course wasn’t the first standards battle, history is littered with innumerable standards that have won or lost. It also wasn’t the last the Internet was to see. By the mid noughties SOAP and XML were seen as the obvious way to build out the distributed services we all, at that point, already saw coming. Yet by the end of the decade SOAP and XML were in heavy retreat. RESTful services and JSON, far more lightweight and developer friendly than their heavyweight counterparts, had won.

“JSON appeared at a time when developers felt drowned by misguided overcomplicated XML-based web services, and JSON let them just get the job done,”

“Because it came from JavaScript, and pretty much anybody could do it, JSON was free of XML’s fondness for design by committee. It also looked more familiar to programmers.”

Simon St. Laurent, content manager at LinkedIn and O’Reilly author

Yet, depending on which standards body you want to listen to, ECMA or the IETF, JSON only became a standard in 2013, or 2014, respectively and while the IETF RFC talks about semantics and security, the ECMA standard covers only the syntax. Despite that it’s unlikely many people have actually read the standards, and this includes the developers using the standard and even those implementing the libraries those developers depend on.

We have reached the point where standardization bodies no longer create standards, they formalize them, and the way we build the Internet of Things is going to be fundamentally influenced by that new reality.

Continue reading “A Rebel Alliance for Internet of Things Standards”

My Life in the Connector Zoo

“The great thing about standards is that there are so many to choose from.” Truer words were never spoken, and this goes double for the hobbyist world of hardware hacking. It seems that every module, every company, and every individual hacker has a favorite way of putting the same pins in a row.

We have an entire drawer full of adapters that just go from one pinout to another, or one programmer to many different target boards. We’ll be the first to admit that it’s often our own darn fault — we decided to swap the reset and ground lines because it was convenient for one design, and now we have two adapters. But imagine a world where there was only a handful of distinct pinouts — that drawer would be only half full and many projects would simply snap together. “You may say I’m a dreamer…”

This article is about connectors and standards. We’ll try not to whine and complain, although we will editorialize. We’re going to work through some of the design tradeoffs and requirements, and maybe you’ll even find that there’s already a standard pinout that’s “close enough” for your next project. And if you’ve got a frequently used pinout or use case that we’ve missed, we encourage you to share the connector pinouts in the comments, along with its pros and cons. Let’s see if we can’t make sense of this mess.

Continue reading “My Life in the Connector Zoo”

Specifications You Should Read: The NASA Workmanship Standards

"This is reflective of the typically idiosyncratic way engineer's of this era explored the human condition. The purple and shitty gradient show's the artists deep struggle with deadlines and his personal philosophy on the tyranny of the bourgeois. " - A segment from a confused student's art history paper
“Reflective of the typically idiosyncratic way engineers of this era explored the human condition. The shitty gradient show’s the deep struggle with deadlines and their personal philosophy on the tyranny of the bourgeois. ” – An excerpt from a confused student’s art history paper after the standard is installed in the Louvre.

The NASA workmanship standards are absolutely beautiful. I mean that in the fullest extent of the word. If I had any say in the art that goes up in the Louvre, I’d put them up right beside Mona. They’re a model of what a standard should be. A clear instruction for construction, design, and inspection all at once. They’re written in clear language and contain all the vernacular one needs to interpret them. They’re unassuming. The illustrations are perfectly communicative.  It’s a monument to the engineer’s art.

Around five years ago I had a problem to solve. Every time a device went into the field happily transmitting magic through its myriad connectors, it would inevitably come back red tagged, dusty, and sad. It needed to stop. I dutifully traced the problem to a connector, and I found the problem. A previous engineer had informed everyone that it was perfectly okay to solder a connector after crimping. This instruction was added because, previously, the crimps were performed with a regular pair of needle nose pliers and they came undone… a lot. Needless to say, the solder also interfered with their reliable operation, though less obviously. Stress failures and intermittent contact was common.

Continue reading “Specifications You Should Read: The NASA Workmanship Standards”