Archive

Posts Tagged ‘review’

How to Build and Flash ESPurna Open Source Firmware to Sonoff POW Wireless Switch

December 3rd, 2016 13 comments

ITEAD Studio Sonoff family is comprised of various inexpensive ESP8266 WiFi power switch, and the company sent me two of their latest CE certified models with Sonoff TH16 + external temperature & humidity probe, and Sonoff POW to measure power consumption. I checked the hardware is the first part of the review, and used Sonoff TH16 to control a water pump with the stock firmware and Ewelink Android app in the second part. It works reasonably well, but it relies on the cloud, so if you lose your Internet connection or the service closed, you can’t control the relay manually anymore. Luckily, the UART pins are exposed on Sonoff switches so you can solder a 4-pin header and connect a USB to TTL to flash your own firmware.

Click to Enlarge

Click to Enlarge

Please don’t connect Sonoff devices to the mains when programming them, it’s very dangerous, instead the USB to TTL board will power the system, and will allow you to program the board safely. Later you’ll be able to update the firmware, if needed, over the network.

The next step is to select the firmware you want to use, and I’ve been advised two firmware for ESP8266, namely ESPurna specifically designed for Sonoff devices, and ESPEasy with a larger community of users. The latter may be usable to control the relay, but it has yet to support HLW8012 chip used to measure power consumption in Sonoff POW, so I decided to go with ESPurna.

That’s the description of the firmware from its bitbucket page:

ESPurna (“spark” in Catalan) is a custom C firmware for ESP8266 based smart switches. It was originally developed with the ITead Sonoff in mind. Features:

  • Asynchronous WebServer for configuration and simple relay toggle with basic authentication
  • Communication between webserver and webclient via websockets with secure ticket check
  • Flashing firmware Over-The-Air (OTA)
  • Up to 3 configurable WIFI networks, connects to the strongest signal
  • MQTT support with configurable host and topic
  • Manual switch ON/OFF with button (single click the button)
  • AP mode backup (double click the button)
  • Manual reeset the board (long click the button)
  • Visual status of the connection via the LED
  • Alexa integration (Amazon Echo or Dot) by emulating a Belkin WeMo switch
  • Support for automatic over-the-air updates through the NoFUSS Library
  • Support for DHT22 sensors
  • Support for the HLW8012 power sensor present in the Sonoff POW
  • Support for current monitoring through the EmonLiteESP Library using a non-intrusive current sensor (requires some hacking)
  • Command line configuration

I could not find firmware release for ESPurna, but Xose Pérez – the developer – has provided some basic instructions to build and flash the firmware to Sonoff. Those are not really detailed however, and it took me nearly a full day to successfully build and flash the firmware to Sonoff POW, mostly because I was not quite familiar with most of the tools used. So I’ve reproduced the step I went through in Ubuntu 16.04, and hopefully this can help people getting things done more quickly.

Let’s retrieve the source code, and enter the code directory first:

You can build the project with PlatformIO or the Arduino IDE. The instructions are for PlatformIO so that’s what I used. There are two ways to build the code with the project wither using Platform IDE for Atom and the command line, or simply using the command line. With insights, I ended up using the command line, but I’ll show both methods.

Setup PlatformIO IDE for Atom to build ESPurna

First, you’ll need to download PlatformIO IDE for Atom for your operating systems, and install it. For Ubuntu 16.04, I selected “Download .deb” for Linux and installed it through through Ubuntu Software program. Alternatively, after download, you can install it from the command line:

You can now start Atom program in Ubuntu dash, select Open Project, and browse for espurna/code directory to load the project we’ve just gotten from Bitbucket.

Click to Enlarge

Click to Enlarge

The tick button on the top left corner is to build the project, and the right button just under is to upload the firmware to the target board. But if we try to build the firmware now it will fail with an error about “espressif8266_stage”. That’s because we need to install Espressif 8266 (Stage) development platform. First we need to enable Developer mode in the IDE by going to the top menu to select PlatformIO->Settings->PlatformIO IDE, and checking “Use development version of PlatformIO“.

platformio_core_enable_development_version

Click to Enlarge

Now install PlatformIO shell commands from either a system Terminal, or PlatformIO IDE terminal (PlatformIO->Terminal->New Terminal):

and finally install ESP8266 development platform:

At this point you can click on the tick icon to build the default “node-debug” environment, a build output window will show in the IDE, and quickly disappear if the build is successful.

Setup PlatformIO via Command Line to Build ESPurna

If instead we want to use the command line we can install the latest pip version, the developer version of PlatformIO, and the staging version of ESP8266 development platform:

You can check the build environment is set properly by running the following command in espurna/code directory:

It will automatically download, build and install all dependencies and build for “node-debug” firmware for NodeMCU board. If it is successful, it will end as follows:

So I find the command line option much more easy and straightforward.

Build ESPurna for Sonoff POW

However, we are not using NodeMCU board here, but Sonoff POW, and there are two environments defined just for that:

  • sonoff-pow-debug – Build firmware to flash over serial
  • sonoff-pow-debug-ota – Build OTA firmware to upgrade the firmware over the network

The parameters for each environment are all defined in platformio.ini. First we need to build sonoff-pow-debug environment:

But it failed with an error message related to hlw8012 library:

I reported the issue on Bitbucket, but the main developer could not reproduce the issue. Eventually I found out that it could be a PlatformIO bug, as the system does not recursively checking for includes outside of main.ino. So I added <hlw8012.h> in the main.ino as follows:

and the build could complete:

Since we’ve already changed the code, you may also consider changing “#define ADMIN_PASS  fibonacci” in code/src/config/general.h to use a different default password. The password can also be changed in the web interface, but this makes sure you won’t have a device somewhere with the default password common to most users.

Flashing Firmware to Sonoff POW

Now that we’ve made sure the firmware could build, it’s time to flash it to the device.

First we need to setup some udev rules to allow flashing over serial:

Now connect the USB to TTL to a USB port on your computer, press the button (connected to GPIO0) on Sonoff POW for several seconds until both LEDs are off to make sure you are in bootloader mode, and start flashing with:

Success! Great. If you have your own firmware to flash it may be useful to know the actual command used to flash the firmware was:

Building and Flashing the ESPurna filesystem

Wait! We’ve just flashed the firmware, isn’t it all? Nope, as the webserver files are stored in another partitions, and compressed in a single index.html.gz file for better performance. The exact reasons why are further explained here.

We’ll need Node.js and gulp command line client:

Now inside espurna/code folder , we can check if building the file systems works with two commands:

Here my successful gulp attempt:

Finally, we can run the following (which also runs the two commands above) to flash the file system to the board, after entering bootloader mode by pressing the button:

Now that’s done.

A Quick look at ESPurna Web Interface

ESPurna firmware and filesystem has now been flashed to Sonoff POW. But does it work?

Click to Enlarge

Click to Enlarge

I can see a new SONOFF_POW_XXXXX access point, so that does look good. I can connect using the default password “fibonacci”, then go to my web browser to access http://192.168.4.1, and login again with admin/fibonacci credentials.

Click to Enlarge

Click to Enlarge

ESPURNA 1.03 interface goes to the status menu first, and there I can turn on and off the relay remotely, and check the power consumption in watts, which remains at 0 watt since I have not connected it to the mains yet. It’s also possible to turn the relay on and off with the button, and there an option to select whether to turn on or off the relay at boot time, which is great since I need it on at all times.

The web interface also allows you to change general parameters including the hostname and password, as well as enable or disable the HTTP API (disabled by default). The WiFi section is used to connect to up to 3 wireless routers, the MQTT section lets you configure an MQTT (Mosquito) broker, and the power section is used to calibrate the power monitoring device.

If you just intend to check the current power consumption and turn on and off the switch with your phone, you don’t have to do anything else. But I’d like to find some ways to draw daily, weekly, monthly charts of my office power consumption using either MQTT or the HTTP API. I’ll have to study how to do that, and that will hopefully be the topic of my next post about Sonoff POW.

Sonoff POW can be purchased on ITEAD Studio for $10.50 plus shipping, but is currently out of stock with the company manufacturing a third batch soon.

Getting Started with Pine64 PADI IoT Stamp – Part 2: Serial Console, GCC SDK, Flashing & Debugging Code

November 28th, 2016 5 comments

PADI IoT Stamp module powered by Realtek RTL8710AF ARM Cortex M3 WiFi SoC is a potential competitor to Espressif ESP8266 modules.  Pine64, the manufacturer of the module, sent me their kit with a $2 IoT stamp, a breakout board, a USB to TTL debug board and a J-Link debug board. In the first part of the review I’ve shown the hardware and how to assemble PADI IoT stamp kit. In the second part I’m going to write a tutorial / getting start guide showing how to control the board with AT commands, build the firmware with GCC SDK, and finally demonstrate how to flash and debug the firmware with the J-Link debugger.

The Quick Start Guide indicates you need to connect the USB to TTL debug board to UART2 instead of UART1 as I did on the very similar B&T RTL-00 RTL8710AF module, and set connection settings to 38400 8N1. This did not work for me, and I had indeed to connect the USB to TTL board to UART0 instead (GB0 & GB1 pins).

Click to Enlarge

Click to Enlarge

I’ll be using a Ubuntu 16.04 (Linux) computer for this quick start guide, but you can work with Windows and Mac OS X too, as tools as available for all three operating systems. So in my case I configure minicom to 38400 8N1 using /dev/ttyUSB0 device, and the boot log is almost the same as B&T RTL-00 with the same ROM version and toolchain:

There are however some changes, and for example the firmware used on PADI IoT Stamp has slightly more heap available. The guide also mentions ATS? should show all command available, but it’s not working for me:

Typing “help” as I did with RTL-00 module does not work either, and that does not look since documentation appears to be wrong again, but that’s not a big deal since we have all AT commands listed in that document. I could configure it as “IoTSTAMP” access point:

and enable the HTTP server with ATSW AT command:

It rebooted the IoT stamp with the same WiFi setting, and I could connect to its demo web page for configuration.

Click to Enlarge

Click to Enlarge

Since everything is so similar to B&T RTL-00 I’ll just point out to the post “Getting Started with B&T RTL-00 RTL8710 Module – Serial Console, AT Commands, and ESP8266 Pin-to-Pin Compatibility” for more tests with different AT commands. I still tried to turn on and off the a GPIO pin using the ATSG command since it’s something I did not do with RTL-00:

The first line pull GC0 pin to high level (3.3V), while the second command brings it down to low level (0V). Details about ATSG command:

I did not connect an LED, but instead measured the value with multimeter and could confirm the voltage level was right in both cases.

B&T provided an SDK which required a an unlicensed / pirated version of IAR ARM Workbench, but Pine64/Realtek have released a GCC SDK that do you require you to use pirated software. You can download sdk-ameba-rtl8710af-v3.5a_without_NDA_GCC_V1.0.0 (198 MB) directly from Pine64 website. After unzipped the SDK you can enter sdk-ameba-rtl8710af-v3.5a_without_NDA_GCC_V1.0.0 directory, and open readme.txt to have a look at RTL8710 GCC SDK structure:

Since I only aim to write a getting started guide I won’t go through all of it, but we can see the low level source code & binary, some documentation, an example project, and some tools include Android and iOS apps, OTA download server and more.

Nevertheless the readme.txt tells us to first read “UM0096 Realtek Ameba-1 build environment setup – gcc.pdf” in order to setup our development environment. The instructions are available with Windows and Linux, but again I’m only test them using Ubuntu 16.04. They’ll be very similar since you’ll rely on cygwin in Windows, and if you run the latest Windows 10 you should be able to install Windows subsystem for Linux, and use the Linux instructions.

First you have to make sure some tools and libraries are installed:

then we can build the sample project:

If everything goes well the log should end showing “Image manipulating” as follows:

We can find the application in application/Debug/bin directory:

There’s also an ota.bin image which might be usable using OTA firmware update documentation, but for this guide I want to use the J-Link debugger that the company sent me instead. The GCC SDK is not for PADI IoT stamp, but instead for Realtek Ameba Arduino board, and you’ll be asked to connect the board through one of the micro USB port. That won’t work with IoT stamp since there’s no USB port at all, and instead you’ll need to go and back forth between multiple documentation, and connect the board as per the JTAG/SWD connections diagram shown below.

padi-iot-stamp-jlink-swd-connectionThat document also mentions that:

Required external power VCC 3.3V, JTAG/SWD didn’t supply power to the PADI IoT Stamp, VCC connection from PADI IoT Stamp is used by JTAG/SWD as voltage reference only.

At first, I did not see that, and used it without external power supply, but since I was not successful with the J-Link debugger (for another reason), so I ended up inserting PADI IoT stamp into a breadboard and added Ywrobot power board to provide an external 3.3V power source.

Click to Enlarge

Click to Enlarge

I also soldered a 22uF capacitor, since I’ve read it’s not optional, as it may affect WiFi connection due to power issue. Once I complete the wiring, I connected the debugger to my computer:

There are two sets of instructions in UM96 document to download and flash the code: OpenOCD/CMSIS-DAP and JLink, so since I had a J-Link debugger, I went with that latter. First you have to download J-Link Software and Documentation pack and for my system I selected ” Linux, DEB Installer, 64-bit V6.12″. After accepting the EULA, I got JLink_Linux_V612_x86_64.deb file which I installed as follows:

Now we can start JLink GBD server for a Cortex-M3 as explained in the document:

So the JLink debugger is detected, but failed to connect to the target. Apart from the last error, everything looks exactly as in the documentation. That’s when I started to add an external power boar, solder the capacitor, and double check my connection. But finally after many trials and errors, I realized that I had to use a SWD connection (SWCLK/SWDIO signals) instead of JTAG…

Now keep the GDB server running, open a new terminal windows in the same directory (where you’ve built the code), and run make flash to download and flash the code to the board:

