Posts Tagged ‘sensor’

$30 BakeBit Starter Kit Adds Sensors & Buttons to Your NanoPi NEO & NEO Air Boards

January 20th, 2017 1 comment

FriendlyElec (previously FriendlyARM) launched NanoPi NEO and then NanoPi NEO Air board as respectively Ethernet and WiFi/Bluetooth connected boards for IoT applications. But so far, there was no ecosystem around the board, you had to use your own sensor modules, and write your own software to control them. This has now changed with the launch a BakeBit Starter Kit with twelve sensor modules, a NanoHat Hub add-on board designed for NanoPi boards, as well as BakeBit Library to control the hardware.

NanoPi NEO with NanoHat and Two Modules

The NanoHat Hub plugs into the two NanoPi NEO headers and provide 12 headers with 3x I2C interfaces, 3x analog interfaces, 2x UART interfaces, and 4x digital interfaces among which D3 and D5 support PWM, compatible with SeeedStudio Grove modules. You then have a choice of 12 modules to connect to the NanoHat Hub:

  • OLED Module
  • Ultrasonic Module
  • Green LED Module
  • Red LED Module
  • LED Bar Module
  • Rotary Angle Sensor Module
  • Joystick Module
  • Sound Sensor Module
  • Button Module
  • Light Sensor Module
  • Buzzer Module
  • Servo Module

BakeBit Starter Kit – Click to Enlarge

But now that you have your hardware setup with multiple module, you still need to program the thing, and that’s where BitBake library, based on Grove Pi, comes into play, as it allows you to program the module easily with Python programming. More details can be found in the Wiki for BakeBit NanoHat and modules.

BakeBit Starter Kit is now sold for $29.99 (promotion), but if you already have Grove modules, you could also simply purchase NanoHat Hub for $12.99. Bear in mind that Chinese New Year is around the corner, so any order passed after January 24th and beyond, will be processed after the holidays around February 6th. [Update: The company has also released a $9.99 NanoHat PCM5102A audio board for NanoPi Boards]

How to Install Domoticz Home Automation System in NanoPi NEO and Other ARM Linux Boards

January 19th, 2017 7 comments

I’ve recently started experimenting with IoT projects, and the first hurdle is to select the hardware and software for your projects are there are simply so many options. For the hardware your first have to choose the communication protocols for your sensors and actuators, and if you are going to go with WiFi, ESP8266 is the obvious solution, used together with your favorite low cost Linux development board such as Raspberry Pi or Orange Pi to run some IoT server software locally or leveraging the cloud. But the most difficult & confusing part for me was to select the server software / cloud services as there are just so many options. I prefer having a local server than something running only in the cloud, as my Internet goes a few hours a month, so I started with a solution combining ThingSpeak with MQTT gathering data from Sonoff power switches running ESPurna firmware and vThings CO2 monitor. This works OK, but while cloud service is continuously update, its open source version has not been updated since mid 2015. Among the many service and software framework available, one seems to have come more often than other, is supported by vThings air monitoring platforms, and recently been added to ESPurna. I’m talking about Domoticz described as:

a Home Automation system that lets you monitor and configure various device like lights, switches, various sensors/meters like temperature, rain, wind, UV, Electra, gas, water and much more. Notifications/Alerts can be sent to any mobile device.

The system can run on Linux, Mac OS, Windows on x86 platform, but also on 32-bit and 64-bit ARM Linux boards such as Raspberry Pi and Cubieboard with just 256MB memory recommended, and 200MB free hard disk space. It can also generate charts from the data like the ones below.

Click to Enlarge

On top of that, the forums appear to be very active, and the last stable version was released in November 2016, and the last beta release yesterday according the download page.

I’m going to take it slow, so today I’ve just tried to install it on NanoPi NEO since it’s compact and runs Linux. However, it does not appear to be officially supported by Domoticz, so we’ll have to see whether it’s possible to install it on the board.

