Flexible I/O Expansion for Rugged Applications

WynSystemsThe SBC35-CC405 series of multi-core embedded PCs includes on-board USB, gigabit Ethernet, and serial ports. These industrial computers are designed for rugged embedded applications requiring extended temperature operation and long-term availability.

The SBC35-CC405 series features the latest generation Intel Atom E3800 family of processors in an industry-standard 3.5” single-board computer (SBC) format COM Express carrier. A Type 6 COM Express module supporting a quad-, dual-, or single-core processor is used to integrate the computer. For networking and communications, the SBC35-CC405 includes two Intel I210 gigabit Ethernet controllers with IEEE 1588 timestamping and 10-/100-/1,000-Mbps multispeed operation. Four Type-A connectors support three USB 2.0 channels and one high-speed USB 3.0 channel. Two serial ports support RS-232/-422/-485 interface levels with clock options up to 20 Mbps in the RS-422/-485 mode and up to 1 Mbps in the RS-232 mode.

The SBC35-CC405 series also includes two MiniPCIe connectors and one IO60 connector to enable additional I/O expansion. Both MiniPCIe connectors support half-length and full-length cards with screw-down mounting for improved shock and vibration durability. One MiniPCIe connector also supports bootable mSATA solid-state disks while the other connector includes USB. The IO60 connector provides access to the I2C, SPI, PWM, and UART signals enabling a simple interface to sensors, data acquisition, and other low-speed I/O devices.

The SBC35-CC405 runs over a 10-to-50-VDC input power range and operates at temperatures from –40°C to 85°C. Enclosures, power supplies, and configuration services are also available.

Linux, Windows, and other x86 OSes can be booted from the CFast, mSATA, SATA, or USB interfaces, providing flexible data storage options. WinSystems provides drivers for Linux and Windows 7/8 as well as preconfigured embedded OSes.
The single-core SBC35-CC405 costs $499.

Winsystems, Inc.

Programmable Logic Controller Board

SmartTILE illustration 6.psdThe SmartTILE (Smart TRi Integrated Logic Engine) is a programmable logic controller CPU board that plugs onto a carrier I/O board. The board integrates a 32-bit CPU, ferroelectric RAM (FRAM) and flash memory, a battery-backed real-time clock, and an Ethernet port on board. Its digital, analog, and serial I/O signals are brought to a user’s carrier board via three sets of header pins.

All critical components are already built-in on board. A user just needs to design a simple carrier PCB that contains a D/A circuit that interfaces the SmartTILE’s low-voltage signals to real-world voltages and currents (e.g., 24, 120, or 240 V).

The SmartTILE-Fx provides 16 digital inputs, 16 digital outputs (5-V CMOS logic level), eight analog inputs, and four analog outputs (12-bit, 0-5V) and can be expanded to 128 digital inputs and 128 digital outputs. The controller board -Fx provides three channels of serial ports (3.3 V, TX, RX, and /RTS) that can interface to RS-232, RS-485, or even wireless radio. An I2C port (3.3 V) is also available, allowing OEM to interface to specialty ICs that support I2Cbus.

Contact Triangle Research International for pricing.

Triangle Research International, Inc.

Raspberry Pi-Based Network Monitoring Device

In 2012, Al Anderson, IT director at Salish Kootenai College in Pablo, MT, and his team wired the dorms and student housing units at the small tribal college with fiber and outdoor CAT 5 cable to provide reliable Internet service to students. “Our prior setup was wireless and did not provide very good service,” Anderson says.

The 25 housing units, each with a small unmanaged Ethernet switch, were daisy chained in several different paths. Anderson needed a way to monitor the links from the system’s Simple Network Management Protocol (SNMP) network monitoring software, Help/Systems’s InterMapper. He also wanted to ensure the switches installed inside the sun-exposed utility boxes wouldn’t get too hot.

The Raspberry Pi is a small SBC based on an ARM processor. Its many I/O ports make it very useful for embedded devices that need a little more power than the typical 8-bit microcontroller.