There will be a lot of message as above, and the GDB Server windows will show its own set of messages:

Now if you want to debug your code, you can run make debug to start the gdb console:

At this point, you’ll just need to use gdb command out of the scope of this post, but you can find tutorials online, for example this. You can also run make ramdebug in order to write ram_all.bin to RAM then enter gdb debug.

So that’s only the debug part, but if you want to create your own application, you’ll need to study the source code, and there are plenty of examples to help you in project/realtek_ameba1_va0_example/example_sources folder:

Note that this is only useful is you want to use PADI IoT stamp as a standalone module, and if you connect it to another board (e.g. Arduino) you can control it through the AT command set.

So while PADI IoT stamp is a usable platform with its GCC SDK, currently documentation is not always correct, and development should be reserved to experienced developers, as it’s not exactly as straightforward as Arduino, Lua or other firmware often used in ESP8266. Arduino will most likely never supported on IoT stamp due to memory constraints, but mbed support should come to the module in the first part of next year, which will make everything much easier.

If you want to go further, you can read the documentation on PADI IoT stamp resource page and the GCC SDK, checkout rebane’s openocd example, and/or read a forum post about controlling IoT stamp through Pine A64 board using Python.

If you want to play with your own, you can get PADI IoT stamp for $1.99, the breakout board kit for $0.5, the USB to serial debug board for $1.99, and the JLink (SWD) debugger is $7.99 on Pine64 online store. Please note that the two debug boards are standard components, so you may use your own, if you already have such hardware.

R-Box Pro 3G Android TV Box Review – Part 2: Android 6.0 Firmware

November 21st, 2016 26 comments

The vast majority of octa-core Android TV Boxes sold on the market comes with 2GB RAM, but Amlogic S912 based R-Box Pro TV box was interesting with its 3GB RAM option (aka R-Box Pro 3G), as I wondered if I would see any noticeable improvements during my tests with the extra RAM. We’ve already confirmed the the hardware comes with 3GB RAM using 2x 1GB + 2x 512MB RAM chips configuration in the first part of the review last month, and it’s now time to check out whether this translates to anything in Android, as well as go through the usual hard-to-get features to work like automatic frame rate switching and HD audio pass-through.

r-box-pro-3g

First Boot, Firmware Update, and First Impressions

One positive with the device is the four USB ports, so this time I did not need an USB hub at all, and connected a USB HDD, two RF dongles for an air mouse and gamepad, as well as a USB keyboard to take screenshots. I completed the hardware setup with Ethernet and HDMI cables, and plugged the power supply to boot the device. Boot time is rather slow compared to competitors at about one minute.

Click for Original Size

Click for Original Size

The launcher used is exactly the same as on Rikomagic MK22, and the list of apps is also quite similar with IPTV apps such as Mobdro, Netflix, FilmOn Live, and UkTVNow.
r-box-pro-app-list

r-box-pro-apps-list-2The setup is also exactly the same, so if you want to find out more about the interface and setup options you can read Rikomagic MK22 review, while you’ll find more details about the IPTV apps (Mobdro / Filmon) in MXQ Plus / M12N TV box review.

I had no troubles with the settings when configuring WiFi and Ethernet, and the system kept the video output resolution I set (3840x2160p60) even between reboot. Part of the 16GB flash is used for the operating system, and the user still get 11.38 GB to play with, and at the end of the review after installing apps and some copying files, I only had used 3.26 GB.

r-box-pro-storageYou can also see exFAT and NTFS file systems are supported as usual, and a FAT32 micro SD card could also be mounted.

about-mediabox-r-box-proThe “About Media” box section shows R-BOX Pro 3G runs Android 6.0.1 with Linux 3.14.29, no surprise here. The firmware is rooted. I received the box early October, and when I first boot up the device the firmware was dated in September, so I checked for firmware update. They’ve done something pretty stupid as they’ve included both UPDATE&BACKUP and WirelessUpdate apps in the firmware, which is sure to confuse customers. But basically UPDATE&BACKUP app is not configured and trying to get an OTA firmware update will results in “Check Failed! Check Your OTA Servier Argent” (sic), while WirelessUpdate app appears to be configured, but can’t get any update firmware from the server, probably because they did not bother to copy any firmware… Finally, I could find new firmware on GeekBuying, but again on for “USB Burning Tool” with IMG extension, so I decided to try some new SD card method with Amlogic IMG firmware in Linux and Windows, and I finally managed to flash the firmware without using Amlogic USB Burning Tool. It took me nearly a full Saturday to make it work, but at least now I know how to do.

Nevertheless, this is 2016, and OTA firmware update is now working on most TV boxes, even some cheaper ones, so manufacturers should not expect end users to work with tools reserved to factory workers…

I had no problems using both Google Play and Amazon Underground to install apps. The remote control worked well enough up to 8 meters, and I could turn on and off the box with it.

Power handling is properly implemented with power off and standby modes, but the latter is pretty much useless based on the power consumption values I got on my power meter (with all USB devices connected as shown in top photo):

  • Power Off – 0.0 watt
  • Standby – 6.4 watts (USB HDD still on, Box LED is red)
  • Idle – 6.2 watts (Box LED is blue)

The case top and bottom temperatures were  respectively 41 and 51 °C max after Antutu 6.x benchmark, and after 15 minutes playing Riptide GP2, they rose to 42°C and 60°C respectively. The game performance was constant over time, and about the same as on other Amlogic S912 with highest resolution settings, i.e. not perfect, but playable.

Since one of the first thing I do with a new box is to check for new firmware, not having OTA firmware update, nor a simple SD card or USB flash drive ZIP firmware is not a good way to start. Sadly, even after the frustration of flash a new firmware, I had sluggishness issues with some apps show the “App is not responsive window” aking to wait or kill the app a bit more often than I’m comfortable with, and as we’ll see below my Kodi experience was one of the worse with 4K videos and audio pass-through. I certainly did not feel any benefit of having 3GB RAM over 2GB RAM with this device, as I was hoping the extra read/write buffer for the storage might improve the performance, but the opposite happened, likely because of sub-optimized firmware.

4K and Audio pass-through in Kodi 17.0 and DRM Info

