Tag Archives: Dog Hunter

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.

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.

Arduino’s Yún powers this Gmail (alert) lamp

The Atmel-powered Arduino Yún may have only begun shipping this week, but eager Makers like Stefano Guglielmetti have already begun using the board in various DIY projects. Specifically, Guglielmetti built a Gmail (alert) lamp programmed to ping him in real-time about incoming emails labelled “important.”

“I need to be alerted in real time when I receive some important emails. Not all the emails –  we provide customer care for many clients, with different SLAs, and I need to be alerted only for the most important ones,” Guglielmetti wrote in an official Arduino blog post. “Moreover, sometimes I look forward to receiving a [specific] email, [so] I need something flexible, eye catching, that doesn’t depend on my computer or my cellphone.”

According to Guglielmetti, the working principle behind the DIY project is really quite straightforward.

“On Gmail, I defined a new label, so I can quickly change the rules for the messages that will go under it, then I tell to Arduino Yún which label to watch for (via REST APIs… amazing) and that’s it,” he explained. “The lamp – actually only just an LED [for now] – turns on every time I get new messages under that label. It’s the bat-signal principle!”

In terms of the code, Guglielmetti says he leveraged a number of new features unique to the Yún.

“In a single day I learned how to use the Bridge library to get data from REST webservices, how to save and load data from the Linux filesystem, and how to run processes on the Linux side and get the STDOUT results,” Guglielmetti added. “Now I will build the actual lamp, improving both the hardware and software.”

Additional information about the Gmail lamp project can be found here.

As previously discussed on Bits & Pieces, the Yún – designed in collaboration with Dog Hunter – is based on Atmel’s 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 Arduino Yún can be snapped up for $69, or €52.

A closer look at the Atmel-powered Arduino Yún

The Arduino Yún – designed in collaboration with Dog Hunter – is based on Atmel’s ATMega32u4 microcontroller (MCU) and also features the Atheros AR9331, an SoC running Linino, a customized version of OpenWRT.

The new Atmel-powered board will be available on September 10, so today we’ll be taking a closer look at the Yún’s hardware. As previously discussed on Bits & Pieces, 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 Yún also features WiFi and Ethernet connections, enabling the board to communicate with networks out of the box. In addition, the Yún’s Linux and Arduino processors link through the Bridge library, allowing Arduino sketches to send commands to the command line interface of Linux.

“The Arduino Yún has the same footprint as an Arduino Uno but combines an ATmega32U4 microcontroller (the same as the Leonardo) and a Linux system based on the Atheros AR9331 chipset,” Arduino’s Federico Vanzati explained. “Additionally, there are built-in Ethernet and WiFi capabilities. The combination of the classic Arduino programming experience and advanced internet capabilities afforded by a Linux system make the Yún a powerful tool for communicating with the internet of things (IoT).”

According to Vanzati, the Yún’s layout keeps the I/O pins the same as the Leonardo and is therefore compatible with the most shields designed for Arduino.

“With the Yún’s auto-discovery system, your computer can recognize boards connected to the same network. This enables you to upload sketches wirelessly to the Yún,” he continued. “You can still upload sketches to the Yún through the micro-USB connector just as you would with the Leonardo.”

On the connectivity side, the Yún is equipped with two separate network interfaces, a 10/100 Mbit/s Fast Ethernet port and a IEEE 802.11 b/g/n standard compliant 2.4GHz WiFi interface, supporting WEP, WPA and WPA2 encryption. As expected, the WiFi interface can also operate as an access point (AP). In AP mode any WiFi enabled device can connect directly to the network created on the Yún. While a Yún in this mode can’t connect to the internet, it could act as a hub for a group of WiFi enabled sensors.

As Vanzati notes, interfacing Arduino with web services has historically been rather challenging due to memory restrictions.

“[However], the Yun’s Linux environment simplifies the means to access internet services by using many of the same tools you would use on your computer,” he said. “You can run several applications as complex as you need, without stressing the ATmega microcontroller.”

To help engineers and Makers develop applications that can connect to popular web services, Arduini has partnered with Temboo, a service that simplifies accessing hundreds of the web’s most popular APIs. In fact, a Temboo library is packaged with the Yún, making it easy to connect to a large variety of online tools.

Facilitating a seamless connection between the two processors is achieved via the Yún’s Bridge library, which connects the hardware serial port of the AR9331 to Serial1 on the 32U4 (digital pins 0 & 1).

“The serial port of the AR9331 exposes the Linux console (aka, the command line interface, or CLI) for communication with the 32U4,” Vanzati confirmed. “The console is a means for the Linux kernel and other processes to output messages to the user and receive input from the user. File and system management tools are installed by default. It’s also possible to install and run your own applications using Bridge.”

Of course, the ATmega32U4 can also be programmed from the AR9331 by uploading a sketch through the Yún’s WiFi interface. When connected to the same WiFi network as your computer, the board will appear under the “Port” menu of the Arduino IDE. The sketch will be transferred to the AR9331 and the Linux distribution will program the ATmega32U4 through the SPI bus, emulating an AVR ISP programmer.

Last, but certainly not least, the Yún can be powered through the micro-USB connector, the Vin pin, or the optional Power Over Ethernet (POE) module. When powering the board though the Vin pin, users must supply a regulated 5VDC, as there is no on-board regulator for higher voltages.

Additional information about the Atmel-powered Arduino Yún can be found on the board’s official page here.