LinkIt One geo-based photography remote

    By fate, I came across a sample of a rather interesting Mediatek LinkIt One board. This is a single-board computer with an impressive range of peripherals prepared for use in projects related to wearable devices and IoT.

    In order to get a “combat” experience with this controller, we have developed a simple remote that connects to a DSLR camera, takes pictures and records the coordinates of the shooting point.

    In this article, I will talk about the resulting device and share our impressions of working with LinkIt One.



    The idea of ​​creating a remote


    Everyone knows that in EXIF ​​photos you can add geotag with the coordinates of the location of the picture. You won’t surprise anyone with this. Any smartphone can easily cope with this task. On the other hand, not every (even professional) camera has this option. It is clear that the smartphone has everything you need to determine geolocation, and the camera needs at least an additional GPS module for this. And professional photographers rarely need this. But what if you still need to shoot a lot and know where the pictures are taken?

    For this, we made our remote control. It connects to the standard camera connector, which is specifically designed for this purpose. The user presses the button, the remote closes the optocoupler for shooting and records the time and coordinates. If the time on the camera is set correctly, then it will not be difficult to compare the pictures with the coordinates.

    But in practice, it’s much easier to install an application on the smartphone that records the GPS track continuously during shooting, and then do the same thing as with the remote control. Why then make a separate device?

    In fact, the main goal of the project is not even the remote itself, but to get real experience with the LinkIt One board, which we will return to later.

    Remote Control Hardware


    The basis of the remote control is the LinkIt One board, for which I made a special shield for taking pictures.
    From a hardware point of view, remotes for photography are extremely simple. They are connected to the camera with a jack connector, 2.5 mm in diameter. It has three contacts - ground, half press and full press. In the console itself there is a simple button that closes the signal contacts with the ground. Therefore, on our shooting shield, the PVT322 dual-channel optocoupler is first and foremost . She closes these contacts.

    Secondly, I installed a three-color LED, which allows us to understand the state of the receiver. That is, at the start, he needs time until he finds satellites and at this time, shooting is impossible. The same LED determines the charge level.

    Also on the shield are two buttons for remote control (shooting and battery monitoring), a connector for connecting the camera and a GPS antenna from the LinkIt One kit.



    The scheme is extremely simple. I can only say that I connected all the loads (RGB-LED and optocoupler) via BCR108E6327 logic transistors. Attached the shield of the shield at the end of the article, in case someone wants to repeat the device.

    Remote control housing


    We also unplannedly managed to make a normal body for him. When I was working on the project, I met one novice graphic designer who showed interest in 3D printing and industrial design. Here is his profile at SketchUp's warehouse. Without hesitation, he agreed to help.

    He, like I usually used SketchUp for this, but at his much higher level. This program is quite simple, but armed with plug-ins; in the hands of a professional, it can work wonders. You can look at the case of the resulting remote control in the online viewer here .



    Of course, we printed it, cleaned it, painted it, assembled it and got the following:





    With the case, over, there are problems. The fact is that the designer came to the rescue later than I did the electronics. The socket for photographing is recessed deep into the remote control, and the toggle switches on the LinkIt One board itself are not available when the remote control is closed. In general, the case turned out to be not perfect, but quite nice and usable.

    Remote control operation


    Immediately after turning on, the remote control determines its location. At this time, the indicator LED flashes red and shooting is not possible. After the position becomes known, the LED starts flashing green. When you press the right button, a picture is taken, the coordinates are recorded in the memory, and the LED for this time lights up in blue.

    The second button is responsible for the battery. After pressing it, the green or red LED lights up for one second. If green, then the charge is more than 20%, if red - then less.

    There are two problems due to the case. Firstly: you can get to the power on switch only by opening the cover. It may be easier not to turn it off, but we did not check how much the battery lasts. Secondly: the board has a switch responsible for the computer mode: either UART or Mass Storage. Moreover, in Mass Storage mode, the program does not start when disconnected from the PC. This means that you must switch this switch when you need to download data from the remote control.

    All this is easier to see once:



    The remote control parses the NMEA messages that the receiver sends and saves them in kml format. The recorded file can be downloaded by connecting the remote to a computer, and you can view the contents in Google Earth:



    And now a little more about the heart of the remote.

    What is LinkIt One?


    At first glance, this is just another Arduino clone, but when you start to figure it out, everything turns out to be much less prosaic.



    Detailed technical specifications are available on the wiki and in the Developer's Guide . I will only list the distinguishing features:
    1. 260 MHz ARM processor with 16 MB flash and 4 MB RAM
    2. Slot for installing an SD memory card up to 32GB
    3. Built-in modules with external antennas: WiFi, Bluetooth, GPS / GLONASS, GSM (there is a SIM card slot on the board)
    4. Powered by 1Ah battery. This is done well: it charges from USB, and the API allows you to find out the remaining charge
    5. Audio jack For headphone and microphone
    6. Arduino Compatibility More on this below.

    In fact, the board has a lot of very nice little things that are already implemented in the API. Work with GSM, GPS, Bluetooth, I2C, SPI, 3xUART, work with MP3 files, battery, etc. The very idea of ​​the board is that it already has everything that may be needed. But because of this, LinkIt One is not very convenient in the context of managing any external hardware in real time. It runs a specialized RTOS, but the timings still float. The logic levels of the GPIO are 3.3V. Three analog inputs, two PWM outputs (and only servos can be connected to them). That is, there is a risk for iron that it is not compatible with some ready-made solutions.

    Work with it is supposed in Arduino IDE. To it you will need to install an additional SDK which implements part of the processing / Wiring language functions and many special functions for LinkIt One. In fact, all the software for this board is developed in C ++. Right in the environment you can see many ready-made code examples. The documentation is over, while relatively few. For example, I could not find a description of the power supply circuit board, nor its overall dimensions. And Google constantly gives out when searching for links on LinkedIn.

    You can buy the board at Seeedstudio.com for $ 79. The board is on sale in a nice box with instructions, three antennas and a battery.

    Photos with a box






    I also did a small benchmark.

    LED flashing frequency
    I understand that it is impossible to draw any conclusions about hardware or software based on the results of such a test, but I decided to check how often the leg will twitch if I switch it with the digitalWrite function without delay.
    The author of this post checked that MK with Arduin firmware does this with a frequency of 210 kHz, and programmed by normal means - 1.6 MHz. LinkIt One under the same conditions showed me 312kHz.

    Next I will provide quick start instructions for Windows and Linux. This may seem interesting only to those who really will work with her or plan to do this.

    Hello World for LinkIt One on Windows


    First of all, you need to upgrade your Arduino IDE to work with LinkIt One. Manufacturers recommend downloading the SDK and the latest version of the Arduino IDE, and then launch the SDK and specify the environment folder. But I couldn’t do it right away. Instead, I downloaded the already deployed LinkIt One programming environment.

    At the top of the board there are three switches that are responsible for the mode of operation of the board. The first switch sets the initialization method in the system (as a COM port or as USB Mass Storage). The second sets the power mode: from USB or from the battery. The third defines the connection to the SPI SD card or slot. Before connecting the board to the computer, you must set these switches as shown in the photo:



    Then you can connect the board to the computer. Immediately after the connection, two unknown devices appear in the device manager:



    Now you need to install the driver. The installer is in the folder ... \ Arduino-LinkIt-ONE-IDE-master \ drivers \ mtk. Just run InstallDriver.exe and wait. Two COM ports will appear in the device manager at once:



    This completes the installation. Just in case, I updated the firmware of the board to the latest version. How to do this is described on the wiki (in short, you just need to run FirmwareUpdate.exe).

    You can start downloading the example with a blinking LED. Launch the Arduino IDE and select the LinkIt One board:



    Now select the COM port. Be sure to specify the port that appears in the device manager as Debug Port!



    Then open the finished Blink example and click the “Download” button. If everything is done correctly, the environment will display a corresponding message about it (pay attention to the percentage of used memory):



    After the download is completed, the user LED will flash on the board:



    Working with LinkIt One under Linux


    Mediatek only works under Windows, but you can also work under Linux if you wish. This will require:
    1. Install Arduino IDE
    2. Download the SDK for LinkIt One (although it is written that it is only for Windows) and install it using wine. In the folder, the installer checks for the presence of arduino.exe, an empty file with the same name is suitable for it
    3. Write your program and click "Check"
    4. After that, the compiler will produce a number of errors related to the fact that in some source codes of libraries from the SDK header files in the wrong register are included (under Windows, the register does not matter)
    5. Connect LinkIt One in memory card mode to a computer
    6. Find the MRE folder on the removable disk and drop the * .vxp firmware file there. In the autostart.txt file, the path to the firmware to be executed is fundamentally indicated.
    7. Put the board in UART mode and reload with the button
    8. Watch how firmware is running

    This is all very inconvenient and seriously developing something in this mode will not work. But for one project for the evening, this is the solution.

    Conclusion


    Overall, the experience with LinkIt One is positive. There is, of course, roughness. The feeling is that you are working with something slightly unfinished, as always when mastering something new. But on the other hand, it can really help to quickly launch even a relatively complex project.

    Files to download:

    Shield for LinkIt One
    3D model of the case
    Example kml-file
    Source code of the remote control program

    This is the only habro-adapted repost of articles from my site ( 1 and 2 ).

    Also popular now: