Tag Archives: Featured

Edge Impulse makes TinyML available to millions of Arduino developers

via Arduino Blog

This post is written by Jan Jongboom and Dominic Pajak.

Running machine learning (ML) on microcontrollers is one of the most exciting developments of the past years, allowing small battery-powered devices to detect complex motions, recognize sounds, or find anomalies in sensor data. To make building and deploying these models accessible to every embedded developer we’re launching first-class support for the Arduino Nano 33 BLE Sense and other 32-bit Arduino boards in Edge Impulse.

The trend to run ML on microcontrollers is called Embedded ML or Tiny ML. It means devices can make smart decisions without needing to send data to the cloud – great from an efficiency and privacy perspective. Even powerful deep learning models (based on artificial neural networks) are now reaching microcontrollers. This past year great strides were made in making deep learning models smaller, faster and runnable on embedded hardware through projects like TensorFlow Lite Micro, uTensor and Arm’s CMSIS-NN; but building a quality dataset, extracting the right features, training and deploying these models is still complicated.

Using Edge Impulse you can now quickly collect real-world sensor data, train ML models on this data in the cloud, and then deploy the model back to your Arduino device. From there you can integrate the model into your Arduino sketches with a single function call. Your sensors are then a whole lot smarter, being able to make sense of complex events in the real world. The built-in examples allow you to collect data from the accelerometer and the microphone, but it’s easy to integrate other sensors with a few lines of code. 

Excited? This is how you build your first deep learning model with the Arduino Nano 33 BLE Sense (there’s also a video tutorial here: setting up the Arduino Nano 33 BLE Sense with Edge Impulse):

  • Download the Arduino Nano 33 BLE Sense firmware — this is a special firmware package (source code) that contains all code to quickly gather data from its sensors. Launch the flash script for your platform to flash the firmware.
  • Launch the Edge Impulse daemon to connect your board to Edge Impulse. Open a terminal or command prompt and run:
$ npm install edge-impulse-cli -g
$ edge-impulse-daemon
  • Your device now shows in the Edge Impulse studio on the Devices tab, ready for you to collect some data and build a model.
  • Once you’re done you can deploy your model back to the Arduino Nano 33 BLE Sense. Either as a binary which includes your full ML model, or as an Arduino library which you can integrate in any sketch.
Deploy to Arduino from Edge Impulse
Deploying to Arduino from Edge Impulse
  • Your machine learning model is now running on the Arduino board. Open the serial monitor and run `AT+RUNIMPULSE` to start classifying real world data!
Keyword spotting on the Arduino Nano 33 BLE Sense
Keyword spotting on the Arduino Nano 33 BLE Sense

Integrates with your favorite Arduino platform

We’ve launched with the Arduino Nano 33 BLE Sense, but you can also integrate Edge Impulse with your favourite Arduino platform. You can easily collect data from any sensor and development board using the Data forwarder. This is a small application that reads data over serial and sends it to Edge Impulse. All you need is a few lines of code in your sketch (here’s an example).

After you’ve built a model you can easily export your model as an Arduino library. This library will run on any Arm-based Arduino platform including the Arduino MKR family or Arduino Nano 33 IoT, providing it has enough RAM to run your model. You can now include your ML model in any Arduino sketch with just a few lines of code. After you’ve added the library to the Arduino IDE you can find an example on integrating the model under Files > Examples > Your project – Edge Impulse > static_buffer.

To run your models as fast and energy-efficiently as possible we automatically leverage the hardware capabilities of your Arduino board – for example the signal processing extensions available on the Arm Cortex-M4 based Arduino Nano BLE Sense or more powerful Arm Cortex-M7 based Arduino Portenta H7. We also leverage the optimized neural network kernels that Arm provides in CMSIS-NN.

A path to production

This release is the first step in a really exciting collaboration. We believe that many embedded applications can benefit from ML today, whether it’s for predictive maintenance (‘this machine is starting to behave abnormally’), to help with worker safety (‘fall detected’), or in health care (‘detected early signs of a potential infection’). Using Edge Impulse with the Arduino MKR family you can already quickly deploy simple ML based applications combined with LoRa, NB-IoT cellular, or WiFi connectivity. Over the next months we’ll also add integrations for the Arduino Portenta H7 on Edge Impulse, making higher performance industrial applications possible.

On a related note: if you have ideas on how TinyML can help to slow down or detect the COVID-19 virus, then join the UNDP COVID-19 Detect and Protect Challenge. For inspiration, see Kartik Thakore’s blog post on cough detection with the Arduino Nano 33 BLE Sense and Edge Impulse.

We can’t wait to see what you’ll build!

