This blog described electronic components that can be used to support or interface to nanodevices.

Arduino WiFi 1010 with carrier board and Sensor Demo

morreale Monday 11 of January, 2021

Arduino MKR WiFi 1010

An Arduino MKR WiFi 1010 small board computer with a Grove sensor system compatible carrier board is proposed for controlling and monitoring the OpenAir Collective Direct Air Carbon Capture (DACC) Violet sorbent test prototype. The Violet DACC prototype will be used to evaluate the performance of sorbents to capture CO2 from the air and to determine the best geometry of the Violet design. The MKR WiFi 1010 has the following features:

  • SAMD21 Cortex-M0+ 32 bit microcontroller
  • u-block NIN-W102 radio module for Wifi and BLE
  • Powered by USB cable at 5V
  • Cryptochip
  • 8 digital pins
  • 13 PWM pins
  • 1 UART
  • 1 SPI
  • 1 I2C
  • 7 analog inputs
  • 1 analog output
  • 10 external interrupts
  • 256 KB flash memory
  • 32 KB SRAM
  • Small form factor

Arduino MKR Connector Carrier

The Arduino MKR Connector Carrier has connectors to connect to Grove compatible sensors. The carrier has the following features.

  • 5 Analog single Grove input ports
  • 1 Analog dual Grove input port
  • 5 Digital single Grove input ports
  • 1 Digital dual Grove input port
  • 1 I2C port
  • 1 UART port
  • 5V to 3.3V level translators
  • DC/DC converter (7 V to 16 V input to +5V and +3.3 V)

Grove Sensor Modules

Five Grove modules are attached to the MKR WiFi 1010 via the carrier board to demonstrate WiFi connectivity, and sampling sensors. This includes four sensors (temperature, water, sound, and Hall), and one LED socket module. The Grove system is made by Seeed Studio and is based on a four wire system (Power, Ground, and 2 signal pins). Pin spacing is 2 mm and has varying compatibility with STEMMA and Gravity connectors/modules.

Arduino WiFi 1010 with carrier and sensors.

This demonstration setup contains sensors the I had on hand and are attached in the following ports.

  • A0: Temperature Sensor
  • A1: Sound Sensor
  • D0: Hall Sensor
  • D1: Water Sensor
  • D2: LED Socket Module

The sensors set is to be replaced once the appropriate CO2, temperature, and pressure sensors have been finalized.

A number of sketch were written to capture sensor data, setup the MKR WiFi 1010 as a webserver and access point, and to demonstrate the Real Time Clock (RTC) that connects to a Network Time Protocol (NTP) service to set the time. These sketches were refined and combined to sample data with a time stamp for each series of sampled data. Samples are taken every 1 second in this demo sketch. A sample of some of the data is shown below.

Serial Monitor Output

SSID: Red2
IP Address:
signal strength (RSSI):-54 dBm
Epoch received: 1610340928

1/11/21 23:55:28, Temperature: 23.74 C, Water level: 1, mfield: 1, Sound Level: 16
1/11/21 23:55:29, Temperature: 23.74 C, Water level: 1, mfield: 1, Sound Level: 19
1/11/21 23:55:30, Temperature: 23.82 C, Water level: 1, mfield: 1, Sound Level: 3
1/11/21 23:55:31, Temperature: 23.82 C, Water level: 1, mfield: 1, Sound Level: 47

