Posts Tagged ‘automation’

Google Assistant SDK Now Supports Device Actions, More Languages (French, German, Japanese)

December 29th, 2017 1 comment

Back in May 2017, Google released the Assistant SDK that worked on Raspberry Pi 3, and other ARM boards, essentially transforming low cost development boards into Google Home equivalent. The SDK became more popular once Google’s AIY Voice Kit was launched since it offered an easy and inexpensive way to use it with Raspberry Pi 3 board.

Since all you need was a Linux board with an Internet connection, a microphone, and speaker, I tried Google Assistant SDK on one of the cheapest platform available: Orange Pi Zero Set 6 Kit including Orange Pi Zero board, but also an expansion board with built-in microphone and audio output jack, and a cute little case. I added my own pair of speakers, micro SD card, and USB power supply, and after setting up the software, I was able ask question, and get answers with female voice using the demo app.

At the time however, there was some limitations, as integration with home automation devices was not easy, English US was the only language option, and we were stuck with a female voice. Since then, Google has added support for male voice for text-to-speech, and as I checked the release notes, Google added support for more languages, and device actions in December 20.


  • Google Assistant Library (developer preview 0.1.0)
    • Support for Device actions.
    • Support for more languages: English (Australia, Canada, UK, US), French (Canada, France), German, and Japanese. Selectable from Google Assistant app.
    • Location can now be configured as a street address in the Google Assistant app.
    • Better handling of connection errors.
  • Google Assistant Service (v1alpha2)
    • Support for Device actions.
    • Support for more languages: English (Australia, Canada, UK, US), French (Canada, France), German, and Japanese. This setting can be passed through the Service API or selected from the Google Assistant app.
    • Location can now be configured as a street address in the Google Assistant app, or as a latitude and longitude via the API.
    • Support for displaying the text of the user’s request and the text response from the Google Assistant.
    • Support for submitting queries via text input (Using Device actions or IFTTT).

I could update the library on Orange Pi Zero as follows:

I could still use my DIY smart speaker to ask questions and get answers after a reboot, so the update went smoothly. Controlling other devices like Sonoff TH16 will require some more studying.

$17 Sonoff S31 Wireless Smart Socket Includes Energy Monitoring Function

December 27th, 2017 10 comments

ITEAD Studio has just launched another Sonoff Smart Home product with Sonoff S31 WiFi smart socket with energy monitoring. Just like Sonoff switches, light bulbs, and their other products, the device can be controlled using eWelink app for Android or iOS, and supports integration with Amazon Alexa, and Google Assistant.

It should be noted that the company only provide a US plug version for now, and so far, there’s no Wiki link, so while it’s likely based on ESP8266 or ESP8285 like their other Sonoff devices, it may not be designed to be easily hackable, although I suspect the electronics may be similar to Sonoff POW switch (TBC).

Sonoff S31 hardware specifications listed by ITEAD:

  • Voltage Input – 90~264V AC, 50/60HZ
  • Max. Current – 16A
  • Max. Power – 4200W (Note package above reads max load: 220V/10A)
  • Gang – 1x US type with ground
  • Connectivity – 802.11 b/g/n WiFi with support for WEP/WPA-PSK/WPA2-PSK
  • Misc – Power button, LEDs
  • Dimensions – 75.7×39.7x32mm
  • Weight – 135g
  • Temperature Range – -20 °C ~ 75 °C
  • Humidity – 10%-80%

The socket also includes overload protection for safety, and once you can install eWelink app for Android/iOS to control it remotely, monitor power consumption, and estimated electricity bill, set timers, and securely share with other users in the home.

The company also highlights the compact design, claiming users will be able to connect two sockets on their 2-gang boxes. If you prefer alternative open source firmware like Sonoff-Tasmota or ESPurna, you’d have to wait or do it yourself since the product is still very new.

Many people on Facebook complain about the lack of EU plug, so hopefully the company will take note and soon offer a compatible version, but in the meantime you can purchase the US version of Sonoff S31 for $16.90 plus shipping on ITEAD Studio store. [Update: Sonoff S31 can also be found for $16.90 shipped on Aliexpress]

Anavi Light pHAT Adds RGB Light Strip Support to Raspberry Pi Boards (Crowdfunding)

December 10th, 2017 15 comments

He works as a software engineer for his main job, but Leon ANAVI is apparently enjoying his hobby of designing open source hardware, as after RabbitMax Flex home automation HAT, and ANAVI Infrared pHAT with IR transmitter and receiver, he has come up with as third project: Anavi Light pHat, an add-on board for Raspberry Pi 3/Zero (W) that adds support for RGB light strips.

Light pHAT specifications:

  • Compatible with 40-pin Raspberry Pi header
  • EEPROM with board manufacturer information and a device tree fragment
  • Terminal block for a 12V RGB LED strip
  • 3x 4-pin I2C headers for sensor modules
  • 1x 3-pin header for PIR motion sensor
  • 1x 4-pin UART header for debugging
  • Dimensions – pHAT form factor

You first need to connect the pHAT to your board, and then LED strip, and you can then control the lights using Home Assistant open source home automation platform, with the strip integrated as an MQTT JSON Light component.

Documentation will be provided to use the kit. It’s not available yet, but based on my past experience with his boards, documentation is usually good and easy to follow. Just like the other boards, Light pHAT was design with KiCAD, and you’ll find the hardware design files on Github.

If you want to control the light based on detection of movement, a optional PIR motion sensor is available, as well as three I2C sensor modules: BH1750 light sensor, HTU21D temperature and humidity sensor, and APDS-9960 RGB color and gesture detection sensor.

The project has launched on Crowdsupply with a target of $1 funding since it’s mostly a hobby project, and it will happen whatever the amount raised. A $25 pledge is asked for the Light pHAT only, but you could also consider pledging $35 to get a kit with a 1-meter RGB LED strip, or $59 for the board, LED strip, and all 4 sensors mentioned above. Shipping is free worldwide, and delivery is planned for February/March 2018 depending on selected reward.

Leon also told me he had a spare board he used for testing together with a one meter LED strip, that he’d like to giveaway to one of CNX Software readers. The contest is open worldwide, and Leon offered to pay for shipping, so the only thing you have to do is to leave a comment with #giveittome hashtag. I’ll draw the winner with in about two days on Tuesday 12, 2017 @ 16:00 (GMT+7). Make sure you use a valid email, and can answer within 48 hours.

This Tiny ESP8266 Board is Designed for DIY WiFi Switches

December 5th, 2017 3 comments

Various breadboard-friendly boards based on ESP8266 or other chips are available on the market, but some readers are not quite satisfied with the offerings, and need more available pins on the breadboard so they ended up hacking the board matching their needs by either bending header pins, or soldering modules to stripboards. As I browsed new arrivals on ICstation website, I found a tiny board with ESP8266 module that exposes I/Os via what looks like 2.54 mm pitch header that should fit right into a breadboard.

But after further checking only three I/Os are exposed, and the board is actually specifically designed for wireless switches, and comes with firmware that works with eWelink app used in Sonoff devices. So the module could be useful for people wanting to control devices without doing programming at all, and limited to no soldering. Just connect the module, and control it without smartphone.

Board specifications:

  • PSA-B ESP8266 module supporting 802.11 n/g/n WiFi
  • Ceramic antenna
  • 6-pin header with 5V, 2x GND, OUT pin, LED pin, and key input pin.
  • Misc – Status LED , matching button
  • Dimensions – 2.7 x 2.5 x 0.8 mm

The boards looks very convenient if you plan to use eWelink app, but the UART pins are not directly exposed. However, Tinkerman also found PSA-B module inside ITEAD Studio 1-Ch self-locking board, and located Tx, Rx, and GND pins on the top side of the board, managed to upgrade the firmware to ESPurna using a cable with 3 pogo pins. For reference, PSA-B module is sold for $3.00 on ITEAD Studio, so total price for the board above could be a little lower than the $6.23  currently offered on ICstation, but at least it may save you time.

