Justin Thacker's Lab Notebook

Week 01

January 11, 2006 (1 hour):
After class, met with group and discussed ideas and decided on implementing a draft dispensing control module. Features of the project were discussed and decided that our project would control the flow of beverage through the tap system, control the temperature of the freezer, use internet based interface to monitor all aspects of module, use lcd on freezer for user interface, use RFid tags to monitor the beverage consumption of each consumer, interface RFid scanner to read RFid tags, calculate the BAC of each consumer, and disable flow function once consumers BAC approaches specified limit.

January 11, 2006 (2 hours):
Independently researched different components needed for the project. A rabbit microcontroller with an embedded web server seemed to be the microcontroller needed. An unknown memory size was the main concern that remained in the final selection. A digital thermometer was found from Dallas Technology which would meet our needs. Also RF scanners were looked at on TI but seemed pricy. Further research will be needed to see if a more practical solution exists.

January 12, 2006 (1 hour):
As a group discussed some items we had researched for the project. IR scanners from TI, rabbit microcontrollers, and lcd displays were among the discussed hardware needed for the project. At this time homework one was completed as well.

Accomplishments: Completed homework one and decided on design idea of Digital Real-time Intelligent Networked Kegerator.
Weekly Work Total: 4 hours
Project Work Total: 4 hour

Week 02

January 16, 2006 (2 hours):
Met as a group and further discussed research conducted on hardware components for the project. Our microcontroller was basically narrowed down to one of the rabbit controllers with an embedded web server. Once we figure out how much memory we will need to keep track of the user data as well as the web server we can make our final selection based on memory size. A block diagram was drawn showing all major components of the design.

Accomplishments: Decisions on hardware components were narrowed to a few possibilities.
Weekly Work Total: 2 hours
Project Work Total: 6 hours

Week 03

January 25, 2006 (1 hour):
Met in the lab after class and recieved our development board for the rcm 3000 series microcontroller. Also placed an order for our RCM3315 RabbitCore.

January 26, 2006 (1.5 hours):
Met as a group to go over design constraints and make final decisions on our component selections.

Accomplishments: All components have been selected and orders have been placed for most of them.
Weekly Work Total: 2.5 hours
Project Work Total: 8.5 hours

Week 04

January 29, 2006 (1.5 hours):
Did research on products that are similar to our design. A similar product called the KegMeter was found at www.kegmeter.com. This product automatically dispenses a draft beer when a beer is placed below the draft tower. Also keeps track of various other keg statistics using flow meters which will be used in our own design. Another device was found which monitored the flow from up to 8 different kegs. This unit was found on bristolnf.com. The item can be interfaced to a pc for programming and setup of the device. This device is targeted for bar use to keep track of how much beer was served compared to how much was sold to reduce the number of free/stolen drinks dispensed.

February 2, 2006 (2 hours):
Began designing the user interface that will be on the LCD. We will be using an RPG to navigate through menus to get to the desired screen. Information such as the temperature, keg usuage, and user information will be accessible from the unit. Also an email was sent to rabbitt semiconductor requesting special pricing on either an RCM3305 or RCM3315.

Accomplishments: All components have been ordered. Block diagram was updated with appropriate voltages and currents for all components.
Weekly Work Total: 3.5 hours
Project Work Total: 13.5 hours

Week 05

February 11, 2006 (2.5 hours):
I went to the lab to day and began experimenting with the rabbit microcontroller. We began testing our flow meters using a sample interupt program we found in our Dynamic C samples. Since only 4 external interrupt pins are available we need to come up with another way to track the pulses from more than 4 flow meters. We experimented with connecting each flow meter up to a series of xor gates as well as to their own input pin. The idea is that when an interrupt is called, it checks the previous value from the input pin to determine which flowmeter triggered the interrupt. Thus far we are unable to get any kind of reading from our input pins. Getting the i/o pins to work properly will be the next task in programming our controller.

Accomplishments: All components have been ordered. Block diagram was updated with appropriate voltages and currents for all components.
Weekly Work Total: 2.5 hours
Project Work Total: 16 hours

Week 06

February 14, 2006 (2 hours):
Today i began reading the Networking Solutions TCP/IP section on the documents page of the dynamic C disc. We will be using the http library for most of the functions needed to make our webwerver.

Accomplishments: A basic understanding of how the rabbit webserver works.
Weekly Work Total: 2 hours
Project Work Total: 18 hours

Week 07

February 22, 2006 (2 hours):
I finished looking through the dynamic C references for http servers. I also looked through some of the example programs and began thinkiong of how to our wenserver was going to be implemented

