Breezefinder: Citizen Wind Energy

Anyone who has walked down Tenth Avenue after a rainstorm is familiar with the broken umbrellas scattered everywhere–stuffed into trashcans, abandoned in corners. If the city is so windy, why aren’t there wind turbines everywhere?

As it turns out, the technology to harness unpredictable urban winds is pretty new, but an even bigger problem is a lack of data. Breezefinder is a citizen science solution to the question: where is wind energy?

Main challenges: coding with string and char functions, mastering GPS and phone functions in a relatively new Arduino library, power supply

Eventful mishaps: setting the FONA on fire (just a little)

Next time: a more appropriately designed housing, consolidated power management, no fire

I am really proud of how this project turned out and would like to take it further in the future. Right now my sample data is available @breezefinder on Twitter, and if I had the chance, I’d love to have several Breezefinder feeds collecting data. The Instructable for making Breezefinder yourself is here.

The code:

#include “Adafruit_FONA.h”
#include <SoftwareSerial.h>

#define FONA_RX 2
#define FONA_TX 3
#define FONA_RST 4

SoftwareSerial fonaSS = SoftwareSerial(FONA_TX, FONA_RX);
SoftwareSerial *fonaSerial = &fonaSS;

Adafruit_FONA fona = Adafruit_FONA(FONA_RST);

const int analogInPin = A0;  // Analog input pin that the anemometer is attached to
float outputValue = 0; //value output to PWM (analog out) controls m/s reading

int sensorValue = 0;        // value read from the pot
int threshold = 10.00;          // change this to your desired triggering anemometer reading
char sendto[21] = “40404”;
String label = String(“Yes! windspeed = “);
String label2 = String(” GPS location is “);
String messageString = String();
char message[141];

void setup() {
// initialize serial communications at 9600 bps:
Serial.begin(9600);

Serial.println(F(“Breezefinder SMS test”));
Serial.println(F(“Initializing….(May take 3 seconds)”));

// make it slow so its easy to read!
fonaSerial->begin(9600);
if (! fona.begin(*fonaSerial)) {
Serial.println(F(“Couldn’t find FONA”));
while(1);
}
Serial.println(F(“FONA is OK”));

// Print SIM card IMEI number.
char imei[15] = {0}; // MUST use a 16 character buffer for IMEI!
uint8_t imeiLen = fona.getIMEI(imei);
if (imeiLen > 0) {
Serial.print(“SIM card IMEI: “); Serial.println(imei);
}

Serial.println(F(“FONA is OK”));
// Try to enable GPRS

Serial.println(F(“Enabling GPS…”));
fona.enableGPS(true);

Serial.println(“FONA Ready”);
}

void loop() {
// read the analog in value:
sensorValue = analogRead(analogInPin);

// map the incoming sensor data to the range of the digital out:

/* analog inputs will always bring in a value from 0-1023,
and the second set of numbers in the map function
describe the resulting range.

The sensor is supposed to have a linear relationship from voltage to wind speed,
so this math should result in a multiplier you can use to figure out m/s from the anlog input.
1023/32.4=31.57
*/
outputValue = map(sensorValue, 80, 500, 0, 31.57); //because 1023 is the normal value, but it maps to 5V in the Arduino, I changed it to 500.
//80 is the minimum value of the serial log
// print the results to the serial monitor:
Serial.print(“sensor = ” );
Serial.print(sensorValue);
Serial.print(“\t output = “);
Serial.println(outputValue);

// alter LED state
if (outputValue > 9){ //now you can evaluate for actual wind speed
Serial.print(“YES”);
digitalWrite (ledPin, HIGH);}
else {
Serial.print (“NO”);
digitalWrite (ledPin, LOW);
}
// wait 2 seconds before the next loop
// for the analog-to-digital converter to settle
// after the last reading:
delay(10000);

// read the GPS value
delay(2000);

float latitude, longitude, speed_kph, heading, speed_mph, altitude;

// if you ask for an altitude reading, getGPS will return false if there isn’t a 3D fix
boolean gps_success = fona.getGPS(&latitude, &longitude, &speed_kph, &heading, &altitude);

if (gps_success) {

Serial.print(“GPS lat:”);
Serial.println(latitude, 6);
Serial.print(“GPS long:”);
Serial.println(longitude, 6);
//    Serial.print(“GPS speed KPH:”);
//  Serial.println(speed_kph);
//Serial.print(“GPS speed MPH:”);
//    speed_mph = speed_kph * 0.621371192;
//  Serial.println(speed_mph);
Serial.print(“GPS heading:”);
Serial.println(heading);
Serial.print(“GPS altitude:”);
Serial.println(altitude);

} else {
Serial.println(“Waiting for FONA GPS 3D fix…”);
}

// print the results to the serial monitor:

messageString = label + outputValue + label2 + fona.getGPS(&latitude, &longitude, &speed_kph, &heading, &altitude); //HOW DO I GET GPS DATA IN HERE?
messageString.toCharArray(message, 141);
if (outputValue > threshold){
//Send an automatic response
Serial.println(“Threshold exceeded, sending reponse…”);
if (!fona.sendSMS(sendto, message)) {
Serial.println(F(“Failed”));
} else {
Serial.println(F(“Sent!”));
}
}

// wait 2 milliseconds before the next loop
// for the analog-to-digital converter to settle
// after the last reading:
delay(2);
}

Making a citizen science wind power tool–tutorial DRAFT

Hey guys,

Ever wondered how much energy you could capture right on the street? Or on the roof of your house? Or–you devious creature–on the roof of someone ELSE’S house? Get ready to explore with me the process of making a wind power diagnostic tool, which can tell you anywhere in the world whether or not an environment can support a vertical-axis turbine.

