Make a Wind-based Ambient Display

by MArlauckas in Circuits > Art

1288 Views, 8 Favorites, 0 Comments

Make a Wind-based Ambient Display

20171215_121152.jpg

This is a class project designed and built by Trinh Le and Matt Arlauckas for HCIN 720: Prototyping Wearable and Internet of Things Devices at Rochester Institute of Technology.

The objective of this project is to abstractly visualize the direction and speed of wind in locations associated with RFID tokens. These two dimensions would be useful for anyone who pilots boats, flies drones, kites, model rockets, and so on.

The display would consist of an upward-blowing fan to make ribbons of fabric ripple and 'dance' above the table top. The liveliness of the ribbons would show the magnitude of the wind speed. Wind direction would be represented by an indicator connected to a stepper motor in the base and able to rotate a full 360°.

Materials and Tools

Housing

  • 1/8” Acrylic (PMMA) Sheets, suitable for laser cutting
  • 1/8” Acrylic Rods (for filling joints)
  • Fringy stuff

Electronic Parts

Wiring

  • Adafruit Perma-Proto Half Board (https://www.adafruit.com/product/1609)
  • 22 AWG wire, solid and stranded
  • 20 AWG, two-conductor wire (for power)
  • Male header connector strip (for fan and motor connections)
  • 2 - 12 pin female stackable header strips (for Photon)
  • 1 - 1x3 0.1” pitch female header strip (for fan transistor)
  • 1 - 1x8 0.1” pitch header connector and crimp socket contacts (RFID reader)
  • 1 - 1x2 0.1” pitch header connector and crimp socket contacts (fan)
  • 4 - 1x1 0.1” pitch header connector and crimp socket contacts (stepper motor)
  • 1 - 16-pin DIP socket (for H-bridge)
  • Small nylon tie-wraps (optional)
  • Heat shrink tubing (optional)

Hardware

  • 2 - M3x6mm screws (for mounting stepper motor)
  • 4 - M3x35mm screws (for mounting fan)
  • 8 - M3 flat washers
  • 4 - M3 nuts

Tools

Data to Represent

wu.png

The Wind Display will display a representation of wind direction and speed from a location associated with an RFID-tagged token. This data will be harvested from the WeatherUnderground API.In order to use this API, create an account at https://www.wunderground.com/weather/api, and select the plan option that best suits your needs.

Display Construction

20171207_073027.jpg
20171212_142950.jpg
57336409.png
3876368.jpg
20171205_135357.jpg
20171209_115158.jpg
20171212_173019.jpg
filler_rod.png
20171211_083709.jpg
20171211_083751.jpg
20171212_142059.jpg
20171212_142032.jpg
20171212_172732.jpg
20171212_175807.jpg
5886476.jpg
20171212_172627.jpg
20171212_172905.jpg
20171214_122908.jpg

Laser Cutting

Following the instruction manual for the laser cutter you'll be using, prepare the display Adobe Illustrator files (below) for cutting. You might need to rearrange the objects in the files to accommodate the size of the laser cutter you are using.

Laser cut the plates from 1/8" acrylic (PMMA) plastic sheets.

Assembly Jig

In order to maintain the regular pentagon outside angle of 116.6°, we designed a quick jig (assembly_jig.ai) to help with assembly the plates.

  1. Open the assembly_jig.ai file, and cut several pieces from corrugated cardboard.
  2. Glue them up in a stack, making sure the stack stays square.

Angle Filler Rods

Because the angles are not orthogonal to each other, we are using 1/8" acrylic rods to fill the gap, and provide more surface area for gluing. Pre-cut lengths of rod to be place between each plate, leaving a bit of room at each end for where the corners come together.

Assembling the Base

Start with the base piece with the large fan hole, and glue piece of acrylic rod on each of the five edges.

Place this fan piece on one slant of the assembly jig, and place a base side piece on the opposite slant side.

Carefully apply the adhesive to the joint and wait for it to set.

Continue working around the other sides of the base piece, making sure to attach a piece of filler rod wherever two plates meet.

Assembling the Deck
Glue the two stepper motor mounting disks back-to-back, being sure to line up the holes. When set, carefully using a tap to thread the two small holes for the M3 screws. Now, glue this to the center of the deck plate, again being sure to line up the center hole.

Attach the stepper motor using the two M3x6mm screws.

Assembling the Top

The top is assembled in the same way as the bottom, but with only four plates. You'll be leaving a gap where a fifth plate 'might' be located. Don't forget to use the acrylic rod with gluing up the top plates.

Electronics

finalproject_circuit_bb.png
20171211_104100.jpg
20171211_121034.jpg
20171211_121326.jpg

This project can be assembled quickly using a breadboard and jumper wires. Just follow the above diagram.

For a more committed built, well, then it's time bust out those mad soldering skills.

You DO have mad soldering skills, don't you? If not, here a few links to help correct that...

Using the Adafruit Perma-proto half board, lay out the components as shown in the Fritzing diagram above. Using sockets for the integrated circuits and transistor allows for quick and easy replacement if you happen to release any Magic Smoke (https://en.wikipedia.org/wiki/Magic_smoke).

Solder header pins/sockets to the board to help connect the outlying components (stepper motor and fan) and make them easily swappable (see ‘Magic Smoke’ above). Solder power and ground wire in place first, trying to keep them as short and direct as possible. Solder the DC power jack to one end of a length of the 20AWG two-conductor wire, and the other end to the top power rails (board oriented with Photon headers to the left).

Solder wires to make the circuit connections. In some cases, it is easier to run wiring on the bottom of the board. For the RFID reader, the stackable headers for the Photon allow ample room for connections to be made under the Photon. Terminate the RFID wires with the 1x8 header connector, to attach to the RFID reader's header.

Install Electronics

20171212_181650.jpg
20171214_141217.jpg
20171214_141204.jpg

Once the base is glued up, install the fan in the base using the four M3x35 screws, washers and nuts.

Attach the main board to the inside of the back plate (the plate with the rectangular cutout for the DC barrel jack) using the foam-backed mounting tape.

Insert the DC barrel jack into the rectangular hole, and cement in place using the acrylic adhesive.

Attach the RFID reader board to the connector and mount wherever convenient using the foam-backed mounting tape. It's okay if the back of the board faces the outside of the display, the antenna will still pick up the RFID signal. Secure the Blue LED close by.

Plug the fan and stepper motor into the main board.

Programming

New to Particle Photon? https://docs.particle.io/guide/getting-started/intro/photon/

This project will use Particle Webhooks to harvest the wind data. Here's the process, in a nutshell.

  1. The device waits for a token to be scanned.
  2. When a token is scanned, the unique token ID is stored.
  3. The device then publishes this token ID to Particle.io.
  4. Upon receiving this data, Particle.io sends the data to our API page via webhook integration.
  5. The API page receives the token ID, and looks up the city and state associated with it from the Locations array.
  6. The API page then makes the AP call to WeatherUnderground (WU) using the location information.
  7. The WU API returns a JSON object of the complete current weather conditions for that location to the API page.
  8. The API page parses this info, extracts and converts the wind direction and wind speed, and returns them to the device as a JSON object.
  9. The device parses the JSON object, storing the wind direction and speed to be used to control the stepper motor and fan.


Firmware

Create a new Photon project called 'wind_display' and overwrite the main file with the wind_display.ino code (below).

Next, find and install the following libraries in your project:

  • MFRC522 - v0.1.4 RFID library for Particle Devices
  • SparkJSON - v0.0.2 JSON library Ported from @bblanchon
  • Stepper - v1.1.3 Stepper Motor library for Arduino

Compile the project and download to your Photon.

API Page

In order to use the API page, you'll need to upload it to a PHP-enable web server. There are many free PHP web hosting options available.

Download getWindData.txt and change the file extension to .php. Open in your preferred editor and make the following changes:

Add you Photon Core ID:

//  Add the core_id for Photons you'd like to allow to use this API<br>$allowedCores = array(
	'Your CoreID goes here'
);

Add your WeatherUnderground API Key:

//  WeatherUnderground API Key<br>$wu_apikey = "Your WU API Key";

At this time, don't worry about setting the tokens/locations. We'll take care of that after everything is set up.

Save and upload the file to the web server. Record the live URL for the API page.

Particle Webhook

Log in to your Particle Console, and click on the Integrations icon on the left side.

  1. Click on 'New Integration', then select 'Webhook'.
  2. Set Event Name to 'wind_display'.
  3. Set URL to the live URL of the API Page.
  4. Click 'Create Webhook'.

Get RFID Token IDs and modify the API page

With the Photon plugged into your computer via USB, and unplugged from the external power supply, open a terminal window and run the Particle Serial Monitor.

  1. Scan an RFID tag and write down the 8-character token ID that is displayed in the serial monitor.
  2. Repeat for any additional tags you'd like to use.

Now go back to getWindData.php and find the Locations array section:

// Locations Array<br>// Replace "TokenID n" with scanned token ID
// Replace "Cityn" with city associated with token ID
// Replace "Sn" with two-char state associated with city
$locations = array(
	"TokenID 1" => array("city" => "City1", "state" => "S1"),
	"TokenID 2" => array("city" => "City2", "state" => "S2"),
	"TokenID 3" => array("city" => "City3", "state" => "S3")
);

Replace each token ID with the token IDs of your tags, and associate each with a city and state you'd like wind information from.

Save the file and upload to your web server.

Use It!

Wind Direction Speed Visualization
  1. Display it wherever you'd like.
  2. Set the wind vane to point north.
  3. Plug in the power supply.
  4. Place a token near the RFID reader and wait for the blue LED to blink.

Further Ideas

Here are some ideas to extend the project!

  • Add a web interface for the API page to add new tokens/locations more easily.