Archive

Posts Tagged ‘raspberry pi’

IceZero Lattice iCE40 FPGA Board is Designed for Raspberry Pi Zero

June 24th, 2017 No comments

Yesterday, we reported about Olimex’s open source hardware iCE40HX8K-EVB board with a Lattice iCE40 (HX8K) FPGA, and today, another iCE40 FPGA board, also open source hardware, appeared in my news feed with Trenz Electronic’s IceZero board specifically designed to be programmed using a Raspberry Pi Zero board.

Click to Enlarge

IceZero board specifications:

  • FPGA – Lattice ICE40HX4K with 3520 logic gates, and 80 Kbit memory
  • Storage – SPI Flash for FPGA self-configuration
  • Misc – 3x User LEDs;  User Clock: 100 MHz
  • Expansion – 4x unpopulated PMOD Connectors; 40-pin Raspberry Pi female header
  • Dimensions – 56 x 30.5mm (Raspberry Pi HAT Compatible)

The board is supported by icoTC open source FPGA toolchain for Windows and Linux, which you can use in Raspberry Pi Zero (W), and other RPi board with a 40-pin header running Raspbian, as explained in that simple example in Github. Trenz electronic only shared part of the documentation, but you’ll find everything on a blog post on Black Mesa Labs with the design files licensed with the CERN Open Hardware License v1.2, and more technical details about the board.

Block Diagram with Raspberry Pi

Trenz Electronic sells IceZero board for 34 Euros excluding VAT and shipping, but in case you’d like to make it yourself, you can also order the bare PCB on OSH Park.

MangOH Red Open Source Hardware Board Targets Cellular Industrial IoT Applications

June 14th, 2017 3 comments

Sierra Wireless has announced MangOH Red open source hardware platform designed for IIoT (Industrial IoT) applications with a snap-in socket for 2G to 4G & LTE-M/NB-IoT modules, built-in WiFi and Bluetooth, various sensors, a 26-pin expansion header, and more.

mangOH Red Board without CF3 / IoT Modules – Click to Enlarge

MangOH Red board specifications:

  • Snap-in socket to add any CF3-compatible modules, most of which based on Qualcomm MDM9215 ARM Cortex A5 processor including:
    • Airprime WP7502 LTE Cat 3, HSPA, WCDMA, EDGE/GPRS module
    • Airprime WP7504 LTE Cat 3, HSPA, WCDMA, CDMA module
    • Airprime WP7601 LTE Cat 4 module
    • Airprime WP7603 LTE Cat 4, WCDMA module
    • Airprime WP8548 HSPA, WCDMA, EDGE/GPRS, and GNSS module
    • AirPrime HL6528RD quad-band GSM/GPRS Embedded Wireless Module designed for the automotive market
    • And more….

      mangOH Red with CF3 Module, Shield, and IoT Module – Click to Enlarge

  • Storage – micro SD slot
  • Wireless MCU Module – Wi-Fi 802.11 b/g/n and Bluetooth 4.2 BLE module with an ARM Cortex-M4 core MCU (Mediatek MT7697) providing access to real-time I/Os
  • Wireless Connectivity “Accessories”
    • Micro SIM card holder; ESIM
    • Main, GNSS, & Diversity antennas connectors, and WiFi/Bluetooth chip antenna
  • USB – 1x USB 2.0 host port
  • Audio – 3.5mm audio jack (unpopulated)
  • Sensors – Bosch Sensortec Accelerometer, Gyroscope, Temperature and Pressure sensors, Light sensors
  • Expansion
    • 26-pin Raspberry Pi compatible connector
    • IoT Expansion Card slot to plug in any technology based on the IoT Connector open standard
    • 6-pin real-time I/O header controlled by WiFi/BLE module.
    • 6-pin low power I/O header
  • Debugging – 1x micro USB port for serial console
  • Misc – LEDs; reset and user buttons;
  • Power Supply – 5V via micro USB port; battery connector; power source jumpers

Click to Enlarge

mangOH Red hardware design is fully open source with BoM, schematics (PDF an Allegro/OrCAD), PCB Layout (Intercept Pantheon), Gerber, and mechanical files available for download in the resources section, where you’ll also find other documentation and getting started guides for users and developers.  The CF3 modules run Legato Linux developed by Sierra Wireless, and open source with the source code on Github. Code specific to MangOH Red + WP8548 was also upstreamed in Linux 4.10.

The company also offers Sierra Wireless Smart SIM with up to 100 MB free data, but you can use the board any commercially available SIM car. The board also supports AirVantage IoT Platform to create, deploy and manage solutions in the cloud.

MangOH Red board can be purchased as a bareboard, but most people will probably want to get a Starter Kit with MangOH Red plus Air Prime WP8548, WP7502 or WP7504 sold on Digikey. I’m very confused by the price list, as $99 is shown for both the bare board, and kits including the board and a CF3 module. So I’ll assume $99 is for mangOH board only, and you’d likely have to pay $200+ for a board plus a CF3 module with the total price depending on the selected module. You may find additional details on MangOH Red product page.

Micro SD Cards for Development Boards – Classes, Tools, Benchmarks, Reliability, and Tips & Tricks

June 13th, 2017 38 comments

When people plan to use a development board for their project, they mainly focus on the requirements of the development board itself, as well as software support. But selecting the right accessories may be just as crucial for good performance and stability. For example, selecting a proper power supply is important, as the board may freeze or randmly rebooted if it is not feed at the right voltage. Part of this is selecting a micro USB cable, as you’ll want a cable with minimal resistance which can be achieved through shorter cables and/or a low AWG value. Another important item that can impact stability and performance of the systems are micro SD cards when used to run the operating system in development boards.

Understanding SD Card Performance Metrics & Classes

Until a few years ago, (Micro) SD cards were primary used to store data such as photos, videos and music. In those use cases, you have large files that benefit from high sequential read and write speeds. That’s why the SD association created different classes to specify a minimum write speed with speed class, UHS speed class, and more recently Video Speed Class.

That’s useful as you won’t need the same write speeds to copy music files, or record videos in a 4K camera, and the cards with a lower class are normally cheaper. Note that most (all?) low cost development board do not support UHS-II or UHS-III interface, so it may work, but you won’t be able to reach the maximum performance of the card. Micro SD card controllers are also often connected via SDIO which limits the sequential performance to around 23 MB/s.

However, those classes are only marginally useful for micro SD cards used in development boards, since operating systems generate a lot of small read and write operations, for example for databases and web caches, rather than handling large files.  That’s why storage devices may also include read and write IOPS (I/O per seconds) which are more useful for this type of use case. The table below about Samsung eMMC and UFS flash chip shows some of those numbers.

Click to Enlarge

The only problem is that until very recently, there was no way you could know minimal IOPS R/W numbers for SD cards since they were simply not made available by the manufacturers, so instead people were recommending Class 10 micro SD cards which may or may not best suited to their use in development boards. However, since the introduction of Adoptable Storage in Android, where micro SD cards could be used for apps instead of just data, IOPS values became more important, and the SD association has now introduced Class A1 & Class A2 application performance classes for SD cards specifying minimum IOPS R/W values together with a 10MB/sec minimum sustained sequential write speed.

That’s great! Problem solved then? Not quite, as manufacturers have only started to use application performance class logos in their higher-end SD cards with high capacity like 256GB, which usually cost several times the price of your typical development board. So we need to rely on the community to test IOPS R/W values, or random read and write speeds.

Software Tools for SD Cards

There are several program that can test performance. hdparm and dd are popular, but the former only test sequential speed for a very short time, and the latter only test sequential speed, and many people may not include the time it takes to flash the cache to the actual card (e.g. with sync), leading to potentially misleading results, and  mostly irrelevant to our use case.

So instead, there are specific tools to tests both sequential speeds and random I/O performance. Bonnie++ is one, but recently iozone has become the reference for disk I/O testing, and that’s the one used in the benchmarks below.

Many tutorials recommend to flash firmware using Win32DiskImager in Windows, or dd in Linux. However, while I have not experience the issue myself, I’ve been told the latter may not always detect errors while flashing, and a new tool is now recommended: Etcher. It works in Windows, Linux, or Mac OS using a GUI or the command line, and will verify the SD card after flashing making sure nothing has gone wrong during the process.

SD Cards Benchmarks

