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.

  • 2,986 views
  • 2 comments
  • 7 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

ESP01 Webserver to Control Your Arduino UNO, Mega or Nano

Project tutorial by adamsstephen

  • 453 views
  • 2 comments
  • 6 respects

I2C OLED Display Using Arduino/NodeMCU

by Tarantula3

  • 3,540 views
  • 3 comments
  • 27 respects

Arduino Nano: BH1750 Ambient Light I2C Sensor with Visuino

Project tutorial by Boian Mitov

  • 3,672 views
  • 0 comments
  • 13 respects

7-Segment Clock with Arduino Nano + DS3231 + LDR

Project tutorial by Ingo Lohs

  • 912 views
  • 9 comments
  • 12 respects

Laser Measurements Controlled by Arduino Nano

Project in progress by Ingo Lohs

  • 2,984 views
  • 2 comments
  • 5 respects
Add projectSign up / Login