LOW POWER , LOW COST MICRO-CONTROLLER FOR IOT APPLICATION

       NodeMCU is a low-cast open source Iot platform. It initially included firmware which runs on the ESP8266 Wifi SOC from Espressif Systems, and hardware which was based on the ESP-12 module. Later, support for the ESP32 32-bit MCU was added.

    The name "NodeMCU" combines "node" and "MCU" (micro-controller unit). The term "NodeMCU" strictly speaking refers to the firmware rather than the associated development kits. Both the firmware and prototyping board designs are opensource. So we can use in Arduino open source software.

  1. ESP266 MICROCONTROLLER : The ESP8266 is a low-cast WIFI microchip with full TCP/IP and microcontrollers  capability, This small module allows microcontrollers to connect to a Wi-Fi network and make simple TCP/IP connections using Hayes-style commands. However, at first there was almost no English-language documentation on the chip and the commands it accepted. The very low price and the fact that there were very few external components on the module, which suggested that it could eventually be very inexpensive in volume, attracted many hackers to explore the module, the chip, and the software on it, as well as to translate the Chinese documentation.

            ESP8266 with 1MiB of built-in flash,allowing the building of single-chip devices capable of connecting to Wi-Fi.

Features :

  •  Processor: L106 32-bit RISC microprocessor core based on the Tensilica Xtensa Diamond Standard 106Micro running at 80 MHz
  • Memory
  1.    32 KiB instruction RAM
  2.  32 KiB instruction cache RAM
  3. 80 KiB user-data RAM
  4. 16 KiB ETS system-data RAM
  •   External QSPI flash: up to 16 MiB is supported (512 KiB to 4 MiB typically included)
  • Integrated TR switch, balub, LNA, power amplifier  and matching network
  • WEP or WPA/WPA2 authentication, or open networks
  • 16 GPIO pins,10 bit ADC
  • SPI, I2C(software implementation), I2Sinterfaces with DMA (sharing pins with GPIO)
  • UART on dedicated pins, plus a transmit-only UART can be enabled on GPIO

  Pin-Out of ES

No alt text provided for this image
  1. VCC, Voltage (+3.3 V; can handle up to 3.6 V)
  2.    GND, Ground (0 V)
  3.   RX, Receive data bit X
  4.  TX, Transmit data bit X
  5.  CH_PD, Chip power-down
  6.  RST, Reset
  7.   GPIO 0, General-purpose input/output No.
  8.   GPIO 2, General-purpose input/output No. 2

2. ESP32:

ESP32 is a series of low-cost, low-power system on chip microcontroller  with integrated Wi-Fi and dual-mode Bluetooth. The ESP32 microprocessor in both dual-core and single-core variations and includes built-in antenna switches, RF balun, power amplifier, low-noise receive amplifier, filters, and power-management modules.

     ESP wifi module will be work on the Open source software, that will be used to interact with Internet.

Internet of things (IoT) is a system of interrelated computing devices, mechanical and digital machines provided with unique identifiers (UIDs) and the ability to transfer data over a network without requiring human-to-human or human-to-computer interaction.

     Arduino IDE is open source software which is used for the programming , and the iot application used in the software Thing speak, AWS, firebase etc.

3 Simple ways programming ESP

1.    FROG pin programmer: This is probably the easiest way to program an ESP12 module. You basically just pop the module into the board and then it behaves exactly like one of the development boards.

  •   The programmer is a little bit expensive if you are only making a few boards.
  •   Boards can only be programmed this way before they are soldered to your PCB

2.    Using USB serial monitor: To manually put the ESP module into programming mode and then use basically any USB to serial converter to program the ESP8266.

  • EN, RST and GPIO 0 needs to be pulled high using a 10K resistor
  •   GPIO 15 needs to be pulled to Ground using a 10K resistor
  •  3.3V power supply capable of about 250mA of current (A cap between VCC and GND is recommended)

To get it into programming mode, GPIO 0 needs to be pulled low when the ESP is starting up. The easiest way to do this is to add buttons to GPIO 0 and the RST pin that connect to ground when pressed. Then to enable flash mode, you simply.

  •  Hold down the GPIO 0 button.
  •  Press the RST button.
  •  Then let go of both buttons.
  • connect TX of the programmer to RX of the ESP8266 (Not a typo, the connections are reversed)
  • Connect RX of the programmer to TX of the ESP8266.
  •  Connect Ground of the programmer to Ground of the ESP8266

To upload your sketch, do the following steps:

  1.   Select the port number of your Serial adapter (Tools->Port).
  2.    Enable programming mode on your ESP8266
  3. Click the upload button. (If it fails double check your wiring and try resting your board into programming mode again)
  4.    Click the reset button when the upload has finished

Here are the board settings I used when uploading using this method:

  •   Board: Generic ESP8266 Mode
  •  Flash Mode: DIO
  • Flash Size: 4M (3M Spiffs) 
  • Reset Method: ck
  •  Flash Frequency: 40MHz
  •    Upload Speed: 115200