With that in mind we need micro SD cards with good random R/W performance, which we can test with iozone3, and for many applications 8 to 32 GB capacities are enough. We were planning to test ourselves, but Andreas Spiess has already published a videos – embedded further below- leveraging pidramble work, with benchmarks using several micro SD cards on a Raspberry Pi 3 board. You’ll also find more results and discussion on Armbian forums. Linaro also made a survey of micro SD cards a while ago.

Random Read & Write Speeds in MB/s – Cards Sorted by Random Write Speed – Click to Enlarge

Here are the main takeaways from the tests:

  • Larger cards are usually faster but not always (See Samsung EVO+ 64GB results).
  • Benchmarks vary a lot between runs for a given card with 10 to 20% variations
  • Most low cost micro SD cards / clones have really bad random write performance.
  • Samsung and Sandisk cards get the best random I/O performance
  • It’s not always necessary to buy the most expensive cards for usable performance.

The conclusion is that for the best performance select cards like Samsung EVO+ 32GB or Samsung Pro+ 32GB selling for respectively around $18 and about $25 on Amazon US. A cheaper card that should work decently is Sandisk Extreme Pro 8GB sold for $8.

The Problem of Fake Micro SD Cards

It looks like we have now found a decent list of micro SD cards to use with our development boards. There are still problem has some are copy, even on sites like Amazon , as manufacturer of fake card may insert them in the supply chain. One way to double check if you have an original is to check the CID (Card Identification) number. In Linux, you can do so as follows:

The first two digit represents the manufacturer ID. There’s no public list, but “1b” is for Samsung. You can decode the full CID on here.

If you’ve bought a Samsung SD card, and the Manufacturer ID is difference from 0x1b, then you almost certainly have a fake Samsung SD card. If the number is 0x1b, you can’t be 100% sure you have a genuine SD card however, as the clones may have also cloned that part.

Sadly there’s no easy other way to check if a card is real or fake. Checking the performance is similar to other reports online may help confirm you have a proper card. That 2010 article by Bunnie has more details about fake SD cards.

Longevity and Reliability of micro SD Cards

I’ve been using micro SD cards for about 5 years both in development boards, and my phone, and I have to say I’ve had to throw away many of them due to I/O errors after a while. I’ve also found my card readers also only last a few months. So far, I mostly bought cheaper ones, so it could be an explanation. Sadly, manufacturers do not provide any MTBF (Mean Time Between Failure) for SD cards so there’s no data like on hard drives and SSDs.

However, there are ways to limit wear and tear on micro SD cards by limited writes, either by making the rootfs read-only which is fine for embedded projects, less if you plan on using your board as a computer, or using log2ram, extending the write buffer commit interval, etc… More discussion about SD card lifespan can be found on Pete Scargill’s blog.

Some people will also encounter corrupted flash that won’t boot anymore after a power failure or a crash because the file system has been corrupted. It is not directly related to the SD card itself, and it’s more likely to occur if you have a poor power supply. Steps to reduce the probably of corruption involves the same steps as previously mentioned to limit wear and tear with a read-only file system and so on.

Another solution to avoid most the issues mentioned above is to use boards with eMMC flash, but of course going that route would mean that you’d have to avoid  Raspberry Pi boards, baring the RPi Compute Module. Neverhteless, a combination of carefully selected power supply, USB cable, and micro SD card should still give you a good experience, and avoid many potential headaches, with your board.

Thanks to Karl and Thomas for tips and insights.

HealthyPi Raspberry Pi HAT Measures ECG, Body Temperature, and Oxygen Saturation (Crowdfunding)

June 12th, 2017 10 comments

Bangalore based ProtonCentral has launched the third version of Healthy Pi, a vital sign monitor using the Raspberry Pi as its computing and display platform, and capable of measuring body temperature, oxygen saturation, and ECG/respiratory data.

Healthy Piv3 board specifications:

  • MCU – Atmel ATSAMD21 ARM Cortex M0 MCU, compatible with Arduino Zero
  • Vital Signs Chips
    • ECG and respiration front-end –  TI ADS1292R 24-bit analog front-end with SNR of 107 dB
    • Pulse oximetry – TI AFE4490 Pulse Oximetry front-end with integrated LED driver and 22-bit ADC
    • Temperature – Maxim MAX30205 digital body temperature sensor for skin temperature sensing
  • Expansions Headers and Ports
    • 1x 40-pin header to connect to Raspberry Pi
    • 2x 3-pin connectors for temperature and BP/GLUCO
    • DB9 connector for finger-clip Spo2 probe
    • 3.5mm jack for ECG cable and probes
    • 1x UART connector for an external blood pressure module
  • USB – 1x micro USB port for power and programming
  • Debugging – 10-pin JTAG header
  • Dimensions – 65 mm x 56.5 mm x 6 mm (Raspberry Pi HAT form factor)
  • Weight – 100 g

The board comes with Arduino Zero bootloader, can be programmed with the Arduino IDE or Atmel Studio, and is usable as a standalone board. However, connecting it to a Raspberry Pi 3 board will allow you to leverage WiFi connectivity to communication with a TCP client for telemedicine applications, or using an MQTT client for continuous logging applications for example sending data to an AWS EC2 instance running Thingsboard IoT platform, as well as running Java based HealthyPi GUI on a display. The board is not fully open source hardware, as gerber files and BoM are missing, but they’ve released PDF and EAGLE schematics and PCB layout, as well as GUI and firmware source code on github.

The company launched the board on Crowdsupply, where they have raised over $10,000 dollars so far. There are two main options:

  • $195 Healthy Pi 3 HAT Kit with HealthyPi v3 board, 3-electrode cable with “button” connectors on one end and stereo connector on the other end, Finger-clip Spo2 probe, digital skin temperature sensor, 20 single-use disposable ECG electrodes, and a HAT mounting kit
  • $369 (Early bird)/ $395 Healthy Pi 3 Complete Kit with the content of Healthy Pi 3 HAT Kit plus a Raspberry Pi 3 board, a 16GB microSD card with pre-loaded Raspbian and Healthy Pi software, a 7” touchscreen LCD, SmartiPi Touch enclosure for display and Pi, a 5 V/2.5 A medical-grade power adapter with a country-specific snap-on plug

While they provide a 5V/2.5A power bank, they recommend to use a power bank for safety reasons, and to minimizes noise. If you use the board in standalone connected to a laptop, it is also recommended to run on battery during measurements for extra safety.

Delivery is scheduled for July 10, 2017, and free worldwide shipping is included in the prices above. The system will eventually be sold on ProtoCentral website too.

Apple Opens HomeKit Accessory Protocol Specification to Non-Commercial Projects

June 9th, 2017 10 comments

HomeKit is a software framework that allows Apple users to control smart devices with their iPhone or iPad. But so far, you had to become an MFI licensee to design a HomeKit compatible device, you product had to be tested by Apple, and – according to a story on Hackster.io – also required a special cryptographic chip for authentication. Developers creating commercial devices still need to become an MFI license, but Apple has now opened HomeKit Accessory Protocol Specification for non-commercial projects, meaning you can now use the Framework on Arduino, ESP8266 boards,  Raspberry Pi, and other development boards using software authentication.

You could already use HomeKit on Raspberry Pi board previously using HomeBridge, but the advantage now is that you don’t need to breach Apple’s terms and conditions, and you can talk directly to your phone without the need for a bridge.

If you want the specifications got to HomeKit’s developer page, click on “HomeKit Accessory Protocol Specification”, login with your Apple ID, and download the specs after the following disclaimer and agreeing with a license agreement:

HomeKit Accessory Protocol Specification

(Non-Commercial Version)

This document describes how to create HomeKit accessories that communicate with Apple products using the HomeKit Accessory Protocol for non-commercial purposes.

Companies that intend to develop or manufacture a HomeKit-enabled accessory that will be distributed or sold must be enrolled in the MFi Program.

Continue to License agreement.

Thanks to Harley for the tip.

Amazon AWS Greengrass Brings Local Compute, Messaging, Data Caching & Sync to ARM & x86 Devices

June 8th, 2017 No comments

Amazon Web Services (AWS) provides cloud computing services to manage & store data from IoT Nodes over the Internet, but in some cases latency may be an issue, and Internet connectivity may not be reliable in all locations. AWS Greengrass provides a solution to those issues by running some of the IoT tasks within the local network in ARM or x86 edge gateways running Linux.

Click to Enlarge

You can still manage your devices from AWS cloud, but a Linux gateway running Greengrass Core runtime will be able to run AWS Lambda functions to perform tasks locally, keep device data in sync, and communicate with devices running AWS IoT Device SDK.

Greengrass benefits include:

  • Response to Local Events in Near Real-time
  • Offline operation – Connected devices can operate with intermittent connectivity to the cloud, and synchronizes with AWS IoT once it is restored
  • Secure Communication  – AWS Greengrass authenticates and encrypts device data at all points of connection.
  • Simplified Device Programming with AWS Lambda – Greengrass execute Lambda functions locally, reducing the complexity of developing embedded software.
  • Reduce the Cost of Running IoT Applications – You can program filter device data locally, and only transmit the data you need to the cloud. This reduces the amount of raw data transmitted to the cloud and lowers cost

Greengrass Core’s minimum requirements are a 1GHz Processor with at least 128 MB, so it will run on most x86 products, as well as some ARM boards and devices, with Amazon recommending the following to get started quickly:

Greengrass Core works with Linux distributions with Linux 4.4.11+ or greater including Ubuntu 14.04 LTS, Debian Jessie, etc.. Canonical will also provide snap to easily install it on Ubuntu operating systems. Dependencies include SQLite 3 or greater, Python 2.7 or greater, Glibc 2.14, boto3 (latest), botocore (latest), OpenSSL 1.0.2 or greater, libseccomp and bash. You’ll find more detailed requirements in the FAQ.

Amazon’s announcement today was about AWG GreeenGrass availability to all customers, but it has already been used successfully in the industry by customers such as Enel, the largest utility in Europe, Konecranes now having 15,000 connected cranes, Pentair plc for their aquaculture customers, and Rio Tinto mining group to improve management and safety of their truck fleet.

Greengrass is free to try for one year with up to 3 devices, and costs $0.16 per month or $1.49 per year per device for up to 10,000 devices. If you are going to manage more than 10,000 devices you’d have to contact Amazon for pricing options. You can find more info and get started on Amazon Greengrass page.

 

LyCOM shows off a range of Raspberry Pi Hats at Computex 2017

June 2nd, 2017 10 comments

Taiwanese LyCOM, a maker of various I/O accessories showed off a range of Raspberry Pi compatible expansion boards at Computex. Some of them are rather unusual, such as the Pi-112 which adds M.2 drive support. LyCOM also offers modules that adds SATA and mSATA support. Common among all three modules is that they use a USB to SATA bridge chip, although unfortunately I wasn’t able to determine who the manufacturer of the bridge chip was, as all the hats were in a glass display case. All three hats have a micro USB connector that needs to be connected to one of the USB ports on the Raspberry Pi board, but they can also be connected via a pin-header. The M.2 adapter also has a second micro USB port for power and it’s of course only compatible with SATA based M.2 drives.

M.2 SATA SSD HAT for Raspberry Pi

SATA pHAT for Raspberry Pi Zero

mSATA HAT for Raspberry Pi

LyCOM was also showing off a full-size SD card adapter and a couple of serial port adapters. Judging by the company’s website, they also have some additional models, but these are less unique in terms of features, but you can find more details here.

SDXC Board for Raspberry Pi

Raspberry Pi GPIO to DB9M Serial Board

XOD is a Visual Programming Language for Arduino, Raspberry Pi, and other Maker Boards

June 2nd, 2017 13 comments

When you think about visual programming on the Raspberry Pi or Arduino board, Scratch may come to mind, but some developers have decided to create their own visual programming language working for Arduino, Raspberry Pi, and other boards. Meet XOD, pronounced ksəud.

Click to Enlarge

The developers explains their used “functional reactive programming principles and added graphical functionality”. XOD is comprised of “nodes” that represents either some physical device like a sensor, motor, or relay, or some operation such as addition, comparison, or text concatenation, which you can link together through inputs and outputs to create a program, and XOD IDE will compile the resulting diagram to create and upload a binary program to Arduino, Raspberry Pi, etc… You can also convert a XOD diagram into a node with inputs and outputs to use it in another diagram, so the language is scalable.

The developers are now looking for testers to play with XOD private alpha, but XOD language, IDE, and library sources code will be released on Github once launched. You can register with your email address on their website, if you are interested in participating in the test program.