Domoticz is not a Linux distributions but a framework, so first we need to install a Linux distributions on the board, and the obvious choice for NanoPi NEO is to use the latest Armbian release either Debian Jessie or Ubuntu Xenial.

I downloaded Debian, extracted the image, and flashed it to a micro SD card on a Ubuntu computer:

Replace /dev/sdX with your own SD card device, which you can find with lsblk command.  If you are a Windows user, you can flash the firmware like you’d do for a Raspberry Pi using Win32DiskImager after uncompress Armbian firmware.

Now we can insert the micro SD card into the board, and connect the power to start the board. If you have not connected the serial console to your board, please be patient for the first boot as the system may take around 3 to 4 minutes to boot before you can login to it, as it expands the micro SD card to full capacity, and creates a 128MB emergency SWAP file.

Once it’s done we can login through the serial console or SSH using root / 1234 credentials. The first time, you’ll be asked to go through the first setup, changing the root password, and creating a new user with sudo privileges.

So now that we have Linux running on the board, and after login again as the new user, we can follow the instructions for Raspberry Pi board and other ARM boards to install domoticz with a single command line that works on systems running Debian/Ubuntu:

After a minute or two, as the system update the packages, and download domoticz, the setup wizard should start.

At some points we’ll need a fixed IP address, either by configuring Linux with static IP, or setting a permanent IP linked to the board MAC address in the router. The second option is usually my favorite option. Nevertheless, let’s click on OK to proceed.

You’ll be asked whether you want to enabled HTTP or/and HTTPS access. I selected both for now, but it’s probably a good idea to only select HTTPS for better security.Next is the HTTP port number set to 8080 by default, followed by the HTTPS port number to 443 by default (no screenshot), and finally the installation folder which defaults to ~/domoticz. You should now have reached the Installation Complete! window, and you can click Ok to exit the installation wizard.
Wow.. That was easy, and no errors. But does it work? Let’s access from a web browser.

We have a “Your Connection is not secure” error, but it’s expected as Domoticz simply generated a self-certificate, you can safely add exception to your browser to avoid this issue next time. Your data will still be encrypted, but if you plan to access your Domoticz setup from the Internet, you should probably install an other certificate using Let’s Encrypt certificate authority for example.
Once we have added an exception to the web browser we can indeed access Domoticz web interface, so the installation worked, but it will only show “No favorite devices defined…” Again that’s normal, because we need to configure it for example by clicking on the Hardware link.

Adding Hardware to Domoticz – Click to Enlarge

This will allow you to configure the system with MQTT, local I2C sensors, all sort of gateways, and even Kodi Media Center.  I’m pretty sure all devices working over the network or USB should work, but things like “Local I2C Sensors” which may be connected directly to the board may or may not work. Anyway, that looks promising, but I’ll stop here for today, as I have a lot more to study before going further, including upgrading Sonoff firmware, and configuring vThings CO2 monitor for Domoticz.

TI Innovator Hub Connects MSP432 LaunchPad Board to TI Graphing Calculators

January 13th, 2017 3 comments

I remember when I was in high school we all had those TI calculators to cheat enhance our chances of passing exams, but Texas Instruments has now launched what it calls TI-Innovator Hub based on a MSP432 LaunchPad board that connects to some of their graphing calculators and allows student to program and control external hardware through their calculators.

TI-Innovator-HubInnovator Hub hardware specifications:

  • MSP-EXP432P401-ET TI LaunchPad Board
  • 3x input ports, 3x output ports, I²C port
  • Breadboard connector with 20 labeled pins
  • USB
    • Mini USB Port (DATA port for connection to a TI graphing calculator, or a computer running TI-Nspire CX software)
    • Micro-USB port (POWER port to connect to external power source)
  • Misc – Red LED, RGB LED, Light Brightness Sensor, and speaker
  • Enclosure

