Tuesday, October 20, 2015

Techy Tuesday - Single Board Computers For Fun and Profit

Every now and then something comes up that would be nice to throw a controller on.  Maybe it's some home automation tasks, maybe it's something like adding a TOR relay, who knows?  It's just something you don't want to tie up a computer for.  Enter the cheap single board computer (SBC) like the Raspberry Pi mentioned in that first link.  

With the Pi, now at  Model 2B, these are fully functional computers that are on a par with good cell phones; in other words, a functional desktop PC from around 10 years ago - for $35.  It features a 900MHz quad-core ARM Cortex-A7 CPU, 1 GB of SDRAM, USB and Ethernet connectors.  It can run the full range of ARM GNU/Linux distributions, including Snappy Ubuntu Core, as well as Microsoft Windows 10.  Yes, you read that right; this single board computer can run Windows 10 (not sure why you'd want to, but maybe that's just me).  Raspberry Pi is the most popular single board computer, and you may be able to simply search for an app for something you'd like to do and find it in the community. 

Besides the Raspberry Pi, the other big name in this space is the Arduino.  Compared to the Raspberry Pi, they appear aimed more at controlling things.  Instead of four USB and an Ethernet connectors, they have pin sockets.  A beginner package, the Uno, is a microcontroller board based on the ATmega328P. It has 14 digital input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, a 16 MHz quartz crystal, a USB connection, a power jack, an ICSP header and a reset button. It contains everything needed to support the microcontroller; simply connect it to a computer with a USB cable or power it with a AC-to-DC adapter or battery to get started.. You can tinker with your UNO without worrying too much about doing something wrong, worst case scenario you can replace the chip for a few dollars and start over again.

Trade magazine EE Times runs an article on a group of these single board computers.  Between the Raspberry Pi and the Arduino, you'll probably find more source code and more projects than for any other boards.  Or all of them put together.

An interesting idea is the HummingBoard-Gate, a computer that emphasizes small add-on sensors called Click Boards.  There dozens: a GPS receiver, Stepper Motor Driver (hmm - one of these for each axis of a CNC system?), three axis accelerometer; over 150 to choose from.  You could also connect your own basic sensors using a 36-pin GPIO header and 4 USB ports.  However, the board doesn’t come with any memory storage and starts off with a single-core Solo chip and 512 RAM for a whooping $50.  Adding a faster processor, storage, and WiFi and Bluetooth and bring your investment up to $235—that’s before the addition of sensor modules.  As you can see, The HummingBoard-Gate adds all the flexibility you could want, but it brings a price.

I've still never played around with any of these SBCs.  At $40, I think a Raspberry Pi is in the near future.


  1. We have Raspberry Pi boards all over the place on the Iowa running various interactive displays, and playing back the various canned messages you hear over the ship's PA system.

    I did a bunch of work for a friend with Arduinos. He had an application he'd written that turned it into an intervalometer for long time exposures with digital cameras. Turns out some digital cameras start producing very noisy images if the "shutter" is kept open for more than a few minutes. His application would cycle the shutter every 10 minutes to allow the sensor to cool down, or lose a charge, or "reset" whatever makes them get noisy.

    It worked great!

    I repackaged the super kludge he'd cobbled together so it looked better, and didn't have wires popping out of the little sockets he used, and made 5 of them for him and his photo club. I mentioned to him how easy it would be to "productize" it so he wouldn't have to keep buying complete Arduino boards and complete "shields". Every one I built for him had over $80 in parts alone, plus 3~4 hours of my time. "I'll only ever need these five units" he told me, so I kept my drawings to myself.

    He kept coming back wanting 5 more, and then 5 more, and it was really getting annoying, so I upped my fee from the $25 each to assemble them,to more like what it was really worth to me.....$100 each to build them.

    If I would have gone into production with these, the total parts cost would have been about $12 in quantities of 100, and less if we built more, and from the test response he received, we easily could have sold several thousand in about a year with a profit of about $75 per unit.

    I don't know what his problem was, but he kept going from vendor to vendor with his very expensive "kit" of parts, just looking for somebody to machine the plastic boxes, and wire everything together and glue it into the box, but none of the local assembly house vendors wanted anything to do with his kludge, as they knew from looking at it the reliability would be zip.

    I had a PC board designed, a complete BOM, and easy assembly instructions, but he just wouldn't get off the dime and do it.

    I'd do it myself, but the code that runs it is his.....

  2. I have one PI up and running presently as a Looking Glass email machine. Another half-dozen I plan to build a cluster from but haven't had the time yet. One or two, maybe, to run motion-detector cameras for the perimeter. There is a boat-load of projects one can do with these and a good way to learn some neat stuff, plus Linux and coding, and my advice would be to forget Windows 10 but YMMV.

  3. I've used both RasPi and Arduino for both work and play, and some of the ARM-core MCUs for the space in between (need a single-chip solution but more computing power / resources than an AVR provides).
    One nice thing about Arduino is that it's a handy way to deal with a mega328, even if you're doing a custom board design. Design in the MCU, program it with the Arduino bootloader, and you've got a user-programmable gadget with a cross-platform development environment.
    On the other hand, the mega328 only has the one serial port, so debugging an application that needs that port for its own purposes is problematic, and the Arduino programming environment has some interesting issues that cause error reporting to be seriously confusing and library mixups to go unreported until such time as the application just doesn't do what you expect.
    The Pi is a cute friendly little Linux board, but the expansion header wasn't really thought out. (One would think, for example, that including USB on the header would be a no-brainer.)
    Ah, well. Perfection is elusive, and these boards are cheap. And the software is free. Was there some saying about gift horses?

  4. Ive set up a Raspberry Pi as an Onion Pi - a wired/wireless TOR router, and as an XMBC television interface (think Roku/AppleTV/Chromecast). I also had one set up as a trusted write-down, taking a classified RS-232 signal and generating an unclassified analog audio out to a radio. Very inexpensive and effective device!

  5. I set up a pi with touchscreen to control a 3D printer last month. The printer with the Arduino board could run off a LCD screen without it but the added addition of the full color touch screen was a nice touch.

    Next project is a Bridgeport mill retrofit kit that has a pi board on it and Arduino along with off the shelf larger touch screen or a wireless tablet controller via octoprint.

    Software is Really easy to set up. Took me a week of reading, then actual work time was maybe an hour.

    Email me if you want help getting this to run your mill..


  6. My team used a Beaglebone Black in the IEEE autonomous robotics competition this spring. The 2 PRUs (think 2 Arduinos that share memory with the main processor) were good for handling small tasks while the CPU was doing something that required more processing power. It worked well handling complex tasks, like image processing, while still being available when needed for navigation.