Monthly Archives: January 2014

The next Electric Imp

Yesterday evening Hugo Fiennes, CEO and Co-founder of Electric Imp gave a talk at the Mountain View Hacker Dojo.

Hugo did a great job explaining the Electric Imp platform to a packed room. Besides a M&M candy dispenser that he controlled over the internet he also brought a board with the next generation Electric Imp on it.

20140129_201910

The Electric Imp is the silver module on the left. The tiny size gives an idea of how small of a form factor internet connectivity will be available. Hugo also shared his excitement about the reduction in power consumption and the ability to power IoT devices from batteries.

First Steps with the Electric Imp

At the CES 2014 Intel announced the Edison platform that is intended to enable IoT applications.  As pointed out in my earlier blog, there is a pretty similar solution out there. It goes by the name of Electric Imp.

El_Imp

cloudgraphic

The Electric Imp is a platform that consist of several parts:

  • The SD-Card size Electric Imp
  • A web based IDE
  • A cloud service that integrates with the Electric Imp hardware
  • The BlinkUp cell phone app to pair the Imp Hardware with your local network and Electric Imp web services

Such an impressive combination promised some fun, so I was curious how well all the components would work together.  To try it out I got myself an Electric Imp and the related Imp Arduino Shield from Sparkun. In order to use it with Arduino Shields or Arduino Boards you have to also order the headers and solder them on the board. I use the Arduino Stackable Header Kit . The stackable header allow you to use the Imp as a "WiFi Shield" to an Arduino Single Board Computer (SBC) as well as being a standalone SBC. If you only use you Electric Imp as a SBC you won't need any stackable headers. Also make sure you order the headers that fits your Arduino board. There are different revisions out there. The R3 version has additional pins and will not fit an original Arduino board.

Once the headers are soldered down you can plug the Electric Imp Shield on top of an Arduino board. Signup for an account on http://electricimp.com and download the BlinkUp app to your smartphone. Fire-up the app and log into your Electric Imp account with your credentials. It's time to power up the Arduino-Imp combo. Hold your Phone screen flush with the front edge of the Electric Imp card and start the pairing process. The phone screen flashes for a while. Once the flashing stops the Electric Imps status light should turn green. You can get detail instructions on the Electric Imp web site or on Sparkfun. So far not a lot of challenges.

Time has come to whip together some code that brings this combo to life. To test the Electric Imp I used some modify code from their web site.

The code above let's the two LEDs on the Electric Imp Shield blink alternatively for half a second each. So if you see the LEDs blinking, you know that the IDE properly compiled it and downloaded it over the internet into the Electric Imp card where it gets properly executed. Well Done! Stay tuned, in my next installment I will try to get the Electric Imp talk to the Arduino.

Galileo in the Doghouse?

In one of my previous blogs I compared the Galileo board against the Raspberry Pi  Today we are looking at how the Galileo board compares to the affordable Beaglebone Black board. The Beaglebone is an initiative by Texas Instruments (TI). Unlike the Raspberry PI the Beaglebone board is all open source. Anyway let's look at the key technical data:

Beaglebone Black Intel Galileo
Target price: US$45 US$69
SoC: Texas Instruments Sitara AM3359 Intel Quark X1000
CPU: 1GHz ARM® Cortex-A8, NEON floating-point accelerator, 2x PRU 32-bit microcontrollers 400MHz 32-bit x86 Pentium Class CPU
GPU: SGX530 3D graphics accelerator none
Memory (DRAM): 512MB DDR3 RAM 256 Mbyte
PCIe ports: none PCIe 2.0
USB 2.0 ports: 1 Host,
1 Device
1 Host,
2 Device
Video input: none
Video outputs: HDMI (rev 1.3 & 1.4) none
Audio outputs: stereo via HDMI none
Onboard storage: 2GB 8-bit eMMC on-board flash storage
SD/MMC/SDIO 3.3V card slot
SD/MMC/SDIO 3.3V card slot
Onboard network: 10/100 Ethernet 10/100 Ethernet
Low-level peripherals: Power 5V, 3.3V , VDD_ADC(1.8V)
3.3V I/O on all signals
McASP0, SPI1, I2C, GPIO(69 max), LCD, GPMC, MMC1, MMC2, 7 AIN(1.8V MAX), 4 Timers, 4 Serial Ports, CAN0, EHRPWM(0,2),XDMA Interrupt, Power button, Expansion Board ID
16 × GPIO,
UART, I²C bus, SPI
Power ratings: 210-460 mA @ 5V 550 mA (1.9-2.2W)
Power source: 5 Volt 5 Volt
Size: 86.36 mm x 53.34 mm (3.4 in x 2.1 in) 106.68 mm x 71.12 mm (4.2 in x 2.8 in)

Both boards offer pretty similar technical data. One of the main difference is the absence of a graphics engine and HDMI interfaces in the Galileo's X1000 Quark processor. This obviously makes the Galileo less of a choice for graphics application. The Beaglebone also offers a higher CPU clock speed which will give you additional punch. However, if you need a miniPCIe slot Galileo is the way to go.

