PDA

View Full Version : Is a stamp a good choice to build a multi-mode bicycle cyclometer?



Tom F
08-20-2005, 07:50 AM
Is a Stamp a good choice for building a multi-mode bicycle cyclometer (as a hobby project with a generous budget)?· I'm thinking a a device that displays speed, elevation, average speed, distance travelled, maybe temperature, road gradiant (elevation change by distance travelled), real-time graphs, etc.· Are there Stamp sensors for functions like sensing a magnet as it spins past a sensor, elevation, accurate elapsed time (from the CPU?), LCD display?· Has anyone hacked a sensor for the Polar heart rate monitor?!! I'm not too concerned about size... just having fun! If a Stamp and associated remote sensors can handle this, which Stamp?· I'm happy to do the reading, research, building and programming,·but I thought I'd ask here first if my goal is reasonable and where to start... TIA

knightofoldcode
08-20-2005, 08:35 AM
Tom Field said...
Is a Stamp a good choice for building a multi-mode bicycle cyclometer (as a hobby project with a generous budget)? I'm thinking a a device that displays speed, elevation, average speed, distance travelled, maybe temperature, road gradiant (elevation change by distance travelled), real-time graphs, etc. Are there Stamp sensors for functions like sensing a magnet as it spins past a sensor, elevation, accurate elapsed time (from the CPU?), LCD display? Has anyone hacked a sensor for the Polar heart rate monitor?!! I'm not too concerned about size... just having fun! If a Stamp and associated remote sensors can handle this, which Stamp? I'm happy to do the reading, research, building and programming, but I thought I'd ask here first if my goal is reasonable and where to start... TIA


I think it's very certainly an attainable idea.

I'd suggest you go for it if that's what you want.

Speed -- Very certainly. Look into a Hall Effect Sensor. You'd have to look into these, they are designed to be used in FAST things, such as the RPM on a cutting head, etc. I would suspect it can handle much slower rates, IE, 5 RPM's, or whatever.

Elevation + Average Speed + Distance Traveled -- Can all be done with a GPS. I know for a fact that GPS's can be connected to the Basic Stamp Family. I've seen many articles on it.

Temp -- Very certainly. Many people use the BS's for a eather station. So, Temp would be a very certain item.
Road Gradient -- I can't think off the top of my head how to do this, but I know it probably could be done.


I'd suggest just the BS2. You're not likly to need the advanced stuff of the other BS's. The BS1 has it's quirks, and I try to stay away from it, but even the BS1 would probably do what you're looking for.

Heart Rate is a totatlly different thing, I've never seen it done, or heard of it, however, I have seen it done to be hooked into a standard PC, I can look up the sensor used, however the sensor had it's own Microprocessor, and you'd want to cut that step out.

I'd say go for it. But make sure you try one thing at a time. Test the temp, then the LCD, then the GPS, etc, etc, obviously not in that order. :)

Knight.

Tom F
08-20-2005, 08:42 AM
Hi, Knight,

Thanks for the help!

Hmmm... I considered doing GPS as an advanced project, but that would be cool to try... I'd get a plot of my route and could display my speed, or heart rate, etc! I'll look around here for details. When you mention having seen articles, do you mean here at Parallax, or from general google search, or are there other sites you suggest for this kind of stuff?

Road gradiant is just % grade, which is arcsine (or arccosine?) where distance travelled is the hypotenuse of a triangle and the other side of the triangle is the change in elevation. Don't know if the BS2's Basic has trig functions... I may have to do them myself.

I appreciate hearing the input from others here about this project.

knightofoldcode
08-20-2005, 08:43 AM
Here are some links to the sensors you've discussed, as well as a sensor for the cardinal directions (compass).