Accomplishments: I now have an understanind of how the rabbit webserver will be implemented.
Weekly Work Total: 2 hours
Project Work Total: 20 hours

Week 08

February 27, 2006 (3 hours):
Met in lab to begin working on our design review presentation. Divided up the different sections of the presentation. I will be doing the overview, pssc, and block diagram. Also made about half of the slides of the ppt presentation. Afterwards I began working with the rcm3300 and rabbit web. I got a basic sample program which acts as a static server to display a webpage when the ip is accessed. The ip assigned to us by chuck is I tested to make sure the webpage could be accessed outside of purdue's network and it was successful.

February 28, 2006 (2 hours):
Met in lab to finalize the design review presentation. Also further familiarized myself with the schematic and pcb.

March 2, 2006 (1 hour):
Met in lab to work on interfacing our temperature probes with the rabbit micro. Immediately ran into a problem when timing signals on a microsecond resolution. As of now there is no clear way to do this. We are considering using inline asm code to produce noops to create the appropriate delay since Dynamic C only handles millisecond delays. Also emailed rabbit and asked for any advice. Hopefully we can get a response before spring break.

Accomplishments: Got a basic webserver to work on on the rcm3300.
Weekly Work Total: 6 hours
Project Work Total: 26 hours

Week 09

March 7, 2006 (2 hours):
Worked on rabbit web some more. Got code working for user authentication, entering data into a form and post data.

March 9, 2006 (5 hours):
Met in lab to go over final PCB layout. Closely looked at pcb to find any small trace issues.

Accomplishments: Got the PCB layout finalzied before sent off to be made.
Weekly Work Total: 7 hours
Project Work Total: 33 hours

Week 10

March 21, 2006 (2 hours):
Created a basic web page for the main page on the webserver. Page includes links to user data, system diagnostics, and a login to access important system variables and change them. The user data and system diagnostics pages will use cgi functions for their generation.

March 22, 2006 (2.5 hours):
Began writing some ocde for the cgi functions of the system diagnostics and user data pages using dummy variables for now. Also took a function from a sample program, post.c, to parse data entered from the browser. This will initially be used to obtain the login and password on the main screen, and will eventually be used to accept input for user data and to change system settings.

Finished up code for the initial main page on the webserver. Not yet tested but should be capable of producing a user statistics page using a cgi function that displays dummy variable for a user displaying age, weight, and consumption. Later the page will be able to display all user data and current up to data statistics. Also a system diagnostics page can be created using a cgi function that will display the currents system settings like temperature, keg information, and status of different components. A third page, change system settings, can be created, requires a login and password, that willl accept changes to keg info whena new keg is put in, also can adjust system temperature. SSL has also been added to the server by invoking the USE_HTTP_SSL macro in http.lib.

Accomplishments: Implemented a preliminary webserver for the rabbit.
Weekly Work Total: 7 hours
Project Work Total: 40 hours

Week 11

March 27, 2006 (3 hours):
Tested the code that was written on Marcy 23. Debugged the user and keg statistics cgi functions. Also tested the rabbit's ability to produce a cgi by writing to the buffer 100 times and accessing that page through the web. The rabbit's ability to produce a page when needed is quite good. I do not forsee any difficulties with producing cgi functions.

March 28, 2006 (3 hours):
Created a flow chart and function hierarchy for the systems software. The main program will use a hybrid between polling and interrups. The flowmeteres will use interrupts to track keg usage and the bill acceptor and rfid will be called repeatedly in a loop. The Lcd will be used by indidual functions when feedback tot the user is required.

March 29, 2006 (3 hours):
Began writing the software design considerations report due at the end of the week. Our major design considerations are getting everything to communicate with each other in realtime. To do this we will use polling and interrupts to obtain the necessary information from each device and respond in real-time.

March 30, 2006 (2 hours):
Finished the software design considerations report. The memory management on the rabbit is done by the Dynamic C compiler which gives us one less thing to worry about when designing the software. Primary focus is then on using the port pins most efficiently and synchronizing all components.

Accomplishments: Webserver is now capable of displaying a user's statistics and a keg's statistics. It can also show current sytem settings such as the control temperature. Hw 10 was completed.
Weekly Work Total: 11 hours
Project Work Total: 51 hours

Week 12

April 2, 2006 (4 hours):
Further webserver code was written but not tested. The current version should uses global variables to store all current users and all current kegs. Pages for inputing keg and user information are created and should be capable of populating the user and keg global arrays. Each array should then be able to be displayed by keg and user statistic cgi functions. The use of global arrays to store the user data will be crucial to the success of our design since that information will also need to be accessed by the rfid module as well as display functions that output user data.