Categories: Espressif, Hardware Tags: automation, esp8266, IoT, wifi

Xiaomi Unveils Their Very Own ESP32 Development Board, Module & SDK

November 28th, 2017 11 comments

We now have plenty of modules and board based on Espressif System ESP32 dual core wireless SoC, and a fairly good software support with ESP IDF SDK, Arduino CoreMicroPython, Espruino and other solutions.

So I was surprised when I saw Teo Swee Ann, Espressif CEO, posted photos about an event – Xiaomi IoT Developer Conference – where Xiaomi apparently introduced their own ESP32 development board, together their own SDK (still empty right now) compatible with the company’s Mijia ecosystem, as part of their “Open IoT platform”

Click to Enlarge

The slide below translates as “WIFI module –  Automated manufacturing / 4-fold foolproof mechanism / whole process tracing / cost price (about 15 RMB)” and “Open source SDK”, with the price likely the price of Xiaomi ESP32 module (ESP-WROOM-32C) shown on board above (Thank to hm for translation).

Click to Enlarge

I could not find much information at this early stage, except new partnership between Baidu and Xiaomi for A.I. and IoT which does not mention the board. I’ll update this post, once more details are available.

Review of ITEAD Studio IP66 Waterproof Case for Sonoff Wireless Switches (and Other Boards)

November 26th, 2017 1 comment

ITEAD Studio recently launched a waterproof enclosure for $2.90 (now at still a decent $3.90), rated IP66, for their family of Sonoff wireless switches, so you can safely use them outdoors protected from rain and dust.

The company sent me one sample together with Sonoff RF switch supporting WiFi and 433MHz RF connectivity so that I can test the case, and write a review describing my experience.

Click to Enlarge

I’ll focus on the waterproof since this is the main focus of this review, and beside Sonoff RF, you can also use Sonoff basic, various other Sonoff boards (POW, TH10/T16), and even other development boards as we’ll seen below. I’ll be using the stock firmware with eWelink app, but if you prefer alternative firmware like ESPurna or Sonoff-Tasmota, you may want to flash it to your Sonoff now.

Click to Enlarge

The waterproog case has two parts, a rubber cord, two waterproof PG7 connectors, and four screws.

PG7 Connector – Loose (left) vs Tightened (right)

The PG7 connectors are comprised of two parts, a rubber washer, and another rubber joint that is squeezed when the top nut is tightened. That design means using round cables will probably give better waterproofness, but it also worked with my not-so-round-cable.

You can either start assembly by connecting the waterproof connectors to the case, or inserting the cables into them. I selected the latter.

Click to Enlarge

There’s very little space in the case for tools, so the first time I used my fingers to hold the inner nuts, and a tool to tighten the ones outside. Finally, it did not work that well, as once I completed the build, water would go inside through the PG7 connectors. So for my second try, I used a precision screw drivers to hold the inner nuts into place while tightening then from the outside of the case as shown above.

Click to Enlarge

We can now connect the cable to the board, and place the latter inside. It’s actually really tight in the box, and I struggled to place Sonoff RF inside the case, but this can be done. We need to press the top button on Sonoff RF to pair the device with the app, so at this stage, I made sure I could control the light with my Android smartphone and eWelink app.

All good. The last step of the assembly is the top acrylic cover. We need to place the rubber cord inside the groove around the cover, and since it’s a bit too long, we can cut it with a few millimeters extra, and push the cord in the groove to make sure there’s no opening.

Rubber cord before cutting.

Tighten the four screws, and the two outer nuts on the PG7 connectors, and perform one more test to make sure we can still control Sonoff RF.

