Archive Page 2

Distributed Control and Sensing with USB

Distributed I/O systems are a key element in many industrial processing settings, distributed environmental controls for buildings of all sizes, vehicles large and small, scientific research settings like large telescopes and particle accelerators, and in laboratories with equipment connected to a central data collection and processing system. Multiple microcontrollers units (MCUs) provide the sensing and control to automate systems for improved efficiency, better data collection, and enhanced safety. Without MCUs, modern life as we know it could not exist.

There are multiple ways to connect an MCU-based device to a host computer system, ranging from industrial serial interface protocols like RS-485, CAN, or ProfiBus, to conventional Ethernet or wireless protocols. USB is also a possibility, but it seems to be largely confined to small-scale and consumer type applications. But does USB have what it takes to be used for applications other than just connecting a printer to your PC? Can it be used to collect data from an automated test system, or control the various components in an industrial process?

Continue reading ‘Distributed Control and Sensing with USB’

Frustrating Development Tools

I have a complaint (well, to be honest, I have a lot, but I don’t trot them out all at the same time): Why do hardware and development tools vendors insist on using things like Windows .net? It annoys me to no end to have to resort to reading through KB articles from Microsoft just to get something as straightforward as a compiler up and running. It annoys me even more when I can’t get the software running even after jumping through hoops and hopping up and down on one foot while patting the top of my head. Does it really have to be this way?

Continue reading ‘Frustrating Development Tools’

Creating Time-Consistent Loops for Embedded Systems

In an embedded system there are typically four main ways to architect the code: Simple loop, foreground-background, cyclic executive, and RTOS. In this article I will look at how to create a simple main loop with a time-consistent execution period, similar to what a cyclic executive does.

Continue reading ‘Creating Time-Consistent Loops for Embedded Systems’

1000 mW Laser Engraver

A while back I bought an Neje DK-8-KZ 1W laser engraver. It was on sale, and I was curious about it. At only 1W (1000 mW) I knew I wasn’t going to be cutting anything except paper with it, but I was looking for another way to create engraved labeling on plastic enclosures. Well, it can do that, with some limitations, and it works pretty well on wood, but my biggest aggravation has been just getting it to actually put the engraving where I want it to go, and also deal with the automatic scaling it employs.

Continue reading ‘1000 mW Laser Engraver’

Ardunio Programming: C++ and Embedded Systems

Ideally we would use assembly language to wring the last drop of performance from small microcontrollers, and at one time that really was the only way to do it. But assembly language programming is tedious and error-prone, and if I never have to wrestle with another assembly language program that would be fine with me.

With the advent of C, things got a lot easier in the embedded systems world. As its creators stated, C is essentially a close relative of an assembler, rather like a macro assembler (there’s a good Google/Wikipedia topic, if you don’t know what a macro assembler is). A C program can be compiled into very tight and efficient code, with an almost one-to-one correspondence to the underlying assembly language that the compiler generates.

But times change, and things are extended, improved, and expanded, and thus C++ arose from C. Over time C++ has become one of the dominant languages in programming, but there are challenges when attempting to use it with a microcontroller. Continue reading ‘Ardunio Programming: C++ and Embedded Systems’

Clever Arduino Case

One of the challenges that seem to keep coming up when working with an Arduino is where to put it so that it won’t get banged up on the workbench or tossed off the dining room table to make space for dinner. I’ve written about using wood, and my books give examples of various types of enclosures (everything from PVC tubing to pro-grade test instrument enclosures), but what other options are available? Is there an off-the-shelf solution? Turns out there is, if you have an R2 or R3 type Uno (or Duemilanove), and best of all it’s inexpensive.

Continue reading ‘Clever Arduino Case’

New series: Arduino Test Equipment

The ESR electronics Tricorder, Part 1

In this article I describe the beginnings of a device that I like to think of as a Tricorder for electronics. This is the first of a three part series in what will (hopefully) be the start of a series of articles that describe ways to use Arduino boards and AVR microcontrollers to build useful, low-cost test, measurement, and control devices.

For additional details and definitions be sure to check out my books “Practical Electronics: Components and Techniques” and “Arduino: A Technical Reference“. Both are available from O’Reilly, Amazon, Barnes and Noble, and numerous other places where fine books are sold.

Continue reading ‘New series: Arduino Test Equipment’

Follow Crankycode on

Little Buddy

An awesome little friend

Jordi the Sheltie passed away in 2008 at the ripe old age of 14. He was the most awesome dog I've ever known.