1
\$\begingroup\$

I'm not good at electronics and I develop software mostly. But now I'm working on a project that I need to learn about IoT.

I want to have the microcontroller take photos and send it to a web server via WiFi. Also, it receive command from the server.

I've looking for some tutorials but haven't get anything useful.

I wonder how do I choose the microcontroller? I only have experience with stc 51 and stm32 and I've heard about Arduino and Rasperry Pi.

I'm thinking about using ESP8266 but is it able to implement what I want?

\$\endgroup\$
  • 3
    \$\begingroup\$ Microcontrollers don't take photographs, cameras do. \$\endgroup\$ – Andy aka Oct 24 '16 at 12:56
  • 3
    \$\begingroup\$ Actually quite a complex project; you're best off finding hardware that can already do it such as the Pi + camera module. \$\endgroup\$ – pjc50 Oct 24 '16 at 13:06
  • \$\begingroup\$ @Andyaka Yes, I know that I should have a camera to do that. I want the camera to take photos and let the microcontroller to send the photos to my server. Thanks for pointing out. \$\endgroup\$ – jinglei Oct 24 '16 at 13:15
  • 2
    \$\begingroup\$ Camera interfaces (MIPI/CSI) are high-speed digital. Most microcontrollers don't have one, and so can't be used with a camera. The Pi does, and the drivers have been written for you. \$\endgroup\$ – pjc50 Oct 24 '16 at 13:24
  • 1
    \$\begingroup\$ @pjc50 Actually I've never considered that much before, thanks a lot. Now I'm thinking about giving Pi a try. \$\endgroup\$ – jinglei Oct 24 '16 at 14:17
2
\$\begingroup\$

Implementing this type of project starting from the microcontroller up will be drastically more difficult than using SOC (system on a chip) like the Raspberry Pi or Intel Galileo etc. I've done this using the Raspberry Pi and python.

Here is a rough overview on the steps necessary to implement this on the Raspberry Pi:

-first start the Pi server using Apache to generate your personal server. A domain name is not required, but might be useful. Here is a guide on that.

-Connect a USB camera and gain familiarity. Here is guide on that.

-Within Linux, You can schedule photos using CRONTAB to store them in a particular folder.

Once you get the basics down, you can start using the GPIO headers to add sensors (to detect motion, heat, etc) and send email or text alerts. This can be accomplished in Python. Live streaming feed is also possible using OpenCV and Flask servers.

\$\endgroup\$
  • \$\begingroup\$ Hi! Thanks for your answer. It seems there's some misunderstanding between us. Actually what I want is, say if I use Pi, sending photos from Pi to my web server which hosts in the cloud. So I think here the Pi needs to connect WiFi and also control the camera. Have you done things similar? If any, could you please give me some instructions on how to send photos via WiFi? BTW, the camera part is quite helpful. :) \$\endgroup\$ – jinglei Oct 26 '16 at 2:30
  • \$\begingroup\$ Getting the Pi on WIFI is easy. The newest version has wifi already on it, of you can use a usb wifi dongle. Controlling the camera is also easy, its just a few commands. If you want to send these files to server outside your LAN you can use FTP. Be sure to check the raspberry pi stackexchange you'll find many similar projects there. \$\endgroup\$ – jmaturner Oct 26 '16 at 16:20
0
\$\begingroup\$

There are cameras designed specifically for small MCU designs, like OV7670. They implement typical low-speed protocols like SPI, I2C or specific ones like SCCB (which seems to be based on I2C). I'm not familiar with ESP8266 in particular, but I suppose it has to support at least some of these protocols.

Of course, there are no miracles and low-speed interfaces mean you'll have low resolution pictures and low frame rates. Above VGA resolution, SoC based designs like Raspberry Pi become increasingly attractive. If prace is a big factor, I know there's Orange Pi which costs under $20 including camera, though I have no idea how bad the picture quality is.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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