Hardware Description

Share for us
Share on facebook
Share on twitter
Share on pinterest
Share on whatsapp


A photoresistor (see Figure 3.1) gets it resistance from the light. If it is dark, the sensor will read up in the millions of Ohms, but as light is shined at it, it will have a lower resistance. The sensor requires a voltage divider to get a correct signal.

Temperature & Humidity Sensor DHT11

The DHT11 sensor (see Figure 3.2) can detect temperature (C and F) & humidity. It has everything it requires built into it, so it will work very well with the SUNFOUNDER UNO. This sensor is used in conjunction with the DHT11 Library.

Gas Sensor MQ-2

MQ-2 gas sensor (see Figure 3.3) belongs to surface ion N type semiconductor, which is made of tin oxide semiconductor gas sensitive material. With the gas concentration rising, the sensor’s conductivity increases and its output resistance decrease. MQ-2 gas sensor has high sensitivity to natural gas, LPG and other smoke. You can read out gas concentration value with SUNFOUNDER MEGA2560 built-in ADC module according to the principle of voltage division.

Human Body Pyroelectric Infrared Sensor (PIR)

The PIR (see Figure 3.4) will detect changes in infrared radiation; thus, we can use it to detect motion, because the human body does not have a constant temperature. The PIR cannot sense movement unless there is this change in temperature. To use a PIR sensor, connect the signal of the PIR to a digital pin on the SUNFOUNDER MEGA2560. When the sensor detects people pass by, pin OUT will output 1, otherwise it will output 0.


RFID (see Figure 3.5) is the abbreviation of radio frequency identification, called radio frequency technology. We use RC522 as the chip of RFID module in this kit. RC522 is a highly integrated contactless R/W chip (13.56 MHz). The delivery module is fully integrated into the contactless communication methods and protocols (13.56 MHz) by using the principle of modulation and demodulation. In this kit tutorial, just call RFID library files to easily use RFID module.

Gas Pressure sensor BMP180

The BMP180 (see Figure 3.6) is designed to be connected directly to a microcontroller of a mobile device via the I2C bus. The pressure and temperature data has to be compensated by the calibration data of the E2PROM of the BMP180.

The BMP180 consists of a piezo-resistive sensor, an analog to digital converter and a control unit with E2PROM and a serial I2C interface. In this tutorial, we use Adafruit_BMP085_Unified and adafruit_sensor_maste libraries to read the value of BMP180.

RF Transceiver Chip NRF24L01

The NRF24L01 (see Figure 3.7) is a single-chip RF transceiver chip and works in 2.4 ~ 2.5 GHz ISM frequency band. The chip includes a fully integrated frequency synthesizer, power amplifier, crystal oscillator and the modulator. Operating parameters, such as transmitting power and working frequency can be done easily by three-line SPI port. With ultra low current consumption, it is only 10.5mA when the output power is -5dBm and only 18mA in receiving mode. It can easily achieve low power requirements in power off mode.

The NRF24L01 has four operating modes: transceiver mode, configuration mode, idle mode and power off mode. The operating mode of NRF24L01 is determined by three pins of PWR_UP, CE, and TX_EN.


W5100 (see Figure 3.8) is a versatile single-chip network interface chip with 10/100 Ethernet controller integrated internally. It is mainly used in highly integrated, high stable, high performance and low cost embedded system. W5100 enables you to connect to Internet without operation system. W5100 is compatible with IEEE802.3 10BASE-T and 802.3u 100BASE-TX.

W5100 integrates whole hardware and years of market proven TCP/IP protocol stack inside, Ethernet medium transport layer (MAC) and physical layer (PHY). Hardware TCP/IP protocol stack supports the TCP, UDP, IPV4, ICMP, ARP, IGMP and PPoE. These protocols have been validated for years in many fields. In addition, W5100 also internally integrates 16KB memory for data transmission. For W5100, you don’t need to consider the control of Ethernet, but only a simple port (Socket) programming.

W5100 has three interfaces, that is, direct parallel bus, indirect parallel bus and the SPI bus. W5100 is easy to connect with MCU, just like accessing external memory. Here we use Ethernet library to use W5100 more easily and conveniently.