The hub can then be programmed using TI-84 Plus CE (TI Basic language) or TI-Nspire CX (Lua language) graphing calculators. It’s a bit like playing with Arduino board, but instead of using a computer for programming, you can use a calculator. TI also provides resources to make it easier for teachers. Some extra accessories are also available include I/O Module Pack with sensors and motors, an ultrasonic ranger module, a breadboard pack, and an external battery.

You can watch the “cool box” & “mind blown” video to see what students think about it.

I could not find pricing information. You’ll find a few more details on TI Innovator Hub product page.

Via Electronics Weekly.

MIPI I3C Sensor Interface is a Faster, Better, Backward Compatible Update to I2C Protocol

January 11th, 2017 1 comment

I2C (Inter-Integrated Circuit) is one of the most commonly used serial bus for interfacing sensors and other chips, and use two signals (Clock and Data) to control up to 128 chips thanks to its 7-bi address scheme. After announcing it was working of a new I3C standard in 2014, the MIPI Alliance has now formally introduced the MIPI I3C (Improved Inter Integrated Circuit) Standardized Sensor Interface, a backward compatible update to I2C with low power consumption, and higher bitrate allowing it to be used for applications typically relying on SPI too.

mipi-i3cI3C offers four data transfer modes that, on maximum base clock of 12.5MHz, provide a raw bitrate of 12.5 Mbps in the baseline SDR default mode, and 25, 27.5 and 39.5 Mbps, respectively in the HDR modes. After excluding transaction control bytes, the effective data bitrates achieved are 11.1,20, 23.5 and 33.3 Mbps.

MIPI I3C vs I2C Energy Consumption and Bitrate - Click to Enlarge

MIPI I3C vs I2C Energy Consumption and Bitrate – Click to Enlarge

The MIPI Alliance has also provided a tablet comparing I3C, I2C, and SPI features, advantages and disadvantages.

Parameter MIPI I3C I2C SPI
Number of Lines 2-wire 2-wire (plus separate wires for each required interrupt signal) 4-wire (plus separate wires for each required    interrupt signal)
Effective Data Bitrate 33.3 Mbps max at 12.5 MHz
(Typically: 10.6 Mbps at 12 MHz SDR)
3 Mbps max at 3.4 MHz (Hs)
0.8 Mbps max at 1 MHz (Fm+)
0.35 Mbps max at 400 KHz (Fm)
Approx. 60 Mbps max at 60 MHz for conventional implementations (Typically: 10 Mbps at 10 MHz)
  • Only two signal lines
  • Legacy I2C devices co-exist on the same bus (with some limitations)
  • Dynamic addressing and supports
    static addressing for legacy I2C
  • I2C-like data rate messaging  (SDR)
  • Optional high data rate messaging
    modes (HDR)
  • Multi-drop capability and dynamic
    addressing avoids collisions
  • Multi-master capability
  • In-band Interrupt support
  • Hot-join support
  • A clear master ownership and
    handover mechanism is defined
  • In-band integrated commands
    (CCC) support
  • Only two signal lines
  • Flexible data transmission rates
  • Each device on the bus is
    independently addressable
  • Devices have a simple master/slave relationship
  • Simple implementation
  • Widely adopted in sensor
    applications and beyond
  • Supports multi-master and multi-drop capability features
  • Full duplex communication
  • Push-pull drivers
  • Good signal integrity and high speed below   20MHz (higher speed are challenging)
  • Higher throughput than I2C and SMBus
  • Not limited to 8-bit words
  • Arbitrary choice of message size, content and purpose
  • Simple hardware interfacing
  • Lower power than I2C
  • No arbitration or associated failure modes
  • Slaves use the master’s clock
  • Slaves do not need a unique address
  • Not limited by a standard to any maximum  clock speed (can vary between SPI devices)
  • Only 7-bits are available for device addressing
  • Slower than SPI (i.e. 20Mbps)
  • New standard, adoption needs to be proven
  • Limited number of devices on a
    bus to around a dozen devices
  • Only 7-bits (or 10-bits) are available for static device addressing
  • Limited communication speed rates and many devices do not support the higher speeds
  • Slaves can hang the bus; will require
    system restart
  • Slower devices can delay the
    operation of faster speed devices
  • Uses more power than SPI
  • Limited number of devices on a bus
    to around a dozen devices
  • No clear master ownership and
    handover mechanism.
  • Requires separate support signals for
  • Need more pins than I2C/MIPI I3C
  • Need dedicated pin per slave for
    slave select (SS)
  • No in-band addressing
  • No slave hardware flow control
  • No hardware slave acknowledgment
  • Supports only one master device
  • No error-checking protocol is
  • No formal standard, validating
    conformance is  not possible
  • SPI does not support hot swapping
  • Requires separate support signals
    for interrupts

