Embedded Computing
  • About
  • Blog
  • Hardware
    • Which Platform?
    • Controller Platforms >
      • Adafruit Platform >
        • Adafruit Feather M0
      • Arduino Plaform >
        • Arduino Primo and Primo Core
        • Arduino Uno
        • Arduino M0 Pro
        • Arduino mini Pro
        • Arduino Zero
        • Arduino Tian
        • Shields for Arduino Uno
      • BBC micro:bit
      • chipKIT Plaform >
        • chipKIT Uno32 and uC32
        • chipKIT WF32 and WiFire
        • Compatibility
        • chipKIT PGM Programmer-Debugger
        • 4D Systems PICadillo-35T
        • Shields for chipKIT Uno32
      • 4D Systems Platform >
        • 4D Systems PICadillo-35T
        • 4D Systems gen4-IoD-28T
      • DFRobot Platform >
        • DFRobot BLuno
        • DFRobot Wido
      • ESP8266 Platform >
        • ESP8266-01
        • NodeMCU Board
        • 4D Systems gen4-IoD-28T
      • LaunchPad Plaform >
        • LaunchPad MSP430G2
        • Standalone MSP430G2955
        • LaunchPad MSP430FR2331
        • LaunchPad MSP430FR2433
        • LaunchPad MSP430FR4133 and MSP430FR6989 with LCD
        • LaunchPad MSP430FR5529
        • LaunchPads MSP430FR5969 Pins Maps
        • LaunchPad MSP432: RTOS for Everyone
        • MSP432P4111 LaunchPad Pins Map
        • Stellaris LM4F120 LaunchPad
        • LaunchPad TM4C123 Tiva C Series
        • Connected LaunchPad TM4C129 Tiva C Series
        • LaunchPad CC1310 Sub-1 GHz
        • LaunchPad CC3200 WiFi
        • LaunchPad CC3220 S - SF WiFi
        • LaunchPad CC3235 S - SF WiFi
        • LaunchPad Hercules
        • LaunchPad MSP430FR5994
        • SensorTag CC1350
        • Launchpad SensorTag kit CC1352R Pins Maps
      • Microduino Plaform >
        • Microduino
      • Microsoft Azure IoT DevKit
      • Particle Platform >
        • Particle Core
        • Particle Photon
        • Particle Tools
      • Protostack Platform >
        • Protostack Boards
      • Teensy Plaform >
        • Teensy 3.0
        • Teensy 3.1
    • Computer Platforms >
      • BeagleBone Platform >
        • BeagleBone Green Wireless
      • Mediatek Platform >
        • Mediatek LinkIt One
        • Mediatek LinkIt Smart 7688 Duo
      • UDOO Platform >
        • UDOO Neo
    • Legacy Platforms >
      • Cosa, an Alternative Framework for AVR Boards
      • Digistump Platform >
        • Digispark
        • Oak
      • Intel Platform >
        • Intel Curie with Neural Network
        • Intel Edison
      • LightBlue Bean
      • Little Robot Friends
      • Maple Plaform >
        • LeafLabs Maple
      • RedBear Platform >
        • RedBearLab CC3200
        • RedBearLab WiFi Mini
        • RedBear Duo
      • Wiring Plaform >
        • Wiring S
        • Wiring Play Shield
    • Boards and Plugs
    • I²C Logic Level Converter
    • Peripherals >
      • BoosterPacks for LaunchPads >
        • iMeter BoosterPack
        • Anaren CC110L AIR BoosterPack
        • CC2650 BLE BoosterPack
        • CC3100 WiFi LaunchPad
        • Audio BoosterPack
        • Breadboard BoosterPack
        • BoosterPack Pins
        • Capacitive Touch BoosterPack
        • CapTIvate Development Kit
        • CapTIvate Touch Keypad BoosterPack
        • Educational BoosterPack MK-II
        • Fuel Tank BoosterPack MK-II
        • Grove BoosterPack
        • Pervasive Displays e-Paper EPD Extension Kit Gen 2
        • LCD 2.2" With Touch BoosterPack
        • Nokia 7110 LCD BoosterPack
        • microSD-Card BoosterPack
        • 4D Systems BoosterPack Adaptor
        • Universal 1.8" Colour LCD BoosterPack
      • Shields
      • Grove System
      • Sensors >
        • Serial GPS Unit
        • I²C Voltage-Current-Power INA219 Sensor
        • I²C Inertial Measurement Unit
        • I²C True Colour Sensor >
          • Arduino Hardware
          • Arduino Software
          • Arduino TX-C Digital Two Bits Connection
          • Robo Pro Program and Results
          • True Colour Sensor Calibration
          • True Colour Sensor Integration
          • Extensive Tests: Hardware
          • Extensive Tests: Software
          • Extensive Tests: Results
          • Step-by-Step Instructions
        • Pressure Sensor
      • Actuators >
        • I²C Stepper Motor Controller
        • I²C Haptic Controller
    • Displays >
      • General Purpose 3.5" Screen
      • Pervasive Displays e-Paper Screens >
        • Pervasive Displays e-Paper BWY Screens
        • Pervasive Displays e-Paper BWR Screens
        • Pervasive Displays e-Paper EPD Extension Kit Gen 2
        • Pervasive Displays e-Paper EPD Extension Kit
        • FRAM-based E-Paper Screen Controller
      • Kentec 3.5" LCD with Touch BoosterPack for Stellaris
      • Sharp Memory LCD BoosterPack 128
      • Universal 1.8" Colour LCD BoosterPack
      • The 2.2" LCD with Touch BoosterPack
      • The 2.8" HY28A LCD Screen
      • High-Definition 480x320 3.5" Screen With Touch and Fonts
      • Kentec 3.5" LCD SPI with Touch BoosterPack
      • 4D Systems Intelligent Screens >
        • 4D Systems gen4-uLCD-35DCT-CLB​
        • 4D Systems μLCD-32PT (SGC) Screen
        • 4D Systems uLCD-32WPTU Screen
        • 4D Systems Arduino Adaptor
        • 4D Systems BoosterPack Adaptor
      • East Rising 5" LCD with RA8875, Touch, Fonts, Flash and SD-card
      • East Rising 5" LCD with SSD1963, Touch, Flash and SD-card
  • Software
    • The IDE Question >
      • The Battle of IDEs
      • More IDE Options
      • Looking for a Better IDE
      • Assessing the Next Generation of IDEs
    • Exploring RTOS with Galaxia >
      • Event Library
      • Semaphore Library
      • Mailbox Library
      • Timer Library
      • Clock Library
      • SWI Library
      • Task Library
    • Ultra-Low Power with EnergyTrace >
      • Ultra-Low Power with MSP430
      • Ultra-Low Power with Energia MT and Galaxia
    • Using Integers Instead of Reals
  • IoT
    • IoT Platforms: Which Hardware?
    • IoT Services: Which Solution? >
      • Recommended IoT Solutions >
        • IoT with Node-RED
        • IoT OTG with Blynk
        • IoT BLE with Blynk and CC2650 BoosterPack
        • Private IoT with Blynk on Local Server
        • Plug-and-Play IoT with dweet and freeboard
        • IoT with Sparkfun Data and analog.io
        • Advanced IoT Data Processing with ThinkSpeak
        • IoT Hub with Zapier
        • Send Mail with SMTP2GO
      • Platform-Specific IoT Solutions >
        • IoT with Particle
        • IoT with LightBlue Bean and Node-RED
        • IoT with LinkIt One
      • Other IoT Solutions >
        • IoT with Sub-1 GHz Sensor Network
        • IoT with Project Things by Mozilla
        • IoT with Losant
        • IoT with Exosite
        • Data and Action IoT with Xively and Zapier
        • IoT with PubNub and freeboard
        • IoT Hub with Temboo
        • IoT with Cayenne MQTT
      • Not tested IoT Solutions >
        • IoT with Microsoft Azure
        • IoT with IBM Bluemix
        • IoT with MQTT and 2lemetry
        • IoT with Parse
      • Notification Solutions
    • Get Date and Time from Internet with NTP
    • Fast and Easy WiFi Connection with QR-Code
  • Tools
    • How to Start?
    • Reference >
      • Asking for Help
      • LaunchPads and BoosterPacks Pins Maps
      • Ruler
      • Standards for Connectors
    • Training >
      • Texas Instruments Workshops
      • Embedded Systems: Shape The World — MOOC edX UTAustinX UT.6.02x
      • Embedded Systems - Shape The World: Microcontroller Input/Output — MOOC edX UTAustinX UT.6.10x
      • Embedded Systems - Shape The World: Multi-Threaded Interfacing — MOOC edX UTAustinX UT.6.20x
      • Real-Time Bluetooth Networks: Shape the World — MOOC edX UTAustinX UT.RTBN.12.01x
      • Systems Thinking with Texas Instruments Robotics System Learning Kit
    • Books >
      • Getting Started with the MSP430 LaunchPad
      • Getting Started with Arduino
      • Arduino Cookbook
    • IDEs >
      • Texas Instruments Code Composer Studio 6
      • Texas Instruments Code Composer Studio Cloud
      • Energia
      • Tools for Documentation
    • Equipment >
      • Saleae Logic Analyser >
        • First Generation Logic Analyser
        • Second Generation Analog and Logic Analyser
        • Logic Software
      • Rigol DS1102E Oscilloscope
      • XDS110 Debug Probe with EnergyTrace​
      • Segger J-Link Programmer-Debugger >
        • Segger J-Link EDU Programmer-Debugger
        • Segger J-Link EDU mini Programmer-Debugger
        • Segger J-Link Software
        • Connecting to Boards >
          • Segger J-Link with Arduino Due​
          • Segger J-Link with LaunchPad MSP432
          • Segger J-Link with Adafruit Feather M0
          • Segger J-Link with Adafruit Feather nRF52
          • Segger J-Link with Arduino Primo Core
    • The 404 Collection
  • Projects
    • Libraries >
      • Master I²C Software Library
      • Date and Time Library
      • LCD_screen Library Suite >
        • Concepts and Scope >
          • Compatibility with Serial_LCD
          • Integers Only
          • Fast SRAM Support
          • Supported Screens
          • Turning an Image into a C-Array
          • Roadmap
        • Training Video
        • LCD_graphics Library >
          • LCD_graphics — Clock
          • LCD_graphics — Gauge
        • LCD_GUI Library >
          • LCD_GUI — Label
          • LCD_GUI — Button
          • LCD_GUI — Area
          • LCD_GUI — Dialog Window
          • LCD_GUI — Menu
          • LCD_GUI — Slider
          • LCD_GUI — Text Box
        • Download Library
        • Install Libraries on Energia 1.6.10E18
        • Examples >
          • Life Game
          • Digital Micrometer on VGA Display
          • Touch Screen GPS
      • Others Libraries
    • smartDevices >
      • I²C smartColours Smart Sensor
      • I²C smartRFID Smart Sensor
      • I²C smartLED Display
      • I²C smartControls Smart Device
      • I²C smartWiFi Smart Device
      • I²C smartBLE Smart Device
      • I²C smartNode Smart Device
    • IoT Projects >
      • Low Power Home Network Weather Monitoring
      • Weather and Security Station with Blynk
      • SensorTag to Blynk Using Node-RED
      • Pervasive Reporting
    • Other Projects >
      • FRAM-based E-Paper Screen Controller
      • General Purpose 3.5" Screen
      • Colour Recognition with Neural Network
      • A Low Power Weather Station
      • Digital Volt-Amp-Watt Meter
      • Mobile Measurement with LCD Display
      • Screen with SRAM for GUI
      • Volt-Amp-Watt-Meter for Grove
      • Multi-Touch Project with CapTIvate

Colour Recognition with Neural Network

To my surprise, I discovered the SoC of the Intel Curie board features a neural network, called NeuroMem, with 128 neurons and 128 bytes of memory per neuron. It has been licensed to Intel by General Vision.

Basically, neurones associate a category (output) to a set of variables (inputs). The first example that came up was colour recognition. The input variables includes the red-green-blue-clear values and the output categories list the colours to be recognised. So I gave the neurons a try and selected the I²C smartColours Smart Sensor to check how technology has evolved.

Using neurones consists on two (or three) parts:
  • Training neurones is performed by providing the neurones with sets of values and category. Training is the key part. Poor training results in poor accuracy.
  • Optionally, testing neurones checks the neural network works fine. This is carried out by providing sets of values and comparing the answer with the expected category. The sets for testing could be the same used previously for training, or different ones.
  • Using neurones consists on providing the set of input variables to obtain the category as an answer. 
Picture

Hardware

Apart from the Intel Curie board, I'm using the excellent Grove I²C colour reader based on the TCS3414CS and provided by Seeed Studio, and a serial screen from 4D Systems for a better interface during the training period.

​Each device requires a shield and comes with a proprietary connector, so the final result is the standard sandwich of boards and cables messing around. 

Software

As with the hardware, software relies on off-the-shelf libraries and includes:
  • the Seeed Studio library for Grove Colour Sensor,
  • the Diablo16 Serial Arduino Library for 4D Systems screen, and
  • the Pattern Matching Engine library for the neural network of the Intel Curie board. 
​
The Pattern Matching Engine library corresponds to the CurieNeurons Pro Library previously sold by ​General Vision for USD19. Both libraries give access to all the 128 neurones.

General Vision provides an excellent introduction to neural networks with the presentation Unleashing the neurons of the Intel® Curie module on the Arduino/Genuino 101 platform.

Picture
The application consists of two main screens, one per main step.

  • The first screen corresponds to the learning process.
​
​The sensor reads the colours and the user defines one category, here one among three colours plus empty. The colours and the associated category are then committed to the neural network.
Picture
  • The second screen uses the neural network to guess or recognise the colours.
​
​As for the first step, the sensor reads the colours and the neural network guesses or recognises the colour.
Picture
Apart from the interface on the touch-screen, the whole process is traced to the serial port: first configure, then learn, finally guess.
Picture

Conclusion

This very basic project provides an excellent opportunity to explore neural networks, one of the multiple technologies used by artificial intelligence. As long as the colours are distinct, the neural network can differentiate them.

If I compare this project with the standard algorithm I used on the I²C smartColours Smart Sensor, neural networks are easier to program and faster to operate. There is no more need to develop algorithms as the neural network is self-programmed. Again, training is the key part. Poor training results in poor accuracy.

Unfortunately, Intel no longer supports the Curie board. Same fate includes the Galileo and the Edison boards. Let's hope General Vision continues to offer affordable shields with more powerful neural network chips.
Picture

Links

  • Arduino 101 
  • Intel Curie
  • General Vision CurieNeurons page and library  
  • ​Pattern Matching Engine library for Curie
  • ​API Reference for the Intel Pattern Matching Technology Library
  • I²C smartColours Smart Sensor
Picture
Picture
Posted: 04 Jan 2018
​Updated: 27 May 2019

Powered by Create your own unique website with customizable templates.