Iron sample for HD FPV *
* oh, I feel, the holivors will begin now
The first flight of Virtualrilka as a broadcast HD camera
Already wrote a lot about FPV on Habré, but in order to minimize the amount of drilling in the comments, let's just agree:
- FPV - First Person View, first-person view. This can be either control of a flying / riding / floating / upright vehicle with simultaneous monitoring through a camera installed on it, or independent control and monitoring.
- In the case of flights - they are “far and high” and “low and close”. Of course, there are many variations, but these are the main parameters.
- Flights are fast (aircraft) and slow (multicopter). Again, the plane can soar slowly, and fry the copter in full, there are many options.
So, all of the following applies primarily to slow, "low and close" options. But I hope that in the near future it will be possible both far and high.
When I first put on FatShark glasses, which showed a picture from an analog video transmitter, I was amazed how bad things were. Viewing angles, resolution, price. Analog video signal - interference, interference, and again interference. A bunch of tricks to minimize these very interference, as well as to prevent interference on the control channel. Of course, many do not like this state of affairs and want improvements. I would like a digital communication channel, digital video, preferably one common communication channel for video and control, glasses / helmet with HD resolution ...
In many forums devoted to modeling, this topic is periodically raised, but usually it encounters fierce hatred from experienced modellers who are used to the good old proven systems. It is difficult to argue with them, since there is a reason for their criticism. But nobody forbids wanting the best.
By the way, I recommend - an extensive discussion of the topic on rcdesign.ru
My first attempt to get a high resolution video using analog transmitters was described in this topic . The circuit turned out with a minimum signal delay, but bulky and gluttonous, so things didn’t go beyond home tests.
The second attempt was made just the other day, which will be discussed in this topic.
Probably, many have already heard from our ears about our microcontroller called Virtrilka . She thought only for working with normal-resolution video, optimal for smart control over the Internet. But when we finally got HD video on it (resolution 1280x720 pixels), a crazy idea immediately appeared - why not try to use it as a course (or at least a panoramic) camera in the field of local use without any Internet . I wanted to put her on a plane or a copter and see what came of it.
The native Wi-Fi module is not suitable for such an application - it is exclusively for domestic use, but for acceptable range, you need something more powerful and with a antenna more serious. So there is only one way out - a separate transceiver connected to some interface. Since for now we consider only Wi-Fi as a communication channel, it turns out that you need a compact and lightweight Wi-Fi router that can be connected to the Ethernet connector.
With Ethernet at Virtualka, things are as follows: the native controller is inactive, instead of it, the ks8851 chip is added to the board, which sits on the SPI bus. This was done so that when using Virtualrilki for its intended purpose (on-board brain and video encoder of any moving pieces), interruptions on the pins were available. Native Ethernet, although it uses only one interrupt, makes the rest unavailable. For this reason alone, we had to do without it, but, just in case, we left the possibility of connecting it on the “second floor”. And the ks8851 chip turned out to be too leisurely, obviously not suitable for video transmission.
In short, our apprentice Sasha urgently makes the second floor for his native ethernet, and while we get out with improvised means - we use the usual purchased USB-Ethernet adapters. It turns out quite cumbersome, but it will do for testing the technology.
It turned out like that
- Our regular camera, working in HD mode, is connected to the Virtualrilka;
- We plug in the USB-OTG adapter into the Virtual Arcade, we plug into the USB-Ethernet adapter;
- To the USB-Ethernet adapter we connect the popular Ubiquity Picostation router;
- Picostation is powered by an on-board battery (PoE power supply, in blue and brown pairs), from it is also powered by Virtualirka;
- Ubiquity Picostation is configured to connect to the "ground" - plate Ubiquity Nanobridge.
- Ubiquity Nanobridge is connected to a laptop using a standard twisted pair cable (also powered by PoE, either from the battery or from the PoE power supply);
- Video glasses are connected to the laptop.
We have two sets of routers for tests, on 2.4 and 5.8 GHz. But so far we are only trying a kit that is at 5.8 GHz, since it is relevant at the exhibition, about which a little later.
It’s monstrous, but as soon as the board with the native ethernet for the Virtrilka is ready, everything will be greatly simplified on the onboard side.
Here it’s worth a little distraction for the situation with glasses. It’s clear that the balls are no longer suitable, since they can only display analog video signals. The first option was - Headplay glasses, also quite common among players, as they can display both analog video and digital (there is a VGA connector for connecting to a computer). But Headplay has another problem - the resolution is only 800x600. But somehow it’s stupid to take video on board with a resolution of 1280x720, and watch on screens with a lower resolution.
The search for other options did not help much, either experimental models that could not be found on sale, or expensive monsters like Sony HMZ-T3 . We almost agreed on Sonya (in the same place, “3D” can also be arranged, generally super), but the familiar modellers suggested the coordinates of the person who develops such glasses himself. Neither I nor my colleagues had even heard of home-made glasses before, so I became very interested.
The glasses turned out to be like that . Outwardly, they look great, the resolution is 1280x720, the viewing angle is announced about 90 degrees. They can display an analog signal (RCA connector, it is also a “tulip”) and digital - through an HDMI connector. In general, a fairy tale, judging by the description. Looking ahead, I will say that I tried them in business, they did not disappoint.
These glasses are here, but the author constantly refines them, the new model is different in appearance from the one in the photo.
I also note that in St. Petersburg tests of other glasses, rather of a helmet, were simultaneously tested:
Here is their discussion and the author’s website.
We can say that these are two different “schools” for the production of glasses / helmets - the difference in optics and other details. The good news is that both models are made by our guys.
As usual, the above circuit has been tested at home. Copy - paste on Habré is not welcome, so I’ll just give you a link, if suddenly anyone is interested - www.g0l.ru/blog/n3926
Since everything worked in an excellent way at home, it was decided to test on something really flying. Because of the weather that was not at all summer, I didn’t really want to go to the field with an airplane, and it was too early to test on an airplane, so we began to look for familiar characteristics. Thanks to the guys from Garage No.17 for supporting and inviting me to conduct tests on their territory, on their copter.
Thus, the first flight of Virtrilka as a course HD video camera took place on a hexacopter with a NAZA controller.
There was a decent wind, but NAZA did well. Virtualrilka also did not disappoint. They didn’t fly far away, since it was still scary, the first test and all that. Unfortunately, the idea came up late that the video stream had to be recorded in the form in which it was received on a laptop. So from those tests there is only a video shot on GoPro. I recorded video from the screen, horror, of course, but at least something.
It did not work out to evaluate the delay at that time, again, for a foolish reason - the guys in the garage had Headplay glasses, but there was no VGA cable. And I forgot to take this very cable. And according to the picture on the laptop screen it’s unrealistic to control - it lights up everything on the street, there is not enough space between the garages, it's scary. In general, there were a lot of jambs, but there was also a lot of joy - the Virtrilka flew, transmitting video from the board to the ground, not a single drop (packet loss, frame scattering). The delay was evaluated by eye - no worse than at home, i.e. somewhere around 180-250 ms. At least the use as a survey camera is already real. With calm control of the copter (flying, watching the HD picture from the board with glasses) - normal. For quick aerobatics, of course, a bit much.
The first ligament test for HD FPV in garages
Returning from the garage tests began to think how to further test. Although, what can I think, range should be checked. So on Monday, we made a test in a real field. True, the test was without flight. The ground part, plate, laptop and glasses stood still, and the “side part”, twisted with electrical tape for convenience, was taken by car to a predetermined distance and watched what happened.
Volunteer Lech who volunteered to help with the trials :-)
This time, the entire video stream was recorded simultaneously with playback, so there is a “live” video. We checked two distances, 700 meters and 2200 meters. At 700 meters there was full direct visibility, they saw where to direct the plate. But there, where 2200 meters — our mobile side part was no longer visible, the bush was in the way, so we were aiming at random, guided by the LED indication of the signal level on the plate.
In addition to the “digital link,” the mobile team carried a helicopter model, on which stood a conventional analog video transmitter. As a result, when it was turned on, the digital link immediately began to fool. But he fooled in different ways, the impression is that there was a dependence on the relative position of the Picostation and the analog transmitter. In addition, it turned out that our plate was too narrowly directed, the slightest deviation to the side led to the loss of the signal or its sharp deterioration. In the following tests, we change the plate to a “bullet” - the Ubiquity Bullet M5 HP with a powerful omnidirectional antenna, or to a similar, but 2.4 GHz. At the same time, Picostation should be changed to HP M2.
But so far it has happened - it has happened. We are making a discount on the fact that it was difficult to constantly bring up the plate, the plate was on the ground (it would be better to raise it higher), the bushes interfered. I still can’t believe that the following videos are just a recorded stream, and not shot on a regular camera :-) And it is, it was an RTP H.264 stream that GStreamer received, displayed on the screen (and then with glasses ) and wrote to the file.
Sample ligament for HD FPV in the field. Link at 700 meters.
Sample ligament for HD FPV in the field. Link at 2200 meters.
Small on-site debriefing
Control Record for Measuring Minimum Delay
Delay Test, 3 Mbps Stream
Delay test, 6 megabit stream
Scheme Improvement Options
In general, the weakest link in the resulting scheme is Wi-Fi, but it also has advantages. The pluses are that it is widespread, two-way (that is, both reception and transmission are possible at the same time), under the same connection, you can drive both video and telemetry from board to ground, and control from ground to board. At least the camera gimbal control can now be implemented without problems, so that the same Virtrilka rotates the gimbal servos.
Another plus - you can try different routers, different antennas. There are also boosters, but this complication of the circuit already begins. There are suspicions that in a real flight between ground and airborne parts there are fewer obstacles than on the ground, so the range should be better. In general, the following tests will be on a hexacopter and on a Skywalker type aircraft in the field. And no more plates on the ground.
You also need to add a change in the video bitrate depending on the signal level. This is easily implemented on Virtrilka using the gstd daemon .
The first question that the guys from Garage No. 17 asked me was a question about OSD. Those. information about the various state parameters of the airborne unit. Voltage, roll, pitch, distance from base, coordinates, azimuth, etc. Usually, all this information with the help of special devices is superimposed on an analog video image and transmitted to the ground by a video transmitter. Accordingly, the received video cannot be cleared of this information. And the information cannot be processed in any way, except visually.
With a digital link, it is immediately possible to drive telemetry in the form of a normal data stream, regardless of the picture. And on the receiving side, already process it as you like and, if there is a need to see it with glasses, overlay it on top of the video. But not in the video itself, namely to draw the top layer on the screen (monitor, TV, glasses, whatever). Or feed it to ready-made applications, like MIssion Planner.
I tried to determine the voltage of the onboard power supply (via a voltage divider connected to the ADC input) by Virtualrilka and transfer the received information via UDP to an application running on a laptop that receives video. Everything is perfectly transmitted and displayed, plus it all turns out interactive (you can turn off the output of information, switch the ADC channel or create something else). A small demo with the first trial of such an OSD can be seen here .
But there was another problem. To transmit telemetry to the earth, you need to get data from somewhere. You can, of course, connect a scarf with gyroscopes, accelerometers, a barometer, a compass to the Virtualrilka, connect GPS, etc. etc. But why, if, for example, the sensors usually already have these sensors on the copter, you just need to take their readings from the flight controller. Here I am stalled - I do not know if widespread copter brains have such an opportunity. If there is, then the problem is solved.
Appetite comes with eating. After it turned out that the transfer of HD video with an acceptable delay for a slow flight is still possible, I wanted more. How would a stereo image get?
The option "in the forehead" is to put on board two Virtualrilki, two cameras. But drive the stream through the same router (Picostation). You just need to find a compact passive hub / switch. Or do it yourself, since there are many chips of all kinds for this business.
Again, in order not to copy-paste myself, I give a link to the test of such a bunch , maybe someone will be interested.
The disadvantages of this option are obvious (in addition to a double set of all the iron, except for the router) - the flow is twice as large. This can be avoided by combining pictures with two Virturiloks on board. Those. one Virtualrilka master, the second - a slave. The master takes the stream from the slave, combines it and transfers it to the ground. This is not even a theory, such a bundle has already been implemented by an office called RidgeRun. Based on these elements for GStreamer -
Only here they have pictures combined in anaglyph, but I still want a full-fledged pair of independent pictures for the left and the right eye. Although here the question already arises - how to watch it all ...
Discarding decisions that are inaccessible to the average modeler because of the wild price tag, there is only one option. Most recently announced by the Chinese DJI Lightbridge . As I understand it, there is not Wi-Fi but just an OFDM transmitter and receiver, although I can be wrong. A delay of <80 ms is declared, however, in the video shot by one of the owners, it can be seen that the lag is 200-300 ms, i.e. not better than I received on Virtrilke.
Here is the DJI Lightbridge delay video. See the timer.
About the display lag was discussed all in the same thread on the design . In any case, the price of this light bridge is around $ 1300. How much will it cost in Russia - I'm afraid to imagine.
Here is a description of a series of tests turned out. Of course, much remains to be tested in practice, but the fact that flying on a copter or an airplane wearing glasses with full HD video is already pleasing. Oh, I’m definitely happy :-) And when we finish the HDMI input (we have already given test samples to production), then GoPro can be connected as a full-fledged course camera.
In general, if someone who reads this opus wants to see the currently available set of iron in action - a welcom at Hobby Expo 2014 . We will participate there , just to demonstrate HD-video from copters and from large R / C-machines. And the glasses that I mentioned in the topic will be on our stand.
UPD: I also forgot to write about Iota. LTE coverage is getting better and better, we should try to drive the video through the Iota (Megafon, Beeline, MTS) into the field.
UPD> For comparing the dimensions - a regular lighter, virtrilka and naked Picostation M2 HP side by side The
total consumption during HD streaming at 12 Volts is about 400 mA.