You’ll find more technical details by downloading MIPI I3C specifications and/or whitepaper (free email registration required). Note that only MIPI member can have access to the complete specifications.

Via Electronics Weekly

Categories: Hardware Tags: i3c, mipi, sensor, standard

Changhong H2 Smartphone Comes with a Molecular Sensor to Detect Materials

January 10th, 2017 3 comments

New smartphones used to bring lots of new useful features and innovations a few years ago, but as new device releases has become much less interesting in recent years with the most interesting recent features probably being dual rear camera systems, and fast charging.However, Changhong H2 Android smartphone is integrating a unique feature thanks to SCiO molecular sensor allowing the device to detect materials.

material-sensing-smartphoneThe rest of the specifications are pretty standard with an octa-core processor clocked at 2 GHz, a 6″ full HD display, a 16 MP rear camera with autofocus, a fingerprint sensor, and a 3,000mAh polymer battery. There’s also a special physical button to extend battery life & clear memory.

The smartphone molecular sensor works by emitting lights and analyzing the reflected light spectrum. This enabled the smartphone to scan your food and for example detect the type of fruit you are holding in your hand, as well as estimate the caloric or sugar content in your food, report your skin’s moisture or body fat, and so on. It can also detect fake medicines such as fake Viagra pills. However, it won’t be able to detect fake gold, as the sensor does not work with metals since they reflect all light.

The phone will sell in China later this year for 2,999 RMB (~$433 US), but if you don’t happen to live in China, you can register your interest to be informed when the phone launches in your country. If you are interesting in material sensing in a phone, but are interested in the technology, SCiO handheld scanner with support for iOS and Android smartphone is for sale for $299, but if you want to develop your own app or molecular sensing models, you can get the same scanner with the SDK for $499. The sensor was actually launched in a Kickstarter campaign in 2014, but some people have yet to receive theirs, and some report it’s not quite working that well.

Via Liliputing

vThings WiFi CO2 Monitor Quick Start Guide

December 28th, 2016 5 comments

I’ve already checked out vThings CO2 Monitor hardware and we’ve seen it’s based on ESPrino ESP8266 board, and my model includes CM1106 CO2 sensor and BMP180 temperature and pressure sensor. I’ve now installed it in my kitchen, about 3 to 4 meters from the gas stove, and getting data to ThingSpeak.


The door and window of my kitchen are open all day, and the wall have ventilation holes. That’s important for CM1106 sensor since it auto calibrates every 3 days in clear air. If you plan to use such sensor in a closed environment, you should buy Vthings with CM1102 CO2 sensor that costs more, but does not require calibration.

Since all WiFi systems I’ve just so far starting AP mode for configuration, I first looked for an access point, but… nothing… Then I decided to read the documentation (might be useful at times), and the monitor is actually configured via a Chrome (desktop only) add-on through USB. There are three types of devices made by vair-monitor, and I first used  vThings Configuration Utility add-on, but eventually found out I had to use vThings – Dual Beam Configuration Utility.


vThings Configuration vs Things – Dual Beam Configuration Utility

I used Ubuntu (Linux), but if you are using a Windows or Mac computer, you’ll need to install drivers first. Once you’ve connected the monitor through USB and started “vThings- Device Configuration Tool” the following windows should be shown.

Click to Enlarge

Click to Enlarge

The fist thing to do is to connect the monitor to your WiFi router by entering its SSID and password, and click on Set WiFi.

Click to Enlarge

Click to Enlarge

It should connect to your router, and the first time updated the firmware automatically. Wait a couple of minutes for it to complete, and you can go to the next step to configure one or more of the following Public, Private or Generic services:

Public Private Generic
BeeBottle DomoticGa HTTP DomoticZ MQTT FHEM RF 433/315
EmonCMS Homeseer
ThingSpeak HomeAssistant
UbiDots JeeDom

I decided to go with ThingSpeak since I got familiar with it while writing Sonoff POW tutorial.

Click to Enlarge

Click to Enlarge

Select the data provided by the sensors inside your vthings Co2 monitor, in my case CO2 levels, temperature, and pressure, and nothing else, or connection will fail, as I found out when I used 4 default fields including humidity, and ThingSpeak was not updated at all. You’ll also need ThingSpeak API write key, that you can get my create a channel on as shown below.


Once the channels is create on ThingSpeak website, and you’ve added the API write key in vThings Device Configuration Tool, you could go to Generic Services->HTTP and notice an HTTP request has been created, so if you have installed ThingSpeak locally, you could change to your own IP address.

Click to Enlarge

Click to Enlarge

By default the data will be updated every 120 seconds, but you can change that in Settings->Update Interval. Once configuration is done, you can unplug it from your PC, and connected to the location you want to monitor. vThings Device Configuration Tool requires a USB connection to find the device, it can not find it over WiFi, so if you want to change configuration, you’ll need to connect it back to your computer. There’s a function to (auto)start a webserver in vESPrino, but it did not seem to work for me.

After a few hours or minutes depending on your update internal you should get some nice charts on ThingSpeak with CO2 levels, temperature and pressure, or other data based on the sensors you’ve selected while purchasing the hardware.

Click to Enlarge

Click to Enlarge

The channel is public if you are interested/curious in seeing the data. ThingSpeak will show 60 samples (2 hours in my case) by default, but let’s see what happened over the last 12 hours with CO2 levels.

Click to Enlarge

Click to Enlarge

The CO2 levels started at about 500 to 600 ppm while I did the configuration in my office (windows closed), and dropped to around 404 ppm once I installed in the kitchen. That value correspond roughly to the current CO2 ppm value in the atmosphere (in Hawaii). Three times around 18h00 people warmed food and CO2 jumped to around 500 ppm. During the night, CO2 levels slowly increased to 480 ppm, likely because of the plants cycle (producing oxygen during the day, and carbon dioxide during the night). This morning CO2 levels spiked at around 900 ppm when cooking right after 6am and 8am.

That’s all fun, but is there a real benefit to measuring CO2 levels in your house? In the kitchen I could probably trigger an alert over 1,500 ppm in which case it may mean something is burning, but smoke detectors are much cheaper and better suited to the task. Vladimir Savchenko, vThings developer, found a study claiming that high CO2 levels may decrease creative thinking and lead to bad sleep, so he used vThings CO2 monitor in his bedroom and discovered CO2 levels reached close to 4,000 ppm, and that just open the door or window would greatly reduce the concentration of the gas.

sleepwithcloseddoortext-co2-levelsvThings CO2 monitor does not only monitor CO2 levels as we’ve seen above, as temperature, humidity, and/or pressure sensor can be included in the case, as well as a PM2.5 & PM10 laser dust sensor.

vThings CO2 Monitor v3 is sold for 60 Euros with CM1106 CO2 sensor, and more if you use a better CO2 sensor, or add extra environmental sensors. 135 Euros would get you a top of line monitor with a laser dust sensor, CDM7160 CO2 sensor, temperature and humidity sensor, and RF connectivity.

Batteryless, Urine Powered Smart Diapers Notify You When It’s Time to Change Them

