Monday, February 5, 2018

esp8266/Arduino 74HC4051 library


The 74HC4051 is a high-speed Si-gate CMOS device and is pin compatible with Low-power Schottky TTL (LSTTL).

The 74HC4051 IC can be used to expand the single ADC input port of the ESP8266, to 8 ports.
The ESP8266 comes with a 10bit ADC, 0 to 1V, the datasheet doesn't tell much more than this about the internal analog converter.


The output pin of the 74HC4051 is controller by 3 pins, by setting those pins high or low an analog input of the 74HC4051 is selected.
It can be driven by the same 3.3V that powers up the ESP8266.


This library was developed on Atom+PlatformIO, compiled esp8266/Arduino.



Code

Notes
  • read risk disclaimer
  • excuse my bad english

4 comments:

  1. Post interessante. Ho due domande da newbie.
    1) Posso sostituire l'esp8266 con il nodemcu (lolin v3)?
    2) Quale è la funzione del condensatore c4 da 100nf?)
    Grazie

    ReplyDelete
    Replies
    1. Grazie.
      Si, visto che si basa su ESP8266 anche il nodemcu lolin v4. Il condensatore riduce i disturbi sulla linea di uscita, voltando si può omettere il 10uF.

      Delete
    2. Grazie. Scusami ma ho ancora una domanda. Il termine "voltando" è una correzione del T9 o ha un significato tecnico?

      Delete
    3. Ops, era una correzione di "volendo". Considera che C2 deve essere almeno del voltaggio di input, quindi un elettrolitico di 4.7uf, ma puoi usare un 10uf, di 16V se usi 12V in ingresso andrà bene.

      Delete