3.    Auto resetting using programming using Node MCU

  Most USB to serial chips have additional pins that output signals at different stages of the upload process and with the use of some external circuitry it's possible to trigger the low of the GPIO 0 and the resets required.

  • You can power the ESP8266 directly from 3V pins of the NodeMCU.
  •  Will handle the autoresetting/enabling of programming mode.

AVR MICROCONTROLLER:

  These are modified Harvard architecture 8-bitRISC single-chip microcontrollers.AVR was one of the first microcontroller families to use on-chip flash memory for program storage , as opposed to one-time programmable ROM,EPROM or EEPROM used by other microcontrollers at the time . Many of the Arduino line of open hardware development boards.

Different types of AVR microcontroller :  ATMEGA ,  ATTINY ,TINYAVR, XMEGAAVR  MEGAAVR

ATTINY :

      ATtiny (also known as TinyAVR) are a subfamily of the popular 8-bit AVR  microcontrollers, which typically has fewer features, fewer I/O pins, and less memory than other AVR series chips. 

A.    ATTINY85

                      ATtiny85 is an 8-bit AVR microcontroller that comes with 8-pin interface and mainly used in automation and Arduino projects. The CPU is based on RISC architecture and is mainly called low power controller that stands fit for the real-time applications that can operate on minimum power.

  The program memory is 8KB while both EEPROM and RAM contain a memory space of around 512 bytes. These memory spaces are very useful for storing the number of instruction in the form of code.

  This module comes with only one port called Port B that is a bi-directional port and contains 6 I/O pins with internal pull-up resistors. The output buffers on PORTB are designed with symmetrical drive characteristics that come with both high sink and source capability. It is important to note that, Port B pins are externally pulled low and tri-stated that will source current if the pull-up resistors are activated.

   External and internal interrupts are available on the board, while 32 general purpose registers are included in the device that are mainly called data holding spaces.

   Two 8-bit timers are added in the device where one timer comes with compare modes and can be used both ways i.e. timer as well as a counter while other is high-speed timer/counter. This module comes with software select power saving modes that are very helpful for the applications that operate with minimum power

B.    ATTINY861

High Performance, Low Power AVR® 8-Bit Microcontroller ,Advanced RISC Architecture – 123 Powerful Instructions – Most Single Clock Cycle Execution – 32 x 8 General Purpose Working Registers – Fully Static Operation – Up to 20 MIPS Throughput at 20 MHz

  • High Endurance Non-volatile Memory Segments – 2/4/8K Bytes of In-System Self-Programmable Flash Program Memory.
  • Endurance: 10,000 Write/Erase Cycles – 128/256/512 Bytes of In-System Programmable EEPROM.
  • Endurance: 100,000 Write/Erase Cycles – 128/256/512 Bytes of Internal SRAM – Data retention: 20 Years at 85°C / 100 Years at 25°C – In-System Programmable via SPI Port – Programming Lock for Software Security.
  • Peripheral Features – One 8/16-bit Timer/Counter with Prescaler – One 8/10-bit High Speed Timer/Counter with Prescaler .
  • 3 High Frequency PWM Outputs with Separate Output Compare Registers , Programmable Dead Time Generator – 10-bit ADC.
  • 11 Single-Ended Channels , 16 Differential ADC Channel Pairs ,15 Differential ADC Channel Pairs with Programmable Gain (1x, 8x, 20x, 32x) – On-Chip Analog Comparator

DIFFERENCE BETWEEEN ATTINY AND ESP CONTROLLER

  • Attiny microcontroller does not have inbuilt WIFI module.
  •  ESP has inbuilt WIFI module .
  • Attiny cannotbe used for iot application
  • ESP mainly used for iot application
  •  Attiny controller operating voltage will be 2.8v to 5.5v.
  •  ESP operating voltage is 3.3v
  • Some Attiny controller does not have UART application
  • All ESP controller has UART application


































































































·        









     

To view or add a comment, sign in

More articles by Sangeeta Patil

  • Types of Communication Protocols and their use cases

    Protocol A set of rules or procedures for transmitting data between electronic devices, such as computers…

  • ACOUSTIC

    ACOUSTIC(Hearing): including its production, transmission, and effects, including biological and psychological effects.…

  • POWER SYSTEM AND SOLAR INTEGRATION

    Battery is the primary power source for any electronics wireless gadget, be it a smartphone, laptop, watch or remote…

  • PRINTED CIRCUIT BOARDS (PCB)

    Before understanding the PCB,we need to understand the Block diagram and Schematic BLOCK DIAGRAM : Representation of a…

  • HUMAN –LEOPARDS CONFLICT

    There has been a drastic increase in human-wildlife conflicts with the animals attacking farms/agriculture…

  • HUMAN –ELEPHANT CONFLICT

    There has been a drastic increase in human-wildlife conflicts with the animals attacking farms/agriculture…

Insights from the community

Others also viewed

Explore topics