April 3, 2006 (3 hours):
Tested and debugged webserver code. The webserver is now capable of inputting user and keg data using a form and populating the corresponding arrays. 4 kegs and 50 users can be added to the system. Statistics for all users and all kegs can be displayed using the cgis.

April 4, 2006 (4 hours):
Wrote more code for the webserver. Added additional pages to remove kegs and users from the system. Also added a form input to the System Diagnostics page to change the control temperature. The remove keg and user page simply asks for the keg or user name and removes that item from the array and shifts each entry forward one space. This code has not been tested.

April 5, 2006 (3 hours):
Tested and debugged the webserver code. The webserver is now capable of removing a user and keg from the system and can also change the control temperature variably of the system.

Accomplishments: Webserver is now capable of displaying all user's statistics and all keg's statistics. It can also show current sytem settings such as the control temperature and modify that setting. Upto 50 users and 4 kegs can be added and removed.
Weekly Work Total: 14 hours
Project Work Total: 65 hours

Week 13

April 9, 2006 (4 hours):
Began reimplimenting the way administrators login to the system through the webserver. A global variable is used to hold the ip and a valid byte indicating that a user is logged in. This variable is checked at the top of each cgi function that has restricted access. If the user is not authenticated they are redirected to the Login screen. Currently administrator access is needed to access the system diagnostics page and change or remove kegs and users.

April 12, 2006 (4 hours):
Tested the code writeen on Sunday. After a few hours of debugging the login mechanism works.

April 13, 2006 (4 hours):
Tested the code writeen on Sunday. After a few hours of debugging the login mechanism works.

Accomplishments: The webserver is now capable of logging on and off an administrator allowing the user to access and change sensitive information.
Weekly Work Total: 8 hours
Project Work Total: 73 hours

Week 14

April 16, 2006 (4 hours):
Began changing server code for outputting user info. The goal is that when the User Statistics page is selected it will display all user names with two radio buttons beside them, one saying more, and the other edit. A user may select a radio button that corresponds to each user and click submit. More will show all of the user's information, and edit will show all of the information in forms that will allow editing of the data. The same technique is being implemented for the keg information

April 17, 2006 (4 hours):
Continued working on the code for displaying data. A problem has occured with the radio buttons not being parsed correctly. After several hours of debugging the problem was fixed when an irrelevant strcpy() was commented out. This was the first "strange" behavior i have seen from dynamic C

April 20, 2006 (14 hours):
Worked on integrating sflash into the webserver program. When the system is started, user data is loaded from the serial flash into the user and keg arrays. The serial flash consists of 8191 512 byte pages. Each user and keg is stored on an individual keg. Logging for each pour will be placed on pages following the first 513. Also the first page contains a valid byte indicating that the serial flash is ready. Data is saved to the sflash when the user logs out of the system. More weird behavior has occured when loading information from the serial flash. Adding lines of code often causes unexplained problems but the system seems to be functioning nrmally.

April 21, 2006 (4 hours):
Continued working with the dev board ironing out all of the bugs in the webserver and sflash. Everything seems to be working correctly. Matt's code has been integrated into the webserver and functionality remains.

April 22, 2006 (8 hours):
Integrated Ian's LCD code into the main program. An error occured at first stating "out of rood code space". It was determined that this could be fixed by changing the memory address where the program code ends and the data begins allowing more space for code and less for data. This modification was made in the StdBios.c to the DATAORG variable. The starting variable address was changed from 0x3000 to 0x8000. It was initially changed to 0x9000, but then the error "out of root varible space" occured. We will continue to tweak this value as more code is put together.

Accomplishments: The webserver has been modified to make use easier, and sflash has been implemented to save data after restart.
Weekly Work Total: 34 hours
Project Work Total: 107 hours

Week 15

April 23, 2006 (2 hours):
Planned on filming our PSSC tonight, but rabbit became unresponsive when the lcd was hooked up to the PCB. Everything works fine until it is connected. We are considering removing the costates in the main while loop and just use a counter to time everything rather than waitfors which require a costate to function.

April 24, 2006 (12 hours):
Replaced costates in while loop and used a counter%x to time everything. Also hooked up dummy variable for the lcd display with real ones. Finally at 6 a.m. we filmed the psscs and edited them. We still have a lot of work getting the fine touches to work and get all of the componenets into the packaging.

Weekly Work Total: 14 hours
Project Work Total: 121 hours