If that’s all good, we can now disconnect our setup from the mains (important step), and insert the case in a bucket of water to check for bubbles, and whether water can enter inside. If I just fully immerse the enclosure, I have no water entering, but if I go a bit deeper, and move the case around, water will go inside. That’s OK, as IP66 only guarantees protection against dust that may harm equipment, and against low pressure water jets, so you should definitely NOT use the case under water, it’s only good against rain and humidity, and should prevent insects from entering the case too.

I’ve shown the latter tests in the video below. At the end, I spray water while the light is on, and water did not go inside at all. If the outside of the case is humid, please do not touch it while it’s connected to the mains (like I did in the video), as it’s not 100% safe to do so.

As discussed earlier, ITEAD Studio can be used with other boards, and while the company provides the exact dimensions in the Wiki, I’ve quickly check whether it could be used with other boards. Sonoff POW is a yes, without the case, and it’s really tight.

Sadly, Raspberry Pi 2/3 boards, and clones are just a little too big.
But there’s plenty of space for Raspberry Pi Zero (W), and extra hardware, or/and battery.

Orange Pi One fits, and you could use both Ethernet and power cables.

ESPino32, a rather large ESP32 board, and NanoPi Duo, are no brainer, and I could even place both at the same time in the case. Other breadboard-friendly boards should fit too, unless they are too long.

If you use the case for alternative use case, you may only need one hole, so you’d have to close the other one. I was unable to find the name of the part required to achieve that… yet.

I’d like to thanks ITEAD Studio for sending the case and device for review. You can purchase the IP66 waterproof case for $3.90 or the full kit with Sonoff RF or Sonoff Basic for respectively $11.10 or $8.75 plus shipping.

Nexell NXC100 Voice Recognition Chip, NXP4330Q Processor, and ALTO Development Board

November 21st, 2017 No comments

I wrote about NanoPi Fire2 & Fire3A boards based on Nexell S5P processors a few days ago, and at the time, as I checked out Nexell website, I found out about the company’s NXC100 Voice Recognition SoC that can be used in 4-mic array board.

The chip can then be connected through SPI to a host processor, and Nexell appears to have a NXP4330Q Smart Voice kit based on their quad Cortex A9 processor of the same name. But since documentation is really limited, I looked for more details, and came across NXP4330Q based ALTO board design by InSignal, which sold the Exynos powered Arndale boards a few years back.

Nexell NXC100 Voice Recognition SoC

The chip is the only product from the “A.I related” section of therir website, but more are likely to come out as the company is working on GP-GPU (General Purpose GPU), machine learning, and even registered website. But no info for now about the later.

Back to NXC100 chip with the specifications:

  • 4x Channel Digital MIC Interface configurable (1 to 4 microphones) for far-field voice processing
  • Speech/Audio Features – Sound beam-forming, dynamic noise suppression, echo cancellation, I2S interface
  • Host Interface – SPI (with Nexell processors)
  • Power Management – On-chip 3.3V LDO for minimal external component
  • Package- 6.5×6.4mm TSSOP20

That’s about all we know from the product page. The developer page links to NXC100 datasheet, and reference schematics for a development board with NXP4330Q processor and a 4-mic array board based on the solution. Sadly, those files require login credentials, so you’d have to contact the company, and likely provide details about your company and project(s) before getting access.

Nexell NXP4330Q Processor

At first, I thought this was a new processor from NXP Semiconductors I had never heard off, but no, that’s really a quad core ARM Cortex A9 SoC from Nexell themselves.

Click to Enlarge