Jan Jongboom is the CTO and co-founder of Edge Impulse. He built his first IoT projects using the Arduino Starter Kit.

Dominic Pajak is VP Business Development at Arduino.

Remote working with Arduino: Alexa and the Arduino IoT Cloud

via Arduino Blog

We’ll certainly remember this year, with many of us learning how to adapt and live a safe life-style under the pandemic. As many countries begin to initiate a relaxation of restrictions and we are starting to be able to leave our houses, arrange shifts to get into work (still observing safety measures), we might find ourselves with different needs.

Perhaps we got used to having the TV on more often than usual, letting the voices of shows we don’t really watch keep us company in the background while home alone… working. Maybe we just like to have a corner light up with colors which soothe our moods, or give a fancy background tint to a remote disco party as we dress with big shades and wigs.

Many of these things can easily be automated using Alexa and Arduino IoT Cloud, so when we (finally) leave the house and are not sure if the TV is still on, or if our living room corner is still purple! we can simply ask “Alexa, turn the TV off” or “Alexa, turn the living room off” and a series of smart devices and software will take care of it for us.

Let’s give it a shot…

Getting the Alexa skill: Learn how to use Arduino IoT Cloud and Amazon Alexa to interact with your sensors.

Using the MKR RGB shield with Alexa: Learn how to control your MKR RGB Shield using Arduino IoT Cloud and Amazon Alexa.

Controlling TV with Alexa: Learn how to create a voice-controlled device with Alexa and Arduino IoT Cloud in 7 minutes

Create a voice-controlled device with Alexa: Learn how to turn on/off your lamp, and change the color and luminosity of the light in seven minutes!

Want to get started with the Arduino IoT Cloud? Check out this article!

Emergency ventilators: from ideation to manufacturing

via Arduino Blog

This article was written by César Garcia, researcher at La Hora Maker.

Welcome to the second article in this series on ventilators! As we’ve seen last week, ventilators are critical pieces of infrastructure. They must work reliably for long periods of time without missing a beat. Today we will uncover what are the different phases involved in developing one of these devices. Please, note that this process is a simplified one, based on current circumstances. It usually takes much more time to get one ventilator ready to market.

First stage is the ideation phase. In this initial stage, teams need to decide what technology they will use for their design. One of the most common these days is repurposing an AMBU, by operating it mechanically. There are other alternatives although like pneumatical, based on electro valves, etc, and some of the models approved in Spain involve techniques like High Frequency Jet Ventilation — that is a complete departure from the AMBU models! 

Andalucía Respira Ventilator photo (Source: Junta de Andalucía press release)

Given that the device is going to be used by medical personnel, it’s really important to look at the clinically relevant parameters for these devices. The MIT E-Vent team has done a wonderful job documenting these clinical aspects. You can find the key ventilator specifications to consider on their site.

It’s also worth noting that not all ventilators are meant to work the same. Some of them are better tailored for emergencies, while others are designed to support the patient for longer periods. Mechanical ventilators are covered by several ISO norms like 80601-2-12:2020. Several agencies have made the specifications available for free, to help new initiatives to develop ventilators against COVID-19.

Once you know which approach you would like to take, it’s time to start working on your first functional prototype.  Most of the designs will require you to get sensors and valves, as well as basic medical supplies. As per the control unit, we would recommend you to take a look at the Arduino boards better suited to the task in this presentation by Dario Pennisi.

Getting your prototype to pump air is the first step. But you need to control the amount of air in a precise way. Too much-pressurized gas could damage the patient lungs while falling short could suffocate them too. There are two approaches to this issue — some ventilators keep track of the volume of air, while others focus on pressure. To test this, you will need a lung simulator — there are plain simple models to really complex ones. UK’s MHRA offers an extensive test suite for Rapid Manufactured Ventilator Systems (RMVS) for this crisis. You can explore the test at Appendix B. 

Photo credits: MHRA’s diagram for the test circuit from the Rapidly Manufactured Ventilator System specification.

If you are producing ventilators in the UK, this is the main mandatory step right now. In other countries, like Spain, the regulation is a bit more complex — we will focus on those additional steps in the rest of this article.

Once you pass all tests with the simulator, you are required to run clinical tests with animals. As you can imagine, this is not something you can do at your local hackerspace or Fablab. Veterinarians and doctors need to supervise the test, and validate if your device works as expected. Even if you pass some initial tests, you may still need to do more extensive trials. If you plan to produce a non-emergency ventilator, you might be required to repeat tests on pathological animals.

Let’s say you pass all these tests, what is next step? You need to supply your prototype and manuals to an external lab. The goal is to make a third party verify the device specs in a controlled environment. They will test for Electromagnetic compliance, so that the device doesn’t interfere with external ICU equipment, neither is affected by third party emissions.

Once you have your documentation ready, you can submit it for review for the local regulatory agency (AEMPS in Spain, FDA in the USA), to receive final approval! Does this mean that the device is certified? Not really!

Regular certification doesn’t just focus on the device, but also on the manufacturing methods, facilities, quality control, etc. To produce certain equipment, you need to ensure the environmental conditions at the factory, proper hygienic procedures, etc are maintained.

How do you make sure that none of the people assembling or printing is not affected by coronavirus? Most prototypes that have passed all tests have been produced by companies with manufacturing experience. Some projects like Oxygen, offer a maker version and an industrial version, that was manufactured by a car company. In their repository, you can find all documents required to move from prototype to an industrial device!

OxYGEN-IP Ventilator exploded view (available at OxYGEN repo)

So, how are these devices going to be deployed? In Spain, they are being used as devices in a clinical trial. Ethical committees in the hospitals would need to approve the trials and set the rules for actual usage. These devices will be used by trained doctors as compassive devices: if no other ventilator is available, they could decide to use them, after getting permission by patients or relatives. These clinical trials would start with a few patients and then scale to larger numbers if required.

In the next episodes, we will explore the stories behind some of these prototypes!

A GUIDE FOR PARENTS: HOW TO LEARN ELECTRONICS & CODING WITH THE ARDUINO STUDENT KIT

via Arduino Blog

Schools have recently had to make a sudden and seismic shift in the way they teach. As both educators and students get used to remote learning, the onus is now more on parents to support their children through homeschool, and that means parents themselves need support. At Arduino Education, we want to help you and your children by making remote learning experiences as smooth (and fun!) as possible.

LEARNING ELECTRONICS & CODING AT HOME

As parents to children aged 11-plus, learning electronics and coding with them at home may not be something you’d ever think you’d be doing. But don’t worry, it really isn’t as daunting as it sounds, and electronics and coding skills are crucial in the world your children are growing up in.

ABOUT ELECTRONICS & CODING

Learn coding and the basic concepts of electricity together with your child at home with the Arduino Student Kit. It comes with all of the electronic components you need, as well as step-by-step instructions for how to start coding. But what is coding, exactly? Well, it’s simply the language that computers understand. It’s how we tell a computer what to do. In the Student Kit, you get pre-programmed code to help you understand how it works. You could also explore drag-and-drop visual coding such as Scratch to help you get a better understanding of what coding is.

LEARN ELECTRONICS & CODING AT HOME WITH THE ARDUINO STUDENT KIT

The Student Kit is a hands-on, step-by-step homeschool starter kit for children aged 11-plus that will help them get started with the basics of electronics and coding at home. You’ll get all the hardware and software you need for one person, as well as complete guidance, step-by-step lessons, exercises, and a logbook where you can answer the lesson questions and find solutions. 

HOW THE KIT HELPS YOU HOMESCHOOL YOUR CHILDREN

This is your hands-on, step-by-step remote learning learning tool that will help your child learn the basics of programming, coding, and electronics at home. As a parent, you don’t need any prior knowledge or experience as you are guided through step-by-step. The kit is linked directly into the curriculum so you can be confident that your children are learning what they should be, and it provides the opportunity for them to become confident in programming and electronics. You’ll also be helping them learn vital skills such as critical thinking and problem-solving.

WHAT’S IN THE KIT?

  • All the basic electronic components you need to complete each lesson
  • Access to an online platform which helps children take their first steps into the world of electronics and inventions
  • Nine step-by-step lessons with up to 25 hours of learning time
  • Two open-ended projects. These projects don’t have a right or wrong answer – the solution to the project question is unique to each individual
  • A digital logbook that students can use to annotate their exercises, observations, and experiments. Parents can also use the logbook to find solutions

WHAT DOES THE KIT HELP TO TEACH?

By using the kit at home, you’ll be mirroring what your children would learn in their classroom. As well as how to code, the kit teaches:

  • Basic concepts of electricity
  • Safety 
  • Schematics
  • Writing code
  • Controlling a circuit
  • Coding concepts
  • Controlling a servo motor
  • Producing sounds, tones, and music
  • Measuring the intensity of light 

WHAT YOU NEED

You’ll need to purchase one Student Kit per child – you can either find your country’s distributor or buy the kit online. To use the kit, you’ll need a desktop computer, laptop or tablet device which has a compatible operating system and meets minimum requirements for downloading the Arduino software. Find out more about this here.

An introduction to ventilators

via Arduino Blog

This article was written by César Garcia, researcher at La Hora Maker.

