The principle is simple, compare GPS coordinate between 2 elements to determine where to aim a pan and tilt to film it.
However, there is some limitation, cheap GPS are not very precise so it will not work with a distance below 15m. Also altitude measurement with GPS is not accurate enough to use it. I decided to go with pressure sensors (MS5611) and use a simple pilote rule that 100Pa = 2 feets.
The first version was using a direct orientation to North pole for absolute positioning. I quickly understood that is was a strong contrain. The new version wait for the start of the tracking to take the current position as 0° forward (meaning you have to point the beacon while starting tracking). It is then using the course_to function from the tinygps++ lib to compute an angle. I use the tinygps++ beaucse it can output the coordinate with more precision.
There is a button on the beacon to command the base for start and stop tracking. At the same time the IR while send to the sony camera to order to start recording.
On the base you have 3 button :
-1 used for altitude compensation, it will zero the offset between the pressure of the beacon and the one of the base.
-1 used for command to start or stop the tracking
-1 is the reset of the Arduino Mega
There is also 2 switch
-1 for 2 preset of rotation speed (usefull for development and later for preset according to the scene you are filming)
-1 for 2 preset for zoom behavior (max zoom value)
I am using 2 Arduino on the base to avoir having jitter on the servo as interrupt present problem for the PWM generation. The 2 Arduino are link by a serial comm using my own basic protocol to transmit only position and speed.
The beacon is using a moteino as it is usefull for me to have the µ and the RFM69HW directly on the same PCB and at 3.3V (no level shifters). The GPS is working either in 3.3v or 5v.
Software details :
- Tinygps++ libraries for NEMA translation and course computation
- Servo libraries with speed included
- IRremote libraries
- RFM69HW library (currently set to minimal power)
- GPS set to 5Hz
- Loop time target 100ms
- Simple low pass filtering on GPS coordonate
To do :
- Tune speed parameters to smooth the rotation
- Tune zoom control in flight
Nice to have :
- Kallman filter
Finaly you may have noticed that you already saw something like my device, you are right, it is called Soloshot and available on amazon, build by surfers but working with almost every hobbies !
But the fun is to do it by ourselves isn't it ?