Tag Archives: electricity monitor

Adafruit builds a WiFi Yún soundboard



Adafruit’s Tony DiCola has put together a detailed tutorial describing how to transform an Atmel-based Arduino Yún (ATmega32u4 MCUinto a soundboard that can be controlled from a webpage over WiFi.

Aside from the Atmel-powered Arduino Yún, key project components include a MicroSD card with 20 megs of available space and a USB audio adapter (or USB speakers).

“Before you get, started you will want to have your Yun connected to your wireless network and be familiar with connecting to the Yún over SSH,” DiCola explained.

The project’s first step? Making sure the MicroSD card is inserted into the Yun and powered on. After connecting to the Yún with SSH, Makers are instructed to install the audio and drivers.

Next up? Installing and configuring the Flask web application framework.

“Once the audio and Flask setup steps are complete, you can install the software for this project,” said DiCola. “While connected to the Yun over SSH, execute commands to download the software and unzip it on the SD card.”

As DiCola notes, Makers can add their own sounds to the soundboard by simply copying MP3 files into the YunSoundboard-master/sounds folder. For Mac or Linux, the scp tool is used to copy files from a PC to the Yun by executing in a terminal. On Windows, Makers will need to install the pscp utility, with the syntax the same as used for the Mac/Linux command, except for the ‘pscp’ command instead of scp.

“Once the sounds are copied over, reload the web page and you should see them added to the list of sounds automatically,” he noted.

According to DiCola, the above-mentioned project is a great example of how to use the Yún’s Linux processor to host a web application and play sounds. Of course, the basic project can be modded or expanded to run on other boards. Makers can also copy their music collection to the device for WiFi controlled boombox, or hook up a PIR motion sensor to the Yun and have the web page alert them if someone is near the device and ready to be pranked.

As we’ve previously discussed on Bits & Pieces, the Atmel-powered Yún has been used in a wide variety of Maker projects that we’ve recently covered, including an electricity monitor, mesh extender platform, high-five cameraFoursquare soap bubble machine, a Gmail (alert) lamp, water heater regulator, smart measuring camera and a security camera.

Interested in learning more about building a WiFi Yún soundboard? You can check out Tony DiCola’s full tutorial on Adafruit here.

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.

Arduino Yún powers this electricity monitor

A Maker by the name of “Akellyirl” has designed an electricity monitor built around an Atmel-powered Arduino Yún.

As previously discussed on Bits & Pieces, the 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.

Key features of Akellyirl’s project include a WiFi connection to facilitate continuous monitoring, TEMBOO for cloud support (with Google APIs), as well as automatic recording and writing of power consumption to a Google Drive Spreadsheet (+ analysis).

“A nice feature of this project is that the monitoring is flexible and completely wireless (except for the current transformer of course),” Akellyirl wrote in a detailed Instructables post. “This allows continuous monitoring from a PC or phone and permanent storage on the Cloud.”

To build the above-mentioned electricity monitor, Makers will require the following components:

  • Arduino Yún (ATmega32u4)
  • Current transformer (e.g. SCT-013-030)
  • 2 x 10kOhm resistors
  • 1x 47uF capacitor
  • Some wires, breadboard
  • 5V power supply for the Yún (smartphone charger)

“The circuit is actually very simple. It consists of a voltage divider to bias the ADC of the Arduino to a DC voltage, [with a] voltage output current transformer adding an AC voltage proportional to the AC current flowing in the cable. The capacitor forms a low pass filter with the resistors to remove noise,” Akellyirl explained.

“[Meanwhile], the current transformer produces a current proportional to the current flowing though it’s magnetic circuit. The proportion of the current in the cable that you get in the transformer is equal to the turns ratio. [For example], 30A corresponds to an output voltage of 16.67mA x 62 Ohms = 1V (rms).”

Interested in learning more about building an Arduino Yún-powered electricity monitor? You can check out Akellyirl’s detailed tutorial over on Instructables.