LeapMotion. What's inside?

    While working with a teapot is limited to drafting documentation (which is undoubtedly rather boring for a Habr - judging by the previous topic) I will write about the abstract - about the inside of a piece of iron. For the next project (lighting control), we needed to smoke an OpenCV theme and cameras suitable for this.
    At the same time, I also wanted to get a depth map with video - to change the brightness depending on the distance to the person.

    Upon learning that the LeapMotion controller uses two cameras, we immediately ordered it to "poke".

    I think that if they do not know what LeapMotion is, then at least everyone has heard. If you still haven’t heard, then this is a small controller box that perceives hand movements and allows you to control your computer with these very movements. Here is a video showing how this happens:

    I will not dwell in detail on anboxing and a review of the device itself, because it has already been done before me, as much as two times .
    I’ll talk about a more interesting thing - how this thing actually works. The device is ready for preparation:

    Having opened it from all sides, the first opening option is revealed - a rubber sticker at the bottom that can be easily peeled off:

    Several screws are found under it:

    Which, of course, is twisted right away, and ... nothing happens. The device looks the same monolith as before. Well, let's go on the other hand in the literal and figurative sense:

    The dark surface on the front is an opaque IR-permeable plastic. He, too, is glued to something, but with the slow movements of the hot air gun he managed to free him from the arms of glue and the body. We remove it to the side and see EYES:

    They do not make such an impression on you, because you have already seen them in the title picture. But when you remove opaque plastic, and they look at you because of it , the feeling is unforgettable.
    We remove the rubber seal, and we see the first board:

    It rests on four screws. We turn them off, remove the top board, and get access to the bottom:

    Here it is, together with the black plastic insert and held by the screws that we saw earlier. It's good that we already twisted them :)
    Control inclusion, we verify the correct operation after disassembly:

    Everything is fine. You can play on.

    When connecting the boards, they make up such a sandwich: The

    boards are connected with this connector (part of the father):

    And the other part:

    Of course, there is no need to show it in such details, but I'm still happy with my macro lens. We turn to the boards (bottom side of the top board):

    The CYUSB301X controller is located on it :

    This is a 32-bit ARM9 controller from Cypress. 200MHz, USB3.0 and 2.0, OTG. Designed just for working with pictures and videos.
    USB3.0 (I wonder why, wouldn’t 2.0 be enough?) Plug:

    MOSFET is located nearby:

    And two large capacitors:

    There is nothing more interesting on this side. We look at the top side of the first board:

    This is flash memory MXIC 25L3206E, SPI-interface, 32 megabits. It stores the controller firmware. For some reason, the developers did not use the proprietary feature of the Kipressovsky controllers - downloading firmware via USB. Maybe to speed up the download?
    Divorced UART:

    When we saw it, we soldered to it so quickly that we did not even have time to photograph the contact pads without solder.

    Unfortunately, he is silent in him like a partisan - not a single byte.
    So, let's look at something more interesting, for example, one of the three infrared LEDs:

    Next to it - apparently, a harness to control it - in standby mode, the LEDs noticeably dim the brightness.
    And here is another, central LED:

    The only difference is a slightly different lens shape. Next to him is exactly the same harness.

    The remaining board is pretty boring. Two cameras with fisheye lenses, yes a connector.
    Once again, we are surprised at the sensation of a mug with eyes, cameras, and a mouth-plug:

    I think the developers did not accidentally stop at just such an arrangement of components. ° - °
    The cameras are black and white, with a resolution of only 640 × 480, but they can produce 60 frames per second.

    Count. 0.3 megapixels, for 60 frames, two cameras, without compression ... 640 * 480 * 60 * 2 = 35MB / s. Apparently that's why they installed USB3.0, this speed is unattainable for 2.0, and it was more expensive to develop compression (in overhead costs) than to install a new chip.
    However, in USB2.0 mode, the device also works, but reduces the frequency by frame - the reaction becomes more thoughtful.

    I wanted to look at the matrix - but the camera lenses were sealed with sealant:

    So we did not dare to disassemble further, for fear of disrupting the focus. The cameras shoot completely in the infrared range - dark plastic cuts off completely visible light, and infrared radiation from LEDs, reflected from the skin of the hands, passes through. As expected, with a bright source of infrared light behind (the sun, incandescent lamps), the definition of the fingers begins to slightly mute. Use fluorescent and LED lamps. :)


    In terms of circuitry - the device is pretty dumb. In fact, it’s just a backlit webcam that drives the video stream to the computer.
    A picture from two cameras looks so funny:

    But on a computer the picture is processed, a depth map is built from two images:

    And an array of points is created that the programs already work with:

    You can work with the camera without using native software - kind people sorted the protocol and wrote programs for working with him.

    For our purposes, unfortunately, this thing did not fit - the cameras are too close, and it will not be possible to correctly determine the distance of more than a few meters. Well, okay.

    Finally - a funny two-color LED:

    I remind you that if you do not want to miss the epic with the teapot and want to see all the new posts of our company, you can subscribe imageto the company’s page (“subscribe” button)

    Also popular now: