Project tutorial
NANO I2C IO Expander

NANO I2C IO Expander © CC0

An Arduino Nano used as an IO expander on I2C for ESP8266. For example, add 8 digitals IO and 6 analog inputs.

  • 10,210 views
  • 2 comments
  • 10 respects

Components and supplies

Ard nano
Arduino Nano R3
×1
12002 04
Breadboard (generic)
not necessary but useful to test the result.
×1
D1 mini
Espressif Wemos D1 Mini
As I2C host controleur
×1
09590 01
LED (generic)
to test digital output
×1
08377 02 l
Resistor 330 ohm
To protect the LED
×1

Apps and online services

About this project

In my Fablab, we are working on the design of a four-channel programmable electrical power strip. We have built it around an ESP8266, and we need to measure four analog signals to calculate power consumption on each channel.

The ESP8266 has only one analog input, so we decided to add an ADC on the I2C bus of the ESP. We start to search for a breakout board with such component. We have found some reference as Adafruit ADS1115 or some with an MCP4725, for example. I often use Arduino Nano on my project and I thought it might be interesting to use a Nano V3 as an I2C slave to provide some analog inputs plus some supplementary digital I/O. This little board is very cheap, especially on the Chinese market place. So I searched on the web to find a existing library that can do this job (I am little lazy) and I didn't find it so I do it myself!

I provide here the result of this work.

Code

The github of the project
Provide all you need, source code of course for the nano and large amount of documentation. It also contain a ARDUINO library to use in the esp or other host. I tested it with an ARDUINO 2560

Schematics

Fritzing schematic
Very simple ! Don't show led or other controlled io components.
esp8266andnano_gaC6pyOVzs.fzz

Comments

Similar projects you might like

I2C OLED Display Using Arduino/NodeMCU

by Tarantula3

  • 20,977 views
  • 3 comments
  • 38 respects

ESP01 Webserver to Control Your Arduino UNO, Mega or Nano

Project tutorial by adamsstephen

  • 4,914 views
  • 3 comments
  • 17 respects

Arduboy Clone with Arduino Nano and I2C OLED display

Project tutorial by Mirko Pavleski

  • 2,921 views
  • 1 comment
  • 13 respects

Arduino Nano Clock with 4x64 LED Matrix

Project tutorial by M.V.P.

  • 12,538 views
  • 29 comments
  • 38 respects

IoT Using ESP8266-01 and Arduino

Project tutorial by Ahmed Ibrahim Ahmed

  • 8,731 views
  • 11 comments
  • 45 respects
Add projectSign up / Login