/* Data deleted. Water was placed on the water sensor
 * and my finger was held on the temperature sensor
 * to increase the temperature.

1/11/21 23:56:55, Temperature: 23.91 C, Water level: 0, mfield: 1, Sound Level: 10
1/11/21 23:56:56, Temperature: 26.27 C, Water level: 0, mfield: 1, Sound Level: 5
1/11/21 23:56:57, Temperature: 25.39 C, Water level: 0, mfield: 1, Sound Level: 18
1/11/21 23:56:58, Temperature: 28.05 C, Water level: 0, mfield: 1, Sound Level: 15
1/11/21 23:56:59, Temperature: 29.32 C, Water level: 0, mfield: 1, Sound Level: 0
1/11/21 23:57:00, Temperature: 30.50 C, Water level: 0, mfield: 1, Sound Level: 14
1/11/21 23:57:01, Temperature: 30.96 C, Water level: 0, mfield: 1, Sound Level: 13
1/11/21 23:57:02, Temperature: 31.34 C, Water level: 0, mfield: 1, Sound Level: 48
1/11/21 23:57:03, Temperature: 31.62 C, Water level: 0, mfield: 1, Sound Level: 179
1/11/21 23:57:04, Temperature: 31.71 C, Water level: 0, mfield: 1, Sound Level: 46
1/11/21 23:57:05, Temperature: 31.99 C, Water level: 0, mfield: 1, Sound Level: 11
1/11/21 23:57:06, Temperature: 32.18 C, Water level: 0, mfield: 1, Sound Level: 15
1/11/21 23:57:07, Temperature: 31.52 C, Water level: 0, mfield: 1, Sound Level: 23
1/11/21 23:57:08, Temperature: 31.06 C, Water level: 0, mfield: 1, Sound Level: 17
1/11/21 23:57:09, Temperature: 30.60 C, Water level: 0, mfield: 1, Sound Level: 0
1/11/21 23:57:10, Temperature: 30.32 C, Water level: 0, mfield: 1, Sound Level: 27
1/11/21 23:57:11, Temperature: 29.86 C, Water level: 0, mfield: 1, Sound Level: 11
1/11/21 23:57:12, Temperature: 29.68 C, Water level: 0, mfield: 1, Sound Level: 12
1/11/21 23:57:13, Temperature: 29.50 C, Water level: 0, mfield: 1, Sound Level: 23
1/11/21 23:57:14, Temperature: 29.32 C, Water level: 0, mfield: 1, Sound Level: 26

This demonstration sketch shows that the MKR WiFi 1010 can be used to generate time stamped sensor data using the RTC and connect to the internet via WiFi. The next step is to connect it to the Arduino IoT Cloud so that the data can be monitored from anywhere.

The Sketch

The sketch is shown below.

 * This sketch modifies the WiFi RTC tutorial found at
 * https://www.arduino.cc/en/Tutorial/WiFiRTC
 * to make it more module and to correct the hours output
 * when using negative GMT timezones.
 * By Jay Morreale
 * 1/10/2021
 * MKR1000 - MKR WiFi 1010 - MKR VIDOR 4000 WiFi RTC
 * This sketch asks NTP for the Linux epoch and sets the
 * internal Arduino MKR1000's RTC accordingly.
 * created 08 Jan 2016
 * by Arturo Guadalupi <a.guadalupi@arduino.cc>
 * modified 26 Sept 2018
 * http://arduino.cc/en/Tutorial/WiFiRTC
 * This code is in the public domain.

#include <SPI.h>
#include <WiFiNINA.h>
#include <WiFiUdp.h>
#include <RTCZero.h>

#include "wifi_secrets.h";    // include the ssid and password

 *  Digital sensor pin definitions
#define HALL_SENSOR 0
#define WATER_SENSOR 1
#define LED_01 2

 * Analog sensor pin definitions
#define pinTemp A0     // Define the pin to which the temperature sensor is connected.
#define pinSound A1     // Define the pins to which the sound sensor and LED are connected.

RTCZero rtc;                  // create an RTC object

 * Define WiFi variables
char ssid[] = SECRET_SSID;    // your network SSID (name)
char pass[] = SECRET_PASS;    // your network password (use for WPA, or use as key for WEP)
int keyIndex = 0;             // your network key Index number (needed only for WEP)

int status = WL_IDLE_STATUS;  // define a variable for the wifi status

 * Define varialbles for calculationg local time for a given timezone.
const int GMT = -5;           // change this to adapt it to your timezone
int diff = 0;                 // difference between gmt hours and GMT
int tz = 0;                   // hours correct for GMT time zone when GMT < 0
int tzhours = 0;              // used to hold the rtc.getHours value

 * Define variables for for the sensors
int mfield = 0;         // magnetic field read value
int wlevel = 0;         // water level read value
const int B = 3975;     // thermister coefficient b-value
int tempVal = 0;        // thermister read value
float resistance = 0;   // thermister resistance
float temperature = 0;  // thermister temperature
int soundVal = 0;       // sound lever read value
int soundThreshold = 4; // sound level threahold value
int soundSample = 0;    // variable to hold the sound sample

 * Setup
void setup() {

  Serial.begin(115200);     // setup the serial monitor at the specified baud rate

  pinMode(pinTemp, INPUT);
  pinMode(pinSound, INPUT);

  checkWiFi();               // test to see that the WiFi module is working
  connectWiFi();             // connect to the wifi network and wait until it connects

  printWiFiStatus();        // print the status of the wifi network connection

  rtc.begin();              // start the real time clock (RTC)
  getNTPtime();             // setup the RTC by getting the epoch from the NTP server

 * Loop
void loop() {

  printDate();              // print the date as month, day, year
  printTime();              // print the time in hours, minutes, seconds for the timezone
  printTempSense();         // print the temperature
  printWaterSense();        // print the water sensor output 0=wet
  printMfieldSense();       // print the magnetic field sensor output 0=magnetic field
  printSoundSense();        // print the output of the sound sensor

  delay(1000);              // wait a 1000 ms before getting the next time

 * Function definitions

 * Test the WiFi module works. Run once in setup()
void checkWiFi() {

  if (WiFi.status() == WL_NO_SHIELD) {
    Serial.println("WiFi shield not present");

    // don't continue:

    while (true);

 *  Setup the wifi module by attempting to connect to WiFi network. Run once in setup()
void connectWiFi() {

  while ( status != WL_CONNECTED) {

    Serial.print("Attempting to connect to SSID: ");

    // Connect to WPA/WPA2 network. Change this line if using open or WEP network:

    status = WiFi.begin(ssid, pass);

    // wait 10 seconds for connection:


 * Setup the RTC by getting the time form the NTP. Run once in setup()
void getNTPtime() {

  unsigned long epoch;
  int numberOfTries = 0, maxTries = 6;

  do {
    epoch = WiFi.getTime();

  while ((epoch == 0) && (numberOfTries < maxTries));

  if (numberOfTries == maxTries) {
    Serial.print("NTP unreachable!!");
    while (1);
  } else {
    Serial.print("Epoch received: ");

  * Print the time
void printTime() {

  tzhours = gmtHour(rtc.getHours(), GMT);



 * The original code to compute the time corrected for the users
 * timezone does not work for negatve GMT values. gmtHour() calculates
 * the correct hour assuming a 24 hour clock.
int gmtHour(int hr, int gmt) {

  diff = (hr + gmt);
  if(diff < 0 ) {
    tz = (24 + diff);
  } else {
    tz = diff;
  return tz;

 * Print the date in month, day, year (mm/dd/yy) format
void printDate() {



  Serial.print(" ");

 * Print the WiFi status
void printWiFiStatus() {

  // print the SSID of the network you're attached to:

  Serial.print("SSID: ");

  // print your WiFi shield's IP address:

  IPAddress ip = WiFi.localIP();
  Serial.print("IP Address: ");

  // print the received signal strength:

  long rssi = WiFi.RSSI();

  Serial.print("signal strength (RSSI):");
  Serial.println(" dBm");

 * Print a number with two digits
void print2digits(int number) {

  if (number < 10) {


 * Print the temperature
void printTempSense() {
  // Print the temperature to the serial console.
  Serial.print(", Temperature: ");
  Serial.print(" C, ");

  * Print the water sensor state
void printWaterSense() {
  Serial.print("Water level: ");

   * Print the magnetic field sensor output 0=magnetic field present
void printMfieldSense() {
  Serial.print(", mfield: ");

 * Print the sound level
void printSoundSense() {
  Serial.print(", Sound Level: ");
  Serial.print(soundSample = sampleSound());
  setLED(soundSample, soundThreshold);

 * Sample the temperature
float sampleTemp() {
  // Read the temperature value
  tempVal = analogRead(pinTemp);

  // Determine the current resistance of the thermistor based on the sensor value.
  resistance = (float)(1023-tempVal)*10000/tempVal;

  // Calculate the temperature based on the resistance value in degrees Celsius.
  temperature = 1/(log(resistance/10000)/B+1/298.15)-273.15;
  return temperature;

 * Sample the sound level
int sampleSound() {
  soundVal = analogRead(pinSound);
  return soundVal;

 * Sample the magnetic field
int sampleMfield() {
  // read magnetic field sensor
  mfield = digitalRead(HALL_SENSOR);
  return mfield;

 * Sample the water sensor
int sampleWlevel() {
  // read the water sensors
  wlevel = digitalRead(WATER_SENSOR);
  return wlevel;

 * Turn the LED on if s > th
void setLED(int s, int th) {
  if(s > th) {
    digitalWrite(LED_01, HIGH);
  } else {


The following Tutorials were used to create this sketch.

Hardware design resources

System Administrator Tuesday 29 of December, 2020

The IEEE has some fantastic webinars on circuits, devices, and power electronics to name a few. Many of the webinars are free and may require a little searching at the resource center to find them, otherwise try the YouTube channel if you are not a member. The list below is a selection of electronics related website that may be of interest in no particular order.

Smart TV Interconnection Guide

morreale Monday 28 of December, 2020

The Smart TV Interconnection guides shows how to connect a computer, laptop, or other device to a Smart TV with an High Definition Media Interface (HDMI). Devices may have one of the following interfaces or ports:

  • HDMI
  • Universal Serial Bus (USB) Type-C (USB-C)
  • DisplayPort
  • Digital Visual Interface (DVI)
  • Video Graphics Array (VGA)

A device with an HDMI port may be connected to a Smart TV with just a HDMI male to male cable. The gender refers the to gender of the connector. This is the simplest type of connection and is not shown in the guide.

A device with a USB Type-C, USB-C, or Thunderbolt port must use an USB-C male to HDMI female adapter plus a HDMI male-to-male cable. USB-C ports are most common on smart phones, tablets, and modern laptops.

A device with a DisplayPort must use an active DisplayPort male to HDMI female adapter and plus a HDMI male-to-male cable. DisplayPorts are common on computer docks, graphic cards, and some workstations. There is also a dual-mode DisplayPort that is labeled DP++. A DP++ port uses a passive DP++ male to HDMI female adapter and a HDMI male-to-male cable.

A device with a DVI port must use the appropriate DVI male to female HDMI adapter and a HDMI male-to-male cable. DVI ports have the following configurations: DVI-I (integrated) single-link and dual-link, and DVI-D (digital) single-link and dual link. DVI-I/D ports are most common on older graphics cards.

A device with a VGA port must use a VGA male to HDMI female adapter and a HDMI male-to-male cable. A VGA to HDMI adapter also has connections to the audio output port and a USB port to power the adapter. VGA ports a found on old computers and laptops.

Cables and adapters are available in a variety of performance grades and should be selected to match the highest capabilities of your device and Smart TV. The performance of the device and Smart TV can be found in the respective user manuals. The table in the guide provides the minimum level of performance for common resolutions with a 60 Hz refresh rate.

Hdmi Interconnects

Keysight Technologies RF Back to Basics Workship 2019

morreale Monday 28 of December, 2020

I attended the Keysight Technologies RF Back to Basics workshop in November 2019. The workshop was a very good review of RF analysis. I’d like to thank Walter Meissner for generating this list of useful links.

RF Presentations

KeySight - Find Presentations

S-parameter Application Notes

Articles & Papers

Testing and Calibration

Measurement Application Notes

Music Glove

morreale Sunday 26 of May, 2019
This YouTube video describes how to make a music glove based on the BBC Micro:bit. The Micro:bit can be programmed in Blocks, JavaScript, Python, and Scratch. The glove is sown together in real time with Alex Glow and Helen Leigh who designed the glove and teaches music technology. Alex and Helen discuss many topics while building glove and the links to some of these topics are shown below. I’m fascinated with the idea that the glove can be used create music by converting gestures and accelerometer data from the Micro:bit to MIDI commands that can control MIDI instruments.


The MINI.MU Music Glove


@HelenLeigh on Twitter

Daphne Oram founded the BBC radiographic workshop and composed electronic music. She developed a technique for created music and it named after her – Oramics.


Delia Derbyshire was a musician and electronic music composer at the radiographic workshop. She is known for creating the Doctor Who theme. The BBC released a documentary on the Sculptress of Sound: The Lost Works of Delia Derbyshire in 2010 and a short documentary The Delian Mode was released the year before.

Pure Data (or just Pd) is an open source visual programming language for multimedia.


Matrix Voice is a voice development board used to create IoT voice apps. The board is compatible with the Raspberry Pi and more information about it can be found in The MagPi Matrix Voice Review article.


SuperCollider is a platform for audio synthesis and algorithmic composition, used by musicians, artists, and researchers working with sound.


The Sister Moon art project transmits voice and instruments at the moon and records the reflected signal. The project was developed by Marine Nicole Rojina and uses the Dwingeloo Radio Telescope in the Netherlands.

dadamachines Doppler is a new platform for open music hardware. It contains an ARM microprocessor and an Lattice ICE FPGA. Software can be developed using the Arduino IDE. A review of the board can be found at ycombinator.


Teardown 2019 is a hacking, discovering, and sharing hardware event.

Vulpestruments has a blog that describes how to connect the music glove to a MIDI controller.

The Music Glove on Computerphile.

Drone development kit

morreale Friday 26 of August, 2016
Intel is working on the Aero Platform for Unmanned Aerial Vehicles (UAVs). It contains a quad core Atom processor, storage, IO, communications, flight controller, AirMap, and Intel's RealSense technology in package of about 2.5 × 3.5 inches (64 × 89 mm). The Aero platform is expected to cost $400, the vision accessory is $150, and the enclosure is $70, approximately. Yumeec is offering the Typhoon H drone for aerial photography incorporating the Aero platform and the RealSense vision system.


High density 2 kW inverter webinar.

morreale Friday 27 of May, 2016
Professor Robert Pilawa-Podgurski from the University of Illinois gave a very good webinar on Tackling the Little Box Challenge - New circuit architectures to achieve a 216 W/in^3 power density 2 kW inverter.

The Little Box Challenge was a contest sponsored by Google and the IEEE to build an 2 kW 400 VDC to 240 VAC single phase inverter with at least a 50 W per cubic inch power density. The contest had a $1,000,000 prize. Over a hundred teams entered and eighteen teams were selected to submit their design for testing at NREL. Three teams passed the test. The webinar describes his teams efforts to build a inverter for the challenge.

Fundamentals of PCB Design

morreale Tuesday 17 of May, 2016
The Fundamentals of PCB Design webinar is given by Dr. Howard Johnson and is a wonderful overview of PCB design process. Dr. Johnson is the author of the very good book "High-Speed Digital Design: a Handbook of Black Magic".

2015 IEEE Proceedings

morreale Tuesday 09 of February, 2016
The 26th International Symposium on Space Terahertz Technology was held Match 16-18, 2015 in Cambridge MA. The proceeding of the symposium are available online. Session topics included:
  • System for Space Applications
  • Hot Electron Bolometers
  • Receivers
  • Bolometer Spectrometers
  • Sources
  • Instruments for CMB Observations
  • History & Current Developments
  • Detection Theory and Techniques
  • Direct Detectors
  • Posters


Getting started with AWS IoT webinar

morreale Tuesday 09 of February, 2016
In case you missed it, the Getting started wit AWS IoT webinar is now available as an archive on YouTube as are the sildes. The webinar provide an overview of how to setup up and connect a device to the AWS cloud services. The webinar also demonstrate how to connect a pool pump to the cloud and have the cloud send SNS messages to a phone with the status of the pump.

It was pretty neat. The AWS IoT system uses certificates for authentication and authorization, and creates a shadow of the device in the cloud. All applications interact with the device shadow. When the device is in communications with the cloud via the MQTT had HTTP protocols using encrypted links with TLS 1.2, then it's state is synchronized with the shadow. There are SDK for devices running RTOS, and embedded Linux. The embedded Linux SDK is based on Node JS and supports Raspberry Pi, Adruino Yun, BeagleBone Green, Qualcomm Snapdragon DragonBoard, and other single board computer kits and devices.


MD&M 2015 Philadelphia

morreale Monday 14 of September, 2015
The MD&M 2015 Philadelphia Conference and Expo is October 7-8, 2015 at the Pennsylvania Convention Center in Philadelphia, PA. I've been to the MD&M Expo at the Jacob Javits convention center in NYC. It was incredible for its size and scope. If the Philly Expo is anything like the NYC expo, then anyone thinking of building a product now or in the near future should attend at least one day. The NYC Expo is so large it took me 3 days of walking and talk to people to cover every isle in 2014. It was highly illuminating. This year it only took 2 days. Also, participating in the speed networking sessions was a lot fun too.

Electricity reliability trends

morreale Monday 14 of September, 2015
Berkeley Labs has released a report on electricity reliability on the United States. This study looked at reliability data collected by electricity distribution companies, and created two metrics.
  • System Average Interruption Duration Index (SAIDI) which indicates the amount of time a customer is without power over the course of a year on average.
  • System Average Interruption Frequency Index (SAIFI) which is the average total number of times a customer experiences a power interruption over the course of a year.
The study looked at power disruptions from storms like Hurricane Sandy, and without major events like this to determine power reliability. When major storms are included then the study finds that hotter days, higher wind speeds, and higher annual precipitation results in an increase in SADI (see the report for all the details).


Energy Harvesting Power Conversion

morreale Monday 14 of September, 2015
Analog Devices has a new power management chip designed for energy harvesting power applications. It can convert power from a solar cell and store the energy is a super capacitor, and supply power from a supplementary power source like a battery. The chip, ADP5090, has a 320 nA quiescent current, can operate from 80 mV to 3.3 at the input, and supply 2.2 to 5.2 V to a load.


Open Health Hardware

morreale Friday 26 of June, 2015
Open Hardware Healthcare has posted a nice Review of Open-Source Healthcare Platforms & Sensors. These platforms support quite a few sensors including pulse sensor, oxygen in blood sensor, airflow sensor, body temperature sensor, ECG sensor, galvanic Skin Response (GSR) sensor, glucometer, accelerometer, blood pressure sensor, and EMG sensor, for example.


Art of Electronics 3rd Edition

morreale Friday 19 of June, 2015
The Art of Electronics 2nd Edition and the Students Manual for the Art of Electronics are both really wonderful references for building practical electronic circuits. Now, Horowitz and Hill have rewritten The Art of Electronics in a 3rd edition. The contents include:
  • ONE: Foundations
  • TWO: Bipolar Transistors
  • THREE: Field-Effect Transistors
  • FOUR: Operational Amplifiers
  • FIVE: Precision Circuits
  • SIX: Filters
  • SEVEN: Oscillators and Timers
  • EIGHT: Low-Noise Techniques
  • NINE: Voltage Regulation and Power Conversion
  • TEN: Digital Logic
  • ELEVEN: Programmable Logic Devices
  • TWELVE: Logic Interfacing
  • THIRTEEN: Digital meets Analog
  • FOURTEEN: Computers, Controllers, and Data Links
  • FIFTEEN: Microcontrollers
  • 16 appendixes
Much of the content is new. A second volume with more advanced material is planned. The students manual has been revised to be more useful for practicing engineers and this version is titled: Learning the Art of Electronics — A Hands-on Approach, and is due out late this year.

element14 has an nice interview with the authors at element14 interviews "The Art of Electronics" authors Paul Horowitz and Winfield Hill. Also, Adafruit has a Youtube interview with Paul Horwitz.