SARS-CoV-2 virus has been spreading around the world since December 2019. The virus causes a coronavirus disease 2019, also known as COVID-19. This respiratory illness can cause a severe acute respiratory syndrome. Critical patients often require a ventilator during their stay at Intensive Care Units, thus the demand for ventilators has skyrocketed, with traditional manufacturers not able to keep up. Because of this, teams around the world are looking for alternatives and are creating ventilators using Arduino! 

In this new series on ventilators on the Arduino blog, we will explore these devices more detail. We will focus on the steps needed to test a ventilator. Also, on the different technologies available to move the air in a precise way. We will highlight what clinical variables do doctors need. And we will interview some of the teams working on these devices. Let’s start with a brief overview of ventilators using Arduino as a control system!

At the beginning of the crisis, most people started looking for open source ventilators. There were several models available but one of the most popular was MIT Low-Cost Ventilator. This model uses an Ambu, also known as Bag Valve Mask (BVM). These bags are used by paramedics on emergencies. They press the bag to insufflate air into the patient. Given they have to press it by hand, it gets a very tiresome movement after a few minutes. MIT Low-Cost Ventilator automates this movement, saving doctors or nurses of this manual task. Even though, the paper describing the ventilator is quite useful and complete, this model did not pass any clinical trials. It was released on 2010 and nobody took development further until this year.

One of the first teams to launch a new project was the Reesistencia Team. This virtual team, based on Asturias and the Canary Islands in Spain, started working together after meeting in a Telegram group. The team consists of a doctor and several engineers, working to create a DIY open source ventilator, based on Arduino. This model is based around a Jackson Rees bag instead of an Ambu bag. This should allow the device to operate longer than the ones based on emergency bags. This team is active on Twitter, were you can find some of their initial designs.

Latest version from Reesistencia Team 24

This spark of maker ingenuity inspired several other teams to launch their own versions and prototypes in Spain. Oxygen team embraced rapid prototyping, starting with a machine made of scraped wood up to an industrial machine. SEAT, the Spanish car company, has produced five hundred of these devices so far. 

Initial prototypes of OxyGEN ventilador from Protofy.xyz

MIT E-Vent team has recovered the original MIT ventilator and evolved the concept further. They have done already several tests on animals to evaluate the new version. The AmboVent team from Israel has shared another BVM ventilator based on Arduino Nano, and they have provided very complete documentation.

Given the current pace of development it is very hard to document all the processes and steps involved. One of our favorites in this regard is University of Florida Health Open Source Ventilator. They have shared all design documents on their repository along with short videos. They even provide a live stream showing the stress tests for their ventilator!

Next week, we will explore the steps involved in creating a ventilator from scratch. This will help us discover common milestones and give us better tools to evaluate current designs.

Warning: Ventilators are complex machines mean to be operated by trained doctors. They need oxygen and compressed air supplies to operate. Patients are fully dependant on these machines to survive, so they need to run flawlessly. Please, explore this topic with caution and check documentation about previous trials before trying to replicate some of these projects. Not all of them have passed all required clinical trials and validations!

If you’d like to know more about ventilators, check the “Combating COVID-19 Conference” videos.

Arduino staff and Arduino community are strongly committed to support projects aimed at fighting and lessening the impact of COVID-19. Arduino products are essential for both R&D and manufacturing purposes related to the global response to Covid-19, in building digital medical devices and manufacturing processes for medical equipment and PPE. However, all prototypes and projects aimed to fight COVID-19 using Arduino open-source electronics and digital fabrication do not create any liability to Arduino (company, community and Arduino staff members). Neither Arduino nor Arduino board, staff members and community will be responsible in any form and to any extent for losses or damages of whatever nature (direct, indirect, consequential, or other) which may arise related to Arduino prototypes, Arduino electronic equipment for critical medical devices, research operations, forum and blog discussions and in general Covid-19 Arduino-based pilot and non pilot projects, independently of the Arduino control on progress or involvement in the research, development, manufacturing and in general implementation phases.

Hands-on with the Arduino CLI!

via Arduino Blog

In our last post, we told you that the Arduino CLI’s primary goal is to provide a flexible yet simple command line tool with all the features and ease of use that made Arduino a successful platform, and enable users to find new ways of improving their workflows. 

The Arduino CLI is not just a command line tool, but contains all you need to build applications around the Arduino ecosystem.

For example, you can:

  • Parse the JSON output of the CLI and easily integrate it into your custom application.
  • Run the CLI as an always-on service that accepts commands via a gRPC interface using your language of choice.
  • Use the CLI in your Go application as a library.

In the video below, we’ll focus on how to start using the Arduino CLI in a terminal session. The tutorial will walk you through setting up all the required tools on your machine to the fastest way to compile and upload a sketch on your target board to allow quick iterations in developing your project with Arduinos.