2.4G wireless remote control transmission technology

Home-Clima LED Controller    2.4G wireless remote control transmission technology

In the field of 2.4G, everyone is more familiar with Bluetooth and wifi. Zigbee is more commonly used in the Internet of Things. In the professional field, low-cost chips such as nrf2401 and cc2500 are more commonly used. In terms of distance, 100mw at the same power and 17Dbm gain. Bluetooth is only 10 meters, wifi is about 20 meters. Zigbee does not exceed 50 meters. nrf2401, CC2500 will not exceed 100 meters.

 

In fact, why the current 2.4G transmission distance is so close? The most essential reason is 1: The public channel has insufficient bandwidth, and mobile phones, Bluetooth, and wifi all occupy this channel. 2: The power must meet 100mw, and the gain should be below 17dbm, otherwise it will not pass FCC and national standards. It also means that you cannot increase the distance by increasing the power. Someone will ask me back: I have seen someone on the Internet that can transmit 300km through wifi.

 

Yes, I also believe this is true. It's just that this is not comparable at all, and has no practical value. It's like you have to achieve the speed of an airplane on a bicycle, can you say it? My answer is absolutely yes. I need to add the most advanced power equipment, add the lightest housing material, add the best sensors, and put everything on the plane on the bike. I believe that the bicycle airplane that was made in the end is not called a bicycle at all. Maybe we can't even see the wheels of the bicycle in the end. What's more sad is that the cost of this product may be enough for someone else's aircraft factory to make a few such airplanes.

 

If your products are to be exported to the United States, some countries in Central Europe. There is no need to apply for 2.4G public channels. But the radiation power must be below 100mv. Some countries even require the RF transmission time gap to be more than 3ms. Otherwise, your product cannot be sold in these countries. There are no mandatory requirements for China, but after 2016, China will also issue relevant mandatory standards.

 

Isn’t that apart from the above two conditions, there is no other way to increase the transmission distance? The answer is of course yes. This article proposes a set of solutions to this problem. As for whether you can comprehend the mystery, it depends on your luck.

 

 

let's move to the topic. Is the plan good? First of all, we have to choose a good hardware platform, just like cooking. It is difficult for a clever woman to cook without rice. We want to make a good steak. Choosing the right beef is the key. In wireless transmission, it is very important to select the right RF chip.

 

How to choose a good chip? In fact, the most important indicator of wireless transmission is sensitivity and transmission rate. In theory, the higher the sensitivity, the farther the transmission distance will be. The faster the transmission rate, the longer the transmission distance. To put it simply, your sensitivity is higher. At the same distance, your very weak signal can be received by the other party, and then you have the conditions to convert the data to become effective information.

 

The transmission rate is fast. In other words, in the same time, with 1 second as a unit, suppose that chip A sends a total of 10 packets, of which only 2 packets can be successfully received at a distance of 500 meters. Not anymore. Assuming that chip B has a fast rate, it can send 20 packets within 1 second, and can successfully receive 4 packets at 500 meters under the same conditions. In this way, chip B can actually extend the distance a little bit further, maybe At 700 meters, it can successfully receive 2 packets. Then we say that the transmission distance of chip B is longer than that of chip A. If there is a chip with high sensitivity and fast speed, it will be perfect. But the reality is always so cruel, and you can't have both fish and bear paws. The first thing we consider when we make products is cost-effective.

 

This is more prominent in low-cost products. So we choose features in the same price, and we choose performance in the same function. In short, if you can make the best product with the lowest cost, then you are amazing. You can't just ask for the speed of a motorcycle at the price of a bicycle, and you can't use the price of a motorcycle to match a product like a car. You know the truth.

 

We can roughly draw a conclusion that sensitivity and speed are indeed related to transmission distance. Are we blindly pursuing these two indicators? the answer is negative. Everything is relative. Of course, we can initially choose the chip from these two points, but it is not yet a decisive factor. Just like a person’s academic qualifications, it does not indicate that his abilities are very high, but when you do not understand the person at the beginning, the academic qualifications can represent the person’s abilities to some extent. So how can I find a chip that is really suitable for my own solution? My method is actually very simple. First of all, we all use net. Search for information on changing the chip on net. If there is a lot of information about the chip. That means that this chip is used by many people. If you find a few representative products and test it yourself, you will probably know the advantages and disadvantages of this chip, and then you can evaluate whether this chip is suitable for your project. So NRF2401 and CC2500 above are not the ones I am looking for. Because these two ICs are made by a large number of people, they are already mature, and the farthest distance is that. If you are confident that you are smarter than anyone or have super abilities, you can spend time to achieve a distance of 200 meters to 1000. Meter. But I guess you will die miserably.

 

I still believe in the masses, so I think the NRF2401 and CC2500 I tested are already at its limit. I don't want to do unnecessary work. If a very mature product does not meet my requirements, I think it is indeed that way, but an immature product that few people are making does not meet my requirements, then there is still hope for this product. Do better. So I choose RF79L01, but this is bound to face a pain, that is, it has very little information, and you must be a major customer of the chip, the agent will be interested in you, will give you useful information, and will give you technology stand by. Therefore, ordinary individual users are very sad on this issue.

Now that the hardware platform has been selected, the next step is to painfully read the data sheet, draw schematics, PCB, write drivers, and test code. Many people who have not been in contact with or are new to wireless transmission will think of it more or less as too simple. Wireless has not been able to do well in the past few years. Let’s share my painful experience below.

 

The first step is to start simple, with two modules, one for sending and one for receiving. This is the foundation, and any upper layer is developed on this foundation. Basically, as long as the driver is written well, this step will succeed. But don't be happy too early, this is just the first step in the long march. You will find more and more problems. For example, sometimes the sender can receive it, and sometimes the other party cannot receive it. I often receive some disturbing information, or I can receive it today but not the next day. In short, there are good times and bad times. The main reason is that 2.4G is a very unclean frequency band. It's like the national highway is free. Everyone drives the car up. Wouldn't it be crowded? The key is that you have to learn to dodge cars and pierce the needle. This is the physical layer algorithm you designed. 2.4G bandwidth cannot be changed, just like a few lanes on a free highway have been set, and 2.4G channels can only take one car in the same lane, and the next car has to run, so you can only wait for the car in front to get off the highway. You can use it only if you want, that is to say, a device will completely occupy the lane at a certain moment. If everyone has a tacit understanding of waiting in line to use this lane, it won't be messy. But not everyone's quality is so high. There are too many rascals on 2.4G, and they are completely unsafe to do things, because there is no supervision department, so on this platform, fighting is the strength. Like a chaotic arena, the winner is king. Therefore, programmers cannot blindly idealism and dogmatism. Any program is a product of reality. You have to put your product in a real world to design a good algorithm and design a good one. product. If the products in the laboratory are actually used in the products, they are absolutely dead.

 

Now that we understand this truth, let’s reflect on the hardware parameters mentioned above. Do you want to say: This is all right. No matter how fast your transmission rate is, no matter how high the sensitivity is, if you are not enough for others to grab the channel and your effort is not hard enough, everything else will be useless. So how to win in the shadow of the sword, this is the embodiment of your ability.

 

At this point we should probably understand that if you want to make ultra-long-distance products, the hardware parameters are not the main thing, the key is the software part. The software is divided into a driver layer, a system layer, and an application layer. The driver layer is only the operation of registers. This is generally provided by chip manufacturers, and everyone is the same. Then there is the system layer, which is like an operating system, which is responsible for resources. The reasonable deployment of each hardware, the reasonable optimization of various competitive strategies, and the packaging of software interfaces, etc. This part is the most common thing to make single-chip microcomputers, and basically has nothing to do with RF, but the difference between the systems made by experienced people who have been embedded for many years and those who have just contacted is very big. This part is the key to the entire system. The performance of the product, the low cost, and the frequent crashes are all related to the system level. The rest is the application layer, here is the specific RF protocol layer, there are many RF-related protocols, BLE, WIFI, ZIGBEE are all RF protocols. But these are others, and these are short-distance transmission protocols. If you want to do ultra-long-distance transmission, there is no public agreement at present, so we have to write this part of the agreement by ourselves. The difficulty can be imagined.

 

This involves knowledge in multiple fields, communication coding, Data compression, competitive strategy, mutual exclusion mechanism, network path optimization, etc., which belong to the field of mathematics and artificial intelligence, are not good enough for people who do micr ocontroller programming. It can even be exaggerated to say that protocols are things that people who don't know how to program come up with. Speaking of this, someone can refute me. I am an all-rounder. I can do everything from hardware, programming, and protocols. What's so great. If you want to say this, I can only haha. A chef who is responsible for buying vegetables, washing vegetables, cutting vegetables, preparing vegetables, and finally serving the vegetables can only be said to be a cook, and he can only work at a roadside stall. People’s five-star professional chefs don’t even need to cook. That’s the truth. So every professional thing is left to professional people. Finally, your product is professional in every aspect, and others cannot copy it. Of course, a small company cannot be equipped with various professional personnel, so the most suitable SMEs are to integrate resources, add their own professional expertise to others, and make a professional product. When the product makes money, then consider appointing professional personnel, and finally make your own products in the true sense.

 

It’s a bit of a digression. Now we officially talk about the most common functions of professional-level ultra-long-distance wireless communication.

One: How to choose the channel. How to monitor whether a channel is an available channel, what to do if it encounters an unavailable channel, and what strategy is needed if the channel you use is interfered by others. It is necessary to predict the channels that may be occupied in advance and stagger them in advance.

Two: Automatic interconnection. How to identify the paired device when it is turned on, and how to restore communication when the sender and receiver lose connection. When multiple devices are together, how to not fight each other and lock their paired devices. One problem that should be paid special attention to here is that the Bluetooth and wifi protocols are too bloated, and it takes too long to recover after each loss of connection, basically about 10 seconds. This is the most taboo in long-distance communication.

Three: Identity recognition, security encryption, once the code is successfully paired, there is a one-to-one relationship, and cross-control is not allowed. If the agreement is not done well, it is often the interference of others that cannot interfere with your equipment, but interference will occur between your own equipment.

Four: Transmission delay. This is not obvious in short-distance transmission, but it is very critical in long-distance. For example, it is required that a complete and correct frame must be received in 100ms.

 

The above points are the key factors that can fully reflect the length of the distance. Many modules on the Internet preach that they can achieve 1000 meters or even 2000 meters. I mostly laugh at this statement. Because this test must have a standard premise: 1: Test environment. 2: RF power (100mw). 3: The antenna gain is 17dBm. 4: How many valid frames can be received per unit time (1 second) (assuming 1 frame is 16 bytes) as the unit.

2016年8月8日 12:06
浏览量:0
收藏