Tello's camera offers limited resolution. Tello has no storage device on board but streams videos to the ground, so you get glitches and block artefacts. Why not pack a camera on top?
In general, action cameras are way too heavy for a Tello.
So I took a Raspberry Pi Zero W which is lightweight and produces good videos, even when fitted with a small and inexpensive camera. It can be powered by Tello's battery via a USB OTG cable, so you don't need to add an extra battery.
My setup works on the workbench now, I did not yet test it in flight.
Probably, the storage card on Tello was omitted for legal reasons. Be sure to check the regulations in your country. Here in Austria, I need to have a registration for a UAS equipped with a "sensor to record personal data" such as videos and photos, even if it weighs less than 250 grams.
Enough introduction, let's get hands on.
The goal: Record video (or still pics) on Raspi's SD card, with little or no interaction by the user.
You can communicate with a Raspi through wlan and manually start a program that does the job.
Unless you use a Tello EDU, you cannot connect an additional device. You need one connection (mobile phone, PC, ..) to steer Tello and one to communicate with the Raspi. So you might need an additional wlan hotspot to communicate with the Raspi, possibly a second wlan adapter on the PC.
While finding out Raspi's IP address (when I use my phone as hotspot, I get different ip addresses every time), starting an ssh connection and fiddling around, especially outdoors where the sunlight might blind you, Tello overheats or its battery is becoming empty.
So, when I did some experiments with Raspi and Tello, I often returned home frustrated because I did not manage to run the things which I had tried at home.
Therefore, I want to start the recording automatically when Raspberrry powers up.
What about ending the recording?
When you switch off the Tello and therefore the Raspi loses power, it will likely corrupt the video.
One solution would be to add a button to stop the recording. Not much additional weight.
My solution: I record short (10 seconds) videos. When power goes down, I only lose the last video.
Later, I will concatenate the videos on the PC. I expect that this will go easily and automatically, using ffmpeg or something similar.
Recording videos and saving them to the disk (card) requires unique filenames. The standard solution is to generate a filename from date and time, but this will not work here, because Raspi does not have an onboard realtime clock (you could add one, but this adds weight). I use a counter. You might list the existing video files, see which one is the latest, and continue from then on. When I erase (i.e. move to the PC) all videos from the SD to free some space, I would start with file number 0 (or 1) again, and I need to take care for not overwriting the files on the PC.
Therefore I use a little text file to record the latest number. What if this file gets corrupted? The probability of a power loss while writing the little txt file is extremely low, but I wanted to make sure. I use two text files, one for odd and one for even numbers.
If you are interested, I could share my code.
Be careful when starting a program, especially one with an endless loop, at startup. You could easily lock yourself out, the door is locked and the key is inside. Anyway, starting a program at startup is not such an easy thing to do. There are good instructions which you should follow very carefully. I never succeed at the first try. Get all your permissions correct, use the "try" statement in Python to avoid a crash. With the camera, it is easy to see at a glance if the program is running: When the red LED on the camera module is on, the camera is recording.
Maybe you got some inspiration for an inexpensive, interesting and useful project.
Have fun!
Martin
In general, action cameras are way too heavy for a Tello.
So I took a Raspberry Pi Zero W which is lightweight and produces good videos, even when fitted with a small and inexpensive camera. It can be powered by Tello's battery via a USB OTG cable, so you don't need to add an extra battery.
My setup works on the workbench now, I did not yet test it in flight.
Probably, the storage card on Tello was omitted for legal reasons. Be sure to check the regulations in your country. Here in Austria, I need to have a registration for a UAS equipped with a "sensor to record personal data" such as videos and photos, even if it weighs less than 250 grams.
Enough introduction, let's get hands on.
The goal: Record video (or still pics) on Raspi's SD card, with little or no interaction by the user.
You can communicate with a Raspi through wlan and manually start a program that does the job.
Unless you use a Tello EDU, you cannot connect an additional device. You need one connection (mobile phone, PC, ..) to steer Tello and one to communicate with the Raspi. So you might need an additional wlan hotspot to communicate with the Raspi, possibly a second wlan adapter on the PC.
While finding out Raspi's IP address (when I use my phone as hotspot, I get different ip addresses every time), starting an ssh connection and fiddling around, especially outdoors where the sunlight might blind you, Tello overheats or its battery is becoming empty.
So, when I did some experiments with Raspi and Tello, I often returned home frustrated because I did not manage to run the things which I had tried at home.
Therefore, I want to start the recording automatically when Raspberrry powers up.
What about ending the recording?
When you switch off the Tello and therefore the Raspi loses power, it will likely corrupt the video.
One solution would be to add a button to stop the recording. Not much additional weight.
My solution: I record short (10 seconds) videos. When power goes down, I only lose the last video.
Later, I will concatenate the videos on the PC. I expect that this will go easily and automatically, using ffmpeg or something similar.
Recording videos and saving them to the disk (card) requires unique filenames. The standard solution is to generate a filename from date and time, but this will not work here, because Raspi does not have an onboard realtime clock (you could add one, but this adds weight). I use a counter. You might list the existing video files, see which one is the latest, and continue from then on. When I erase (i.e. move to the PC) all videos from the SD to free some space, I would start with file number 0 (or 1) again, and I need to take care for not overwriting the files on the PC.
Therefore I use a little text file to record the latest number. What if this file gets corrupted? The probability of a power loss while writing the little txt file is extremely low, but I wanted to make sure. I use two text files, one for odd and one for even numbers.
If you are interested, I could share my code.
Be careful when starting a program, especially one with an endless loop, at startup. You could easily lock yourself out, the door is locked and the key is inside. Anyway, starting a program at startup is not such an easy thing to do. There are good instructions which you should follow very carefully. I never succeed at the first try. Get all your permissions correct, use the "try" statement in Python to avoid a crash. With the camera, it is easy to see at a glance if the program is running: When the red LED on the camera module is on, the camera is recording.
Maybe you got some inspiration for an inexpensive, interesting and useful project.
Have fun!
Martin