Introduction to MCP23008
Hello friends, I hope you all are doing great. In today's tutorial, we are gonna have a look at detailed
Introduction to MCP23008. MCP23008 provides an 8-bit parallel input/output expansion for I2C bus and SPI applications. It has 8-bit configuration registers for input, output and polarity changing. The master device can enable input and output pins of MCP23008 by writing the Input/output configuration bits. A polarity of the input port register can be inverted with the polarity of the inversion register and all registers can be read by the system master.
MCP23008 is used in different industrial and class projects where I2C and SPI interfacing is required simultaneously.
In today's post, we will have a look at its pinout, features, specifications, applications, working, etc. I will also share some links where I have interfaced with other microcontrollers. If you have any question please ask in comments I will try my best to resolve your problems. So let's get started with Introduction to MCP23008.
Introduction to MCP23008
- MCP23008 provides an 8-bit parallel input/output expansion for I2C bus and SPI applications. This microcontroller has 8-bit configuration registers for input, output and polarity changing.
- In this microcontroller, four pins are configured for inputs and four for outputs. These pins are designed in such a way when the input level is changed, the associated output pin is driven to the same level. This phenomenon is happened by the MCU reading the inputs pins and writing the appropriate value to the output pins.
- This module is available in small space saving 20-lead SSOP packages. Adding small 6-lead PIC10F202 in a SOT-23 package makes it available for small overall PCB areas.
- Either it can connect with a power supply of 5V using the Vdd and GND test pins, or can connect with a 9V power supply or power adapter into the plug.
- Now, discuss its pinouts, with detailed parameters.
MCP23008 Pinout & Description
There is the main 18 pinout of MCP23008, which are described below with a detailed description.
Pin# |
Type |
Parameters |
Pin#1 |
SCL/SCK |
It is a Serial clock input. |
Pin#2 |
SDA/SI |
It is a Serial data I/O (MCP23008)/Serial data input (MCP23S08) pin. |
Pin#3 |
A2/SO |
It is a hardware address input (MCP23008)/Serial data output (MCP23S08). It (A2) must be biased externally. |
Pin#4 |
A1 |
It is a Hardware address input. It Must be biased externally. |
Pin#5 |
A0 |
It is a Hardware address input. It Must be biased externally. |
Pin#6 |
RESET |
This is an external reset input. |
Pin#7 |
NC/CS |
No connect (MCP23008)/External chip select input (MCP23S08). |
Pin#8 |
INT |
It is an Interrupt output. It Can be configured for active-high, active-low or open-drain. |
Pin#9 |
VSS |
It is used for Ground. |
Pin#10 |
GP0 |
It is a Bidirectional I/O pin. It can be enabled for interrupt-on-change and/or internal weak pull-up resistor. |
Pin#11 |
GP1 |
It is a Bidirectional I/O pin. It can be enabled for interrupt-on-change and/or internal weak pull-up resistor. |
Pin#12 |
GP2 |
It is a Bidirectional I/O pin. It can be enabled for interrupt-on-change and/or internal weak pull-up resistor. |
Pin#13 |
GP3 |
It is a Bidirectional I/O pin. It can be enabled for interrupt-on-change and/or internal weak pull-up resistor. |
Pin#14 |
GP4 |
It is a Bidirectional I/O pin. It can be enabled for interrupt-on-change and/or internal weak pull-up resistor. |
Pin#15 |
GP5 |
It is a Bidirectional I/O pin. It can be enabled for interrupt-on-change and/or internal weak pull-up resistor. |
Pin#16 |
GP6 |
It is a Bidirectional I/O pin. It can be enabled for interrupt-on-change and/or internal weak pull-up resistor. |
Pin#17 |
GP7 |
It is a Bidirectional I/O pin. It can be enabled for interrupt-on-change and/or internal weak pull-up resistor. |
Pin#18 |
VDD |
Power pin. |
Pin#19 |
N/C |
N/C |
- For further information, let's see a pinout diagram.
- Now, we discuss the features of MCP23008.
Features of MCP23008 Features
- These are the main features of MCP23008.
- This module consists of Two 8-bit GPIO expanders.
- It is available in both I2C and SPI interfacing.
- This board has four switches and four LEDs to demonstrate the input/output functionality.
- It has headers for the serial interface and GPIO port to allow evaluation in a user-defined application.
- It has polarity inversion register to configure the input port data.
- It also has an external reset input.
- Its operating voltage is 1.8 to 5.5V at -40 Celsius to +85 Celsius.
MCP23008 Arduino Interfacing
- The project which we are going to discuss will tell us how we can interface an MCP23008 I/O port expander to an Arduino microcontroller.
-
First, we discuss the component of projects.
- Component of Project
- These are the main components of the project.
- MCP23008 I/O Port Expander.
- A few 220O resistors.
- A few LEDs.
- Arduino microcontroller.
- Let's now we explain our projects with detail.
- In this circuit with each input and output pin, we connect a 220O resistor and an LED.
-
For input supply, we have connected +5V to Vdd and Vss to GND.
-
Now, connect pin no 1 of the MCP23008, which is SCL to analog pin no 5 of Arduino. This provides clock synchrony between Arduino and the I/O port expander chip.
-
After this, we have connected pin no 2 of MCP23008, which is SDA to analog pin no 4 of Arduino. This connection allows data transfer between the Arduino and the I/O port expander chip.
-
In this project there is no use of interrupts pin, so leave INT pin unconnected.
-
We are not using the RESET pin, we connect it to +5V. If you want to use it, you just connect it with digital pin no the Arduino. If you want to reset all outputs than you draw this pin low in cade.
-
After that, we will connect address pin A0, A1, and A2, to ground. It makes the address of these 3 pins 000.
- For better understanding Lets see the picture.
Applications of MCP23008
- As, we know this microcontroller works on both I2C and SPI protocol, due to this feature it is used in some projects and devices which use both protocols.
So, friends, that was all about MCP23008, if you have any question about it please ask in comments, I will solve your problems. Thanks for reading. Take care until the next tutorial.
Introduction to MAX30100
Hello friends, I hope you all are doing great. In today's tutorial, we are gonna have a look at a detailed Introduction to MAX30100. MAX30100 is a heart pulse rate monitor sensor. This sensor consists of two Light Emitting Diodes (LEDs), (one emits infrared light and the other emits red light) modifiable optics, low noise signal processor that detects heart pulse rate signal. Its operating voltage is from 1.8v to 3.3v.
The MAX30100 is used in different industrial and medical equipment such as fitness measurement devices, medical devices, and different wearable instruments. In today's post, we will have a look at its working, pinout, protocol, features, etc. I will also share some links where I have interfaced it with other microcontrollers. If you have any questions about it please ask in the comments, and I will resolve your problems. So, let's get started with a basic Introduction to MAX30100.
Where To Buy? |
---|
No. | Components | Distributor | Link To Buy |
1 | MAX30100 | Amazon | Buy Now |
Introduction to MAX30100
- MAX30100 is a heart pulse rate monitor sensor. This sensor consists of two Light Emitting Diodes (LEDs), (one emits infrared light and the other emits red light) modifiable optics, low noise signal processor that detects heart pulse rate signal.
- This module can be configured by software registers, and its output data is stored in sixteen FIFOs on this module.
- This sensor communicates with the other microcontroller by the I2C interface. The pulse measurement system in this module has Ambient light cancellation, 16-bit ADC, and a time filter.
- It has an I2C digital interface to communicate with a host microcontroller. MAX30100 has ambient light cancellation, 16-bit ADC and a time filter.
- This module uses low power which makes it useable for battery-operated systems. It operates on the voltage range of 1.8 to 3.3V.
- As earlier we discussed that it has two Light Emitting Diodes, one emits red light with a wavelength of (650nm) and the other emits infrared with a wavelength of (950nm).
- As this device is used for measurement of heart pulse rate and oxygen concentration in blood, for these measurements wear this sensor on your finger or earlobe it can also put any part of the body which is not thick.
- When you wear it on your finger for measurement both infrared and red light pass through the tissues of a finger, absorption these lights can be measured by a photodiode.
- Depending on the quantity of oxygen which you have in your blood the ratio of absorbed red light and infrared light will be different.
- By this ratio, we can easily calculate the oxygen level in your blood hemoglobin.
- Now we discuss the Pinout of MAX30100.
MAX30100 Pinout
- These are the main pinouts of MAX30100.
Pin# |
Type |
Parameters |
Pin#1, 7, 8, 14 |
N.C |
These pinouts are not used for any purpose. All these are open pinouts. |
Pin#2 |
SCL |
This pin is used for I2C clock for input. |
Pin#3 |
SDA |
This is I2C bidirectional data sending pinout. |
Pin#4 |
PGND |
This is pin is used for power ground of drivers of light emitting diodes. |
Pin#5 |
IR_DRV |
This pin is used for cathode of infrared led to connect with the LED drivers point. You can |
Pin#6 |
R_DRV |
This pin is for the cathode of red LE to connect with its driver point. This can also be suspended in a circuit. |
Pin#9 |
R_LED+ |
This pin is for red led to connect with the supply voltage. By this pin, it is connected with the infrared led. |
Pin#10 |
IR_LED+ |
This pin helps to connect the anode of infrared led to the input voltage. It is connected with the red led by internally. |
Pin#11 |
Vdd |
This is input supply pinout for this module, you can connect this with the ground for better performance. |
Pin#12 |
GND |
It is an analog Ground pin. |
Pin#13 |
INT |
It is Active-Low break off pinout. |
For better understanding lets see the pinout diagram.
Features of MAX30100
- These are some features of MAX30100.
- This sensor is available in the simplest circuitry for heartbeat measurements.
- This module consists of two led infrared and red, a photodiode for light sensing, and, has an analog front end.
- The dimensions of this module are 5.6mm x 2.8mm x 1.2mm with the fourteen pinouts which are available in optically improved closed packages.
- It provides low power battery solutions for handheld electronic devices. We can program It in an easy way and suitable for low power components.
- Its high signal to noise ratio (SNR) gives high motion production flexibility.
- This sensor provides the confined light annulment, higher rate capacity, and fast-moving output data.
MAX30100 Arduino Interfacing
- Now we discuss its Arduino interfacing by giving an example of a project, which described below. Let's discuss this project with detail.
Project Component
- These are components which we will use for this project.
- Arduino Nano.
- Small Breadboard.
- Wires.
- The Bluetooth Module HC-06.
- Sensor MAX30100.
- Light Emitting Diode (LED).
- Two resistors of 4.7k Ohm.
- First of all, we connect all these components with each other for working of MAX30100, given diagram shows us a better understanding of connections this circuit.
- First connect all pinouts of MAX30100 with the wires, connect female part of a jumper with sensor and left male part open for Arduino interfacing. For the wiring connection, you can see a given picture.
- After connecting MAX30100 with wires and jumpers we will also connect HC-06 with wires. Let's discuss this process.
- All data received by this Bluetooth device we send to Arduino by serial communication.
- This Bluetooth mode is like the Bluetooth which sends data to ten meters range. The HC-06 works like a slave device, which means it allows other devices to connect to make the connection with it.
- This Bluetooth module has four pinouts which are supply pin (Vcc), ground (GND), receiver (RX) and transmitter (TX).
- After all these connections we will set all these components on a breadboard and connect them with each other.
- Let's discuss these connections step by step with detail.
- First step: Connect the Arduino with the breadboard.
- Second step: After interfacing of Arduino on a breadboard, connect the Bluetooth device with Arduino in a given sequence of wires.
- TX1 pin of Arduino connects with the Bluetooth pin RX.
- Connect RX0 pinout of Arduino with the TX pin of the Bluetooth module.
- Connect the ground of HC-o6 with the ground Arduino.
- Connect Vcc pin of Bluetooth with the Arduino 5V pinout.
- Third step: This step we connect MAX30100 with Arduino. Connection discusses incoming lines.
- Connect Vin pinout of MAX30100 sensor with the Arduino pinout of five volts. (As we did in with the Bluetooth).
- Connect A5 pinout of Arduino with the SDA pin of the MAX30100.
- A2 pinout of Arduino connects with the INT pin of MAX30100.
- Ground pinout of MAX30100 connects with the ground pin of Arduino.
- After this assemble one resistor in the breadboard and connect one end of the resistor with 5V pinout and another point of the resistor with A5 pinout.
- Take another resistor and connect it with the 5v pin and A5 pinout.
- Fourth step: Afterall this interfacing we will connect an led to show reading s of the sensor.
- First, connect the small point of light emitting diode with the ground pin and connect the other part of the light emitting diode with the D2 pinout.
Applications of MAX30100
- These are some applications of MAX30100.
- It is used in handheld devices.
- It is used in devices related to fitness measurement.
- It use as main componnet in medical measurment devices.
So, that was all about MAX30100, if you want to know something more about it as in comments I will explain to you more about it. Take care until the next tutorial.
Introduction to ESP-01
I hope you all are doing great. In today's tutorial, we are gonna have a look at detailed
Introduction to ESP-01. ESP-01 is an inexpensive, small-sized WiFi module, which consists of TCP/IP stack along with a built-in microcontroller. So, we can directly program this small chip and can bring WiFi capability in our
Embedded projects. When first time this ship came into the market in August 2014, it got a lot of attention by users. The main reason for it to seek attention is that this module allows the microcontroller to connect with a WiFi available (and programmed to connect) and it follows
Hayes Style Commands and develops a TCP/IP network.
ESP-01 chip integrates an antenna, RF balun, power amplifier, filters, and power arrangement module. ESP-01 is used in industry and many projects as a WiFi module.
In today's post, we will have a look at its circuit diagram, working, pinout, etc. I will also share some links where I have interfaced it with other microcontrollers. If you have any question about it please ask in comments I will resolve your problems. So, let's get started with a basic Introduction to ESP-01.
Introduction to ESP-01
- ESP-01 is a WiFi module which allows Microcontroller easily access to WiFi network. It is one of the primarily incorporated WiFi chip in the industry, it assimilates the antenna switches, Radiofrequency balun, power amplifier, low noise receiver amplifier, and power executive elements.
Download ESP01 Datasheet
- This module requires minimum internal circuitry, its entire solution, including the front end module is designed to occupy minimum PCB area.
- ESP-01 module is termed as a system on chip (SOC) because it acts as a standalone Microcontroller itself, so we don't need to interface it with any other microcontroller (i.e. Arduino, Atmel, PIC Microcontroller, etc.) in order to use its I/O Pins.
- ESP-01 also integrates an advanced version of Tensilica's L-106 diamond series 32 SRAM with the WiFi functionalities. It also integrated with specific devices through its GPIOs and code for such applications are provided in SDK.
Now, Let's discuss ESP-01 pinout with a detailed description.
ESP-01 Pinout & Description
- The pinout of ESP-01 is described below with a detailed description.
Pin# |
Type |
Parameters |
Pin#1 |
VCC |
This pin is used for input power supply 3.0 to 3.6V. |
Pin#2 |
GND |
This pin is used for Ground. |
Pin#3 |
RESET |
This pin is used for the external reset signal (Low voltage level: Active). |
Pin#4 |
ADC(TOUT) |
This pin is analog to digital converter. |
Pin#5 |
CH_PD |
It is Chip Enable. High: On, the chip works properly; Low: Off, small current. |
Pin#6 |
GPIO0(FLASH) |
It is a general purpose I/O, If low while reset/power on takes chip into serial programming mode. |
Pin#7 |
GPIO1(TX) |
It is a general purpose I/O and Serial TXd. |
Pin#8 |
GPIO3(RX) |
It is a general purpose I/O and Serial RXd. |
Pin#9 |
GPIO4 |
It is a general purpose I/O. |
Let's see the pinout diagram.
Now, we discuss the features of ESP-01.
Features of ESP-01
- These are the main features of ESP-01. Which are described below.
- It is a low power 32-bit microcontroller unit.
- It uses TCP/IP protocol for transmission.
- ESP-01 consists of integrated switch, balun, power amplifier, LNA and matching network.
- It works on 802.11 b/g/n WiFi with a frequency of 2.4 GHz and WPA (Wi-Fi Protected Access) or WPA2.
- It also consists of 10 bit ADC 2.0, (H) SPI, UART, I2C, I2S, IR remort control, PWM and GPIO.
- Its deep sleep power is less than 10uA and Power down leakage current is less than 5uA.
- Its wake up and transmit packets is less than 2ms.
- Its stand by power consumption is < 1.0mW (DTIM3).
- Its output power is +20 dBmin 802.11b mode.
- Its operating temperature range is -40C to 125C.
- This module is FCC, TELEC, CE, WiFi Alliance, and SRRC certified.
Now, we discuss Its Arduino interfacing.
ESP-01 Arduino Interfacing
The project of Arduino with ESP-01 which we are going to explain in the next
few lines will explain how we can read time, date, temperature and humidity from the internet using an API with ESP-01. Then send these values to an Arduino and show these values on the LCD screen.
- Components of Project
- Arduino Board i.e. Arduino UNO.
- ESP-01 Module.
- 16×2 or 20x4 simple LCD.
- Explanation of This Project
- For further information, let's see a circuit diagram.
Memory of ESP-01
- There are two types of memories which is integrated into the ESP -01 modules. First is internal SRAM and ROM, second is External SPI flash. Let's discuss them with detail.
- Internal SRAM and ROM
- ESP-01 is integrated with memory controller including SRAM and ROM. A microcontroller can access to memory unit by iBus, dBus, and AHB interfaces.
- External SPI Flash
- ESP-01 module can be integrated with a one MB external SPI flash to store programme. If larger sized storage is required SPI flash with a larger size will be preferred. 16 MB memory capacity can be supported by this external flash.
Applications of ESP-01
- ESP-01 is wifi module which can be used in different industrial and commercial projects for sending and receiving data.
So, that was about ESp-01, if you have any question please ask in comments. I will resolve your problems. Thanks for reading. Take care...
Introduction to RN4020
Hello friends, I hope you all are doing great. In today’s tutorial, we are gonna have a look at detailed
Introduction to RN4020. RN4020 is a completely licensed Bluetooth category 4.1 low energy consuming unit. This module is surfaced with the Bluetooth which is organized by Unpretentious ASCII instructions by UART interfacing. It also comprises all Bluetooth SIG sketches and (MLDP) Microchip low Energy data for customized data.
The scripted features can be secondhand to allow unconnected process without any Microcontroller or mainframe computer. It can be controlled from a distant position by other modules with the protected assembly and it can be reorganized by means of UART interfacing or by air. In today’s post, we will have a look at its casing, pins, structure, applications, etc. I will also share some links where I have interfaced it with other microcontrollers. You can also get further information about it in comments, I will guide you further about it. So, let’s get started with a basic
Introduction to RN4020.
Introduction to RN4020
- RN4020 is a completely licensed Bluetooth category 4.1 low energy consuming unit. This module is surfaced with the Bluetooth which is organized by Unpretentious ASCII instructions by UART interfacing.
- This unit incorporates RF, a base-band regulator, and an API (application program interface) processor, which makes it a low energy user Bluetooth module.
- It has an inherent high-performance PCB antenna which is modified for elongated assortment, normally over 100 meters distance.
- Its compressed dimensions allow the comfort of incorporation in size- controlled applications. It is used in any less expensive microcontroller for intellectual Bluetooth low energy consuming applications.
- For unpretentious sensor use, its interior scripting abilities allow straightforward functions to be applied without the need for exterior host Microcontrollers or software development tools.
- It provisions 13 communal sketches and 18 communal amenities, which are implemented by Bluetooth Special Interest Group (SIG). For all sustained contours and facilities, RN4020 could be organized to act as waitperson and customer roles at the equivalent period.
- Besides, RN4020 provisions Microchip sequestered contour Microchip Low Power Data Profile (MLDP) that put on Serial Port Profile (SPP), which is well-defined in Bluetooth Definitive and allows data tributary between two expedients.
Pinout of RN4020
- These are the main pinout of RN4020 which are described below.
Pin# |
Type |
Parameters |
Pin#1 |
GND |
It is ground pinout. |
Pin#2 |
AIO2 |
It is analog programmable bi directional input output pinout. |
Pin#3 |
AIO1 |
It is analog programmable bi directional input output pinout. |
Pin#4 |
AIO0 |
It is analog programmable bi directional input output pinout. |
Pin#5 |
UART TX |
It is a UART Transmitter (TX) pinout. |
Pin#6 |
UART RX |
It is a UART Receiver (RX) pin. |
Pin#7 |
WAKE_SW |
It is bottomless Snooze Awaken when it becomes active it rouse module from Unfathomable Snooze. |
Pin#8 |
CMD/MLDP |
It works in command and MLDP mode, in command mode, UART data send to the command translator. During the MLDP method, UART data is sent to MLDP Bluetooth UART LED contacts. |
Pin#9 |
GND |
It is a ground pin. |
Pin#10 |
CONNECTION
LED
PIO[1]
SCK
PWM1 |
It is an evasion condition output.
When it is in the energetic condition it shows that the device is linked with the distant expedient. When it is not energetic it displays there is no association with another expedient. |
Pin#11 |
MLDP_EV
PIO[2]
CS
PWM2 |
It is for MLDP data indication. If it is in the high state which means that data has acknowledged, in a low state, there is no data. |
Pin#12 |
WS
PIO[3]
MOSI
PWM3 |
It is output for movement indication. If it in energetic state component is working properly if not the device is not working. |
Pin#13 |
PIO[4]
MISO |
It is MISO for Diagnostics and Workshop Regulation if a pin 17 avowed. |
Pin#14 |
CTS
PIO[5] |
It is earmarked for CTS if hardware movement controller is permitted on the UART. |
Pin#15 |
WAKE_HW |
It is hardware wakeup from the latent condition. Set the Pin (15) high state to module eliminates from the inactive condition. |
Pin#16 |
GND |
It is a ground pin. |
Pin#17 |
SPI/PIO |
SPI/PIO for pinouts 10-13, active. |
Pin#18 |
RTS
PIO[6] |
It Earmarked for RTS if hardware movement controller on UART is empowered. If the data communication to RN4020 requisite is stopped, declare RTS to high. RTS pin functions self-sufficiently from the CTS (pin 14). |
Pin#19 |
PWM4
PIO[7] |
It is a standby PIO. |
Pin#20 |
RSVD |
It is DMOS comprehensive Bridge 2 Yield A pin |
Pin#21 |
SDA |
It is SDA Statistics contour of the I2C interfacing. The RN4020 constantly performances as the I2C Dominant. |
Pin#22 |
SCL |
It is I2C Clock. |
Pin#23 |
VDD |
It is a power supply. |
Pin#24 |
GND |
It is ground pinout. |
Features of RN4020
- These are some features of RN4020.
- It is entirely specialized Bluetooth form 4.1 component.
- It is on-panel Bluetooth Squat Energy 4.1 heap.
- On this module, ASCII expertise interfaced API over UART.
- This module has DFU above UART or Above the air.
- For sequential transmission of data, it has MLDP.
- This module sends and receive data to distant areas and can control them.
- It hs 64 KB interior flash memory.
- The dimensions of this module are 11.5 x 19.5 x 2.5 mm.
- This module has SMT wads for tranquil and unswerving PCB escalating.
- It is naturally sociable, RoHS amenable.
- It is certified by FCC, IC, CE, QDID.
RN4020 Power Modes
Idle:
This situation passes in on power-up when WAKE_SW in one state and signifies the condition where Command style is energetic.
Active RF:
This power state comes in upon any compulsory RF action (TX/RX) through publicity, detection, coupling, assembly, etc.
Deep Sleep:
This is the less-power modes reinforced by the RN4020. The main topographies of this state-run is that publicizing packages are still airing.
To place the RN4020 in Deep Sleep method after Idle state you should follow some rules.
- Put the WAKW-HW pin in low condition.
- Wrench the WAKE-SW pin in zero condition.
Dormant:
It is the last power mode which reinforced by the RN4020.
To place the RN4020 in this mode you should follow some rules.
- WAKE-HW pin should be in a low state.
- After this put o command.
- Then instantaneously wrench the WAKE_SW pin to low state.
Applications of RN4020
- These are some applications of RN4020.
- It is used in medical equipment such as Glucose measurement meter, heart pulse measurement.
- It used to check aptness of different sports such as cycling computing.
- It used to tag and stalking of assets.
- It used for Immediacy publicity.
- It used to control distant devices.
- It is used for entrenched Expedient governor.
- It is used for AV comforts and game supervisors.
- It used in handheld Smart devices and Equipment
- It used in home automation.
So, friends, it was all about RN4020, if you have any query about it ask in comments. Thanks for reading.
Introduction to MPR121
Hello friends, I hope you all are doing great. In today's tutorial, we are gonna have a look at detailed
Introduction to MPR121. MPR121 is a touch sensor controller, its working is like the capacitor's working principle. This module has twelve electrodes points, it communicates via I2C protocol. When any objects come closer to an electrode point, we can observe the presence of an object by variation in capacitance of an electrode. It's working voltage should be between 2.5 to 3.6 VDC.
MPR121 is used in different industrial projects and electronic devices such as mobile phone and remote control systems. In today's post, we will have a look at its working, pinout, protocol, applications, etc. I will also share some links where I have interfaced it with other microcontrollers. If you have any question about it please ask it in comments I will resolve your problems.
So, let's get started with a basic Introduction to MRP121.
Introduction to MPR121
- MPR121 is a touch sensor controller, its working is like the capacitor's working principle. This module has twelve electrodes points, it communicates via I2C protocol.
- This module has the capability to drive LEDs and GPIO on 4 to 11 electrodes pins, this feature provides freedom to set-up different projects.
- This sensor consumes very low current, it draws only around 29uA current after 16 milliseconds.
- Instead of traditional buttons, this board has four holes which used as an input system.
- The level changer of 3.3v to 5v is surfaced on this chip which provides the facility of 3.3v and 5v I2C interfacing with other microcontrollers.
- On the back side of this module, there are four jumpers which are closed to each other by default.
- The jumper of address pin connects the Add pin to a ground of chip, which indicates that default I2C address of this chip is 0x5A.
- If you want to change the address of the MPR121 chip, first of all, you should open the jumper. Jumpers are also connected with SCL, SDA and interrupt pin.
- The VERG pinout of this module is connected with a ground by a 0.1uF capacitor, which indicates that you can not operate the MPR12 at low supply voltage mode (1.71-2.75VDC) until you modify the board.
- The dimensions of this module are 3cm x 2cm.
Now, we discuss the pinouts of MPR121.
MPR121 Pinout & Description
There are main twenty pinouts of MPR121 which are described below.
Pin# |
Type |
Parameters |
Pin#1 |
IRQ |
It is Open Collector Interrupt Output Pin, active low. |
Pin#2 |
SCL |
It is I2C Clock pinout. |
Pin#3 |
SDA |
It is I2C Data pin. |
Pin#4 |
ADDR |
It is I2C Address Select Input Pin. Connect the ADDR pin to the VSS, VDD, SDA or SCL line, the resulting I2C addresses
are 0x5A, 0x5B, 0x5C and 0x5D respectively. |
Pin#5 |
VREG |
It is Internal Regulator Node. Connect a 0.1 µF bypass cap to VSS. |
Pin#6 |
VSS |
Ground. |
Pin#7 |
REXT |
It is an External Resistor. Connect a 75 kO 1% resistor to VSS to set internal reference current. |
Pin#8 |
ELE0 |
It is Electrode 0 pinout. |
Pin#9 |
ELE1 |
It is Electrode 1 pinout |
Pin#10 |
ELE2 |
It is Electrode 2 pinout. |
Pin#11 |
ELE3 |
It is Electrode 3 pinout. |
Pin#12 |
ELE4 |
It is Electrode 4 pinout. |
Pin#13 |
ELE5 |
It is Electrode 5 pinout. |
Pin#14 |
ELE6 |
It is Electrode 6 pinout. |
Pin#15 |
ELE7 |
It is Electrode 7 pinout. |
Pin#16 |
ELE8 |
It is Electrode 8 pinout. |
Pin#17 |
ELE9 |
It is Electrode 9 pinout. |
Pin#18 |
ELE10 |
It is Electrode 10 pinout. |
Pin#19 |
ELE11 |
It is Electrode 11 pinout. |
Pin#20 |
Vdd |
Connect a 0.1 µF bypass cap to VSS. |
For further understanding let's see the pinout diagram.
Features of MPR121
- These are some features of MPR121 which are described below.
- Its operating voltage is 1.71V to 3.6V
- Its operating current is 29uA at 16ms sampling interval.
- Its scan stop mode current is 3uA.
- There are twelve electrodes sensing inputs on this module in which 8 are multifunctional for LED driving and GPIO.
- For electrode inputs, it has integrated auto calibration.
- It can configure charge current and charge time for each electrode.
- It's every electrode has separate touch and release trip thresholds, which provides hysteresis and release trip thresholds for each electrode.
- It has an I2C interface, which has IRQ interrupt output to informs electrodes for condition changes.
- The dimensions of 3 mm x 3 mm x 0.65 mm 20 with the lead QFN package.
- It's operating temperature is range is -40°C to +85° C.
MPR121 Capacitance Measurement & Touching Sensing
- The capacitance measurement part of MPR121 is consists of a sensing electrode pad which is connected with the sensing inputs of MPR121. MPR121 used the I2C bus and interrupt output for communication with the processor of a host device.
- There are 13 sensing channels, in which 12 channels have physical inputs electrodes and one multiplexer, and the 13th channel is used for proximity detection.
- From a given diagram, we can see that multiplexer is fixed at the front end, due to this all thirteen channel can be measured in sequence within time. After capacitance measurement, this sensor gets filtered noise by which we can observe touch or release button status.
- Except for the measurement of touch sensing, MPR121 is also used in industries for capacitive measurement applications.
- You can send up to ten-bit data ( which indicates a high level of the noise elimination) for capacitance measurement outputs like measurement of water level, displacement measurement, and change of medium content measurement.
- The measurement of capacitance on each channel is the capacitance to the ground which is the sum of background parasitic capacitance to ground (Cb) and a finger touched induced capacitance (Cx).
- The ground is in common ground when the module is not in an active state when the device is connected with batteries this ground is referred to MPR121 ground.
- MPR121 used DC current for measurement of capacitance. For measurement of capacitance every channel first charged and then discharged to ground, this process you can see in a given diagram.
- We can read values of all channels one by one when one channel is charged or discharged, other channels are connected to ground.
- A quantity of charge can be varied by changing the value of current and charge. After charging of electrode, the value of peak voltage can be measured by 10-bit ADC. These output voltages are inversely proportional to the value of capacitance on all the channels.
?? =??/??
Applications MPR121
- These are some applications of MPR121.
- It is used in PC Peripherals.
- It is used in MP3 Players.
- It is used in Remote Controls.
- It used in Mobile Phones.
- It is used for Lighting Controls.
So friends that were all about MPR121, if you have any questions about please ask in comments. Take care until the next tutorial.