Berrybasket

Open Hardware logging infrastructure (Raspberry Pi, Cosm, & MCP3008)

This project is maintained by bergey

Creative Commons License

We teach about circuits, sensors, programming, and data visualization at our local hackerspace. To reach a wider audience, we are introducing open hardware in a nearby public school. Our project integrated with a unit on solar energy, where students build cardboard houses with features to reject or retain heat.

We built an Internet-connected datalogger for use by about 60 students in the 5th & 6th grade science classes, measuring temperature in 14 houses over 5 days. We installed the houses & sensors on the school roof, showed students the hardware & software involved, and facilitated class discussion & graphing of the data. Each class looked at the performance of their houses and discussed patterns caused by weather, daylight hours, and mass & window treatments of the houses.

We presented a poster at the 2013 Open Hardware Summit. Check it out: (1.2 MB PDF preview) ( 23 MB SVG print resolution)

This website documents the hardware, software, and what we did in the school.

If you find some part of this useful for any purpose, we'd love to hear about it! Reach us at <bergey@teallabs.org>. If you have trouble making it work, let us know.

Software

  1. Install Adafruit Occidentalis 0.2 on your Raspberry Pi. If you prefer a different distro, make sure it has hardware SPI support.
  2. Connect to your RasPi over ssh. The easiest way is to plug the RasPi into the router with an ethernet cable, and run:
    ssh raspberrypi.local
    Occidentalis makes itself known under that name. If that doesn't work for some reason, you can log into the router and find the IP address; the most recently connected device is probably the RasPi.
  3. Install the python SPI library. (Details from this blog post):
    git clone git://github.com/doceme/py-spidev
      cd py-spidev
      sudo python setup.py install
  4. Download and install python packages for the online data store of your choice:
    • Cosm API:
      git clone git://github.com/petervizi/python-eeml
    • Thingspeak:
      pip install thingspeak
  5. Download the berrybasket logging script:
    git clone git://github.com/bergey/berrybasket.git
  6. Sign up for the online data store, create a new feed, and fill in the blanks in config.json. config.json has several sections, one for each supported online data aggregator, currently just "cosm", and one for the CSV, "logfile". You can leave out any section that you don't plan to use. For Cosm, the required fields are:
    • api_key
    • api_url appears in the URL of the feed webpage. It's the number in http://cosm.com/feeds/84597

Hardware

We're using the MCP3008 chip to convert analog measurements to digital. The pins down one side of the chip are analog inputs; the other side connect to the computer. The aforementioned blog post has good pictures of which pins go to which Raspberry Pi connections. Our schematic (below) shows wiring up two ADC chips. We've also made a two-layer PCB implementing this design.

Function Part # Manufacturer Vendor Link
Analog Digital Converter MCP3008 Microchip DigiKey
Single Board Computer RasPi Model B Raspberry Pi Adafruit
Screw Terminal 282834-4 TE Connectivity DigiKey
RasPi Perma-Proto 1135 Adafruit Adafruit
13x2-pin ribbon cable 862 Adafruit Adafruit
or RasPi T-Cobbler for prototyping 1105 Adafruit Adafruit

Future Work

Educational Connections

To develop skills and confidence with technology, beginners need systems which they can take apart, modify, and occasionally break. Open hardware hackers can help by writing good documentation, designing systems which are simple to understand, and contextualizing our work in our communities. People of various levels of experience learn that technology is comprehensible & controllable when they form connections to their current activities and build on their strengths and prior knowledge.

Groups of 3 or 4 students decided whether their design goal was to stay warm or stay cool, and built a solar house tuned to that goal. Each house started with the same cardboard frame, with a hole to act as a window. Students added cups of dirt, water, or sand to store heat, one or more layers of plastic wrap over the window, and aluminum foil & black paper to cover the exterior. One house frame was left unmodified to act as a control.

Visual representation and interpretation of data are key literacy skills. Using real data and computer graphing for this exercise encourages students to view their environment as something that they can model.

Prior to designing their houses for the rooftop experiment, students performed more controlled experiments in the classroom, with electric lamps substituting for sunlight. They measured temperature and prepared graphs manually.

Licensing