Photo 1: The Raspberry Pi is a small SBC based on an ARM processor. Its many I/O ports make it very useful for embedded devices that need a little more power than the typical 8-bit microcontroller.

His Raspberry Pi-based solution is the subject of an article appearing in Circuit Cellar’s April issue. “We chose the Raspberry Pi because it was less expensive, we had several on hand, and I wanted to see what I could do with it,” Anderson says (see Photo 1).

The article walks readers through each phase of the project:

“I installed a Debian Linux distro, added an I2C TMP102 temperature sensor from SparkFun Electronics, wrote a small Python program to get the temperature via I2C and convert it to Fahrenheit, installed an SNMP server on Linux, added a custom SNMP rule to display the temperature from the script, and finally wrote a custom SNMP MIB to access the temperature information as a string and integer.”

Setting up the SBC and Linux was simple, Anderson says. “The prototype Raspberry Pi has now been running since September 2012 without any problems,” he says in his article. “It has been interesting to see how the temperature fluctuates with the time of day and the level of network activity. As budget and time permit, we will be installing more of these onto our network.”

In the following excerpt, Anderson discusses the project’s design, implementation, and OS installation and configuration. For more details on a project inspired, in part, by the desire to see what a low-cost SBC can do, read Anderson’s full article in the April issue.

Figure 1 shows the overall system design. The TMP102 is connected to the Raspberry Pi via I2C. The Raspberry Pi is connected to the network via its Ethernet port. The monitoring system uses TCP/IP over the Ethernet network to query the Raspberry Pi via SNMP. The system is encased in a small acrylic Adafruit Industries case, which we used because it is inexpensive and easy to customize for the sensor.

The system is designed around the Raspberry Pi SBC. The Raspberry Pi uses the I2C protocol to query the Texas Instruments TMP102 temperature sensor. The Raspberry Pi is queried via SNMP.

Figure 1: The system is designed around the Raspberry Pi SBC. The Raspberry Pi uses the I2C protocol to query the Texas Instruments TMP102 temperature sensor. The Raspberry Pi is queried via SNMP.

Our first step was to set up the Raspberry Pi. We started by installing the OS and the various software packages needed. Next, we wrote the Python script that queries the I2C temperature sensor. Then we configured the SNMP daemon to run the Python script when it is queried. With all that in place, we then set up the SNMP monitoring software that is configured with a custom MIB and a timed query. Finally, we modified the Raspberry Pi case to expose the temperature sensor to the air and installed the device in its permanent location.

The Raspberry Pi requires a Linux OS compiled to run on an ARM processor, which is the brain of the device, to be installed on an SD card. It does not have a hard drive. Setting up the SD card is straightforward, but you cannot simply copy the files onto the card. The OS has to be copied in such a way that the SD card has a boot sector and the Linux partitioning and file structure is properly maintained. Linux and Mac OS X users can use the dd command line utility to copy from the OS’s ISO image. Windows users can use a utility (e.g., Win32DiskImager) to accomplish the same thing. A couple of other utilities can be used to copy the OS onto the SD card, but I prefer using the command line.

A Debian-based distribution of Linux seems to be the most commonly used Linux distribution on the Raspberry Pi, with the Raspbian “wheezy” as the recommended distribution. However, for this project I chose Adafruit Learning Systems’s Occidentalis V0.2 Linux distribution because it had several hardware-hacker features rolled into the distribution, including the kernel modules for the temperature sensor. This saved me some work getting those installed and debugged.

Before you can copy the OS to the SD card, you need to download the ISO image. The Resources section of this article lists several sources including a link to the Adafruit Linux distribution. Once you have an ISO image downloaded, you can copy it to the SD card. The Resources section also includes a link to an Embedded Linux Wiki webpage, “RPi Easy SD Card Setup,” which details this copying process for several OSes.

The quick and dirty instructions are to somehow get the SD card hooked up to your computer, either using a built-in SD reader or a peripheral card reader. I used a USB attached reader. Then you need to format the card. The best format is FAT32, since it will get reformatted by the copy command anyway. Next, use your chosen method to copy the OS onto the card. On Linux or Mac OS X, the command:

