feature article
Subscribe Now

Machine Learning at the Push of a Button

Automated Tool Generates ML Code for IoT Devices

“Physician, heal thyself” – Luke 4:23

My Thermos bottle keeps hot drinks hot and cold drinks cold. How does it know? 

An electrical engineer would probably design a Thermos with a toggle switch (“HOT” and “COLD”), or a big temperature dial, or – if you work in Cupertino – an LCD display, touchpad, RTOS, and proprietary cable interface. Thankfully, real vacuum flasks take care of themselves with no user input at all. They just work. 

It would sure be nice if new AI-enabled IoT devices could do the same thing. Instead of learning all about AI and ML (and the differences between the two), and learning how to code neural nets, and how to train them, and what type of data they require, and how to provision the hardware, etc., it’d be great if they just… somehow… knew what to do. Now that would be real machine learning. 

Guess what? A small French company thinks it has developed that very trick. It uses machine learning to teach machine learning. To machines. Without a lot of user input. It takes the mystery, mastery, and mythology out of ML, while allowing engineers and programmers to create smart devices with little or no training.  

The company is Cartesiam and the product is called NanoEdge AI Studio. It’s a software-only tool that cranks out learning and inference code for ARM Cortex-M–based devices, sort of like an IDE for ML. The user interface is pretty to look at and has only a few virtual knobs and dials that you get to twist. All the rest is automatic. Under the right circumstances, it’s even free. 

Cartesiam’s thesis is that ML is hard, and that developing embedded AI requires special skills that most of us don’t have. You could hire a qualified data scientist to analyze your system and develop a good model, but such specialists are hard to find and expensive when they’re available. Plus, your new hire will probably need a year or so to complete their analysis – and that’s before you start coding or even know what sort of hardware you’ll need. 

Instead, Cartesiam figures that most smart IoT devices have certain things in common and don’t need their own full-time, dedicated data scientist to figure things out, just like you don’t need a compiler expert to write C code or a physicist to draw a schematic. Let the tool do the work. 

The company uses preventive motor maintenance as an example. Say you want to predict when a motor will wear out and fail. You could simply schedule replacement every few thousand hours (the equivalent of a regular 5000-mile oil change in your car), or you could be smart and instrument the motor and try to sense impending failures. But what sensors would you use, and how exactly would they detect a failure? What does a motor failure look like, anyway? 

With NanoEdge AI Studio, you give it some samples of good data and some samples of bad data, and let it learn the difference. It then builds a model based on your criteria and emits code that you link into your system. Done. 

You get to tweak the knobs for MCU type, RAM size, and type of sensor.  In this case, a vibration sensor/accelerometer would be appropriate, and the data samples can be gathered in real-time or canned; it doesn’t matter. You can also dial-in the level of accuracy and the level of confidence in the model. These last two trade off precision for memory footprint.  

NanoEdge Studio includes a software simulator, so you can test out your code without burning any ROMs or downloading to a prototype board. That should make it quicker to test out various inference models to get the right balance. Cartesiam says it can produce more than 500 million different ML libraries, so it’s not simply a cut-and-paste tool. 

As another example, Cartesiam described one customer designing a safety alarm for swimming pools. They spent days tossing small children into variously shaped pools to collect data, and then several months analyzing the data to tease out the distinguishing characteristics of a “good” splash versus one that should trigger the alarm. NanoEdge AI Studio accomplished the latter task in minutes and was just as accurate. Yet another customer uses it to detect when a vacuum cleaner bag needs emptying. Such is the world of smart device design. 

The overarching theme here is that users don’t have to know much of anything about machine learning, neural nets, inference, and other arcana. Just throw data at it and let the tool figure it out. Like any EDA tool, it trades abstraction for productivity. 

In today’s environment, that’s a good tradeoff. Experienced data scientists are few and far between. Moreover, you probably won’t need his/her talents long-term. When the project is complete and you’ve got your detailed model, what then? 

NanoEdge AI Studio is free to try but deploying actual code in production costs money. Cartesiam describes the royalty as “tens of cents to a few dollars,” depending on volume. Sounds cheaper than hiring an ML specialist. 

Leave a Reply

featured blogs
Apr 8, 2020
Here are some tips that will help you transition to your new environment. But more importantly, it will help you when having to go back into the office. Working remotely can be hard to adjust to psychologically. To help make the transition, take a disciplined approach to mana...
Apr 8, 2020
IPC-A-610 covers a wide range of solder joints, and what it takes to meet Classes 1 – 3 in varying types of connector termination styles. These classifications help a designer determine if a connector is capable of being used in their application. In a previous blog, I ...
Apr 7, 2020
Have you seen the video that describes how the coronavirus has hit hardest where 5G was first deployed?...
Apr 3, 2020
[From the last episode: We saw some of the mistakes that can cause programs to fail and to breach security and/or privacy.] We'€™ve seen how having more than one program or user resident as a '€œtenant'€ in a server in the cloud can create some challenges '€“ at leas...

Featured Video

LE Audio Over Bluetooth with DesignWare Bluetooth IP

Sponsored by Synopsys

The video shows the new LE Audio using Synopsys® DesignWare® Bluetooth 5.2 PHY IP and Link Layer IP with isochronous channels, and ARC® Data Fusion IP Subsystem with ARC EM9D Processor, running the LC3 codec supporting LE Audio.

Click here for more information about Bluetooth, Thread, Zigbee IP Solutions