CarbCounter Plus - Software Progress
By mimemike , On 3/5/09 10:58 PM

Software development progress and information.
Click Here for Project Page
See progress Reports at bottom of this page.
The software for the CarbCounter+ will be developed in a modular fashion so that it can use either a RTOS or custom scheduler and be adaptable to future situations. Also if it is possible to write relocatable code, then additional modules could potentially be "loaded" as needed without having to reflash the entire device.
Following is the "To Do" list which will show what has been done, what is currently being worked on, and what remains. They are in no particular order and are currently arranged into two groups. "Hardware Related" for anything that talks to specific hardware, and "Non Hardware related" for the program that interacts with the user and everything else.
Key: UI=User Interface, MATH=Mathematic Calculation, DB=Database, OS=Operating System, EP=Expantion port add on.
|
To Do (In No Particular order...yet)
| Status
|
Hardware Related
| |
| Assemble Working Hardware (Still waiting on LCD) | -------- 100% ---------
|
| Test/Port Graphics Library on new hardware | -------- 100% --------- |
| Test/Port FAT32 SD Card Library on new hardware | ------- 100 % -------- |
|
| Write Code to read Scale from MCP3551 ADC |
| -------- 100% -------- |
| Get USB bootloader working (Future) | ------ 90% ------ |
| Write SLEEP and WAKE code for power conservation | In the Que |
| Impliment RTCC functions | -- 30% -- |
| Write Auto Zero routine for Scale | ---------- 100% ------- |
| Test/Modify MiWi P2P for wireless connection to a scale (Future) | Future - currently a wired scale |
| Write Basic Audio output functions (DAC and Volume Control) | -----------100%----------- |
| Write Audio output for Visually Impared assistance (DMA) | -------- 80% ------- |
| Write Audio input functions in preperation for speech recognition | Future Add on |
| Get Scale (Load Cell, OPAMP, ADC) operational | ---------- 100% ---------- |
| | |
Non Hardware Related
| |
| UI - Splash screens | ------ 100% ------- |
| UI - Main Menu | ------ 100% ------- |
| UI - Create Keyboard for user input | ------ 100% ------- |
| UI - Database search by keyboard input | ------ 100% ------- |
| UI - Database search by graphical file structure | Future Add on --- 50% --- |
| UI - Database search by favorites (Speech Recognition in future?) | Future Add on --- 50% --- |
| UI - Weighing item | ------ 90% ---- |
| UI - Setup screens | ------ 90% ---- |
| UI - Video Game (Needs the acelerometer module fitted - Future) | When I want a change ;-) |
| UI - Audio playback for User interaction in menus etc | -------- 80% -------- |
| UI - Database Management (Done on PC using memory stick) | NOT NEEDED SINCE IS SIMPLE |
| UI - Blood Glucose (BG) input | ------- 95% ----- |
| UI - Data recall and plotting for BG, Carbs, etc (FUTURE) | Future Add In |
| UI - Low BG "carb's needed" display etc (FUTURE) | Future Add In |
UI - Recipe Builder (FUTURE) Ended up being same as weighing item
| ---- 50% ---- |
| MATH - Low BG to Carbs needed calculations (FUTURE) | ----- 50% ------ |
| MATH - Insulin to Carb Ratios | ----- 50% ------ |
| MATH - Insulin Sensitivity Ratios (FUTURE) | ----- 50% ------ |
| MATH - Weight to Carb calculation | -------- 100% --------- |
| MATH - Insulin profile calculation (FUTURE) | Future add in |
| MATH - Food profile calculations (GI and FAT delays etc) (FUTURE) | Future add in |
| MATH - BG to Insulin Ratios | ----- 50% ------ |
| MATH - Note: The above have different values relative to time of day | |
| MATH - Recalculation of above ratios based on data input (FUTURE) | Future add in |
| MATH - Filtering for weight scale input | -------- 100% --------- |
| DB - Parsing of generic database for quick sort and search | ------ 90% ------- |
| DB - Loading and saving of files | Works using FAT32 FS -100%- |
| DB - Search Engine | -------- 100% --------- |
| DB - Relationship engine (Food types, Images, Speech recognition, etc) | Future Add In --- 60% --- |
| DB - File format | -------- 100% --------- |
| DB - Matainence | Not Needed with currnet DB |
| DB - Inserting new Data | Manual at this point in time |
| DB - Backup and Restore | Copy DS Card to the PC |
| DB - Import and Export | Not Needed at the moment |
| OS - Core operating system - RTOS or Custom | This unit will be custom for now |
| OS - Alarms and Alert processing for BG testing periods (FUTURE) | Future Feature |
| EP - BG Meter / Pump interface (IRDA or wired) (FUTURE) | Future Feature |
| EP - 3 Axis Acellerometer for alternate navigation (FUTURE) | Future Feature |
| EP - Speech Processing Module (FUTURE) | Future Feature |
| | |
The above is a dynamic list and will constantly be changing until the project is complete. If there is any additional you think should be added, please let me know. Also if you know of anything that might help with any of the above, please let me know that too.
------- PROGRESS REPORTS -------
UPDATE 5 MARCH
Got more GUI done closer to completion, including Saving of Meal/Recipe as an item. Also almost finished the speech generation unit for the visually impeared to read out the results from weighing or calculating insulin needed. Currently considering pulling out of competion due to current workload and a minor injury not allowing time to work on this project for at least another week.
UPDATE 2 MARCH
50% way to completing Speech playback for audible reading of weights and insulin dosages. Need to modify hardware for the speech output, but will demo on the development board in a video soon.
UPDATE 8 FEBURARY
Been slowly working at things in the few minutes I have had spare since the competion went into lockdown (not kidding about minutes). Looked over recipe Builder and it is actually identical to how the generic weighing operates, so I will just add a "Save As" button so that you can create a recipe (or Resturants menu item) and save it into a personal database. May have a little spare time this week to finish implimenting and enable the RTC, Blood Gloucose logger, and test reminders. Which will have been very close to 100% functionality of teh original plan. Also reworking the design to include patches, and use a larger 3.4" or 4.2" WQVGA LCD as the 2.8" is just a little to small for the keyboard input if using a finger.
UPDATE 23 JANUARY
Despite My son getting sick, and my wife getting stuck in the snow in the mountains in... I have managed to get alot done in the last hours of the competition, but not as much as I would have liked to. The basic features are fully implimented, and most of teh others are partially coded and would not take much longer to impliment... but longer than the hour or less that I have remaining..... If I make it through I should be able to complete the rest and add some "Bling". Hope I have done enough to get through .
UPDATE 23 JANUARY
I reduced the ADC data output to 18 bit (From 22) to elimnate most of the noise and added an agressive software Butterworth Low Pass filter before the rolling average and now I am getting a slowish, but very stable and repeatable results with about 0.1g LSB resolution (Scaled to 1g on display). Main problem last night was that the data read from the ADC was incorrect, was an error in the SPI routine. Also wrote the Auto Zero function which is performed on each entry to the weigh routines. Now to get data from teh database, and create a meal (or Recipe) from the weight + data items. Note: Details of the Filter design will be in Docs folder in next software upload.
UPDATE 23 JANUARY
Finally got weigh scale operational - still needs fine tuning of the OPAMP but at this point of time it is functional enough to demonstrate the projects function. Had a few problems with noise etc, and tried alot of different filters, but ended up with a simple averaging that seems to work. Now to actually search the database, and calculate teh carbohydrates etc.
UPDATE 22 JANUARY
Finished Menu system. Reads from a text file, sets up the menus, automatically places the images or buttons, links any aditional menus or internal functions that are activated when the button, or the image are touched by the user. You can also back track through the menus by clicking the title (will change in the future). It will be easy to finish of the menu system as it is a simple text file and associated BMP image. Linking a button/image to an avaliable internal function is as simple as typing an associated name which scans an internal table to get the pointer to function. These are used for things like weighing, search etc.
Below is the text file that generates the menu in the photo below. The Icons link to other menus or functions, and the button labeled "ERROR" was used to test the function call and pops up an error message window. Clicking on the top bar with "Home Page" written on it will take you back one menu if not already at the home page.
[VERSION=1.0]
[MENU]
TITLE=Home Page
[ITEM]
NAME=Weigh Item
TYPE=ICON
IMAGE=WEIGH.BMP
DIM=80,64
FUNCION=WEIGH,0,0
PLACE=AUTO
[ITEM]
NAME=Search
TYPE=ICON
IMAGE=SEARCH.BMP
DIM=80,64
LINK=SEARCH.MNU
PLACE=AUTO
[ITEM]
NAME=Favorites
TYPE=ICON
IMAGE=FAVORITE.BMP
DIM=80,64
LINK=FAVORITE.MNU
PLACE=AUTO
[ITEM]
NAME=Blood Glucose
TYPE=ICON
IMAGE=BLOOD.BMP
DIM=80,64
PLACE=AUTO
FUNCTION=BG_READ
STATE=HIDE
PLACE=AUTO[/font]
[ITEM]
NAME=Configuration
TYPE=ICON
IMAGE=CONFIG.BMP
DIM=80,64
LINK=CONFIG.MNU
PLACE=AUTO
[ITEM]
NAME=ERROR
TYPE=BUTTON
DIM=80,48
FUNCTION=ERROR_0
PLACE=AUTO

Thanks,
Mike.