Monthly Archives: February 2014

EECE 380 L2B5 Fourth Weekly Memo

FROM: EECE 380 Lab Group L2B5

TO: Dr. Michelson and Lab TAs

DATE: February 24, 2014

SUBJECT: Fourth Week Summary

During the past two weeks our team has built a circuit for the sensors and tested a model pipe we built for measuring water level. We also further modified DemoAppFFS to send time along with data.

The following part of the memo documents the functions of the circuit. For measuring water level, it is done using the concept of parallel plate capacitor. Two sheet of aluminum foil is wrapped around the pipe acting as two plates of a capacitor. The pipe along with aluminum foil will have different capacitance depending on the amount of water inside the pipe. Two wire is connected from the two sheet of aluminum foil to a 555 timer circuit. The circuit outputs various frequencies depending on the capacitance of the pipe. Then the DC frequency is inputted into LM331 chip which convert DC frequency to a corresponding DC voltage.

Temperature sensing is done using the temperature sensitive diode LM335. There will be different voltage drop across the diode depending on the temperature of the surrounding. This dc voltage can be measured and later be converted into temperature readout.

The output DC voltage for both circuit also passes through amplifiers to change its voltage range in order to fit the 0-3.5v range of Orbcomm modem’s ADC.

In the next week we will begin soldering the circuit and complete any final calibrations for both sensors. We will also begin to look at the actuator of the modem and build any circuits needed. The actuator will graph out the date with time from the emails we set from DemoAppFFS.

Sincerely,

EECE 380 L2B5

EECE 380 L2B5 Third Weekly Memo

MEMORANDUM

FROM: EECE 380 Lab Group L2B5

TO: Dr. Michelson and Lab TAs

DATE: February 9, 2014

SUBJECT: Third Week Summary

 

In this week, we primarily worked the lab from last week, which is using FFS to send data generated from the orbcomm modem. We found this lab to be a bit challenging because we encountered a couple of issues. The first problem is Position_Fix (gets GPS information) is never successful; in other words, it moved update GPS Crumbs to timer_0 case. The other issue is that we had to change many things to un-related/un-depend if from the GPS incoming data.

  • fixtimeJs from GPS.get PosData to 12
  • array is now only a counter

With our effort and the help from the TA, we were finally able to get DemoFFS successfully working.

Shell scripting.

This part of the memo documents the process of shell scripting using linux server provided by ECE department of  UBC. The objective is to create an automatic system which receives the data from the orbcomm modem and output it to a text file. The difficulty of this lab is to learn and understand linux’s shell scripting from zero in CLI. First, we need to open a session using putty in ssh mode. The Host name in this case is username@ssh.ece.ubc.ca and followed by password. We need several Linux commads in order to modify and navigate inside the linux system. The command used in this lab includes:

  1. ls –a               display what files is in the current folder.
  2. cd xx              open a directory in the folder.
  3. cd $home      return to the home directory.
  4. vi xx               open the file in text editor.
  5. sh xx.sh         run the .sh script
  6. crontab –e    edit crontab to schedule automatic commands
  7. crontab –l      display crontab file
  8. rm xx              delete file
  9. cat xx               create file
  10. tab key            to auto fill the name
  11. in text editor

a)      i                  to insert. To edit text

b)      esc key      to exit insert mode

c)      :q                to quit text editor

d)     :wq             to save and quit text editor

e)      :q!               to quit without saving

The orbcomm modem sends emails containing data gathered from sensors to our group gmail account. And using the filter settings in gmail, it will forward all emails with the subject line of “ L2B5 Group” to z2l8+orb@ece.ubc.ca, which is an orb folder we created in our email client using .forward+orb file containing:

~/Maildir/.orb/

We then aggregate mail using bourne shell by creating myscript.sh script file under the home directory. When the script is run, it takes emails (with .plover extension) from /Maildir/.orb/new folder, and outputs the emails into orb.txt file in the home directory.

The next step is to schedule myscript.sh to run automatically without user prompting it. This is done using the built in crontab function inside the linux server. We type       crontab –e command to open and edit crontab. The command to run the script every minute is:

* * * * * sh myscript.sh

The first five input mean the repition time between consecutive commands. In this case * means  all legal value, and Since the smallest time precission allowed is minute. five asterik is used before the command meaning every minute.

Summary

The above procedures create a bridge between the orbcomm modem and our computer. This way we are be able to access the data collected from the orbcom modem from a distant location and process it. In the project the email message saved in to orb.txt  will be used in the actuator of our project.

Sincerely,

EECE 380 L2B5