Recently, I have had a strong desire to learn know more
about embedded Linux, so I set about designing a small network computer
for LAN controlled applications. My main focus is to learn how uCLinux
works in an embedded networking environment, plus I want to explore
the latest generation of Motorola Coldfire CPUs in the process.
Ideally,
this device would be easily mounted to a chassis panel or wall, would have an Ethernet port, and it
should have a lot of external connections to allow a user to
connect it to expansion modules. These would contain analog input
conditioning devices for capture of low-level signals, and opto-coupled
connections for higher level signals, especially VHDCI, or RS-485.
Since the device would be remote, it should have a Web server embedded in it, allowing a user to configure it from the LAN.
Desirable specifications:
1. Small
form factor. I arbitrarily set physical constraints for a design that would be 4.2" x 3" x 1.6" wide.
2. Low
power. I am setting a power budget of 3.5 Watts for the design.
3. Features: At minimum, the device should have or support
- A 10/100 baseT Ethernet port
- An RS-232 Serial Port
- A Digital expansion bus
- A small Web server
- Telnet for remote downloads
- A USB2 port for flash-drive support
4. Low cost. The
less expensive, the better. There are a lot of LAN based controllers
out there, but I would really love to have this entire device
available for around $100 end-user cost.
Step 1: Development Environment Setup
I
started by purchasing a development board from Motorola, the M5282LITE,
for the initial
port. It does not come with
Linux developer tools, but there are some
available for it on the Web. This requires a 'toolchain' for building the kernel in
the proper format. Fortunately, this is available on the Web.
Since the M5282 doesn't contain a memory-management unit, uCLinux was
chosen over a standard Linux kernel for the device. It has a very small
footprint, and has support for a number of development boards,
including the LITE card.
Step 2: Building a kernel
After building
and installing the toolchain in my
current Linux box, I was able to build a working 2.4.x kernel to
get used to the environment. Once this was done, and I had some of my early development hurdles resolved,
I finally settled on a custom-built 2.6.12 kernel. Both
versions were downloaded to the development board, and ran
fairly well. There were, of course, problems which is both the
advantage and dis-advantage of Linux. If it doesn't work, you have the
source code, so you can track the problems down and fix them. You
don't, of course, have technical support, so you have to rely on your
skill and user-groups for solutions. This is undoubtedly one of the
reasons that Motorola doesn't provide the Linux tools to begin with.
Still, I was new to embedded Linux, and was able to get the system up
and running, so determination and desire must play the strongest role. I
will cover the problems I encountered, and their solutions in part two of this article.
Step 3: Completing the Electrical Design
Next
step is to get the rest of the electrical design complete.
Since the M5282LITE doesn't have a USB port in it, I had to add a
simple USB 2.0 phy chip to the design which supports 12Mbps. Not the
full-speed spec, but fast enough for this application.
Step4: Aesthetics
This step is extremely important. First, it dictates the internal configuration of the PCBs; how many, and what their inter-
connect structure must be. As this is an exploration, I don't have the money for an industrial stylist, but fortunately, I use
Blender, which is good for allowing me to create some 'what-if' scenarios without committing to large investments in both
material and design costs.
Concept 1:
This first attempt had some advantages, but some equally strong disadvantages.
Simple lines would make its housing easy to mold, and a single
parting-line would allow me to 'plug' it into a PCB as shown in the top
right image. However, I wanted to have a USB drive port in it, which
complicated the design. To make it work, I tried to split the case in
two:

It works,
but when running this idea by friends at my Linux Users group, one of
them pulled out a very small flash drive that would be a pain to
plug/unplug in this design when the device is mounted...Plus, it looks like a stapler. Yuck.
Concept 2:
A little
bit better. It tackles the problem of various size USB drives, and
makes it easy to insert them when the unit is wall mounted, but it
complicates the mold a lot. First of all, the 'foot' which this thing
sits on would have to be a separate piece (more $$), and that entails
more PCBs in the design, which I don't want if I am going to bring the
cost down.

Concept 3:
This
render is getting closer to a practical design. The unit housing is now
much more of a monocoque design, and can be created from a front
and back cover. Better than the first design, the number of PCBs
dropped down to two. This is my current front-runner, but I need more
input before setting the design in stone.

Coming up...Part two: Linux problems and solutions