To close the triangle  I also recommend the detailed comparison  of the Raspberry Pi vs. the Beaglebone published in Make Magazine.

Galileo goes Wireless

The Galileo is a great single board computer. However one thing that makes the board even more attractive is the simple support for WiFi. This blog outlines the steps necessary to get Galileo with WiFi working.

According to post in the Intel forum Galileo will work with the Intel Centrino N135 and N6205. However after reading the great post from Sergy I could not resist the temptation and got a Intel® Centrino® Advanced-N 6235 card from a local computer store. I then also had to get a pair of antennas and the half mPCI card extender.

Here are a few things you need before you start:

  1. A computer with the Arduino IDE for Galileo installed
  2. A network router with a DHCP server running
  3. An Ethernet cable to connect the Galileo board to your network
  4. An empty SD card or USB thumb drive

As my WiFi card is not supported out of the box I had to add the driver and firmware support. Here are the steps to do this:

(Note: instead of booting from a microSD card, you can also use a USB thumb drive and a USB-to-microUSB OTG-adapter cable). This is  not advertised widely, but see Galileo forum post for details

    1. Head over to Wireless Linux site and download the Linux diver for the Intel Centrino Advanced-N 6235. The file name is iwlwifi-6000g2b-ucode-18.168.6.1.tgz
    2. Attach your Galileo to your network router with a standard Ethernet cable
    3. Download the sketch source code below. Modify the MAC address in the sketch to match you Galileo board's MAC address printed on the label on the Ethernet plug.
    4. Compile and upload the sketch.
    5. Open the Serial Console in the Arduino IDE. You should see a Message that reports the IP address assigned by your DHCP server "Attempting to start Ethernet" "Your IP address: 192.168. 1. 49"
    6. Do a full format  of a microSD Card (no Quickformat)
    7. Copy all the files from Prepare the microSD Card
    8. Plug the micro SD card into the SD card slot on the Galileo Board
    9. Boot your Gallileo board by pushing the REBOOT switch and wait until you see the board dectected by your computers USB port.
    10. Use SSH (mindterm or scp) to copy the file iwlwifi-6000g2b-6.ucode WiFI firmware  to the /lib/firmware/ folder of you Galileo
    11. Generate the WPA credentials:
    12. Start the network with:
    13. Shut down the WiFi with:
    14. Start up the WiFi

Using the IP address that the Galileo reported in the Serial Terminal you should be able to telnet into the board. This will give you a Galileo Linux terminal prompt.

Cortino - Another STM32 based Arduino

While searching for some STM32 related data I cam across the Cortino board by Bugblat.

Cortino

Like my Olimex featured in an earlier blog post this board uses a STM32F103 based 32-bit ARM Cortex-M3 CPU. The Cortino board looks like a nicely done Arduino variant. It even includes a FTDI chip. Although Bugblat does not provide support for the Arduino IDE software their product page offers a good overview of available 3rd Party IDEs.

Like for the Olimex, it should not be too difficult to adopt the Maple IDE from Leaflabs. However the Mable IDE is now getting a bit dated.  A more current Arduino 1.5.5 IDE can be created by using the instructions on Makerlab.me's web page . Note unless you are fluent in Chinese you have to use Goggle Translate. However the code is documented in English and available from Github. For those that want to learn more about the details of supporting a new board there is a good document available on Arduino.cc  Arduino IDE 1.5 3rd party Hardware specification. Another alternative for Mac users is the OS X native Xcode IDE as offered by embedXcode.

How does Galileo Stack up against Raspberry PI

I am interested is to compare Galileo and other DIY single board computers. In this post I want to analyze the Galileo board against the popular Rasberry PI. The first thing to note is that the Rasberry PI is not an Arduino compatible platform. However, there are now extension boards available that allow to use Arduino shields with Raspberry PI. Here are to examples: The first is the AlaMode for Raspberry Pi  the second is the GertDuino: Add-On Board for Raspberry PI . Both boards are priced in the range of a Rasberry PI. So the combination of a Raspberry PI with an Arduino shield extension puts this solution right where the Galileo board is.

Have a look at the table below. It compares the two single board computer's hardware. The technical data for the Raspberry PI are taken from WikiPedia.

Rasberry PI Model A Rasberry PI Model B Intel Galileo
Target price: US$ 25 US$ 35 US$69
SoC: Broadcom BCM2835 (CPU, GPU, DSP, SDRAM, and single USB port) Intel Quark X1000
CPU: 700 MHz ARM1176JZF-S CPU 400MHz 32-bit x86 Pentium Class CPU
GPU: Broadcom VideoCore IV @ 250 MHz none
Memory (DRAM): 256 MBytes (shared with GPU) 512 MBytes (shared with GPU) as of 15 October 2012 256 Mbyte
PCIe ports: none PCIe 2.0
USB 2.0 ports: 1 Host 2 Host (from LAN9512) 1 Host,
2 Device
Video input: A CSI input connector allows for the connection of a RPF designed camera module none
Video outputs: Composite RCA (PAL and NTSC), HDMI (rev 1.3 & 1.4), raw LCD Panels via DSI none
Audio outputs: 3.5 mm jack, HDMI, and, as of revision 2 boards, I²S audionull none
Onboard storage: SD/MMC/SDIO 3.3V card slot SD/MMC/SDIO 3.3V card slot
Onboard network: None 10/100 Ethernet (from LAN9512) 10/100 Ethernet
Low-level peripherals: 8 × GPIO, UART, I²C bus, SPI bus with two chip selects, I²S audio +3.3 V, +5 V, ground 16 × GPIO,
UART, I²C bus, SPI
Power ratings: 300 mA (1.5 W) 700 mA (3.5 W) 550 mA (1.9-2.2W)
Power source: 5 volt via MicroUSB or GPIO header 5 Volt
Size: 85.60 mm × 53.98 mm (3.370 in × 2.125 in) 106.68 mm x 71.12 mm (4.2 in x 2.8 in)