NXP4330Q processor specifications:

  • CPU – Quad core Cortex-A9 @ 1.4GHz with 32Kbyte I-Cache, 32Kbyte D-Cache per core, 1MB L2 Cache, VFP and NEON
  • GPU – Enhanced 3D graphic processor with support for OpenGL|ES 1.1/2.0, Open VG
  • Memory/Storage Controller
    • LPDDR2/3 and DDR2/3 up to 4Gbytes @ 933MHz (TBC)
    • SRAM, ROM and NOR flash controller
    • SLC/MLC NAND flash Controller w/ up to 60bit ECC
    • Up to 3x independent SD/MMC/eMMC controllers
  • Display Controller & Video Post-processor
    • Up to 2 separate displays up to  1920×1280 @ 60hz
    • 24bit RGB, i80 I/F, LVDS, HDMI 1.4a w/HDCP 1.4 compliant, MIPI-DSI
    • 3D De-interlace, Fine video scalar and Color space converter
  • Video – 1080p multi-format video decoder, 1080p H.264 video encoder, MPEG-TS parser with DVB-CSA for TV application
  • Video Input Processor – 3x 8bit BT656/601 format, MIPI-CSI
  • Network Connectivity – Gigabit Ethernet MAC
  • Peripherals & Interfaces
    • USB – USB 2.0 HSIC, USB 2.0 Host and USB 2.0 OTG
    • 6x UART, 3x SPI, PPM, 3x I2C, 3x PWM
    • 2x MPEG-TS
    • 3x I2S, SPDIF Rx/Tx, 2x PDM for glueless interface w/ Digital MIC
    • 8x 12-bit general purpose ADC
  • System Controller
    • 32 channels DMA, Interrupt Controller
    • Clock & Power management for Normal, Idle, Stop and suspend to RAM (Deep Sleep)
    • 4x channels Timer/Watchdog Timer
    • RTC
  • Security- ARM TrustZone: TZPC, TZASC and TZMA; Hardware crypto accelerator : DES/TDES, AES, SHA, MD5 and PRNG; Secure boot and Secure JTAG
  • Package – 17x17mm body size, 513 FCBGA, 0.65mm pitch

It’s been designed for tablets and cell-phones, and manufactured with a 28 nm low power process. I assume the processor is then a few years old. But then I looked at S5P4418 page, and the block diagram is exactly the same, so Nexell NXP4330Q should be Samsung S5P4418, but the company is just not allowed to promote Nexell S5P4418, and instead can sell NXP4330Q. This is further confirmed by the developer’s page for NXP4330(Q) which refers to S5P4418 too, and again nothing is accessible without login. There’s also an automotive grade version of the processor – NXP4330Q-A – compliant with AEC-Q100 standard.

ALTO Development Board

I still looked for an NXP4330Q board that might use NXC100 voice chip, and I had not luck, except for Insignal ALTO board based on NXP4330(Q) minus the MIC array part.

Click to Enlarge

For unknown reasons, the company did not provide photo for the complete development board (only close up on some parts), but they still release the block diagram, and the specifications with the board comprised of a CPU module and a baseboard:

  • CPU Module
    • Nexell NXP4330Q CPU
    • System Memory – 1GB DDR3 (x32 1EA or x16 2EA)
    • Storage – 8GB eMMC 4.5 flash
    • Power Management – NXE2000(PMIC) (Exclude fuel gauge and charger)
    • Board to Board Connectors – 2x 100-pin connectors
  • Base Board
    • Storage – SD card slot
    • Display – HDMI 1.4, LVDS LCD, capacitive touch
    • USB – 2x USB Host ports, 1x USB device
    • Connectivity – 10/100M USB Ethernet (which not make use of the GMAC?), optional 802.11b/g/n WiFi via  WFM50 module
    • Serial – 4x UART
    • Camera – 5MP MIPI CSI camera
    • Debugging – 1x Debug RS232 DB9 port, 20-pin JTAG connector
    • Audio interface connector for audio codec board based on AK4953 (24bit 96Khz, Default)
    • TVP5150 Interface for NTSC/PAL Input(TV Input)
    • Misc- 1 Power Switch, 1 Reset / 1 Power / 5 Functional Buttons; battery/charger extension module

The kit ships with a 5V/2A power adapter, a serial cable, a HDMI cable, a 1024×600 TFT LCD module, and a capacitive touchscreen panel. Public documentation is inexistent, which seems to be a common feature of all Nexell branded SoCs and boards.

Nexell Voice Smart Assistants Block Diagram

I was about to close this post on a disappointing note, but I found two block diagrams for their voice assistant. The first is shows NXC100 used with NXP4330Q SoC as discussed above, with Linux and Android BSP available, and Amazon Alexa support.

Click to Enlarge

The second appears to be more integrated at first, as it does not include a separate voice processor, but all four microphones’ audio data and voice processing is instead handled by Nexell NXP3220 dual core Cortex A7 SoC. The processor does not include any special hardware, so I’d assume it’s designed for lower end smart speakers that may not filter noise as well.

Click to Enlarge

I’ve also noticed Nexell has a new 64-bit ARM 4K/UHD processor (NXP5440) with USB 3.0, Gigabit Ethernet, and DVB support, but since it has nothing to do with voice recognition or smart speakers, that may be for another post later on.

Lab in a Box Concept Embeds x86 Server and 6 ARM Boards into a PC Case for Automated Software Testing

November 3rd, 2017 7 comments

The Linux kernel now has about 20 millions line of code, Arm has hundreds of licensees making thousands of processors and micro-controllers, which end up in maybe hundreds of thousands of different designs, many of which are not using Linux, but for those that do, Linux must be tested to make sure it works. The same stands true for any large software used on multiple hardware platforms.

Manual testing is one way to do it, but it’s time consuming and expensive, so there are software and hardware continuous integration solutions to automate testing such as Linaro LAVA (Linaro Automated Validation Architecture), KernelCI automated Linux kernel testing, and Automotive Grade Linux CIAT that automatically test incoming patch series.

Both CIAT and KernelCI focus on Linux, and rely on LAVA, with KernelCI leveraging hardware contributed by the community, and proven to be effective as since it’s been implemented, failed build configs dropped from 51 with Linux 3.14 to zero today. However, settings the hardware and LAVA can be complicated and messy with all different boards lying around, so BayLibre engineers worked on an affordable “Lab in Box” concept to simplify administration and duplication of such systems in the hope of getting more people involved.

Click to Enlarge

They ended up with a nicely package system that fits into a desktop PC tower and includes:

  • ASRock Q1900B-ITX motherboard based on Intel Celeron J1900 with 8GB RAM and 120GB SSD running LAVA master and dispatcher
  • Devices Under Tests (DUT) will vary depending on your needs, but the demo system includes:
    • Renesas R-Car M3 Starter Kit
    • DragonBoard 410C
    • AML-S905-CC (LePotato) board
    • BeagleBone Black
    • Raspberry Pi 3
    • NXP SABRE Light
  • Connectivity / wiring
    • Network switch
    • USB hub
    • For each DUT board: power cable, serial debug cable, Ethernet cable
  • ACME Cape + Probes + Beaglebone Black to measure power consumption and control the DUTs
  • Power Supply – 530 Watt ATX power supply with +12V and +5V

Click to Enlarge

The system has been proven to work with complete continuous integration system fitted into a single PC case, and costing about 400 Euros excluding the DUTs. Software installation has also been simplified with partially automated software installations (WiP). However there may still need to work, as it’s been found to take a long time to build partially because it’s requires custom wiring for each DUT, boards need to support either 5 or 12V input, and DUT power consumption must be limited to 4A per pair of wires. This system also only supports board that fit into such case, and it’s not really scalable because using a larger case with more board may lead to excessive internal wiring. The Lab in a Box concept could be improved with a more powerful power supply, support for larger boards, and better documentation will also be provided. Baylibre may also work on a professional-grade “Lab in a Box” that fits into a rack.

Watch “Introducing the Lab in a Box Concept” by Patrick Titiano & Kevin Hilman, BayLibre for further details.

If you are short in time, you can also read the presentation slides.

As a side note, all Embedded Linux Conference Europe 2017 videos have been uploaded to YouTube.