At 10 meters/second, most vertical-axis turbines generate energy, so this device uses an anemometer to measure wind speed, a GPS to log its location data, and Bluetooth technology to push data to adafruit.io.

Let’s get started:

  1. [a nice layout image of the parts] Gather the materials: Arduino Uno, breadboard, Bluetooth shield, li-ion battery pack, anemometer, wires, soldering iron and co., materials for housing the finished model
  2. Also, since you’ll be using a SIM card and adafruit.io for this model, register your card [here] and sign up for adafruit.io [here].
  3. If you haven’t already, download the Arduino program [at this hyperlink]. Then, use [this online tutorial] to download the code libraries for [these parts, separated by commas, linking back to the Adafruit website].
  4. Before we test the code, we need to assemble the parts in a “working” order, so get out your breadboard and wires. If you’re using multi-stranded wire, solder the ends if you need to [picture of before and after soldering wire].
  5. [step-by-step images of assembling the breadboard] [a simplified wiring diagram] Following the diagram, wire the Arduino to the [parts] as shown.
  6. Now, hook up the Arduino to your computer and fire up the program. Delete the default text and enter [this code]. If you’re code-averse, this is where you can stop paying attention, but for those of you who want to know how I did it, read the comments and check out [these tutorials] for some of the original inspiration for the code.
  7. Hit the “Upload” button. The LED on your Arduino board should flicker, and the prototype should be in action!
  8. To test this prototype, uncomment the Serial.output section of the code [screenshot here] and blow on the anemometer. A window should display the wind-speed values you are producing with your breath. If it does, success!
  9. Follow a similar testing procedure to make sure the device hooks up to your adafruit.io account and produces the same values.
  10. Before you take your device into the wild, you want to protect it. This is the step where you make the housing!
  11. [follow the illustrated directions to make the housing, probably out of cut acrylic, or cardboard for the truly DIY] [in either case templates will be available for download]
  12. Secure the device in its new housing and shut it securely. You are now ready to see where the wind takes you!

Motor exercise (more things to come!)

I made a motor spin! This is my first project with enough bits on the breadboard that I’m not entirely sure what they all mean (what’s that diode do, anyway? and why is the 9 pin not connected to the motor??). BUT, that just means getting more practice for the final project! I’ve been excited since the beginning of class to work with more complicated sensors and data outputs, so this might seem like a very uncomplicated breadboard in another six weeks’ time…

Alexa Forney: The Bedside Companion

The old joke is that readers never sleep alone–they always have a book in the bed. Now, night readers of the world have two companions. A book, and a handy light!

Avoid getting out of bed with a lamp that stays under your head while you sleep. This pillow folds in half, neatly activating a reading light as you adjust it under your back.

Components include conductive fabric, warm DotStar LEDs, and a hearty dose of help from Jenna Witzleben, who deserves to be the first to enjoy a cup of tea and a good book with the Bedside Companion.

Process:

IMG_2646 IMG_2651

Pardon the lack of sewing photos–I was using both hands.

Environmental sensors!

For me, this is actually the most exciting assignment so far, because I finally get to play with OBJECT-ORIENTED electronics! In other words…I get to touch things. No fancy LED displays for me, people, it’s squeezing, turning, and poking from here on out.

View this post on Instagram

Jazz hands for a successful fade-in @bekathwia

A post shared by Alexa (@oloxo) on

View this post on Instagram

Squeeze me! @bekathwia

A post shared by Alexa (@oloxo) on

Foxfire by Alexa Forney

For generations, foxes and fashionable women have had a contentious relationship.

But a new era has dawned, and now fashionable ladies and foxes can coexist in peace. As a gesture of friendship, foxes are lending their gift of foxfire to the women of the world, in exchange for admittance to their fancy cocktail parties.

IMG_2219

This concept evolved fairly quickly from a rough sketch–of my ideations it was my strong favorite from the get-go. Drafting an altered Peter Pan collar was my first step; my classmates suggested that a fully stuffed fox would stray into neck-pillow territory, so I opted instead for a thick velvet fabric that would have some volume on its own.

IMG_2299IMG_2309 IMG_2311

I left both ends open after sewing the collar to allow insertion and adjustment of my LED array; they are wired parallel to each other. One in each ear, two in the tail.

IMG_2313

Foxfire!

LED light circuit and a sneak preview of this week’s plush development…

Let this stuffed badger be your hint–it’s going to be an animalsome lighting project coming up!

[EDIT: My laptop screen is on the fritz, so I haven’t been able to coordinate transfer of the nice photos I have of my LED array from my camera to my hard drive… Will re-edit ASAP.]

Piezo music edit and LED random color generation

Not without its ups and downs, I managed to produce a new music piece on the piezo:

And generate some nice colors on the multicolor LED! Next: synchronized lightshow…?

Alexa: Exercises 2 and 6

Wow! It really took a village to get everything to work this time. Exercise 2 needed a couple little adjustments to the code:

View this post on Instagram

@bekathwia Eyyyy! It works!

A post shared by Alexa (@oloxo) on

And Exercise 6 mystified at least five troubleshooters, before we identified the problem: there were too many wires.

You can check more out at @oloxo on Instagram.

Alexa: Automatic Stapler Teardown

Who doesn’t love an automatic stapler? These powerful machines will run a staple through up to 25 sheets of paper at a time, using nothing but an optical sensor and a good solid “thwack” from within.

IMG_1861

I started by prying apart the carapace, and found a treasure trove of goodies.

IMG_1888 IMG_1884 IMG_1944 IMG_1941

Springs, wires, and interlocking gears comprised the main mechanical component, and I also scored an engine, an optical sensor, and a really neat circuit board.

IMG_1927

I’m not sure what this thing does? Maybe the crowd will know.

Continue reading “Alexa: Automatic Stapler Teardown”