Nano Peripheral Continued Development

It has been said before and will be said again that I often refer to the Arduino Nano when I mean a copycat Nano board OR copycat Mini Pro. Let’s complicate this a little and add in variations using the 168 and 328 chips.

ESP8266 (top) and Arduino clone variants (below)

To clarify, I would not knowingly buy boards using the 168 chip – so that is out of the picture – and the main difference between the Nano and Mini Pro is that the former (usually) has a micro-USB connection whereas the Mini Pro has 5v TTL serial on a 0.1” connector , requiring an FTDI to program the board. The latter board is better if you are desperate to save power.

We should clarify this further. Any boards that use the non-surface-mount 328 chip should be avoided as they only have 6 analog inputs. SMT variants have 8 analog inputs(A0-A7) and in any case are usually the least expensive (see AliExpress). I use two of those pins (A4, A5) as i2c pins (slave).

We’ve also discussed the SSSTM “Blue Pill” board (not Arduino” but this continues to be unsuitable as an I2c slave peripheral at the time of writing..

See above, at the top is a typical Wemos D1-type ESP8266 board. Below are the Arduino Pro Mini and Nano variants I use.

And the point of these Arduino-type boards? The ESP8266 is a fantastic chip on it’s own, marvellous for WIFI and in my case for MQTT-protocol communications with a main controller such as a Raspberry Pi, FriendlyArm, Orange Pi or similar. My own software for the ESP8266 can run both PWM and RGB serial LEDs however, the PWM does not ideally co-exist with I2c and RGB if you need them all at once.

Enter the “Nano peripheral” which offers up to 6 (soft fade) PWM channels while talking I2c to the main board. That AND up to 6 A/D channels whereas the ESP8266 has only 1. Add to that, more general I/O pins and more, all can be controlled from Node-Red on the main controller without customising the peripheral… i.e. out  of the box. Getting the Wemos and Nano working together is easy… a pair of 3v3 pull-up resistors for i2c, a common 5v supply and you are done. It is not unusual for me to add in an ssd1306 OLED display to the i2c bus (no extra components). Right now on my bench is exactly that with the addition of a BME280+light sensor “weather board” on the ESP8266 side.

With these two puzzle-pieces pretty much standardised I can concentrate on the main control board and mobile software to make this all DO something.


15 thoughts on “Nano Peripheral Continued Development

    1. On my Nano's, and they are the same as your ones on the picture, the chip is running on 5V. I have measured the voltage on the pin VCC of the chip. This means all output signals will be 5V from Nano!
      There is 3.3V coming from the CH340G only, better not using it!
      The datasheet of the Mega specifies 1.8 to 5.5V as supply voltage(no problem on that side).
      On the ESP8266 side I don.t see any specification that it can go higher on inputs but VDD +0.3V. So I assume all higher voltage will stress the skottky diodes with current from 5V to VDD. This will mean the input does not go higher then VDD + Threshold of Scottky diode which will be below max specs of ESP. The curent with 2.2k resistors is about 0.7mA which will most probablybe not harmful for ESP. Putting direct 5V on an input will destroy the Scottky diodes any probably damage the chip.
      I never had any problem with 5V pullup voltage and that is actually used by everyone using your Nano concept. However I will try it with the 3.3V pullup voltage to see if it is reliable too..

      Sorry for this critical comment, but these facts must be cleared after you changed your pullup voltage from 5V to 3.3V.

          1. Not at all complicated. You asked asbout i2c pullups and the voltage. I'm putting my current boards at 3v3. Both chips work at 3v3 so that's fine. For years I put them to 5v without issue. You could use 5v if you are introducing something else which IS i2c and 5v based,

  1. Why not just switch to esp32? You have Pwm,adc,.... Everything there and no i2c code needed, no 2nd board and no 2nd source/project....

    Another nice and cheap option if you only need endless amount of outputs is a shift register... Chain them up with nfets on the output pins and you can make up your firework controller for hundrets of rockets with just one esp8266....

    1. Simple.. ESP8266 + Nano board total half the cost of an ESP32. No i2c software needed, already written. Nano at under £1.50 more flexible by far than shift registers and on a board with power, reset etc

      1. Sure, a shift register is only a shift register. Depends on what is needed. But the price difference between esp32 vs 8266/atmega combo is so low, the time it takes to flash 2 devices, solder additional wires... I simply don't care for the price difference

        Anyway, we all make our own decisions 😉
        i was curious what's your reason for using this combo when one esp32 fits it all (e.g. using the pulse counter i could finally remove my last atmega used for soil moisture sensing which was not possible in the 8266 standalone).

        And with just one chip the ota path can be used....

        1. I OTA the ESP8266 and apart from rarely adding to the Nano (just added baud rate control) nothing to OTA there.

          What about soil measurement do you need a more powerful chip for I wonder? Bluetooth? I used a Chinese Bluetooth soil sensor with light measurement etc.. good one, worked straight off a Pi, but ultimately the range and long term reliability of Bluetooth was no good for me, still working on that one, could end up with a capacitive sensor on the ESP but it's DIY waterproofing.

          1. i'm using my own pcbs - capacitive, 3 parts on the pcb, completly isolated/waterproof (so no corrosion). as i'm not using it for pot-plants inside, but outside (including automated watering), i do not use ble, batteries or anything, but just connect them by wire (it's just some meters....). the esp8266 could not decode the frequency, so replacement was a atmega counting pulses/frequency speaking via spi with the esp8266.
            the esp32 has the pulse-counter, so currently i have 8 sensors and 8 frequency values, normalize them i'm done. the same esp32 still has enough gpio for valves, led, ultrasonic sensor and such...

            been the resistive sensor-path as well.... i'm done with it, all the corrosion, swapping sensors every now and then.... nope. in my eyes that's not a solution to a problem but a workaround that brings up new problems. capacitive is the way to go 😀

Leave a Reply

Your email address will not be published. Required fields are marked *