Shop OBEX P1 Docs P2 Docs Learn Events
Video and information data to Phone via USB — Parallax Forums

Video and information data to Phone via USB

Hi all,
I am trying to send information data and video feedback from a 5.8 GHZ receiver to my android phone. I research for sometime now. I come up with multiple ideas but i need some advice.
--
First concept, video is going to come as analog from the wireless link. Then board converts into digital. At the end board collects input data(joystick data), both information data and video signal from wireless link then it to puts everything into USB and then send it to Android phone.
--
Second concept is similar to first concept with one addition. RCA to USB device is used to convert analog video to digital video.
--
Third concept, video comes as digital from the wireless link then board puts everything into USB.
--
Fourth concept, using a FPGA to do the work. Custom drivers and controllers for analog to digital video.
--
Fifth idea, just give up, this project is impossible, not worth it :). Try something else, go buy off the shelf product.(not exist as an opensource i believe or too expensive, like DJI's bridge link).

I am thinking to use a board that supports USB full-speed or high-speed with DMA controller. (Such as Teensy 3.6, Arduino zero or even something like hifive1)
Last but not least I am going to put the system diagram.
Thanks everyone.
Note: If someone gives me supportive answer and show me a path, i will work hard and make this happen and share it on github.
1965 x 580 - 153K

Comments

  • I've used the EZCAP with some success. The one I have works fine for everything except sound. For my use case (I'm going to take a stab in the dark and say your's is similar based on the 5.8GHz video tx) it didn't matter since the video feed is from a RC aircraft. I know there are some apps for Android (haven't checked iOS) that will connect to the EZCAP as well. If you go this route, do some research on the specific models/clones since they don't all behave the same (classic knockoff Chinese electronics).

    Either way, I'm working on a project that has similar needs, so I'd be down to help out. I'm leaning towards the EZCAP because it works and allows me to focus on other stuff.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2017-01-10 23:35
    Ostantric wrote: »
    I am trying to send information data and video feedback from a 5.8 GHZ receiver to my android phone.

    Converting incoming video to a format your phone can use will likely be a trick. Is this just normal NTSC video?

    Of course most phones can support images with more detail than NTSC but I think it takes something like a Raspberry Pi to stream higher quality video.

    My guess is something with the power of a Raspberry Pi will be needed for this sort of video processing even it the quality in only NTSC. I've heard good things about the Teensy but I don't think it's up to video processing in real time.

    I've been collecting parts for a custom controller myself. I personally would like to do away with all pots on my controller and use some sort of Hall effect sensors for the inputs.
    emiljt wrote: »
    I've used the EZCAP with some success.

    Have you used EZCAP with a phone? It looks like it's a PC only type device.
  • Duane Degn wrote: »
    Converting incoming video to a format your phone can use will likely be a trick. Is this just normal NTSC video?
    It is just a normal NTSC. I am going with the second concept, which is using analog to usb converter. However I am having misunderstanding issues here. Does Ezcap converts NTSC to any digital format when you stream live ? or the one that you can see screenshot (from my pc) is still NTSC?
    Duane Degn wrote: »
    Have you used EZCAP with a phone? It looks like it's a PC only type device.
    Yes, I can get video to my phone from EZCAP. I can write a android app in my free time, however in my project, i need to add data into USB along with video data.
    emiljt wrote: »
    I've used the EZCAP with some success.
    How did you add extra data into USB ?

    so i am going to upload a screenshot. It is a comparison. I didn't do much on the teensy side. Just a simple raw hid example that you can find from their library. I just made it fast.

    You can easily see that teensy's max packetsize is 0x40(readings, simple text) in this packetsize we receive 64 bytes. It sends a packet every 0.9ms which is fast compare to EZcap, but again its only 64bytes.
    EZcap device's maximum packet size is 0xbb8(48000bytes) , in this packetsize received data changes but maximum i saw was to 46546 bytes.(lets say 47kb). and it sends a packet every 15.9ms.
    Quick calculation, lets say we send 64 bytes per 0.9ms and we need to achieve 48kb at t 15.9ms. 64*(15.9/0.9)=~ 1136. Not enough, its just raw hid. But take a look at the teensy 3.6 specs

    Features specific to Teensy 3.6:
    180 MHz ARM Cortex-M4 with Floating Point Unit
    1M Flash, 256K RAM, 4K EEPROM
    Microcontroller Chip MK66FX1M0VMD18 (PDF link)
    USB High Speed (480 Mbit/sec) Port
    2 CAN Bus Ports
    32 General Purpose DMA Channels
    22 PWM Outputs
    4 I2C Ports
    11 Touch Sensing Inputs
    We have 256KByte RAM. I believe we can dumb and take stuff fast. if not we still have 8KByte cache.

    anyways, first i am going to try just bypassing these packets using DMA. Problem I might have is the space but again this is live stream. I calculated the total size per size, its 1,485,230 bytes per second we can just say 1.5mbytes/second.

    Once I achieved this bypassing goal, i am going to add my own data from sensors and them into this packet. Lets say we didnt change the packet size.(0xbb8) I see leftovers in the usb monitoring studio. Since we have 48kb available, and if we are using 47kb, we have 1kb left and we can use it.

    In short I think if i use high speed usb from teensy(I am still thinking full speed with lower resolution still is enough), we can achieve this data rate. At this 1.5mbyte/s rate, we will be able to transmit (control,sensor) data and video data using USB. Again teensy is not doing any kind of video processing, it's shifting video data around and reading sensors.

    Correct me if i am mistaken.
    Thank you all.

    Screenshot attached.





    3401 x 1385 - 1M
  • emiljtemiljt Posts: 45
    edited 2017-01-11 17:13
    Like Ostantric said, you can use the EZCAP with some of the apps available.

    I haven't actually overlaid the video feed from the EZCAP with anything yet. On Linux, the device just shows up as a device in /dev, which can be used by programs like VLC. I haven't spent too much time on it though because I don't plan on modifying the video feed, but just overlay the feed in the program's UI.

    I have thought about modifying the video feed from the drone (in my use case) for flight telemetry, but I already have a data feed from the xbee, so I plan to just use that, especially since the signal is stronger than my video signal.

    Sorry, I know I'm not any help for your situation.
  • Ostantric wrote: »
    In short I think if i use high speed usb from teensy(I am still thinking full speed with lower resolution still is enough), we can achieve this data rate.

    Wow, very cool stuff. Thanks for clarifying. I'll want to check out the Teensy in more detail.

  • I think i figured this out, but its going to take some time.
Sign In or Register to comment.