BS2 (http://www.parallax.com/detail.asp?product_id=BS2-IC)
Parallax Sensors Page (http://www.parallax.com/html_pages/products/componentshop/sensors.asp)
Digital Thermometer (http://www.parallax.com/detail.asp?product_id=604-00002)
Compass Module (http://www.parallax.com/detail.asp?product_id=29123)
Dual-axis Accelerometer (http://www.parallax.com/detail.asp?product_id=28017)
Hall-Effect Sensor (http://www.parallax.com/detail.asp?product_id=605-00005)


Knight.

Tom F
08-20-2005, 08:47 AM
Wow! Wow! Wow! I'm getting really excited about this... I've been looking for an excuse to learn about the stamp. I'm doing a lot of road biking these days and this project is perfect. You're getting me off to a flying start. Your links are great.

PS The Accelerometer does incline, so no calcs are needed!

Thanks again, Knight!!!

Tom

KenM
08-20-2005, 09:44 AM
Keep in mind the accelerometer will work for an incline if and only if your speed is constant (stopped, not speeding up or slowing down).


Tom Field said...

PS The Accelerometer does incline, so no calcs are needed!

Thanks again, Knight!!!

Tom

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Ken

Tom F
08-20-2005, 09:55 AM
Oops! I was just reading Tom C.'s article on the the things and was wondering. Thanks for the clarification, Ken.

Why can't one take frequent samples the accelerometer over time? How often can you sample a GPS and how accurate is it in location and elevation? Could I use that for % gradiant as I climb a hill, or would it be too slow/inaccurate? My current cyclometer uses atmospheric pressure for elevation (and wheel revolutions for distance). Are the pressure sensors from Parallax? What other vendors sell sensors that would hook up to whatever A-to-D ports the stamp might talk to.

Thanks for the clarification, Ken.

I don't want to cross post, but I'd like to point to a posting I just put on the Javelin forum asking if (since I'd prefer Java to Basic, and perhaps a more sophisticated development environment) would a Javelin work for this kind of application or would there be drawbacks? If anyone here has feedback, I'd love to hear it there.

knightofoldcode
08-21-2005, 07:13 AM
Tom Field said...
Oops! I was just reading Tom C.'s article on the the things and was wondering. Thanks for the clarification, Ken.

Why can't one take frequent samples the accelerometer over time? How often can you sample a GPS and how accurate is it in location and elevation? Could I use that for % gradiant as I climb a hill, or would it be too slow/inaccurate? My current cyclometer uses atmospheric pressure for elevation (and wheel revolutions for distance). Are the pressure sensors from Parallax? What other vendors sell sensors that would hook up to whatever A-to-D ports the stamp might talk to.

Thanks for the clarification, Ken.

I don't want to cross post, but I'd like to point to a posting I just put on the Javelin forum asking if (since I'd prefer Java to Basic, and perhaps a more sophisticated development environment) would a Javelin work for this kind of application or would there be drawbacks? If anyone here has feedback, I'd love to hear it there.



Tom Field said...
Why can't one take frequent samples the accelerometer over time?

This would probably be fine, so long as you allow some sort of a decay of old values. In other words, you make it do a average of the last ten values, or something like that.



Tom Field said...
How often can you sample a GPS and how accurate is it in location and elevation?

This would depend on the GPS. Some GPS's will arbitrarily send the data once every second, sometimes every 5 seconds, etc. It really depends on the GPS system you purchase. As for it's accuracy, from what I recall, once the GPS has a lock on it's location with at least 3 sattelites, the accuracy can be within a few feet. Much more accurate for elevation than a pressure sensor.


Tom Field said...
What other vendors sell sensors that would hook up to whatever A-to-D ports the stamp might talk to.

Jameco.com has some Pressure Sensors for pressures in the range of 0-5PSI, but I'm not sure if this is what your'e needing. Recall that at sea level the pressure is much higher than on say, Mt. Everest. So, I'm not sure what ranges you'd need, and also I'm not sure if you'd need absolute pressure sensors, or relative sensors. (Absolute are going on a reference from sea level, relative go on a reference from ambient pressure.)
Jameco.com's Pressure Sensors (http://jameco.com/webapp/wcs/stores/servlet/CategoryDisplay?storeId=10001&catalogId=10001&langId=-1&categoryId=352540)


Hope this helps,
Knight.

Tom F
08-21-2005, 07:20 AM
Thanks, KooC,

Thanks for the help.

I'm still trying to understand the hardware environment for the BS2 or Javelin in terms of hooking up external sensors. How does one determine which Parallax (or third party) sensors these (for example GPS) chips (easily) work with?·· What terminology describes the inputs to the microcontrollers? Do most sensors just have an analog output or digital?· If analog, then, does one have to provide an AtoD chip too?· From where does that chip come.

knightofoldcode
08-21-2005, 08:08 AM
Tom Field said...
Thanks, KooC,

Thanks for the help.

I'm still trying to understand the hardware environment for the BS2 or Javelin in terms of hooking up external sensors. How does one determine which Parallax (or third party) sensors these (for example GPS) chips (easily) work with? What terminology describes the inputs to the microcontrollers? Do most sensors just have an analog output or digital? If analog, then, does one have to provide an AtoD chip too? From where does that chip come.


Now that's a can of worms.

Sensors come in many ways and different varieties to accomplish different goals. Parallax sells ~4 sensors that all measure temperature.

Some are digital, and can be in the form of serial data, and that can be in the form of true RS-232, or TTL RS-232.

Some are Analog, and those would require a A/D chip. That chip can come from anywhere, Parallax, Jameco, Mouser, Digi-Key, etc.

I'd suggest you explore Parallax's webpage in great depth. In particular look around at the educational material. Parallax is really a neat company in that they give you alot of information for free. I'd suggest you either purchase the "Understanding Signals" kit, or read the book (again for free on their webpage).

If you go to the main Parallax page, then hover your mouse over "Downloads" there are alot of selections, in particulate the Nuts and Volts Columns are of interest, and all the documentation. The pBasic syntax manual is also there.

Understanding Signals Kit (With link to free download of the book.) (http://www.parallax.com/detail.asp?product_id=28119)
Basic Analog and Digital Kit (http://www.parallax.com/detail.asp?product_id=28155)
BASIC Stamp Discovery Kit (USB) (http://www.parallax.com/detail.asp?product_id=27807)


Unless you already know Java, I'd suggest you stick with the BS2's, since they have a easier language to learn.

Knight.

Post Edited (knightofoldcode) : 8/21/2005 12:15:47 AM GMT