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°.
Step 1: Materials and Tools
- 1/8” Acrylic (PMMA) Sheets, suitable for laser cutting
- 1/8” Acrylic Rods (for filling joints)
- Fringy stuff
- Particle Photon (https://store.particle.io/collections/photon)
- 2.1mm DC barrel jack (https://www.adafruit.com/product/373)
- 12VDC 600mA Power supply with 2.1mm plug (https://www.adafruit.com/product/798)
- DC-DC Power Converter (https://www.digikey.com/product-detail/en/murata-power-solutions-inc/OKI-78SR-12-1.0-W36-C/811-3293-ND/6817698) OR 7805 Voltage Regulator circuit (https://www.instructables.com/howto/7805/)
- MFRC522 RFID Reader Board (https://www.amazon.com/dp/B00VFE2DO6/ref=cm_sw_su_dp)
- L293D Dual H-Bridge Motor Driver (https://www.adafruit.com/product/807)
- 12V Stepper Motor (https://www.adafruit.com/product/918)
- 120mm 12VDC Fan (https://www.amazon.com/Kingwin-CF-012LB-Efficient-Excellent-Ventilation/dp/B002YFP8BK)
- S9013 NPN Transistor (or similar)
- 2 - 220 Ohm resistor
- 1N4001 Diode
- 5mm Blue LED
- Mifare Classic 1K RFID sticker tags (https://www.amazon.com/YARONGTECH-MIFARE-Classic-Material-adhesive/)
- 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)
- 2 - M3x6mm screws (for mounting stepper motor)
- 4 - M3x35mm screws (for mounting fan)
- 8 - M3 flat washers
- 4 - M3 nuts
- Laser cutter
- 3D Printer
- Soldering tools
- Acrylic adhesive (https://www.amazon.com/Acrylic-Plastic-Cement-Applicator-Bottle/)
- Flat corrugated cardboard sheets (for assembly jig)
Step 2: Data to Represent
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.
Step 3: Display Construction
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.
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.
- Open the assembly_jig.ai file, and cut several pieces from corrugated cardboard.
- 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.
Step 4: Electronics
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.
Step 5: Install Electronics
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.
Step 6: 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.
- The device waits for a token to be scanned.
- When a token is scanned, the unique token ID is stored.
- The device then publishes this token ID to Particle.io.
- Upon receiving this data, Particle.io sends the data to our API page via webhook integration.
- The API page receives the token ID, and looks up the city and state associated with it from the Locations array.
- The API page then makes the AP call to WeatherUnderground (WU) using the location information.
- The WU API returns a JSON object of the complete current weather conditions for that location to the API page.
- 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.
- The device parses the JSON object, storing the wind direction and speed to be used to control the stepper motor and fan.
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.
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.
Log in to your Particle Console, and click on the Integrations icon on the left side.
- Click on 'New Integration', then select 'Webhook'.
- Set Event Name to 'wind_display'.
- Set URL to the live URL of the API Page.
- 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.
- Scan an RFID tag and write down the 8-character token ID that is displayed in the serial monitor.
- 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.
Step 7: Use It!
- Display it wherever you'd like.
- Set the wind vane to point north.
- Plug in the power supply.
- Place a token near the RFID reader and wait for the blue LED to blink.
Step 8: 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.