Tag Archives: Marc-Olivier Schwartz

Adafruit builds a Yún-powered security camera

Adafruit’s Marc-Olivier Schwartz has designed a DIY wireless security camera built around an Atmel-based Arduino Yún (ATmega32u4), USB webcam, microSD card and a PIR motion detector.

“The first application [of the Yún-powered security camera] will be a modern version of standard tasks that you want for a security camera: taking pictures when some motion is detected. The project will store pictures taken by the USB camera on an SD card inserted into the Yún, but that’s not all,” Schwartz explained.

“Because we are in the age of the Internet of Things (IoT), we also want these pictures to be automatically uploaded on a secure location. And that’s exactly what we are going to do by uploading the pictures to Dropbox at the same time.”

As expected, the Yún-powered security camera is also capable of streaming video directly to YouTube.

Schwartz recommends kicking off the project by inserting the SD card into the Yún, connecting the camera to the USB port and linking the motion sensor (VCC pin to the Yun 5V pin, GND to GND, SIG pin to the Yun pin number 8).

After connecting to a PC via the microUSB port, Makers should configure their Temboo and Dropbox accounts. Subsequently, additional software needs to be install on the Atmel-based Yún, including UVC drivers, python-openssl package, fswebcam utility and the mjpg streaming library.

In terms of streaming videos to YouTube, Schwartz first creates a local stream which is then transmitted to a PC via Wirecast and finally, to a YouTube live event.

“Of course, there are several ways to build other cool applications using this project. You can drop the motion detection part and build a camera that take snapshots at regular intervals and upload these on Dropbox,” Schwartz added.

“You can [also] easily create time-lapse videos with this kind of project: just collect the pictures from your Dropbox account, paste them into a time-lapse software. You can also extend this project by adding more Yún + camera modules, to have a complete video monitoring system in your home.”

Interested in learning more? Schwartz’s detailed tutorial is available on Adafruit’s learning system here.

Readers may also want to check out other Yún-based Maker projects including an electricity monitor, mesh extender platform, Foursquare soap bubble machine, a Gmail (alert) lamp, water heater regulator and the high-five camera.

Building a Yún-powered weather station

The Arduino Yún – designed in collaboration with Dog Hunter – is based on Atmel’s popular ATMega32u4 microcontroller (MCU) and also features the Atheros AR9331, an SoC running Linino, a customized version of OpenWRT. The Yún is somewhat unique in the Arduino lineup, as it boasts a lightweight Linux distribution to complement the traditional microcontroller (MCU) interface.

The Atmel-powered Yún – which hit the streets late last year – has been used in a wide variety of Maker projects that we’ve recently covered on Bits & Pieces, including an electricity monitor, mesh extender platform, Foursquare soap bubble machine, a Gmail (alert) lamp, water heater regulator and Evil Alarm System.

Today, we’re going to be taking a look at how Marc-Olivier Schwartz built a cloud-connected weather station with the Yún. Aside from the Atmel-based board, key hardware specs include:

  • DHT11 (or DHT22) sensor and 4.7K resistor (for humidity)
  • 
BMP085 sensor on a simple breakout board/Adafruit BMP180 sensor board (for pressure and temperature)
  • Photocell with a 10K Ohm resistor (light level)
  • Breadboard + assorted male-male jumper wires

On the software side, Schwartz used the Arduino IDE, Temboo, DHT library, the BMP085/BMP180 library, unified sensor library and a Google Docs account for the collected data to be analyzed and stored.

“The hardware connections for this project are actually quite simple: we have to connect the DHT11 sensor and then the part responsible for the light level measurement with the photocell. First, connect the Arduino Yun +5V pin to the red rail on the breadboard and the ground pin to the blue rail,” Schwartz explained in a detailed Adafruit tutorial.

“Then, connect pin number 1 of the DHT11 sensor to the red rail on the breadboard and pin number 4 the blue rail. Also connect pin number 2 to pin number 8 of the Arduino Yún. To finish up with the DHT11 sensor, connect the 4.7k Ohm between pin number 1 and 2 of the sensor.”

Next up is the photocell.

“First place the cell in series with the 10k Ohm resistor on the breadboard. Then, connect the other end of the photocell to the red rail on the breadboard and the other end of the resistor to the ground. Finally, connect the common pin to the Arduino Yún’s analog pin A0,” Schwartz continued.

“For the BMP085 or BMP180 sensor, connect the VIN pin to the +5V, GND to Ground, SCL to Arduino Yún pin number 3 and SDA pin to Arduino Yún pin number 2.”

According to Schwartz, multiple Yún boards can be used in various parts of a single residence.

“You can also customize the email alert part: you can build more complex alerts based on the measured data, or set the project to email you the sensor data at a regular time interval,” he added.

Interested in learning more? You can check out Schwartz’s full Adafruit tutorial here.