"Although the concept of smart home is vague, it is deeply rooted in the hearts of the people. I don't know when the competition for smart home entrance has evolved into beach landing, and it has become more and more intense as time goes on. Although various manufacturers make every effort to constantly push through the old and bring forth the new, but no product can be as popular as the concept of smart home, There are a variety of smart home products in the market. TV, remote control, LED lights, sockets and routers can usher in a new change as smart home products.
Maybe you still have the impression that not long ago, Aiban disassembled the imagic intelligent LED lamp based on low-power Bluetooth 4.0. The colorful lighting effect is really dazzling, but what happened later? The general impression left to us is just the information of "not very practical, only for entertainment". Therefore, although smart home products are novel and fashionable, only products that meet the actual needs of life and provide practical use can meet the tastes of the public and be recognized by everyone. In view of this, Next, we will bring you a practical smart home product - Magic Teng intelligent LED lighting kit based on ZigBee technology, as shown in the figure below.
Magic Teng intelligent lighting suit
The magic totem intelligent lighting package adopts a simple ox cardboard packaging box. After opening, it will be found that there are five small boxes inside, which are Nova lamp *2, arbitrary switch *2 and gateway *1, 5V output adapter *1 which supplies power to the gateway, a simple description page and 3M adhesive, as shown in the following figure. In particular, it should be noted that each small packaging box has a unique QR code of the equipment in the box, which is very important when configuring the mobile app.
Magic Teng intelligent lighting package accessories
The communication control interaction principle of magic Teng intelligent lighting suite is based on ZigBee technology in ATMEL This technology has also been introduced in the evaluation of atmega256rfr2 xplained Pro development board. ZigBee is based on IEEE802.15.4 standard, but it is an extension of IEEE802.15.4 standard. IEEE802.15.4 only deals with low-level MAC layer and application layer, while ZigBee standardizes its network layer protocol and API, as shown in the figure below
ZigBee standard
Physical layer: the bottom layer of the protocol, which undertakes the task of direct interaction with the outside world and controls the work of RF transceiver
MAC layer: it is responsible for the establishment and maintenance of wireless data link between devices and the data transmission and reception of end confirmation mode
Network layer: establish a new network to ensure data transmission, encrypt data and ensure data integrity
Application layer: the application support layer enables communication between multiple devices according to services and requirements, and can be developed independently according to user requirements
ZigBee works in the global ism unlicensed 2.4G band. It is a wireless communication technology with low rate (20 ~ 250kb / s) and short distance (10 ~ 100m. Increasing RF transmission power can increase the communication distance to more than 1km). However, it is superior to low cost, low delay (15ms ~ 30ms), low power consumption and strong networking ability. It can support 65000 nodes and a variety of network topologies, One or two can also be seen from the two groups of LED lights, two groups of switches and a gateway equipped with magic Teng intelligent lighting package( (next page)
Recommended development board
Microchip 433MHz wireless remote control development kit secure wireless remote control development kit based on 433MHz
Ti cc1101 evaluation module includes two cc1101 868-915mhz evaluation modules and antennas
Magic Teng intelligent lighting package equipment
Magic Teng calls its own LED lamp Nova lamp. Of course, this is just a name, which means "new" and "bright", not a special lamp. Nova lamp adopts the same design structure as imagic LED lamp (see the figure below). The standard E27 spiral buckle is suitable for most families. Nova lamp has a nominal rated power of 6W and can be used in 100V ~ 240V AC environment. This wide voltage power supply design is very good, even if it is used abroad. What makes the author feel most is that Nova lamp has no spare power in heat dissipation design. The heat dissipation design of aluminum grid can minimize the heat generated when LED works. Safety first. Although it feels very bad to hold Nova lamp, who will have nothing to do with holding a bulb?
Nova lamp appearance
A simple switch is also creatively named as the heart switch by magic Teng. It is obvious that the application of this switch in life is quite flexible. 3M adhesive tape is attached with the switch, which can place the switch anywhere you want, which is really easy to worry about.
The heart switch is designed as a round square (see the figure below). It is the size of an adult's palm. The frosted design is adopted on the front. It feels great. However, the feedback of the key is clear only when the middle of the switch is pressed down. The internal design and treatment of the key should be rough.
Heart switch
The teleport gateway (see the figure below) is equipped with a power input port, an Ethernet port and a status indicator. What is this used for? I believe those who have not been exposed to ZigBee technology will have such doubts. This is to go back to the characteristics of ZigBee technology. When it comes to ZigBee, its biggest and most obvious advantage is its unique and powerful networking ability, which can support 65000 nodes. How do you manage these nodes? This leads to the concept of a network coordinator, which is responsible for initiating and establishing the management of the whole network. In the magic Teng intelligent lighting package, the teleport gateway plays such a role by connecting it to the Internet and managing the switch and Nova light through the mobile app.
Teleport gateway
The three main devices of magic Teng intelligent lighting package include the above Nova lamp, heart switch and teleport gateway, and these three devices also form a small ZigBee network. Then we will actually experience the use of intelligent LED lamps based on ZigBee technology( (next page)
Recommended development board
Ti msp-expcc430rf4 is a complete development platform for cc430 devices in ultra-low power microcontroller MSP430 series
Silicon lab si1120ek Evaluation Kit is used for the evaluation platform of infrared proximity and ambient light sensor si1120
Use of magic Teng intelligent lighting package
I won't say much about the preparatory work. As an engineer or engineering man, it's not easy to change a light bulb and install an app software. Just note that when configuring the app, the teleport network must be connected to the online power. The magic Teng intelligent lighting package app supports Android and IOS systems at the same time, without discrimination.
Configure gateway Teleport
It has to be said that mobile Internet has changed our usual living habits. Those boring sequence codes and other codes can now be realized by scanning QR codes. Download app software to scan QR codes, and add devices to scan QR codes in one step.
Add networking device
After all devices are added to the app, the Nova light can be controlled through the app on the mobile phone, and the alarm switch light, light switch and light effect in profile mode can be set.
Set alarm clock and profile
In addition to setting the specific lighting effect of Nova light in the profile mode, you can also long press the Nova light icon on the app to directly control the light (see the figure below), which is very user-friendly. Although it is all about the interaction between the mobile phone and Nova light, the implementation process still needs to be through the teleport gateway, that is, you power off the teleport gateway, Mobile app can't directly control Nova light.
Set the lighting effect and set the heart switch
Of course, if you set the heart switch, it's another matter. As shown in the last screenshot of the app above, long press the heart switch key, and a setting window for setting the heart switch to control Nova light will pop up on the mobile phone app. At this time, check the light you want to control with the heart switch or control it at the same time. You can also set parameters such as color temperature and brightness. It's very simple. The following figure shows the effect of controlling Nova light through the heart switch.
Follow the heart switch to control Nova light switch
Once the heart switch is set, as long as the setting is not modified, it can be controlled freely like other appliances in the home through the heart switch in the future. There is no need to open annoying app and connect to the Internet. It is so convenient, which is a very ideal solution for families who want to expand the light coverage but have been decorated.
For the magic Teng intelligent lighting package based on ZigBee technology, it is simple and convenient to use and easy to set up in real life. However, if this is only the case, it is only a successful commodity, which will not be praised by the author. However, magic Teng intelligent obviously goes further and exceeds your expectations. If you are an electronic engineer, you want to play and learn through magic Teng intelligent lighting package, Well, it won't let you down( (next page)
Recommended development board
Silicon lab si1120ek Evaluation Kit is used for the evaluation platform of infrared proximity and ambient light sensor si1120
Stm32f407 arm prototype development board, equipped with LCD and car camera, 100M Ethernet port
Application programming of magic Teng intelligent lighting package
Magic Teng intelligent lighting package also comes with an exciting service for Engineers - Magic Teng application programming interface. Engineers can use this interface to program and control magic Teng's smart devices. They can also integrate the devices of other suppliers to achieve overall home automation. There is a label of application programming interface on magic Teng's official website. Click in to program and control the magic Teng intelligent lighting package (you need to log in). Although it is still in beta 1, the basic functions can be used normally. The following figure shows the open API interface functions.
Interfaces and functions of magic Teng intelligent lighting package
Each interface function has corresponding model structure code and additional comments. Even if you don't understand the code, you can understand it well after a little study. It is very practical for engineers who want to learn. The author tried the functions in the figure below. The functions that can be realized on the mobile phone can be realized in this application programming system, Moreover, it can also realize functions that cannot be realized on the mobile phone, such as deleting the device in the existing account and binding the device with another account. The author will show the more detailed content of this set of application programming specification through practical operation.
First, select to obtain all the device information on the current account. For ease of understanding, the following will be output in the annotated Chinese model
Get the device information on the current account
Remember the devices of these devices_ The identifier number, then turn on the interface function of deleting the device, and enter the Nova light you need to rebind other accounts or the device of your heart switch_ Identifier number deleted
Select the device to delete
After deleting the device, the system will regenerate a new QR code, and click to obtain the available QR code
Get the QR code that can be used
Remember the code of the QR code you can use and add it to the account you need to bind. It's done
Add QR code to the account you need to add
Although compared with other products we have seen, the operation of deleting and binding other accounts by magic Teng intelligent lighting package will be much more complex, this free learning opportunity is very rare for engineers who like to toss and learn, and it is much more interesting than the product itself.
Magic Teng intelligent lighting package has been successful in the product itself. Based on this, the open application programming interface captures the hearts of most engineers who like DIY, which puts forward new challenges for the closed smart home and is worthy of our expectation( (next page)
Recommended development board
Ti Bluetooth / 802.15.1 development tool -- cc2541emk
Cc2540 Mini development board, the attached "key card" circuit board can be used as ble peripherals
Disassembly of magic Teng intelligent lighting package
Disassemble Nova lamp
After talking and playing, there is no doubt that disassembly is the best way to have a deeper understanding of magic Teng intelligent lighting package. I've had the experience of dismantling imagic intelligent LED lights. I'm full of confidence. Let's ask, it's not easy to disassemble another Nova lamp. As a result, it's tears to talk too much. No nonsense, just go to the figure above
LED array for Nova lights
Unscrewing the lampshade of Nova lamp, you can see the aluminum based PCB board of LED lamp. The internal LEDs are distributed in an array. There are 24 LEDs in total, and the cold and warm LEDs are side by side. This design can produce a very uniform luminous effect when adjusting the color temperature. The ZigBee antenna is designed in the center of the aluminum based PCB board. Although this prominent design affects the beauty, it is also a last resort. As a result, the internal space is limited, Second, it is easy to shield the signal inside the aluminum shell. If the antenna is built inside for beautiful design, it will inevitably affect the signal. Of course, those who have the ability can combine the antenna with the shell, just like the amazing feeling of antenna design when the iPhone 4 was just released. However, in China's hardware fast food culture, it is difficult to devote themselves to doing this, and to put it bluntly, for an LED light, It is not the job of domestic enterprises to spend a lot of time on beautiful antenna design.
It's a little far away. Looking back, we continue to see the disassembly of Nova lamp. The old rules can only be broken down by means of violence
Disassemble Nova lamp 1
The specific process will not be described in detail. Just look at the picture. When we first removed the internal structure, I believe everyone was as confused as the author. We actually used insulating and heat-conducting adhesive for pouring and sealing. This is no use for pure violence. However, we can only cut off the insulating and heat-conducting adhesive a little with a knife, and finally to extract the internal module from the aluminum heat dissipation shell, Directly break the LED aluminum based PCB directly, and the Nova lamp must be completely scrapped.
Disassemble Nova lamp 2
Fortunately, the effort paid off. Finally, the internal module came out after a long call. It looked a little mixed. There were not only insulating glue but also insulating tape on the module, as shown in the figure below.
Disassemble Nova lamp 3 - power module + main control communication board
After separation, it is found that the internal module is mainly composed of a main control communication board + a power module. The insulating tape is mainly used to isolate the devices on the two PCB boards from contacting each other. Let's see the scheme of the main control communication board together.
Main control communication board 1
STM32F103 series stm32f103cbt6 of STMicroelectronics is adopted as the microcontroller of the main control communication board, which is based on arm Cortex-M3 core, 72mhz main frequency, with flash memory, USB and can controllers, and integrates 7 timers, 2 ADCs and 9 communication interfaces (including I2C, SPI and UART interfaces). I believe you know a lot about STM32 microcontroller, After all, the frequency of occasions is also very high. For example, this STM32 microcontroller belongs to the same series of microcontrollers as the stm32f0 value line development board previously evaluated by aiban.com
Our other product: