From CDOT Wiki
Jump to: navigation, search
Early Peapod circuit layout, mylar mockup, LiR2050 rechargeable coin cell, and Huzzah development module (carrying the ESP12F module) - April 2016.
Peapod is the development name for a proposed IoT / User-Interaction device which may be given to attendees at FSOSS 2017. This article describes the development of this device from conception through August 2017.
Peapod Ver 1.0 device, September 2017. PCB designed by Ethan Childerhose and Samantha Yao.


The Peapod design currently consists of:

  1. An ESP12F microcontroller+flash+wifi module
    • This module provides inexpensive connectivity and low-power compute
    • Includes GPIO connections for user input and an LED for input confirmation
    • Available for about U$1.90 in bulk
  2. A rechargeable lithium ion cell
    • 16850 cell selected (LiR2050 coin cell ruled out due to capacity)
    • This battery was selected because it has a nominal voltage of 3.6v (though a charged cell can output up to 4.2v). The ESP12F has a nominal supply voltage of 3.3v, but 3rd party reports and tests suggest that it can be powered by 2.6-4.2v. At lower voltages, the wifi circuitry does not perform well.
    • Energy storage is 1200-2500 mAh
    • There may be challenges getting this shipped to us in bulk - there are tight regulations about the transportation of lithium cells
    • Initial tests suggest that this cell might work as a direct power supply without any additional regulation or boost circuitry
  3. PCB
    • Originally considered: A flexible board can be folded over to connect to both sides of the cell, and to create two rows of opposing contacts which can be pressed together by the user to form a connection (i.e., pushbuttons)
    • Now under development: Traditional PCB roughly 20x70 mm with clips for cell, ESP module, low-profile tact buttons. Would be nice to include unpopulated (?) header for reprogramming after FSOSS, maybe some other unpopulated pads for LEDs and other things that would make this a fun and useful hacker circuit after the event.

The target cost of the device is < C$5 in the quantities needed for FSOSS (~250-300 units). Total project cost may be slightly higher depending on what additional devices are required, e.g., development kits, inkjet circuit printer, battery chargers.

The device codename, Peapod, comes from the device size and the original folded-over-circuit design, which are both reminiscent of a pea pod.

Software for FSOSS

The ESP8266 controller used in the ESP12F modules has a large and useful software library available. It can be programmed in Lua or C, with or without an OS (RTOS). There is 4MB of flash memory and 160 kB of RAM. Software is loaded via a serial interface and further OTA updates to that software are possible.

At present, it is envisioned that the Peapod will:

  • Gather wifi AP signal strength data at set intervals (every 5 minutes?)
  • When the user presses a button, blink the on-board LED in confirmation, and record the button press and timestamp
  • Forward the collected data at regular intervals (30 minutes?) via a WiFi connection to a server. By keeping the updates to a fairly slow pace, battery power can be preserved, and the number of simultaneously-active wifi sessions can be held to a manageable number.

The AP signal strength information is sufficient to determine the physical location of the device during the conference; this may be aided by additional access points added at strategic locations (which themselves could be ESP12F devices). Rather than perform the location determination on the Peapod (consuming energy), this analysis will be done on the server side. Various projects report that 2-3m accuracy is possible, but in our case, room-level accuracy is sufficient.

This configuration will enable:

  • A count of the number of attendees present at each of the presentations and workshops
  • Immediate feedback on the presentations and workshops (via the button-presses), correlated with location and time information to determine which presentation/workshop is being rated

Data Mining/Analysis Contest

It is proposed that the raw collected data be made available in real-time to the attendees, and that a contest be held for the most interesting use of that data by the end of the conference (such as: mapping attendee travels; heat-mapping sessions; doing fine-grained user location to determine who interacted with who at the conference; determining how many people left in the middle of each session; calculating the number of trips to non-session areas such as the break room, Tim Horton's, or the registration desk; mapping when people gave feedback on a presentation; calculating tardiness; figuring out which presentations ran overtime; etc...)

The data set for the conference will likely consist of:

  • about 42000 samples, each of which will consist of about 10 access point strength indications, GPIO button indications, the MAC address of the device, the room number as determined by the server, and the battery status
  • reference data, which will include floorplans of the event, the talk schedule, and reference AP strength indications at select locations throughout the conference

Information Package

Each user will be given an information brochure containing:

  • An overview of the Peapod device
  • How to use the Peapod to give feedback on sessions
  • Information about the data collected by the Peapod
  • Data-mining contest details
  • How to reuse the Peapod for personal IoT projects after FSOSS

Privacy Issues

To ensure full disclose and opt-in of the attendees:

  • When the device is distributed to each attendee at registration, there will be a brief verbal explanation of the device.
  • Attendees will be given a privacy statement as part of the Peapod information handout, and the option of opting out of the use of the Peapod.
  • The devices will be distributed unactivated (battery unattached), and there will be a notice attached to the battery connector.
  • A short information session will be held at beginning of each day's session.

In addition:

  • Devices will be identified by MAC address only, and no mapping of MAC address to attendee name will be performed.

Peapod after FSOSS

At the end of FSOSS, attendees will be given the option of:

  1. returning the Peapod device for re-use by the college and/or safe disposal, or
  2. keeping the device for their own experimentation. The Lithium cell is rechargeable and the ESP12F module can be flashed with any software of the user's choice.

A link to information about using the Peapod for personal projects will be included in the Peapod information given to each attendee, and we may have a contest at the next FSOSS for the most creative reuse of the Peapod device.

Student Involvement

It is proposed that the PCB design and software be prepared and tested by Shad Valley volunteer interns in August.


Project initiator: Chris Tyler