Topic: Car Program?

Last question of the day how hard would it to make a program that samples G force at say 10 times a second to begin with and takes that to give you a quarter mile time and 0-60?  There is a product called G-Tech that does the same thing for more than what the chumby costs.  I know that there is math involved since 1G is 32 Feet / Seconds squared and there are 5280 feet in a mile so 1320 in a 1/4 mile.  So at 1G you would accelerate from 0 to 32 fps in one second so the equation (G (Interval Time)^2)*32 = traveled feet in that Interval it would be best to sample this every .1 second or less on specified increments and add the vales together and when that number is > 1320 spit it out also possibly to improve accuracy take the time that is lower's distance to 1320 and the time thats over 1320 and with that percentage you could subtract some off of the time for better accuracy. And possibly a speed?  I have no idea on flash so could somebody make this for me?  Put in a 3...2...1 GO! when you push the start button on it or use when the sensor detects a change in motion to start the countdown.  Drag strip lights would be a plus.  This program would take the initial accelerometer reading and take readings off of that by keeping the sensor on a 90 degree angle to the direction you are traveling. For trap speed you could take the last 2 feet readings and put them over the elapsed time in between them to get a decent MPH value.  I am putting this here because I'm sure there are car people in here and their chumby could be something that could help them in their hobby.  I basically laid out the design now could somebody make this widget for me and put it public because I have no idea how to run flash?  For 0-60 you can take the distance between values in the chart and when its > 60 do an error correction because it will probably be say 60.7 at that time because of the resolution take the distance between in our case was 59.6 then 60.2 so on the first reading you are .4 too slow and on the second one you are .2 too fast so take the difference and multiply it by the interval Here is a picture of a good set of lights to bring in or you could animate them.  http://www.sportys.com/shopmc/images/21619m.jpg Do not ever race on the street there are innocent people that you could hurt and furry creatures that you might not be able to stop for and you would be responsible for their injury/loss of life.  So only use this on a private airplane taking off the runway or a speedboat thats 5 miles offshore in the great lakes where it is legal to do a full power 1/4 mile run.  I don't know the power of the chumby but anything better than .1 of a second would work but .01 or even .001 would lower the error.  I might be able to compile this in C++ but flash is a good starting point as you might have warranty troubles by putting foreign code on your chumby.  I don't want trouble on this widget as it has its legal uses.  Also inspiration struck on this I saw somewhere where a guy excel datalogged the g values and put them on his computer I say just do it all on the chumby.  One last thing I am not an English major and I know that my grammar and spelling are horrible so please don't tell me that I am trying to make this a constructive thread also I worked all day and its after midnight.

Re: Car Program?

Ok, line breaks are a wonderful thing, and will allow people to actually READ your post.

I don't know how hard it would be to make a program like that to run on the Chumby, but it would not be worth it. Data loggers are precision tuned sensor equipment, ad trying to rig up a Chumby to do that job is going to give you mediocre results.
The price point would be nice, but the Chumby will never function as well as the real thing.

If you really want that type of equipment, go look toward Greddy, HKS, AEM, etc...

Also, I have found, that nothing is like a good "run down the 1320" at your local track. That is where you will get accurate feedback, and real world measurements.

"Those who would give up essential Liberty, to purchase a little temporary Safety, deserve neither Liberty nor Safety."

3 (edited by ncoop23 2007-11-10 16:11:11)

Re: Car Program?

I am not looking to make it perfect just have a cool little widget that I enter a given number of feet and once the device moves that number of feet something hapens and it tells you how long it took. 

If you used this function on say an alarm clock where you had to move the unit say 20 feet you would take the abs() of the function and once it moved 20 feet it would shut up.  Or use it as a tape measure lol.  I feel that it could be very useful in different ways.

You would need to read only one axis and have a liner motion or you would get movement in all directions so say you hit a speed bump 4 inches or whatever would be added to the total distance.  Idk the accuracy might not be 100% but I could imagine 90%+ from it written in C or possibly 75% if its in a widget.  If you measured in X and disregarded Y and Z. 

I am not getting a chumby for the purpose of this just wanting a cool feature for it that might not be perfect but give a good idea on a distance traveled in a given time.

The formula is (G (Interval Time)^2)*32 = traveled feet in that time the better resolution the more accurate the readout as G will change all the time.

[Edit]

For those folks in everywhere but the USA the formula is (G (Interval Time)^2)*9.8 = traveled meters in that time.  Why can't everybody use the same measurements?

4 (edited by turfyman 2007-11-13 06:05:46)

Re: Car Program?

I think a program implementing the accelerometer in such a way is a cool idea, in concept, but I think there are 2 major flaws trying to design it on the chumby platform.

First, like Ganson mentioned, it will probably be grossly inaccurate.  Second, chumby is designed to be operated with an AC to DC adapter that keeps the chumby tethered to the wall. 

If you are bound and determined to make it work, than those are the two of the things that you'll have to over come, along with writing the software and trying to mount the chumby so that the accelerometer can measure more accuratly.  That said, I really don't think there is a substitution for a device designed specifically for this application and sadly I think people wanting something like this, on the chumby, will be a very small minority.  Best of Luck!

Re: Car Program?

I would use my cig lighter in my car to power it, 12 volts 13.8 actually and put it in my center console so it won't rattle around.  If the device moves an inch or 2 its not any broblem if you are measureing in 1320 feet.  You just wouldn't want it flying in the air into the back seat. 

Like I said flash wouldn't be very good but if I made a C program even though the device is 350 mhz it would be as good as other products just as long as the accelerometer can keep up with the clock.  I just don't know any flash so could somebody make this in flash for me?

Re: Car Program?

.1 second is not high enough resolution for accurately calculating velocity.  I've used a device from race-technology.com for several years and they are able to get fairly good accuracy with .01 sec resolution.

I just ordered my chumby and will give this a try once I receive it.  If anyone knows the max frequency the data can be retrieved, that will help determine if the chumby device is able to be used for this purpose.  Also, since it may not be possible to time the retrieval on a fixed 100hz clock, it would be necessary to have a clock with high enough resolution to be able to interpolate or calculate based on actual timing.

Finally, besides the normal physics calculation, the race-technology unit also performs 2 other functions to improve performance: smoothing and tilt compensation.  The smoothing is necessary due to jolt from things like shifting and bumps on the road.  The tilt compensation is to adjust for minor variance in gforce due to the car tilting during acceleration.  I suppose with the Chumby device, it may be possible to automatically calculate the tilt because it is a 3 axis accelerometer where as the race-technology device was only 2.

In any case, we probably aren't the only people to think of this application.  The Chumby with a simple widget could be a cheaper alternative to many of those devices in the specialized market.