Get tutorials Arduino Smart Home Kit V2.0 for Arduino

Hardware Description

Photoresistor Module

A photoresistor or light-dependent resistor (LDR) or photocell is a light-controlled variable resistor. The resistance of a photoresistor decreases with increasing incident light intensity; in other words, it exhibits photoconductivity. A photoresistor can be applied in light-sensitive detector circuits, and light- and dark-activated switching circuits.




The schematic diagram of the module is as follows:




Humiture Sensor DHT11

The digital temperature and humidity sensor DHT11 is a composite sensor that contains a calibrated digital signal output of temperature and humidity. The technology of a dedicated digital modules collection and the temperature and humidity sensing technology are applied to ensure that the product has high reliability and excellent long-term stability. 



The sensor includes a resistive sense of wet component and an NTC temperature measurement device, and is connected with a high-performance 8-bit microcontroller.




Only three pins are available for use: VCC, GND, and DATA. The communication process begins with the DATA line sending start signals to DHT11, and DHT11 receives the signals and returns an answer signal. Then the host receives the answer signal and begins to receive 40-bit humiture data (8-bit humidity integer + 8-bit humidity decimal + 8-bit temperature integer + 8-bit temperature decimal + 8-bit checksum). For more information, please refer to the datasheet of DHT11.

The schematic diagram of the module is as follows:



MQ-2 Gas Sensor

MQ-2 Gas Sensor is a sensor for flammable gas and smoke by detecting the concentration of combustible gas in the air. They are often used in gas detecting equipment for smoke and flammable gasses in household, industry or automobile.

MQ-2 gas sensor is a kind of surface ion type and N-type semiconductors, which uses tin oxide semiconductor gas sensitive material. When ambient temperature is in 200 ~ 300℃, tin oxide will adsorb oxygen in the air and form oxygen anion adsorption to decrease electron density in semiconductor so as to increase its resistance. When in contact with the smoke, if grain boundary barrier is modulated by the smoke and changed, it could cause surface conductivity change. So you can gain the information of the smoke existence, the higher the smoke concentration is, the greater the conductivity, thus the lower the output resistance is.





The schematic diagram of the module is as follows:



PIR is a kind of sensor that detects IR energy changes radiated by human body or animals in a non-contact form and transforms the changes into voltage signals and output.


Human Body Pyroelectric Infrared Sensor (PIR)



PIR is a kind of sensor that detects IR energy changes radiated by human body or animals in a non-contact form and transforms the changes into voltage signals and output.


PIR transforms the optical spectrum sensed into electrical signals. It can sense an optical spectrum whose wavelength is between 8 and 12um. All temperature objects emit infrared spectrums and different objects emit a spectrum of different wavelengths. The temperature of the human body is usually about 37℃. The wavelength of the spectrum it emits is about 10um. When the crystal inside senses heat, it will generate electric charges of the same quantity but opposite polarity at its two ends. Therefore, the sensor transforms the difference between the heat generated by human body and that by the environment into voltage signals.

The PIR sensor itself has two slots inside and each slot is made of some special material that is sensitive to IR. The lens used here are not really doing much and the two slots can 'see' out past some distance (basically the sensitivity of the sensor). When the sensor is idle, both slots detect the same amount of IR, which is the ambient amount radiated from the room or walls or outdoors. When a warm body like a human or animal passes by, it first intercepts one half of the PIR sensor, which causes a positive differential change between the two halves. When the warm body leaves the sensing area, the reverse happens, whereby the sensor generates a negative differential change. These change pulses are what is detected.


To use a PIR sensor, connect the signal of the PIR to the digital pin on the SunFounder Mega 2560. When the sensor detects people passing by, pin OUT will output 1; otherwise it will output 0. 





The radio frequency identification-(RFID) RC522 is a device that applies the radio frequency technology.

The RC522 is used 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, you can easily use the RFID module simply by calling the RFID library files.

Note: For this module, please use a 3.3V power supply, or it will be burnt.

Gas Pressure Sensor BMP180



The BMP180 is the function compatible successor of the BMP085, a new generation of high precision digital pressure sensors for consumer applications.


The ultra-low power, low voltage electronics of the BMP180 is optimized for use in mobile phones, PDAs, GPS navigation device and outdoor equipment. With a low altitude noise of merely 0.25m at fast conversion time, the BMP180 offers superior performance. The I2C interface allows for easy system integration with a microcontroller.


The BMP180 is based on piezo-resistive technology for EMC robustness, high accuracy and linearity as well as long term stability. In this tutorial, we use Adafruit_BMP085_Unified and adafruit_sensor_maste libraries to read values from BMP180.


Since BMP180 can only use 3.3V power supply, 662K is used. It is a 3.3V voltage regulator tube which can regulate the input voltage to 3.3V and then supply it to BMP180. The schematic diagram of the module is shown as below:



RF Transceiver Chip NRF24L01



NRF24L01 is a single chip transceiver working under general ISM frequency band 2.4-2.5GHz. The wireless transceiver includes frequency generator, enhanced SchockBurstTM mode controller, power amplifier, crystal amplifier, modulator and demodulator. The output power channel selection and protocol can be set by SPI interface. It has very low current consumption. Under the transmitting mode, its transmitting power is 6dBm and the current consumption is 9.0mA. Under the receiving mode, the current is 12.3mA. The consumption is even lower under the power down mode and standby mode.

The pin functions of NRF24L01 are as follows:







Ground (0V)



Power Supply (3.3V)



Mode Enablement, to activate the RX or TX mode



Chip Select



Serial Clock



Master Output, Slave Input



Master Input, Slave Output



Interrupt Request. Under wireless communication, MCU communicates with NRF24L01 by IRQ.


The shematic diagram of the module is shown as below:



Ethernet Shield W5100

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

W5100 integrates a market-proven full-hardware TCP/IP protocol stack inside, Ethernet media access control (MAC) layer and physical layer (PHY). The hardware TCP/IP protocol stack supports the following protocols: TCP, UDP, IPV4, ICMP, ARP, IGMP and PPoE, which have been tested by the market for years in many fields. In addition, W5100 also integrates 16KB memory for data transmission. For W5100, you don't need to consider the control of the Ethernet; what you need to do is socket programming.

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



4-Channel Relay Module

This is a 5V 4-channel relay interface board, and each channel needs a 15-20mA driver current. It can be used to control various appliances and equipment with large current. It is equiped with high-current relays that work under AC250V 10A or DC30V 10A. It has a standard interface that can be controlled directly by microcontroller (Arduino , 8051, AVR, PIC, DSP, ARM, ARM, MSP430, TTL logic, etc.).





Previous chapter: A Brief Introduction to DeviceBit Platform

Next chapter: Experiments

Apr 12 2017 at 01:42 am

© Developed by CommerceLab