The firmware I used for review (October 13, 2016) comes with Kodi 17.0-Alpha3 built on July 31, 2016 with TVaddons installed. I connected to my video samples SAMBA share and started testing some 4K videos:

  • HD.Club-4K-Chimei-inn-60mbps.mp4 (H.264, 30 fps) – OK
  • sintel-2010-4k.mkv (H.264, 24 fps, 4096×1744) –  OK
  • Beauty_3840x2160_120fps_420_8bit_HEVC_MP4.mp4 (H.265) –  OK
  • Bosphorus_3840x2160_120fps_420_8bit_HEVC_MP4.mp4 (H.265) – OK
  • Jockey_3840x2160_120fps_420_8bit_HEVC_TS.ts (H.265) – OK
  • MHD_2013_2160p_ShowReel_R_9000f_24fps_RMN_QP23_10b.mkv (10-bit HEVC) – OK
  • phfx_4KHD_VP9TestFootage.webm (VP9) – Won’t play, stays in UI
  • BT.2020.20140602.ts (Rec.2020 compliant video; 36 Mbps; 59.97 Hz) – OK
  • big_buck_bunny_4k_H264_30fps.mp4 – Started well, but after 30 seconds or so the image intermittently froze from time to time
  • big_buck_bunny_4k_H264_60fps.mp4 – Not smooth, and audio delay (hardware does not support this type of video)
  • Fifa_WorldCup2014_Uruguay-Colombia_4K-x265.mp4 (4K, H.265, 60 fps) – OK (although video did not seem as sharp as usual)
  • Samsung_UHD_Dubai_10-bit_HEVC_51.4Mbps.ts (10-bit HEVC / MPEG-4 AAC) – OK
  • Astra-11479_V_22000-Canal+ UHD Demo 42.6 Mbps bitrate.ts (10-bit H.265 from DVB-S2 stream) –  OK
  • Ducks Take Off [2160p a 243 Mbps].mkv (4K H.264 @ 29.97 fps; 243 Mbps; no audio) – Not smooth
  • tara-no9-vp9.webm (4K VP9 YouTube video @ 60 fps, Vorbis audio) – Won’t play, stays in UI
  • The.Curvature.of.Earth.4K.60FPS-YT-UceRgEyfSsc.VP9.3840×2160.OPUS.160K.webm (4K VP9 @ 60 fps + opus audio) – Won’t play, stays in UI

Most people probably don’t have VP9 videos, but considering one of the key selling on Amlogic S912 over Amlogic S905 is hardware video decoding support for VP9, it’s quite an unexpected issue, especially it is working on other Amlogic S912 TV boxes I tested so far.

Unsurprisingly, automatic frame rate switching is not working either…
kodi-17-audio-pass-through

I continued testing Kodi with HDMI pass-through to Onkyo TX-NR636 AV receiver was quite a disaster:

  • AC3 / Dolby Digital 5.1 – Audio OK (Dolby D 5.1), but video not smooth
  • E-AC-3 / Dolby Digital+ 5.1 – OK
  • Dolby Digital+ 7.1 – PCM 2.0
  • TrueHD 5.1 – PCM 2.0
  • TrueHD 7.1 – PCM 2.0
  • Dolby Atmos 7.1 – PCM 2.0
  • DTS HD Master – Black screen and no audio
  • DTS HD High Resolution – Black screen and no audio
  • DTS:X – Black screen and no audio (not supported by Onkyo TX-NR636, but should normally be heard as DTS-HD MA)

The box supports Widevine Security Level 3 DRM, which should allow for SD playback of some premium video services, but not HD or UHD.

r-box-pro-drm

Click to Enlarge

WiFi and Internal Storage Benchmark

I’ve copied a 278 MB file between the internal storage and a SAMBA server using ES File Explorer in both direction in order to estimate WiFi performance. R-Box Pro support 802.11n and 802.11ac WiFi, so I tested both on different routers, and the system achieved 1.4 MB/s throughput using 802.11n, and 2.0 MB/s for 802.11ac on average.

WiFi Throughput in MB/s

WiFi Throughput in MB/s

rbox-pro-wifi-802-11ac-serverThe chart makes is clear that neither 802.11n nor 802.11ac performance is very. I must note than in the case of 802.11ac download performance was much higher than upload performance averaging about 3.4 MB/s. The chart on the right shows both Download (Upload from TV box – top) and Upload (Download from TV box – bottom) shows the traffic shape for 802.11ac transfer. 802.11ac download shows the performance is not stable, but at least there are no stalls, but the upload shows mostly constant throughput with several 3 stalls during transfer, so the connection does not appear to be entirely stable.

I measure Internal storage performance with A1SD bench, and the eMMC flash used in R-Box Pro delivered 39.28 MB/s read speed, and 19.31 MB/s write speed. Not the best, but those values should be enough to have responsive firmware in most conditions. So the slow loading apps issue if most probably due to a firmware/software issue then a problem with the hardware itself.

R-Box Pro 3G System Info and Antutu Benchmark

The board name is q6330, exactly the same as Rikomagic MK22, so I’d expect the firmware between those models to be very similar. R-Box manufacturer releases different firmware with their 2GB and 3GB RAM version however. CPU-Z also reports Amlogic S912 is an octa-core Cortex A53 clocked at 1.51 GHz with a Mali-T820MP GPU. 3 GB RAM is detected, or more exactly 2810 MB taking into account the hardware buffers), with 11.38 GB storage available to the user.

r-box-pro-3gb-cpu-z

Click to Enlarge

I ran Antutu 6.x to verify the performance, and 39,846 points is about what we’ve come to expect from Amlogic S912 TV boxes, with some devices getting as high as 42,000+ points.

r-box-pro-3g-antutu

Conclusion

I was intrigued with R-Box Pro 3G because of its 3GB RAM, but I ended getting the worse Amlogic S912 TV box of the six models I’ve reviewed so far.  OTA firmware is not working, the company does not seem to have a webpage for firmware, so I had to look on the Internet to find something on GeekBuying, with only IMG firmware requiring some Windows tools, or building your own parser in Linux in order to flash it. Clearly not user friendly. Kodi 17.0-alpha3 is installed in the box, and the list of issues is impressive: Vp9 videos can’t play, some 4K H.264 @ 30 fps video won’t play smoothly, automatic frame rate switching is not working either, and I only managed to get audio pass-through in Kodi work for a Dolby Digital 5.1 with some DTS-HD videos just showing a black screen. WiFi performance is rather weak both using 802.11n and 802.11ac WiFi, and the apps are not always loading very fast, leading the system to ask whether to wait or kill the apps. I’m pretty sure I missed some issues, but needless to say the company has a lot of work to do to make it a worthwhile device.

Kingnovel provided R-Box Pro 3G for review, and resellers & distributors can contact the company via their website. Individuals should probably not buy the device at this stage, but you can still purchase it for about $70 and up on GeekBuying,and Aliexpress. Note that the 2GB RAM version is often sold side-by-side with the 3GB RAM version, and price starts at $66.

Getting Started with Sonoff TH16 ESP8266 Relay and Sensor using the Stock Firmware and eWelink Android App

November 18th, 2016 19 comments

Sonoff TH16 is a WiFi relay device powered by Espressif ESP8266 WiSoC, able to handle a load up to 16A (3500Watts @ 220V), and including a jack for sensors. The company recently sent me a sample together with  Sonoff AM2301 temperature and humidity sensor, and Sonoff POW power meter device, and in the first part of my Sonoff review I checked out the hardware for all three items. In the second part, I’ll report my experience with Sonoff TH16 and the temperature sensor with a practical example, as I’ve installed it to control a groundwater pump.water-tank-pumps

