Library Chair Log

From ESE205 Wiki
Revision as of 07:52, 12 December 2017 by Jdfeher (talk | contribs) (Protected "Library Chair Log" ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite)))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Group Members

  • Josh Zucker
  • Tom Howe
  • Nick Blenko

Objectives

Our group's main objective is to create an interface that library goers can use to see which seats in the library are available, and which are occupied. This interface is dependent on voltage data obtained from a circuit hooked up to an arduino and affixed to the bottom of a library chair. When a human body moves close to the circuit, i.e when someone sits down in the chair, the output voltage changes and chair occupancy can thus be determined. This circuit will then communicate occupancy and location data to another arduino connected to a raspberry pi. The raspberry pi will in turn communicate this data to a web server. We are aiming for the circuit/arduino device to be accurate, low energy, and completely powered by solar panels.

As individuals we are simultaneously working on a few different smaller goals. These include: finalizing the circuit that will detect when someone is sitting in the chair, figuring out how to communicate effectively between the arduinos and how to generate the wave function necessary for the circuit to operate from an arduino, integrating a solar power source into the circuit, communicating data from the raspberry pi to a web server, and designing and implementing an aesthetically pleasing web interface.

Library Chair Project Page

Week of September 4

This week we began thinking of how we were going to approach the concept of building the library chair. Our original concept is a cushion on top of a weight sensor which is hooked up to an Arduino and Bluetooth transmitter which will transmit to a raspberry pi that will run the server and website where the data will be displayed. Each chair will send a 1 or 0 every minute to update the server with the chair either being open or occupied.

Week of September 11

This week we met with Professor Robert Morley who came up with the original idea of using circuitry to detect library chair occupancy. Morley had a working prototype of the chair in his office. He, instead of a weight sensor, used an RC circuit and square wave to detect whether or not someone was sitting in the chair. When someone would sit in the chair their body would increase the capacitance of the circuit and decrease the impedance of the circuit causing peak voltage in the circuit to drop, this could be measured with an Analog/Digital converter in an MCU and transmitted via radio signal. Morley gave us an MCU with a radio transmitter built in to use in our work.

Week of September 18

This week we met with Morley again to better understand the circuit he was using to measure the peak voltage. He showed us the idea of a peak detector; a circuit with a diode, capacitor, and resistor in it. The diode would only allow voltage through if it was greater than the voltage on the other side of the diode, the capacitor maintained voltage in the circuit so only peaks would be measured in the peak detector, and the resistor would drain current so that if there was a reduction in voltage, for example when someone would sit, the peak detector would be able to pick that up. This circuit makes measuring peak voltage much easier and we thus will not have to worry about measuring voltage on a part of the wave that is not the peak. We began modeling the circuit on LTspice and will hopefully begin prototyping soon. We also looked at potential problems we may face when getting the chairs to communicate with the processor, and then getting that information loaded onto a computer that can produce an interface for users to see which chairs are available. Our primary means of communicating to the server is currently a radio transmitter hooked up to an arduino, and then we plan to use a Raspberry Pi to get that information into a computer. We also looked into other alternatives we may use if we face problems with radio transmission. We thought that bluetooth could maybe be a feasible route, and looked into the puck.js, which is a low energy programmable bluetooth device. However, we are trying to work with radio for the time being. Finally, we got to work examining the low power MSP430 microcontroller that Professor Morley gave us. It came with a radio antennae, and connects through a USB port via a flash emulator. We found the correct IDE to use with the microcontroller (we think), and started exploring how to program it, getting simple "Hello World" type programs to run on it. We will be writing code in C, which we have extensive experience working with having taken CSE 132 in the last year. The next step is to write code that takes readings from the circuit attached to the chair, and discerns whether or not someone is sitting in it.

Week of September 25

This week we finished modeling the detection circuit for the chair and are now figuring out what values of capacitance and resistance to use in order to best detect someone sitting in the chair. We want to make the resistance relatively high and the capacitance relatively low in order to create a stable circuit that will easily detect someone. At the same time, if resistance is too high there won't be enough current flowing into the peak detector and if capacitance is too low the chair could be triggered by somebody walking by.

The detection circuit without values for capacitance and resistance

We also continued familiarizing ourselves with the TI MSP430-specific IDE, and investigated potential alternatives to RC circuitry for pressure sensing, including sparkfun (arduino) sensors, in case the RC circuit turns out to be too finnicky. Finally, we compiled all of the progress we have made thus far and updated our wiki page for the Library Chair. We also wrote a description of the circuit that we put together, and are currently working on how to upload images onto the wiki. In the coming days, we want to create a more comprehensive description of the circuit and how it works, and upload our Gantt chart of how we will divide our labor in the coming weeks and months.

Week of October 2

This week each of us continued working on our individual parts of the project. We continued physically prototyping the circuit and testing for ideal resistances and capacitances for the circuit and are beginning to test the effect of proximity to a person on the peak voltage in the circuit. We also continued working on the IDE for the TI microprocessor, getting it to run the "hello world" program and beginning to work on the code for the square wave generator and voltmeter. We also continued to work on creating a server with a raspberry pi.

Week of October 9

Josh

  • Worked on circuit using NI ELVIS (4 hours 10/7)
  • Worked on math behind calculating circuit element values (1.5 hours 10/9)
  • Continued prototyping circuit and incorporated calculated values (2 hours 10/11)

Tom

  • Acquired the Raspberry Pi we will be using for our project (1hr)
  • Looked into WifiDongles to use in the the implementation for relaying the information to the server (45 min)
  • Looked into feasibility of using an ethernet cable to connect to the server because Raspberry Pi has a port for that (45 min)
  • Need to decide on how our project will be (portable or needing an ethernet connection), maybe test if one is better than the other functionally
  • Connected my Raspberry Pi to the server (3 hr)
  • Found a potential domain service we can use for our online server (15 min)

Nick

  • Worked on getting the two microcontrollers to communicate with each other (~6 hrs)
  • Got further familiarized with CCS IDE and the syntax required to program the microcontrollers
  • Added weekly log link to project page, and added project page link to weekly log (10 mins)

Week of October 16

Josh

  • Worked on capacitor and calculating capacitance (5 hours 10/12)
  • Worked on physical prototype of chair (2 hours 10/16)

Tom

  • Found an online server to use (1 hour 10/16)
  • Drafted code to use for our user interface (4 hours 10/17)
  • Tinkered with Raspberry Pi to figure out how to communicate between the Pi and the server (2 hours 10/18)

Nick

  • Endeavoured to better understand the TI hardware/software microcontroller landscape
  • Worked on RF communication between microcontrollers and delved deep into MSP 430 user manual
  • (2 hours 10/18, 2 hours 10/17, 4 hours 10/16, 4 hours 10/14)

Week of October 23

Josh

  • Continued working on circuit, found capacitance of the plate (5 hours 10/19)
  • Began prototyping circuit on chair (2 hours 10/21)
  • Completed chair prototype (3 hours 10/25)

Tom

  • Got an EDIMAX Wifi Port for my Raspberry Pi (1 hour 10/19)
  • Worked on programming the website (4 hours 10/23)
  • Worked on Raspberry Pi with the website (2 hours 10/23)
  • Hopefully finishing it up today! (x hours 10/25)

Nick

  • Found and ordered arduino parts for RF communication (1 hr 10/19)
  • Searched for sample code and started wiring up arduinos (3 hrs 10/24)

Week of October 30

Josh

  • Finished circuit and began testing chair (4 hours 10/26)
  • Continued testing on chair (2 hours 11/1)

Tom

  • Stripped the website of the template so we could directly code (1.5 hours 10/28)
  • Applied the button to the Raspberry Pi, will hopefully get a signal tonight! (6 hours 11/1)

Nick

  • Wired arduinos and debugged/downloaded libraries (3 hours 10/30)
  • Successfully got one arduino to communicate a blinking light to another arduino using RF communication (3 hours 10/31)

Week of November 6

Josh

  • Worked on and tested circuit (2 hours 11/2)
  • Created working prototype of circuit on board (4 hours 11/3)
  • Worked on integrating circuit and arduino (2 hours 11/4)
  • Began to rebuild circuit after it was destroyed by an unknown vandal (2 hours 11/7)
  • Worked more to rebuild circuit (3 hours 11/8)

Tom

  • Met with professor Feher (0.5 hours 11/6)
  • Spent time researching HTML vs PHP (2 hours 11/6)
  • Readjusted Raspberry Pi to work with the 3 instead of my outdated version (2 hours 11/8)

Nick

  • worked to create function generator from arduino (2 hours 11/4)
  • successfully created arduino program that sends RF messages and serves as a function generator (? need to test to confirm it works) (4 hours 11/5)
  • rewrote 'overview' and 'objectives' section of group wiki page, added RF devices and arduino to budget (1 hour 11/7)

Week of November 13

Josh

  • Worked more on rebuilding circuit (4 hours 11/9)
  • Tested on circuit (2 hours 11/10)
  • Began integrating circuit and arduino (2 hours 11/14)
  • Continue working on and testing circuit (2 hours 11/15)

Tom

  • Ditched using PHP files, converted to html-ja-css and tested locally with that (3 hours 11/13)
  • Connected hardware to get a local response on my computer from an input (3 hours 11/14)

Nick

  • Researched and ordered 16 bit external ADC converter (11/13 2 hours)
  • Tried to integrate circuit and arduino (2 hours 11/10)

Week of November 20

Josh

  • Continued to work on circuit and test (3 hours 11/17)
  • Worked on circuit more and integrated into arduino, began to get successful results (3 hours 11/19)

Tom

Nick

  • Established arduino to pi communications (2 hours 11/19)
  • Created function generator with new more manageable 31kHz frequency (1 hour 11/19)
  • Wired in 16 bit external ADC converter and integrated with circuit (2 hours 11/19)

Week of November 27

Josh

  • Worked on finding best values for resistances (2 hours 11/22)
  • Began working on solar cells and designing case for arduino (3 hours 11/28)
  • Finished designing the case and began printing, soldered the final circuit to the circuit board (3 hours 11/29)
  • Final push, integrated batteries and solar with circuit, refined circuit, tested circuit connected to power, fixed bugs, assembled circuit with case on chair (14 hours 11/30 - 12/1)

Tom

Nick

  • Tested different frequencies and sampling rates to optimize voltage gap between vacant/occupied chair states (5 hours 11/24)
  • Created rolling average filter to smooth and glean a signal from the noisy voltage data (3 hours 11/24)
  • Tested and debugged - can now consistently/accurately determine correct chair state (at least on the chair from my kitchen table) (2 hours 11/24)
  • Researched solar circuits and purchased the right parts (hopefully) (3 hours 11/26)
  • Reworked RF communication, debugged circuit with new chair, acquired and integrated arduino Mega to replace fried arduino uno (5 hours 11/27)
  • Wrote algorithm to further smooth the already smoothed data. Given correct voltage tiers, arduino correctly outputs 1 for sitting 0 for vacant with 20 second lag (2 hours 11/26 & 11/27)
  • Tried to get RF communication and ADC conversion working simultaneously (6 hours 11/28)
  • Debugged code, tried hard to get all facets of arduino running on battery/solar power, helped tom get arduino serial inputs to website, general troubleshooting (20 hours 11/30&/12/1)