dd bs=4M if=~/linux_distro.img of=/dev/sdd

will properly copy the OS onto the SD card.

You will need to change two important things in this command for your system. First, the
if parameter, which is the name the in file (i.e., your ISO image) needs to match the file you downloaded. Second, the of device (i.e., the out file or our SD drive in this case) needs to match the SD card. Everything, including devices, is a file in Linux, in case you are wondering why your SD drive is considered a file. We will see this again in a bit with the I2C device. You can toast your hard drive if you put the wrong device path in here. If you are unsure about this, you may want to use a GUI utility so you don’t overwrite your hard drive.

Once the OS is copied onto the SD card, it is time to boot up the Raspberry Pi. A default username and password are available from wherever you download the OS. With our OS, the defaults are “pi” and “raspberry.” Make it your first mission to change that password and maybe even add a new account if your project is going to be in production.

Another thing you may have to change is the IP address configuration on the Ethernet interface. By default, these distributions use DHCP to obtain an address. Unless you have a need otherwise, it is best to leave that be. If you need to use a static IP address, I have included a link in the Resources section with instructions on how to do this in Linux.

To access your Raspberry Pi, hook up a local keyboard and monitor to get to a command line. Once you have the network running and you know the IP address, you can use the SSH utility to gain access via the network.

To get SNMP working on the Raspberry Pi, you need to install two Debian packages: snmpd and snmp. The snmpd package is the actual SNMP server software that will enable other devices to query for SNMP on this device. The second package, snmp, is the client. It is nice to have this installed for local troubleshooting.

We used the Debian package manager, apt-get, to install these packages. The commands also must be run as the root or superuser.

The sudo apt-get install snmpd command installs the snmpd software. The sudo part runs the apt-get command as the superuser. The install and snmpd parts of the command are the arguments for the apt-get command.

Next we issued the
sudo apt-get install snmp command, which installed the SNMP client. Issue the ps -ax | grep snmpd command to see if the snmpd daemon is running after the install. You should see something like this:

1444 ? S 14:22 /usr/sbin/snmpd -Lsd -Lf /dev/null -u snmp -g snmp -I -smux -p /var/run/snmpd.pid

If you do not see a line similar to this, you can issue the sudo /etc/init.d/snmpd command start to start the service. Once it is running, it is time to turn your attention to the Python script that reads the temperature sensor. Configure the SNMP daemon after you get the Python script running.

The Raspberry Pi’s final installation is shown. The clear acrylic case can be seen along with the Texas Instruments TMP102 temperature sensor, which is glued below the air hole drilled into the case. We used a modified ribbon cable to connect the various TMP102 pins to the Raspberry Pi.

The Raspberry Pi’s final installation is shown. The clear acrylic case can be seen along with the Texas Instruments TMP102 temperature sensor, which is glued below the air hole drilled into the case. We used a modified ribbon cable to connect the various TMP102 pins to the Raspberry Pi.

A Workspace for “Engineering Magic”


Photo 1—Brandsma describes his workspace as his “little corner where the engineering magic happens.”

Sjoerd Brandsma, an R&D manager at CycloMedia, enjoys designing with cameras, GPS receivers, and transceivers. His creates his projects in a small workspace in Kerkwijk, The Netherlands (see Photo 1). He also designs in his garage, where he uses a mill and a lathe for some small and medium metal work (see Photo 2).


Photo 2—Brandsma uses this Weiler lathe for metal work.

The Weiler lathe has served me and the previous owners for many years, but is still healthy and precise. The black and red mill does an acceptable job and is still on my list to be converted to a computer numerical control (CNC) machine.

Brandsma described some of his projects.


Photo 3—Some of Brandsma’s projects include an mbed-based camera project (left), a camera with an 8-bit parallel databus interface (center), and an MP3 player that uses a decoder chip that is connected to an mbed module (right).

