Take the 2-minute tour ×
Electrical Engineering Stack Exchange is a question and answer site for electronics and electrical engineering professionals, students, and enthusiasts. It's 100% free, no registration required.

I'm working a a project that currently works well but this year we want to expand it by collecting data from it, independent of its current functions. We have set up an iPad App to control an Arduino through Wifi. The next step is transmitting video through Wifi to the iPad.

With this question I would like to focus on how a microcontroller can send a video stream through Wifi. I can't seem to find any way to even start this project.

How do you interface the camera with the microcontroller?

How do you then send that stream over Wifi?

share|improve this question
2  
Right, it seems the basics of your question were answered in your nearly identical question. It's the same process, but you can now actually stream the video data that you process/encode. –  Samuel Nov 15 '12 at 18:27
2  
You'll need a beefy microcontroller for that. –  jippie Nov 15 '12 at 19:00
    
i disagree...the other questions answers focus on the bluetooth aspect and stop there, while this question is more about the wifi and actually getting a full answer. –  TMP Nov 16 '12 at 0:56
4  
What kind of video ? Full HD ? PAL/NTSC/Gray ? Consider the amount of computing power required for that. You may need microcontroller working at 200Mhz or more, and probably with a lot of embedded memory. You should start with a quick assessment of your needs in term of memory and computing power required. –  Blup1980 Nov 16 '12 at 11:53
4  
Neither wifi nor cameras are simple or inexpensive to interface to microcontrollers such as the Arduino which both lack a USB host interface and have minuscule available memory for buffering. Something like a raspberry pi with a USB power supply hack / powered hub for a wifi dongle and webcam could do the job, but your most practical solution is going to be either an old smartphone running an ip camera app, or a purpose built wifi surveillance camera. –  Chris Stratton Nov 27 '12 at 22:37
show 3 more comments

3 Answers 3

up vote 5 down vote accepted
+50

I understand that it's a lot to transmit, but let's focus on how to interface the arduino with the camera

Arduinos are not suited for video streaming at all. Here are some of the reasons:

  • At their best, they can only do 20 MIPS
  • Don't have nearly enough ram
  • They're only an 8bit processor
  • The don't come close to having enough bandwidth to stream video
  • They have a limited flash memory
  • The Arduino programming language is not efficient

For those reasons and more, Arduinos and other 8bit MCU's are not able to accomplish what you want. A 32bit ARM processor would be better suited to the task and still very cheap.

Nevertheless here is your answer

If you MUST use an Arduino, the best you could probably accomplish is streaming jpeg at a slow rate. You can add a TTL camera to an Arduino so the Arduino is able to take a picture (there are camera shields that can connect a camera to an Arduino.) The max baud rate on an Arduino is 115200bps (I think) so after a picture is taken it could be saved to a SD card and/or sent via an wireless SD network shield. There is also a Eye-Fi unit that is a SD card that has a built in wireless network.

Keep in mind that this will not be video streaming, at the best it will be streaming a couple low quality pictures a second.

enter image description here

Remote monitoring using the Eye-Fi wireless SD card and Adafruit Data Logging Shield for Arduino. The Eye-Fi card is a tiny wireless memory card. It stores photos and fits inside a camera just like a regular SD card, but also has built-in WiFi transceiver that can upload images to your computer, smartphone or to various photo-sharing sites. Can the Eye-Fi card work in an Arduino SD card adapter? You bet! Adding a TTL Serial JPEG camera, together with some minimal prep work, we can then create a self-contained wireless monitoring camera with motion-sensing capabilities. HOWTO Make an Internet of Things Camera

This is what I recommend

The easiest way to stream media from a MCU would be to use a MCU that can run an embedded OS, like the Raspberry Pi. Basically the Raspberry Pi is just like a computer running linux with usb ports etc. And it has the processing power and memory to stream video in real time.

So for your project, you should use a USB camera, like a web cam, and a USB wireless networking adapter (since the RP only has wired network by default.) The OS will handle the networking side of things, all you need to do is to stream the USB video to the network and there is plenty of software and tutorials for that.

They even have a OS specifically made for doing this called XBMC. See How to turn your Raspberry Pi into an XBMC media centre. There is a good amount of documentation on how to stream video from a unit like that, take a look at Streaming Your Webcam w/ Raspberry Pi.

For the software, I personally have used Media Tomb (a UPnP MediaServer) and it works very good. So a search for raspberry pi mediatomb streaming video or raspberry pi media server would probably get you set and going.

share|improve this answer
add comment

If you just need a basic video feed consider using Motion JPEG to send the data across the network. Basically you will interface your camera to the Arduino and run a web server to send a series of JPEG images to a browser. The quality and frame-rate aren't great, but it's light on processing if your camera outputs JPEGs. As an added benefit, it's easy to throttle the frame-rate if the WiFi bandwidth is too low.

On the iPad side you'll connect to your Arduino server and read in the JPEG images as they are sent to you. It looks like it's already been tried on Arduino, this thread could probably get you started.

share|improve this answer
1  
Even compressed, the Arduino's 2K of ram is unlikely to be enough to handle the image data, packet buffer, etc, unless the camera is willing to provide the data of a single image in multiple chunks when requested. –  Chris Stratton Nov 28 '12 at 22:28
    
He could always add external RAM. Frankly I'm not sure Arduino is the best option anyway, but he asked about it specifically –  Nate Nov 29 '12 at 14:22
2  
Adding external RAM to an ATmega328 would be highly inefficient. The chip is entirely inappropriate to this application. There are much better choices with moderate amounts of onboard RAM, or real memory busses to interface to external (or stacked) RAM, as well as better support for peripherals such as USB. –  Chris Stratton Nov 29 '12 at 15:25
add comment

So just like in your previous question you need to tell us what you're trying to do. I know that you think it sounds straightforward but there are a million possible answers to your question and right from the start I can tell you don't know what it is that you need. As stated in the answer to the question you asked before you should tell us what you're expecting to get out of this, and as for "getting started" I would recommend figuring out how to do this in a simple context.

For example, since you've given us no context at all, I will recommend that you don't interface with a microcontroller at all. Just buy this or any number of premade solutions.

If that doesn't suit your needs go buy a netbook or tablet with built-in wifi and a camera, and simply have it stream over wifi to another computer. This is significantly easier and can be accomplished with simple software if that's all you need. If you need help making software which does something more elaborate than that work I'm sure the helpful people over at Stackoverflow could help you solve that problem.

For another cheap and relatively simple solution, go buy a TP-Link TL-WR703N, install openwrt, and figure out how to use it and program it with a usb-camera.

I can tell you how to solve the problem you're asking me to help you solve, but I'm not going to put in the effort of answering it when it doesn't sound like you actually need me to do it. If one of the options I provided helps you solve your problem? Great, but in the future: questions are best asked with a lot of specifics. Please try to look for keywords that might help others answer your question rather than posting the same question repeatedly with no context.

share|improve this answer
2  
But then how will he needlessly shoehorn an Arduino into the project? –  Joe Baker Nov 28 '12 at 7:49
3  
@JoeBaker you would use the Arduino to blink a red LED so you know everything is working, of course :) –  Garrett Fogerlie Nov 28 '12 at 13:17
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.