What you see above is a picture of my house water tank with two pumps, the white one keep the pressure in the taps and is always on, and the blue one pumps the water from the ground and is the one I’m going to control. Over the last year or so, I’ve tried two other solutions with SimpleLink self-powered power switch and later a NodeMCU board running NodeMCU firmware and a simple web page to control a relay. The first solution worked as long as the white pump did not start, but if it did the ensuing voltage drop may turn the switch off. The second solution shown below was quickly hacked together and worked fine for many months, but if the WiFi connection was lost, I had to restart NodeMCU board by turning off and on the circuit breaker for the pumps.

Click to Enlarge

NodeMCU + Relay controlling a water pump – Click to Enlarge

As you’ll see from the “Before” side of the first picture, I also kept everything in a plastic box, and using Sonoff TH16 cleaned things up a bit.

water-pump-parametersFirst let’s make sure the pump parameters are not out of the specs of Sonoff TH16, and there’s indeed no issue as the pump Wmax is 1020W, and it operates at 220 to 230 V AC. Sonoff TH10 & TH16 relays have three outputs and inputs with the ground/earth pins (E), neutral pins (N), and live pins (L) clearly marked once you open the cover.

sonoff-th16-ground-live-neutralWhen you connect a two prong plug into a wall socket, you don’t normally have to care with side you plug it in since we are dealing with alternative current, but for safety reasons it might be a good thing to connect the 110V or 220V live wire into the live IN terminal. One good way to find out the live wire is to put it on your tongue and if it tickles you’ve found the right one. NO! Don’t do it… We are dealing with high voltage here, and electrical shock may kill you, so take precautions, and make sure electricity is off before doing any cabling.

Having said that you’ll still need to check the live wire when the power is up, and you can do it with an electric tester pen as the one shown below.
voltage-tester
Just make sure you are very careful doing so, and my model has an LED which will lit with the Live wire, but not the neutral one. It turns out the black wire is the neutral one, and the white/grey one is the live one as it should be.

Click to Enlarge

Click to Enlarge

Then  I tried to connect the mains live and neutral cables to L IN and N IN terminals, and do the same for the pump cables. You need to push the button on the terminals don’t but they are quite hard to push, and if only remove the small cover, the live IN and OUT terminal are quite hard to reach. I worked on a ladder, so it complicated slightly the task, but as you can see on the picture above, I managed to dislocate L IN terminal… After that I realize I forgot to pass the cable through the hole in the case, so I pushed hard to remove it, and everything came apart.
sonoff-th16-broken-terminalIt took me a while to find out how to reassemble it, as I first try to place the metal bit inside the tiny plastic terminal, before I realised I had to insert it in the soldered metal bit first as shown below.
sonoff-th10-th16-terminal-assemblyI then pushed the plastic bit back, and added the white button on top, and could finally complete cabling successfully.

Click to Enlarge

Click to Enlarge

The last steps were to clip back the top part of the case, and screw the small cover on, which nicely pushed the rather hard wires in place.
sonoff-th16-closed
I completed the hardware setup by attaching Sonoff TH16 to the armature of the pump roof, and connected the temperature and humidity sensor and placing it as further as possible from the roof since it can get hot in summer.

Click to Enlarge

Click to Enlarge

The hardware setup took me about one hour mostly due to hard buttons, and average quality terminals.

Then I switched to software setup. I first tried to download the apk using the QR Core on the package (coolkit.apk), but the connection to the to server was unstable, and had to repeat the download again… unsuccessfully. So instead I went directly to Google Play to download eWelink app. I should have done that first, as the installation worked beautifully. Then I basically followed the instructions, which started with registration.

Click to Enlarge

Click to Enlarge

The login Window shows “Phone number/Email”, but once you click on Register, you’re only option is to input your mobile phone number. If you don’t like it, you can always install your own firmware on Sonoff TH16 instead. Once you’ve entered your phone number, you’ll be sent a 4-digit code for registration, and be asked to input your password. I did that, and since it took a while, I left the phone unattended for a while, and as you can see from the screenshots above I started at 11:18, but at 11:35 it was still trying to register, so I stopped that, and tried again with the same code, but no luck. So I repeated the task again with a new SMS code, and I could finally registered. At this point, you’ll get the an device window with a “+” sign to add a new device.

Click to Enlarge

Click to Enlarge

I did that and for the first step I had to climb back on my ladder to press the button on Sonoff TH16 relay for about 5 seconds, and check the LED was blinking regularly to make sure it was in pairing mode. The LED is not particularly bright so outdoor it’s not that easy to check. Anyway, after several attempts I managed, and click Next, inputted my WiFi router password, and after two or three attempts at pairing, I could finally successfully add the device which I named “Water Pump”.

Click to Enlarge

Click to Enlarge

It will show in the device window, and you can control the relay from there tap on the on/off button. You can also tap on the other part of “Water Pump” zone to enter a more detailed menu showing the temperature and humidity (if you’ve connected the sensor), as well as auto and manual modes, a share mode to let other smartphone control the relay (it worked well), as well as timer and countdown mode. Our water usage is pretty regular, so I’ve set a 20 minute timer starting everyday at 8:00 and stopping at 8:20. The water pump itself can be configured to work automatically based on the water tank level, but other people in the house don’t like that since it’s not always reliable, which I why I’m using a WiFi relay.

Click to Enlarge

Click to Enlarge

The temperature and humidity values were realistic and regularly updated. Auto mode allows you to set temperature and/or humidity thresholds to turn on or off the relay, and the Profile section of the app will allow you to send feedback, switching language, check the app version (updated twice from Google Play in one week).

I’ve been using the system for around a week and it works well in normal conditions. If I turn off my broadband provider’s modem, I won’t be able to turn on or off the relay manually even when WiFi is enabled, but the good news is that the timers are local, so even If I disable both Internet and WiFi, the relay turns on and off at the scheduled time. This obviously only works if the relay already got its time from the Internet earlier since there’s no RTC. I’ve also tried to turn on and off the relay out of my home, using my neighbour WiFi and I could control the relay from the Internet. It might not be so useful for a pump, but if you forgot to turn the lights off it’s a very convenient features. So while the setup itself did not go very smoothly, the relay has done its job well so far.

I’ve scanned the relay to check open TCP ports.

TCP port 800 (http) is open, but when I access it directly I don’t get anything, and capturing packets on my phone show some binary payload. I’ve not spend time on it, because there’s probably very little value in reverse-engineering the protocol, simply because of the 4-pin to flash your own firmware. Since it’s based on ESP8266 you could flash Arduino or NodeMCU firmware and write your own web interface, or instead try some home automation firmware like ESPeasy or ESPurna. Just don’t do it while connected to the mains, and instead power the board through the USB to TTL debug board needed for programming. ESPurna has been designed specifically for Sonoff devices, and I can see it supports Sonoff POW, which I have yet to review, so I’ll probably test it in the third part of the review to monitor power consumption of my office.

Sonoff TH16 and AM2301 sensors are be purchased for $8.60 and $4.0 respectively on Sonoff TH page. Shipping is not included, but only adds a few dollars with registered airmail shipping, and a bit more for EMS or DHL Express shipping.

V-Bridge Muses DTV Modulator and Video Encoder Review – Part 2: Muses-β Turnkey Solution Demo

November 12th, 2016 No comments

V-Bridge Muses-α and Muses-β boards can be used to respectively broadcast video to DTV standard from your PC, and as a turnkey solution taking any HDMI, CVBS, or USB inputs. The VATek SoC used in those  board support various DTV standards including DVB-T, DVB-C, ATSC/QAM, DTMB, ISDB-T/TB up to full HD resolution. I’ve received an early prototype for each, and I’ve already taken pictures and show how to assemble both Muses-α and Muses-β kits in the first part of the review. Today, I’ll show a demo with Muses-β turnkey solution taking HDMI input from an Android TV box (R-Box Pro), encoding and modulating the video to DVB-T, before broadcast it to an Android STB with a DVB-T/T2 tuner (U4 Quad Hybrid). This tool could be useful to test STB featuring ATSC or ISDB-T too, as those two standards are not supported in my country, and I could instead generate signals within my office.

muses-beta-video-encoder-dtv-demodulator-demo

U4 Quad Hybrid (Left), Muses-Beta Kit (Center) and R-Box Pro TV box (left)

You could also connect it directly to your TV, but for this review it was easier to show with an external device, and my TV is using a coaxial input instead of a female F-connector, so that made it easier. If you connect it to your TV, you could still combine your local TV station signal with Muses-Beta signal by using a 2-way splitter as shown below.

2-way-splitter-antenna

The company provided a cable to connect the RF board to tuner directly, but you could also use the type of antenna shown above instead. The power level is -12dBm, which means it won’t affect others, and should not break any laws in your country. If you need longer range you’d need to use an amplifier, and check with your local authorities if you need any specific licenses.dtv-antenna

Now that the connection is done, let’s have a look at the LCD display, since it;s used to configure the DTV standard, frequency, and many more options. I did not have to change much for this demo. First I select DVB-T and QPSK modulation.

muses-beta-dvb-t
Then set the frequency to 628 MHz as it’s one of the listed frequencies in U4 Quad Hybrid.
muses-beta-dtv-frequency
And kept HDMI to 720i-60, as the prototype can only handle HD resolution (720p) smoothly, and while Full HD (1080p) is possible it won’t be that smooth yet, but should be in the final hardware.
muses-beta-hdmi-resolution

There are many options as shown in the UI chart below.

User Interface State Machine (Click to Enlarge)

LCD User Interface Options (Click to Enlarge)

If HDMI input is detected, the LCD should then soon show three full squares on the top left indicating video is being broadcast with whatever standard you’ve chosen. In order to get the signal I had to configure U4 Quad Hybrid set-top box with the frequency, bandwidth, and delivery system  I selected for the modulator.

Click to Enlarge

Click to Enlarge

And it worked pretty much out of the box, as you can see from the photo below showing U4 Quad Hybrid menu overlaid over the DVB-T signal showing R-Box Pro user interface. Please ignore the vertical lines, as it’s just a problem with LG 4K TV.

Click to Enlarge

Click to Enlarge

I’ve also shot a video showing the setup, and how well it works. Sadly, the video I selected does not play optimally in R-Box Pro (the video source), but I found it only after the review, and other videos are being broadcast normally without smoothness issues nor audio cuts. But the important in the video is to show how easy it is to configure the system and that it works reasonably well. Quality will obviously suffer a bit compare to the source since its re-encoded and HDMI output is set to 720p.

Latency & video quality can be adjusted using three profiles: High Quality (500ms), Average (300ms) and Low latency (200ms). You’ll find some more details in the preliminary? Muses Turnkey Product user’s manual.

The kickstarter campaign is still on-going with 21 days to go. Muses-β kit with the LCD control board – as reviewed in this post – requires a $559 pledge, but if you prefer to replace the STM32 Board and LCD display by your own control board (API will be provided), you can get Muses-β board with AV input board and RF board for $399. I’ll test the cheaper $200 Muses-α board connected to a computer in the next few days in part 3 of the review.

Rikomagic MK22 Review – Part 2: Android Firmware, Video & Audio in Kodi, Benchmarks…

November 7th, 2016 4 comments

Rikomagic MK22 is one of the many Android TV boxes powered by Amlogic S912 octa-core processor with typical hardware specifications such as 2GB RAM, 16GB flash, Gigabit Ethernet and dual band WiFi. I’ve already taken the box apart to check out the hardware in the first part of the review, so I’ll focus on the firmware, but I’ll keep it short focusing on typical problem areas, as I’ve already reviewed a bunch of other Amlogic S912 TV boxes such as Qintaix Q912 or Beelink GT1.

Click to Enlarge

Click to Enlarge

First Boot, Firmware Update, and First Impressions

After having connected all usual cables and  accessories include a 1TB USB hard drive, and RF dongles for my air mouse and wireless gamepad, I booted the device, and after around 45 seconds (typically), I got to the main launcher.

Click for Original Size

Click for Original Size

Since I received the device about a month ago, I decided to go to the UPDATE&BACKUP app to see if there was any OTA firmware update, and unfortunately, as you can see from the screenshot below online update was not enabled in the device with the error: “Check Failed! Check Your OTA Servier Argent” (sic).

update-backup-fail

So I went to Rikomagic download page, and I could find a new firmware, the latest USB burning tool, and instructions. It did not go very smoothly, but I still managed to flash the firmware, and I explained the issues I came across in details in the post entitled USB Burning Tool Still Sucks in 2016. Still that was a disappointment to have to go through this, as the vast majority of TV boxes now support OTA firmware update through the network or SD cards, a much more user-friendly way to upgrade the firmware. The company explained that my early sample did not support OTA firmware update, but it should now. I tried again UPDATE&BACKUP, and got the same error, until I found another firmware update app called WirelessUpdate.

Click to Enlarge

Click to Enlarge

It won’t detect a new firmware since I have RKM MK22_161031 firmware released a week ago, but it did seem to properly check the status from the OTA server, telling that was not new update.

I won’t go into much details about the settings, as you can check my other S912 reviews for all options, for example M12N review. HDMI CEC, Playback settings (HDMI Adaptation), and Power key definition were all present in MK22 firmware. I had no troubles with settings Ethernet, WiFi, and the system automatically set my TV to 2160p @ 60 Hz and kept it that way throughout. I did not have the typical HDMI CEC issue turning on my AV receiver against my will. So it appears Rikomagic fixed some of the issues I encountered in early S912 TV boxes.

about-mediabox-rkm-mk22

I could also enter Android Marshmallow settings, and access all usual options. A single unified 11.38GB partition is used for both apps and storage from the 16GB eMMC flash, and the system runs Android 6.0.1 on top of Linux kernel 3.14.29. The firmware is rooted.

The provide remote control worked fine for up to 8 meters, as further away some keys would be missed. I reverted to MINIX NEO A2 Lite air mouse for most of the review because its mouse mode and QWERTY keyboard make it so much easier in most Android apps.

I could also power on and off (long press) the system with the remote, and make it enter standby (short press), with the following power consumption numbers when all accessories, include a USB hard drive, are connected:

  • Power off – 0 Watt
  • Standby – 5.1 Watts
  • Idle – 6.2 Watts

Temperature wise the box top and bottom temperatures reach 44 and 52 °C max after Antutu 6.x benchmark, and after 15 minutes playing Riptide GP2, they rise to about 47°C and 59°C respectively. I could not notice any performance degradation over time in the game, and performance was the same as on other Amlogic S912 TV boxes.

After my initial frustration with having to upgrade the firmware using Windows based Amlogic USB burning tool, the device actually performance well, just like other entry-level Amlogic S912 TV boxes, with the advantage of having several bugs fixed (HDMI CEC bug gone, HDMI video setting constant, …). Google Play also worked with any problems and could install all apps I normally use for reviews.

4K Video & Audio playback in Kodi 16.1, DRM Info

While some Amlogic S912 TV boxes are pre-loaded with Kodi 17.0 (alpha / beta), Rikomagic MK22 comes with the stable version of Kodi 16.1, possibly with some tweaks, as well as pre-installed add-ons.

mk22-kodi-16-1
Again, I’ll be quick in this review, as Amlogic S912 video playback performance is well known.  So I’ve only tested 4K videos, and checked whether automatic frame rate switching and HDMI audio pass-through are working. All videos were playing through the Gigabit Ethernet connection from a SAMBA share, unless otherwise noted (HDD = played from USB hard drive).

4K videos are playing reasonably well, although 2 had some unusual issues:

  • HD.Club-4K-Chimei-inn-60mbps.mp4 (H.264, 30 fps) – OK
  • sintel-2010-4k.mkv (H.264, 24 fps, 4096×1744) –  OK
  • Beauty_3840x2160_120fps_420_8bit_HEVC_MP4.mp4 (H.265) –  OK
  • Bosphorus_3840x2160_120fps_420_8bit_HEVC_MP4.mp4 (H.265) – First time: Video exited early (after 2 to 3 seconds). Second time: OK
  • Jockey_3840x2160_120fps_420_8bit_HEVC_TS.ts (H.265) – OK
  • MHD_2013_2160p_ShowReel_R_9000f_24fps_RMN_QP23_10b.mkv (10-bit HEVC) – OK
  • phfx_4KHD_VP9TestFootage.webm (VP9) – OK
  • BT.2020.20140602.ts (Rec.2020 compliant video; 36 Mbps; 59.97 Hz) – OK
  • big_buck_bunny_4k_H264_30fps.mp4 – Started well, but after 30 seconds or so the image froze with the audio still playing in the background.
  • big_buck_bunny_4k_H264_60fps.mp4 – Not smooth, and audio delay (hardware does not support this type of video)
  • Fifa_WorldCup2014_Uruguay-Colombia_4K-x265.mp4 (4K, H.265, 60 fps) – OK (although video did not seem as sharp as usual)
  • Samsung_UHD_Dubai_10-bit_HEVC_51.4Mbps.ts (10-bit HEVC / MPEG-4 AAC) – OK
  • Astra-11479_V_22000-Canal+ UHD Demo 42.6 Mbps bitrate.ts (10-bit H.265 from DVB-S2 stream) –  OK
  • Ducks Take Off [2160p a 243 Mbps].mkv (4K H.264 @ 29.97 fps; 243 Mbps; no audio) – HDD: Not smooth
  • tara-no9-vp9.webm (4K VP9 YouTube video @ 60 fps, Vorbis audio) – OK
  • The.Curvature.of.Earth.4K.60FPS-YT-UceRgEyfSsc.VP9.3840×2160.OPUS.160K.webm (4K VP9 @ 60 fps + opus audio) – Plays but could be smoother.

Automatic frame rate switching is not working just like on other Amlogic S912 devices, even after setting it in both Kodi and Android (HDMI Adaptation).

HDMI audio passthrough works for 5.1 channel audio, and I could not detect any audio cuts during testing contrary to what happens on some other devices:

  • AC3 / Dolby Digital 5.1 – Audio OK, but video not smooth
  • E-AC-3 / Dolby Digital+ 5.1 – OK
  • Dolby Digital+ 7.1 – PCM 2.0, no audio
  • TrueHD 5.1 – PCM 2.0, no audio
  • TrueHD 7.1 – PCM 2.0, no audio
  • Dolby Atmos 7.1 – PCM 2.0, no audio
  • DTS HD Master – DTS 5.1
  • DTS HD High Resolution – DTS 5.1
  • DTS:X (not supported by Onkyo TX-NR636) – DTS 5.1

So if all you really is Dolby and DTS 5.1, MK22 should be good enough, but TrueHD and DTS HD audio formats are not supported, at least in Kodi.

MK22 support Widevine Level 3 according to DRM Info, which may be useful for some premium video streaming app. This DRM level is only good enough for SD resolution on Widewine “protected” apps, as Level 1 would be required for HD and UHD resolution.

Click to Enlarge

Click to Enlarge

Networking and Storage

In order to evaluate WiFi performance, I copy a 278 MBfile between the internal storage and a SAMBA server using ES File Explorer in both direction. As with many recent boxes, MK22 also experience an asymmetric performance between download and upload, with the latter about twice as slow. On average Rikomagic MK22 achieves 1.6 MB/s throughput using 802.11n, not a very high performance even for 802.11n, but what’s surprising is that all Amlogic S912 TV boxes are very closely tied for 802.1n WiFi performance, so there may be an issue with Amlogic SDK, or some other limitations.

WiFI throughput in MB/s - Click to Enlarge

WiFi throughput in MB/s – Click to Enlarge

Internal performance is also important for fast loading times and overall system performance, and the eMMC used in MK22 has very good performance with 63.65 MB/s read speed, and 20.23 MB/s write speed.

Click to Enlarge

Read and Write Speed in MB/s – Click to Enlarge

That means there should not be visible slowdowns due to I/Os (provided random I/Os are fast too), and indeed during testing I did not experience any slowdowns, and found apps to load rapidly. Somehow boot time could be a bit faster with such performance.

I also tested file systems support and found FAT32, NTFS, and exFAT file systems to be supported by the device.

Rikomagic MK22 System Info and Antutu Benchmark

CPU-Z reports Amlogic S912 clocked at 1.51 GHz, so Kudos to Rikomagic here, as they are the first to report the real CPU frequency of that processor. The board name is q6330, framebuffer resolution is set to 1920 x 1080, and there’s indeed 2GB RAM (1807MB due to hardware buffers), and 11.38 GB storage available to the user.

Click to Enlarge

Click to Enlarge

RKM-MK22 achieved 40,827 points in Antutu 6.x, a score in line with other Amlogic S912 Android TV boxes I’ve tested so far.

rkm-mk22-antutu-score

Conclusion