I built a COMedia C328 UART camera with a 100° lens placed on a 360° servomotor (see Photo 3, left).  Both are connected to an mbed module. When the system starts, the camera takes a full-circle picture every 90°. The four images are stored on an SD card and can be stitched into a panoramic image. I built this project for the NXP mbed design challenge 2010 but never finished the project because the initial idea involved doing some stitching on the mbed module itself. This seemed to be a bit too complicated due to memory limitations.

I built this project built around a 16-MB framebuffer for the Aptina MT9D131 camera (see Photo 3, center). This camera has an 8-bit parallel databus interface that operates on 6 to 80 MHz. This is way too fast for most microcontrollers (e.g., Arduino, Atmel AVR, Microchip Technology PIC, etc.). With this framebuffer, it’s possible to capture still images and store/process the image data at a later point.

This project involves an MP3 player that uses a VLSI VS1053 decoder chip that is connected to an mbed module (see Photo 3, right). The great thing about the mbed platform is that there’s plenty of library code available. This is also the case for the VS1053. With that, it’s a piece of cake to build your own MP3 player. The green button is a Skip button. But beware! If you press that button it will play a song you don’t like and you cannot skip that song.

He continued by describing his test equipment.


Photo 4—Brandsma’s test equipment collection includes a Tektronix TDS220 oscilloscope (top), a Total Phase Beagle protocol analyzer (second from top), a Seeed Technology Open Workbench Logic Sniffer (second from bottom), and a Cypress Semiconductor CY7C68013A USB microcontroller (bottom).

Most of the time, I’ll use my good old Tektronix TDS220 oscilloscope. It still works fine for the basic stuff I’m doing (see Photo 4, top). The Total Phase Beagle I2C/SPI protocol analyzer Beagle/SPI is a great tool to monitor and analyze I2C/SPI traffic (see Photo 4, second from top).

The red PCB is a Seeed Technology 16-channel Open Workbench Logic Sniffer (see Photo 4, second from bottom). This is actually a really cool low-budget open-source USB logic analyzer that’s quite handy once in a while when I need to analyze some data bus issues.

The board on the bottom is a Cypress CY7C68013A USB microcontroller high-speed USB peripheral controller that can be used as an eight-channel logic analyzer or as any other high-speed data-capture device (see Photo 4, bottom). It’s still on my “to-do” list to connect it to the Aptina MT9D131 camera and do some video streaming.

Brandsma believes that “books tell a lot about a person.” Photo 5 shows some books he uses when designing and or programming his projects.


Photo 5—A few of Brandsma’s “go-to” books are shown.

The technical difficulty of the books differs a lot. Electronica echt niet moeilijk (Electronics Made Easy) is an entry-level book that helped me understand the basics of electronics. On the other hand, the books about operating systems and the C++ programming language are certainly of a different level.

An article about Brandsma’s Sun Chaser GPS Reference Station is scheduled to appear in Circuit Cellar’s June issue.

Dynamic Efficiency Microcontrollers

STMicroThe STM32F401 Dynamic Efficiency microcontrollers extend battery life and support innovative new features in mobile phones, tablets, and smart watches. They help manage MEMS sensors in smart-connected devices and are well suited for Internet-of-Things (IoT) applications and fieldbus-powered industrial equipment.

The STM32F401 microcontrollers include an ART accelerator, a prefetch queue, and a branch cache. This enables zero-wait-state execution from flash, which boosts performance to 105 DMIPS (285 CoreMark) at 84 MHz. The microcontrollers’ 90-nm process technology boosts performance and reduces dynamic power. Its dynamic voltage scaling optimizes the operating voltage to meet performance demands and minimize leakage.

The STM32F401 microcontrollers integrate up to 512 KB of flash and 96 KB SRAM in a 3.06-mm × 3.06-mm chip-scale package and feature a 9-µA at 1.8 V Stop mode current. The devices’ peripherals include three 1-Mbps I2C ports, three USARTs, four SPI ports, two full-duplex I2S audio interfaces, a USB 2.0 OTG full-speed interface, an SDIO interface, 12-bit 2.4-MSPS 16-channel ADC, and up to 10 timers.

Pricing for the STM32F401 microcontrollers starts at $2.88 in 10,000-unit quantities.