The STATSulator is a php/mysql app and bs2 lcd desktop display that keeps track of all your training. It allows you to see what your training buddies are also putting in, raw hours, not the details for your friends activity...
This STATulator was born around new years 07, I was talking with some bike riding buddies and they were looking at their end of year spreadsheets. How many miles they rode, how little they used their mountain bike... And the inner geek in me decided to write the STATSulator.
After a full year of use it has turned out really useful for me. It has shown me how much I rode my commuter bike, after that the mountain bike... But now I carried my craziness over to a new level and track my weight in it as well.
As a project I thought it would be neat ot also make a physical desktop display for it that at a glance would display my stats, to see if I could skip riding that day. :)
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Supplies
I used the following for this project, but you could use a ton of things for this.
- Plexiglass small sheet
- Allthread (I used #6/32)
- 16 nuts ( I used #6/32)
- 16 washers (I used #6)
- Basic Stamp 2
- Basic Stamp Board
- Parallax 4 x 20 LCD (I used the 4x20 backlit model)
- Wall Wart
-Linux box ( I use fedora core 8)
-- Have PHP/Apache/Mysql Installed
-- Install the BSTAMP Package from sourceforge to compile bs2 code
Step 2: Tools
To cut the plexi glass you will need:
- a utility knife or x-acto knife
- Straight Edge (sXe)
To make the case you will need:
- I used the Dremel Workstation and can't recommend it highly enough.
Step 3: App Walkthrough 1
This is the welcome page, this is all written in PHP and should be on sourceforge in the next few days.
Whats of note here is the table on the left I call the peer pressure module so you and your friends can motivate each other to ride.
Step 4: App Walkthrough 2 - Add Data
Adding data is done through the apps "Add" button. It will pre populate the fields where it can based on activity.
Also this page can take uploads from MotionBased exports. So you don't have to key in info twice if you are using a garmin. MotionBased if you are not paying will only allow you to view the last few activities.
Step 5: App Walkthrough 4 - View Time Reports
You can view data by week/month/year/month to date.
On these screens you can see your time, breakdown of activities, breakdown of weather and the details of each activity.
Step 6: App Walkthrough 4 - View Details
This detail view will show the fields for the time frame you are viewing. All of the activities can be selected for viewing more details and editting/updating.
Also this exports to a CSV file so you can do your own graphs in excel.
Step 7: App Walkthrough 6 - View Activity by Month
The page I use more than anything else is this one that shows me my activity by month in pie chart and bar graphs. there is a pie chart for each month, and then two that show just bike riding times. The bike one can be turned on and off if you are not a bike rider.
Step 8: App Walkthrough 7 - User Prefs
On the Preferences page you can turn on and off reports, maybe you don't track distance or heart rate, so you can disable those.
Also on this page you can choose to get monthly status reports and choose to make your info public or not. And by public it just show your total hours in the peer pressure chart on the left.
Step 9: App Walkthrough 8- Healthy Eating Disorder
On this page you can track your weight. It has two graphs that can display your weight and your weight with workout time. It throws in some info like you max/min/avg too.
WARNING: Remember this is a geeky little web page, don't give yourself an eating disorder... seriously.
Step 10: The Desktop Version
For the desktop version of this I used a Basic Stamp 2 from Parallax along with their Board of Education and 4x20 Backlit LCD. If you have never checked them out, they have a really nice website with tons of information making it easy to get in to programming your first microcontroller.
Step 11: Desktop Version - Plexi Glass 1
Lay the Board of Education on your sheet of plexiglass and figure out how big you want to make the plexiglass base and cover. I made it 1/2" longer than the board. Trace it out.
Clamp your straight edge (shout out to minor threat!) to the plexiglass and score it with your x-acto knife.
Step 12: Desktop Version - Plexi Glass 2
To get a nice good edge, score the plexiglass with your x-acto knife then clamp it to the edge of a surface right on the line your scored. Then push the plexiglass down and it will crack nice and straight.
Step 13: Desktop Version - Base 1 - Four Corners
You will need to have your four corners marked out to run the allthread through. I lined up the Board of Education and marked four spots.
Use the first one you make to template the bottom one.
Step 14: Desktop Version - Base 2 - Drilling
I used the Dremel Workstation to drill my holes. I find with plexiglass and a large 18v rechargeable drill *I* tend to crack the corners from the weight of the drill.
With the dremel, set the speed to high and slowly lower the bit through the plexi.
Step 15: Desktop Version - Base 3- Board of Education
Drop the board on the base and mark your four holes and drill. The same goes for the LCD on the top.
Step 16: Desktop Version - Base 4- Allthread
Attach the BoE with 4 screws and nuts, attach the LCD the same way.
Line them up on top of each other and see how much room you will need for the althread. I needed about 2 3/4".
Cut the allthread to length.
Step 17: Desktop Version - Base 5- Attach
I attached the allthread to the top first, run your nut out to the end of the allthread, use a washer on each side of the plexiglass and see if your holes line up.
If it does attach them, once again using a washer on each side of the plexi glass.
Step 18: Desktop Version - Base 6- Rubber Feet
I used rubber feet to keep the metal nuts off of the surface you lean lay this one.
Step 19: Desktop Version - Program
Step 20: Desktop Version - PHP
To get the data into the bs2 file I use a php script which queries the db, then replaces place holders in the bs2 template file using sed. Then it runs the bstamp package to load the data on to the bs2.
Step 21: Props
I'd like to give thanks to my buddy Craig S for the sweet logo. Mine was weak..
I totally tried to bite radiorental's style and use an analog gauge like his really cool analog network meter instructable.
I purchased a neat looking gauge off of ebay but it required more amps than the stamp could deliver so I grabbed the LCD and think it worked out ok. You can see the analog prototype below.
Thanks for looking at this.
Participated in the
The Instructables Book Contest