I found Rikomagic MK22 to be stable and working mostly as expected, with some bugs corrected compared to earlier S912 TV box models under reviews, but with limitations frequently found in entry-level Amlogic S912 TV boxes with lack of support for automatic frame rate switching and HD audio (TrueHD, DTS HD) pass-through in Kodi, as well as DRM limited to Widewine Level 3. WiFi 802.11n is reliable, but performance is a bit weak, although similar to what you get with other Amlogic S912 devices. Storage speed is very good which ensure fast loading times and a responsive system. A big let down was lack of OTA firmware update, as I had to run USB burning tool to upgrade the firmware, but the company told me that from now on OTA firmware will be provided.

Rikomagic MK22 TV box can be purchased on the company’s Aliexpress store for $93.90 including shipping, or quite higher than equivalent competitors products. The Android box is also listed on GearBest, but still shown as “out of stock”.

Sonoff POW and Sonoff TH16 WiFi Relays Review – Part 1: The Hardware

November 4th, 2016 19 comments

Sonoff TH16 is a WiFi 16A relay that can take external sensors via a 2.5mm jack, while Sonoff Pow is a WiFi relay capable of measuring power consumption. Both have been designed by ITEAD Studio, and feature Espressif ESP8266 WiSoC. The company sent me both items for review, and I’ll start by checking out the hardware a little more closely than what is possible during the product announcement.

Click to Enlarge

Click to Enlarge

I received Sonoff TH16 together with Sonoff AM2301 temperature and humidity sensor, which I’ll use to use to control an outdoor water pump and gather temperature and humidity data, as well as two Sonoff POW relays,which I plan to use to measure power consumption in my office, both from the power outlets and my aircon. All three WiFi relays support 3500 Watts, and 85 to 250V input.

sonoff-qr-codeThe packages have three QR codes for eWeLink iOS app, the Android app (coolkit.apk), and the user’s manual in English and Chinese.

Both Sonff TH16 and POW are using the exact same case, but the hole for the sensor jack is not used in Sonoff POW.

Click to Enlarge

Click to Enlarge

There’s a cover to protect the mains cables tightened with a single screw. Input and Output live terminal are on both sides of the relays, will the ground/earth (E) and neutral (N) can be accessed from the middle terminals.

The company promotes their devices as hackable, but still decided to include a sticker that breaks if you try to open the case. If you bought the device from China, the warranty probably does not matter considering the low price of the device, but if you bought locally and intend to use the warranty in case something breaks, it may be voided if you open the case to flash your own firmware.

sonoff-warranty-sticker

Opening the case is very easy. First remove the terminal cover by loosening the screw, and then use a sharp and rigid plastic tool to separate both part of the case. I’ve started with Sonoff POW.

Click to Enlarge

Click to Enlarge

You’ll find the 4-pin for serial access in order to flash and/or debug your own firmware, the mauin button, two LED, a 16A relay, the 6 input and output terminals, and I’ve glad to see a fuse for safety. Talking about safety, ITEAD has not applied for UL, ETV, or TUV safety certifications (yet), but at least they now have CE certification for all their most recent Sonoff modules.

Click to Enlarge

Click to Enlarge

We’ll find ESP8266 SoC on the bottom of the board with a PCB antenna as far away as possible from active components to avoid interferences, thick solder for high voltage traces, and some holes in the PCB along high voltage traces likely for safety reasons.

Unsurprisingly, Sonoff TH16 looks almost exactly the same expect for the added 2.5mm jack for the sensor modules.

Click to Enlarge

Click to Enlarge

The company also seemed to have designed the board to let people add a 9-pin connector to access more I/Os, but for some reasons all holes are filled with solder instead.

Click to Enlarge

Click to Enlarge

sonoff-terminals

A close up on AM2301 reveals the main specifications of the sensors with 0 to 99.9% relative humidity range, and -40 to 80 C temperature range.
aosong-am2301That’s all for the hardware presentation. The next steps will be to install and configure Sonoff modules with the stock firmware and apps.

If I go ahead with my idea of connecting two Sonoff POW in my office the setup will look like the one below.

Click to Enlarge

Click to Enlarge

The one on the left will measure power consumption from the two outlets where all my equipment is connected, I’ll leave the center cable alone (the light), and the one installed on the right would measure my aircon power consumption. Once I cut the cables, and connect one part to Sonoff POW, the rest of the cable will be too short, so I had to get cut two short cables and re-cable the gang box, and the circuit breaker for the aircon. I would have wished they had arrange the terminals to make it easier to instead the modules within an existing circuit.

All four items can be purchased on ITEAD Studio website with Sonoff TH16 and AM2301 selling for respectively $8.60 and $4.0 on Sonoff TH page, while Sonoff POW goes for $10.50. Shipping is not included, but normally only adds a few dollars if you select registered airmail shipping, instead of EMS or DHL Express.

[Update: Part 2 of the review is up @ “Getting Started Guide for Sonoff TH16 ESP8266 Relay and Sensor using the Stock Firmware and eWelink Android App

Part 3 of the review is available @ How-to Build and Flash ESPurna Open Source Firmware to Sonoff POW Wireless Switch

]

Anet A8 DIY 3D Printer Could Be a Worthwhile First 3D Printer for $156

November 3rd, 2016 17 comments

You probably have wished getting started with 3D printer, as I did, but you may have been put off with the high cost associated with 3D printers even the cheaper ones for several hundred dollars, especially if you are unsure whether you’re going to use it often. But there’s now a very affordable 3D printer kit based on Prusa i3 printer that sells on GearBest for $155.99 + shipping (around $30) with DesktopGB coupon.

cheap-3d-printer-anet-a8Anet A8 3D printer specifications:

  • Print Area: 220 x 220 x 240mm
  • Print speed – 100 mm/s
  • Nozzle diameter – 0.4 mm
  • Layer thickness – 0.1 – 0.3 mm
  • XY-axis positioning accuracy – 0.012 mm
  • Z-axis positioning accuracy – 0.004 mm
  • Supported materials – ABS, PLA, TPU, Luminescent, Nylon PVA, PP, Wood???
  • Material diameter – 1.75mm
  • Frame material – Acrylic plate
  • Platform board: Aluminum Base
  • 2004 LCD screen for configuration
  • SD card for offline print
  • Supported file formats – G-code, OBJ, STL
  • Voltage: 12V
  • Weight – 8.5 kg
  • Dimensions – 3D printer: 510 x 400 x 415 mm; Package: 520x350x220 mm
  • Operating Temperature Range – 10 to 30 C
  • Certification – EMC,FCC,LVD,RoHs

The manufacturer recommends Cura or Repetier-Host software for Windows, Linux, or Mac OS to work with the printer. It’s a kit, so you’d need to assemble it, and it should take around a day, although Tulio Laanen, who is experienced with 3D printers and has reviewed Anet A8 in the video below, managed to do it in 4 to 5 hours.

Overall he was surprised by how well the printer worked considering the price, but he also printed some parts to improve the printer, and the provided filament roll. You’ll also find 3D files for Anet A8 spare part on thingiverse. I have a bunch a development boards without case,  so such printer might be an interesting addition, especially it’s likely to become popular as for less than $200 shipped, it’s cheap and appears to work reasonably well.

Categories: Hardware, Video Tags: 3d printing, anet, review