December 22nd, 2016 4 comments

One of the downside with current smart wearables is that most need to be recharged quite often, every day, week or month, and we’re still a long way of 10 year battery life offered by typical watches. I’m hopefully that eventually many devices won’t need to be recharged at all as we’ll have made improvements both in terms of power efficiency and energy harvesting using solar, body heat, vibrations and other techniques.

batteryless-urine-powered-smart-diaperTakakuni Douseki, professor at the Department of Electronic and Computer Engineering of Ritsumeikan University, has been working on micro energy harvesting, and his latest “wireless involuntary urination sensor system” notifies the user when it’s time change the diapers without the need of any battery, instead using energy generated by urine and stored in a capacitor in order to transmit the data wirelessly.

The prototype is using a modified baby diaper with a 320x5mm activated carbon piece, and a 1.8mm aluminum electrode placed between the absorbent and a waterproof sheet. The amount of electricity generated increases with the amount of urine, with the current peaking at the time of “release” as shown in the chart below.


All that electricity is stored in a capacitor, and when the amount of urine reaches a threshold level (80 cm3), the system transmits an ID signal over a wireless connection up to 5 meters. The system may be commercialized later for example to care of patients suffering from incontinence. The research paper about urine energy harvesting and self-powered diaper can be found on IEEE website.

Via Nikkei Technology

Sonoff SC WiFi Environmental Monitor mini Review

December 21st, 2016 6 comments

Yesterday I received two environmental monitors with Sonoff SC and vThings CO2 Monitor, and while I’ve plugged both, I have not had time to look into vThings documentation, but since I’m already using eWelink app for Sonoff TH16 wireless switch, setting up Sonoff SC just took me a few minutes, so I’ll report my experience with the device in this review.
sonoff-sc-usb-power-modemI powered Sonoff SC using the USB port of my modem router, and the green LED on the back of the device started to blink every 2 or 3 seconds. Then I started eWelink app in my Android phone and taped on the “+” icon to add a new device following the instructions here which are basically the same for all Sonoff devices.

Click to Enlarge

Click to Enlarge

Then you need to press the “Audio” button for about 5 seconds until the green LED blinks faster, at which point you can click Next, configure connection with your WiFi router, and complete registration by giving it a name, such as “Air Quality Monitor”.

Click to Enlarge

Click to Enlarge

Now Sonoff SC will show with your other Sonoff devices in eWelink app and show the air quality level, temperature, humidity and noise level. You can click on the > button to get to the prettier representation of the data as shown on the right screenshot above. The data was matching reality as the temperature was about 20 C at the time, and since it was still early morning, humidity was high.

Click to Enlarge

Click to Enlarge

I started to talk a bit loud, and Noise level changed from quiet to Normal. However when I turn on a headlight in to the top of the device, the light intensity was still at dusky… I took at screenshot a little later in the morning and the temperature had risen to 24°C, while humidity lowered to 53% normal, matching reality although probably not perfectly accurate due to the sensors used (e.g. DHT11).

Beside reporting data to the app, Sonoff SC can also be used as a smart hub to control other Sonoff devices. You can create “Scenes” by tapping on “…” icon in “All Devices” window, and add a condition (trigger device) using sensors from Sonoff SC or other Sonoff devices shown as “Air Quality Monitor” and “Water Pump” in the screenshot below.

Click to Enlarge

Click to Enlarge

However, while I could setup a trigger device (Sonoff SC) using the temperature data, I was not able to add an “Execute Device” despite having a Sonoff TH16 wireless switch registered with eWelink app and set in manual mode (e.g. not using external sensors to trigger it on or off).  I have a temperature and humidity sensor attached to Sonoff TH16, so maybe that’s why.. It might be only categorized as a “trigger device” and not an “execute device” despite also coming with a relay. I’ve contacted the company to see if there’s a solution.

Sonoff SC is sold for $19.99 + shipping directly on ITEAD Studio.