The Raspberry PI uses a SoC chip that was originally designed for the set-top box market. Therefore it shows a nice lineup of features on the video side. The integrated HDMI port and on-chip graphics accelerator are testimony to this. However for IoT applications the Quark X1000 SoC used by Galileo offers a really nice selection of interfaces.

Is Edison competing with Galileo

Last summer at the Maker Fair in Rome Intel announced the Galileo single board computer . This week at CES 2014 in Las Vegas Intel followed up with another initiative that carries an inventors name. This time it is Edison. The Edison board is more advanced take on the Quark System on a Chip (SoC) based single board. The board is only the size of an industry standard SD card. So don't expect to solder it yourself.

edison

However the card is a full featured single board computer that will offer support for multiple operating systems (OS).  The integrated WiFi will turn any device equipped with an Edison into an IoT solution.

Intel also promised to release design files that will make it easy to  integrate Edison into your own project.  Among the tool vendors that will support Edison is Autodesk. The company just announced the  acquisition of circuit.io. This online PCB design tool is now a part of Autodesk's 123D design suite.

For those that cannot wait and want something today the Electric Imp Wireless SD-CARD is an interesting alternative. This card is clearly not as powerful as an Edison. However given the creativity that innovators have displayed around the meager Arduino 8-bit AVR CPU  it may still be plenty.

El_Imp

Is 3D Vision ready for prime time?

One of the exiting fields of embedded computing is 3D vision. The Microsoft's Kinect is certainly the premier consumer product in this category. However, if things go according to Intel's CEO Krzanich Kinect will soon get company. At his CES 2014 presentation he showed off RealSense scanning and gesture control technologies and announced the roll-out of this technology during 2014 with SDK becoming available soon.

Intel is not alone looking at this space. TI is also active in 3D Vision. However, their focus is more on Automotive rather than consumer devices.  For those interested to look behind the scene of 3D technology, there is a video interview by Jeff Bier, founder of the Embedded Vision Alliance, that presents some live 3D feeds and explanations by Goksel Dedeoglu, Manager of Embedded Vision R&D at Texas Instruments.

Combining 3D Vision with Infra-Red (IR) imaging technology as showcased in the video below and it is easy to imagine what exiting opportunities are out there.

I agree  that some of these technologies are out of reach for a typical DIY Maker. However, as in the past these technologies will come down in their price points and get more accessible to the masses quickly. One 3D Photo/Movie example can be found in Make Magazin. So it is never too early to start imagine what to do with it.

What shields are working with Galileo

In my last post I touched on Galileo's shield interface implementation. 010511_0750_0082_nsmsHaving experimented with a few shields sitting in my drawer, I realized that the implementation of the Arduino shield interface creates a bit of a challenge.  So before you assume that a shield is plug-and-play do your homework. Like with a vintage car they may need some tender loving care.

Here are a few key criteria that you want to check:

  • Hardware
    1. Does my shield draw a lot of current: the Cypress CY8C9540A 40-Bit I/O Expander is only capable of driving 15/25mA instead of 40/50mA
    2. Are you accessing some of the shield pins at a high rate? Without special tricks, the Galileo can only toggle an IO pin at 477 kHz (see also Galileo FAQ and Forum post on this subject).
  • Software
    1. Does the driver directly access Atmel's  registers? This can be either the IO-port registers, Interrupt, Pulse Width Modulator (PWM) or Timer registers.
    2. Does it use any  AVR libraries? These libraries are exposing the Atmel AVR hardware to the programmer and are therefore a sure sign that you are in for some work to port the Arduino software libraries to the Galileo platform. Search for "#include <avr/" to see how many AVR hardware specific libraries are used.

Well written software libraries only use the official Arduino application programmers Interface (API). However, many of the existing shield libraries directly manipulating AVR hardware registers. This is either done out of ignorance for software portability or out of necessity as to push the hardware to its limits. I expect that with the transition away from the 8-bit AVR (ATmega328) micro controller to the more powerfule 32-bit CPUs ( Arduino Due, Arduino TreGalileo and Olimex-STM32) this problem will gradually subside.

Also note that as of this writing the following Arduino Libraries are supported:

  • SPI
  • EEPROM
  • UART
  • GPIO
  • WiFi

Check the Release Notes on Intel's site for the latest status.