speed calculator for rc cars,
Archiver
Posts: 46,084
im thinking about making a lil box to do timed runs with rc cars,
then to calculate the mph values i planed to write a program, any
thoughts as to how to make a bs2 do this?
i thought about 2 wires a calculated distance apart, but im kinda
confused as to the best way to alow the car to tell the bs2 it
crossed points, im open to any ideas
then to calculate the mph values i planed to write a program, any
thoughts as to how to make a bs2 do this?
i thought about 2 wires a calculated distance apart, but im kinda
confused as to the best way to alow the car to tell the bs2 it
crossed points, im open to any ideas
Comments
Need some more information though. Are these cars on a track, or do youi
want the ability to time the car any place it goes?
I have done similar speed measurements several times with the Stamp or the SX
uController.
If you give specifics, we can narrow down what approach might be best.
One method would be to put a disk on one of the axles of the rc car. The disk
would be solid and have one hole in it. On one side of the disk hole, mount
an opto emitter, and on the other side of the hole, directly opposite the opto
emitter, mount an opto reciever.
In this configuration, you will get one pulse per wheel revolution. Knowing
the length of the pulse (length of pulse measured by stamp) and the distance
per one rev of the wheel, velocity (speed) can be determined.
One drawback to this approach is if there is wheel slippage, the reading will
be inacurate.
If you simply want to check the speed in a straight line....kind of like a
drag race, another approach is to use two pairs of opto emitters/receivers. When
the car is driven past the first opto emiter receiver pair, you can start a
counter that will count pulses of a known fixed frequency, then stop the
counter when the second opto emitter receiver pair is passed by the car.
Knowing the fixed frequency of your external clock, and the distance between
the first and second opto pairs, the velocity can be calculated.
The stamp has a command COUNT, but this is limited as you must specify a
"window" of time to count pulses, and that is why I recommended the external
clock
and counters with method two.
There is another command PULSIN, but again, the limitation with this command
is that once the command is issued, the pulses have to start occuring within
131 mS (BS2), which does not bode well because you dont know exactly when the
car will run past the first sensor.
Anyway, give more detail about the conditions where you want to measure
velocity.....anytime anywhere, or dragstrip style.
ken
===========================
im thinking about making a lil box to do timed runs with rc cars,
then to calculate the mph values i planed to write a program, any
thoughts as to how to make a bs2 do this?
i thought about 2 wires a calculated distance apart, but im kinda
confused as to the best way to alow the car to tell the bs2 it
crossed points, im open to any ideas
[noparse][[/noparse]Non-text portions of this message have been removed]
>
> then to calculate the mph values i planed to write a program, any
> thoughts as to how to make a bs2 do this?
speed = distance / time.
X feet 1 mile 60 secs 60 mins X * 60 * 60 360 * X miles
______ * _________ * __________ * _________ == ___________ == _____________
N secs 5280 feet 1 minute 1 hour N * 5280 5280 * N hour
Of course this isn't "scale" mph. You'll have to divide by the scale ratio
to get the scale mph's.
> i thought about 2 wires a calculated distance apart, but im kinda
> confused as to the best way to alow the car to tell the bs2 it
> crossed points, im open to any ideas
I'd just use an IR tx/rx pair across the track. A short "tunnel" would keep
ambient light off the sensors. Or just recess them in a short
(non-reflective) tube.
--
Enjoy,
George Warner,
Schizophrenic Optimization Scientists
Apple Developer Technical Support (DTS)
get all the guys around me all pumped up and acuratly be able to
tell whos car goes the fastest, using mph since it sounds more
impressive hehe, there are cars tht do 90 +mph there riduculas but
there there, this however is for a group of bashers so we can sit
have a beer n bs about whos faster ,
--- In basicstamps@yahoogroups.com, smartdim@a... wrote:
> What you want to do is not difficult......
> Need some more information though. Are these cars on a track, or
do youi
> want the ability to time the car any place it goes?
>
> I have done similar speed measurements several times with the
Stamp or the SX
> uController.
>
> If you give specifics, we can narrow down what approach might be
best.
>
> One method would be to put a disk on one of the axles of the rc
car. The disk
> would be solid and have one hole in it. On one side of the disk
hole, mount
> an opto emitter, and on the other side of the hole, directly
opposite the opto
> emitter, mount an opto reciever.
>
> In this configuration, you will get one pulse per wheel
revolution. Knowing
> the length of the pulse (length of pulse measured by stamp) and
the distance
> per one rev of the wheel, velocity (speed) can be determined.
>
> One drawback to this approach is if there is wheel slippage, the
reading will
> be inacurate.
>
> If you simply want to check the speed in a straight line....kind
of like a
> drag race, another approach is to use two pairs of opto
emitters/receivers. When
> the car is driven past the first opto emiter receiver pair, you
can start a
> counter that will count pulses of a known fixed frequency, then
stop the
> counter when the second opto emitter receiver pair is passed by
the car.
> Knowing the fixed frequency of your external clock, and the
distance between
> the first and second opto pairs, the velocity can be calculated.
>
> The stamp has a command COUNT, but this is limited as you must
specify a
> "window" of time to count pulses, and that is why I recommended
the external clock
> and counters with method two.
>
> There is another command PULSIN, but again, the limitation with
this command
> is that once the command is issued, the pulses have to start
occuring within
> 131 mS (BS2), which does not bode well because you dont know
exactly when the
> car will run past the first sensor.
>
> Anyway, give more detail about the conditions where you want to
measure
> velocity.....anytime anywhere, or dragstrip style.
>
> ken
> ===========================
> im thinking about making a lil box to do timed runs with rc cars,
>
> then to calculate the mph values i planed to write a program, any
> thoughts as to how to make a bs2 do this?
>
> i thought about 2 wires a calculated distance apart, but im kinda
> confused as to the best way to alow the car to tell the bs2 it
> crossed points, im open to any ideas
>
>
> [noparse][[/noparse]Non-text portions of this message have been removed]
> > im thinking about making a lil box to do timed runs with rc cars,
> >
> > then to calculate the mph values i planed to write a program, any
> > thoughts as to how to make a bs2 do this?
>
>speed = distance / time.
>
>X feet 1 mile 60 secs 60 mins X * 60 * 60 360 * X miles
>______ * _________ * __________ * _________ == ___________ == _____________
>N secs 5280 feet 1 minute 1 hour N * 5280 5280 * N hour
A slight correction in the formula and you can reduce this to...
(try 3600 instead of 360 at the end)
MPH = ( distance * 15 ) / ( duration * 22 )
Where '"distance" is equal to the distance in feet between points A and B,
and "duration" is equal to the time it takes to travel from point A to point B.
>i want to be able to set up a sort of drag race, basically i want to
>get all the guys around me all pumped up and acuratly be able to
>tell whos car goes the fastest, using mph since it sounds more
>impressive hehe, there are cars tht do 90 +mph there riduculas but
>there there, this however is for a group of bashers so we can sit
>have a beer n bs about whos faster ,
90 +mph ??? Is this a scaled mileage?
hobby, I am assuming you dont want to spend a ton of bucks on the sensors,
because
there are sensors out there thru-beam sensors that are expensive but work well
outdoors.
One idea for sensors is to use what one person desribed [noparse][[/noparse]I'd just use an IR
tx/rx pair across the track. A short "tunnel" would keep ambient light off the
sensors. Or just recess them in a short (non-reflective) tube]
This type of sensor can be a challenge because of ambient light.
The other type of sensor that might work is a "tapeswitch." google tape
switch if you dont know what it is. One problem with the tape switch might be
the
car is not heavy enough to trip the switch.
Since you don't know exacty when the car will "trip" the first sensor, it
will be difficult for the stamp "elegantly" do this and my suggestion is as
follows;
Have a free running STABLE clock af 50k hz or so. Feed this clock into one
input of an AND gate. Into the other input of the AND gate feed the SET signal
of a flip flop that has a manual set and clear.
The output of the AND gate will go to a counter.
You will need to do some math......what minimum speed and maximum speed do
you expect?
Based on the min and max speed, and the clock frequency, and the max value
the counter will hold (you can always cascade counters though for larger count
values) figure what distance apart the sensors should be.
The bottom line is you will get a number of pusles which represents time
(knowing the clock frequency) and you will have a distance. Knowing time and
distance will give velocity. The stamp would be used to process the distance
(constant) divided by the time (variable) to give your output, MPH.
Write back if you need more detail, help with the math part (knowing expected
min and max speed) or if any of this is unclear.
ken
=======================
[noparse][[/noparse]Non-text portions of this message have been removed]
>>______ * _________ * __________ * _________ == ___________ == _____________
>>N secs 5280 feet 1 minute 1 hour N * 5280 5280 * N hour
>
> A slight correction in the formula and you can reduce this to...
> (try 3600 instead of 360 at the end)
>
> MPH = ( distance * 15 ) / ( duration * 22 )
>
> Where '"distance" is equal to the distance in feet between points A and B,
> and "duration" is equal to the time it takes to travel from point A to point
> B.
Polygon Man is correct! My bad; that should be 3600 in the last formula. I
would have reduced it too but #$%@& emails programs wrap the lines at 80
chars (and I ran out of room). ;-)
Note that the duration above is in seconds.
--
Enjoy,
George Warner,
Schizophrenic Optimization Scientists
Apple Developer Technical Support (DTS)
so id like to use it,
i was thinking of having it run a loop to check for signal from the
tx, when it detected a break in the signal from the first pair, it
begins a count , storing the data in a VAR, i assume it would count
in ms, making the read out if you do math to multiply the VAR and
get mph more acurate, it would count untill it picked up a break in
the second pair, the whole loop would be started by a simple start
buton / reset buton back at the led readout, with 2 wires coming off
the controll box with rx's, then two tiny boxes with tx's and
circutry to make it send a signal, then 2 leds to aim the lil boxes
at the rx's acros the school track near my house, slowest mph about
20, hiest i would like to be 100, or better, just incase,,
i would think id like to make distance a larger number since its a
constant ,, for more acurate readings, mebe 30 to 50 feet, i figure
you have 200 to 300 feet working range, a nice speed up track, then
at the end a speed calculating part followed by a dirt baseball
diamond to aid break free runs.
i reallythought it would be simple circut, on the stamp end just two
rx's, 2 led to varify signal on start and finish switch ( aiming tx
rx ) and a reset buton starting a program loop detecting break in
start (start count) and break in finish switch (end count do math
and dispaly) press reset buton to begin waiting for break in first
switch, ,, then 2 lil radio shack boxes with 9 volts, and tx, with
circut to constantly transmit the signal the rx recieves ,,
yes id like more help i was kinda confused and thought i could do it
much simpler, and would like to know more about better tx rx , also
im not familiar with even ir tx /rx, how to wire up the circuts, i
understand conceptually, though, the math really isnt my mane
concern though, thats all programing after i have a working switch
--- In basicstamps@yahoogroups.com, smartdim@a... wrote:
> Ok......you want to do a "drag race" kind if timer. And since this
is a
> hobby, I am assuming you dont want to spend a ton of bucks on the
sensors, because
> there are sensors out there thru-beam sensors that are expensive
but work well
> outdoors.
>
> One idea for sensors is to use what one person desribed [noparse][[/noparse]I'd just
use an IR
> tx/rx pair across the track. A short "tunnel" would keep ambient
light off the
> sensors. Or just recess them in a short (non-reflective) tube]
> This type of sensor can be a challenge because of ambient light.
>
> The other type of sensor that might work is a "tapeswitch." google
tape
> switch if you dont know what it is. One problem with the tape
switch might be the
> car is not heavy enough to trip the switch.
>
> Since you don't know exacty when the car will "trip" the first
sensor, it
> will be difficult for the stamp "elegantly" do this and my
suggestion is as
> follows;
>
> Have a free running STABLE clock af 50k hz or so. Feed this clock
into one
> input of an AND gate. Into the other input of the AND gate feed
the SET signal
> of a flip flop that has a manual set and clear.
>
> The output of the AND gate will go to a counter.
>
> You will need to do some math......what minimum speed and maximum
speed do
> you expect?
>
> Based on the min and max speed, and the clock frequency, and the
max value
> the counter will hold (you can always cascade counters though for
larger count
> values) figure what distance apart the sensors should be.
>
> The bottom line is you will get a number of pusles which
represents time
> (knowing the clock frequency) and you will have a distance.
Knowing time and
> distance will give velocity. The stamp would be used to process
the distance
> (constant) divided by the time (variable) to give your output, MPH.
>
> Write back if you need more detail, help with the math part
(knowing expected
> min and max speed) or if any of this is unclear.
>
> ken
> =======================
>
>
> [noparse][[/noparse]Non-text portions of this message have been removed]
some high output current nicad cells across an expensive 12v motor and hope
you go straight for a couple seconds.
Original Message
From: "Beau Schwabe" <polygon_man@h...>
To: <basicstamps@yahoogroups.com>
Sent: Tuesday, April 06, 2004 10:47 PM
Subject: Re: [noparse][[/noparse]basicstamps] Re: speed calculator for rc cars,
> At 10:53 PM 4/6/04, you wrote:
> >i want to be able to set up a sort of drag race, basically i want to
> >get all the guys around me all pumped up and acuratly be able to
> >tell whos car goes the fastest, using mph since it sounds more
> >impressive hehe, there are cars tht do 90 +mph there riduculas but
> >there there, this however is for a group of bashers so we can sit
> >have a beer n bs about whos faster ,
>
> 90 +mph ??? Is this a scaled mileage?
>
>
>
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
> from the same email address that you subscribed. Text in the Subject and
Body of the message will be ignored.
>
> Yahoo! Groups Links
>
>
>
>
>
>thats most likely actual. I run electric dragster sometimes.. you put 20
>some high output current nicad cells across an expensive 12v motor and hope
>you go straight for a couple seconds.
You'd probably get much better performance with a 3-volt or rewound motor and
about half the number of batteries. Overcoming the inertia of all those
batteries is KILLING you coming off the line! You additionally might consider
mounting the batteries over the real wheels if they're not positioned there
already. With this kind of set-up you may need a lead washer or two on the front
end to keeping from flipping as it does a wheelie coming off the line!
I've got lots more tricks if you're interested. Contact me off list.
Regards,
Bruce Bates
Former Slot Car Fanatic
on my right, to 300 feet on my left in a mater of about4 seconds,
then proceded to take off like a hydro foil race boat, thats the
highest it will go, about 40 - 50 is average for a decent car /
truck
--- In basicstamps@yahoogroups.com, "Scott Tappan Contractor"
<scott.tappan.contractor@n...> wrote:
> thats most likely actual. I run electric dragster sometimes.. you
put 20
> some high output current nicad cells across an expensive 12v motor
and hope
> you go straight for a couple seconds.
>
Original Message
> From: "Beau Schwabe" <polygon_man@h...>
> To: <basicstamps@yahoogroups.com>
> Sent: Tuesday, April 06, 2004 10:47 PM
> Subject: Re: [noparse][[/noparse]basicstamps] Re: speed calculator for rc cars,
>
>
> > At 10:53 PM 4/6/04, you wrote:
> > >i want to be able to set up a sort of drag race, basically i
want to
> > >get all the guys around me all pumped up and acuratly be able to
> > >tell whos car goes the fastest, using mph since it sounds more
> > >impressive hehe, there are cars tht do 90 +mph there riduculas
but
> > >there there, this however is for a group of bashers so we can
sit
> > >have a beer n bs about whos faster ,
> >
> > 90 +mph ??? Is this a scaled mileage?
> >
> >
> >
> >
> > To UNSUBSCRIBE, just send mail to:
> > basicstamps-unsubscribe@yahoogroups.com
> > from the same email address that you subscribed. Text in the
Subject and
> Body of the message will be ignored.
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
--- In basicstamps@yahoogroups.com, "Beau Schwabe" <bschwabe@a...>
wrote:
> At 02:53 AM 4/7/04 +0000, you wrote:
> >i want to be able to set up a sort of drag race, basically i want
to
> >get all the guys around me all pumped up and acuratly be able to
> >tell whos car goes the fastest, using mph since it sounds more
> >impressive hehe, there are cars tht do 90 +mph there riduculas but
> >there there, this however is for a group of bashers so we can sit
> >have a beer n bs about whos faster ,
>
>
> Joking!!!!
>
> Here's an idea... (grin) Equip all of your rc cars with a beer can.
> On a spare rc channel devise a mechanism that will release some of
> the beer for exactly 1 second. Afterwards measure the length of
> the "beer streak"... a little math and Walla, you get MPH
>
> >
>
>
---
> Beau Schwabe Mask Designer National Semiconductor
Corporation
> 500 Pinnacle Court, Suite 525
> Home: polygon_man@h... Mail Stop GA1
> Work: bschwabe@a... Norcross, GA 30071
>
---
>i want to be able to set up a sort of drag race, basically i want to
>get all the guys around me all pumped up and acuratly be able to
>tell whos car goes the fastest, using mph since it sounds more
>impressive hehe, there are cars tht do 90 +mph there riduculas but
>there there, this however is for a group of bashers so we can sit
>have a beer n bs about whos faster ,
Joking!!!!
Here's an idea... (grin) Equip all of your rc cars with a beer can.
On a spare rc channel devise a mechanism that will release some of
the beer for exactly 1 second. Afterwards measure the length of
the "beer streak"... a little math and Walla, you get MPH
>
Beau Schwabe Mask Designer National Semiconductor Corporation
500 Pinnacle Court, Suite 525
Home: polygon_man@h... Mail Stop GA1
Work: bschwabe@a... Norcross, GA 30071
>some high output current nicad cells across an expensive 12v motor and hope
>you go straight for a couple seconds.
Ok... I was thinking back when I lived in Oklahoma, I was involved in an
rc group that raced home brew models. The only "original stock" equipment
that you were allowed to use was the transmitter and receiver that came with
it -- No kits allowed. I was out in my garage and unearthed a car who made
its last run in the summer of 2000. This was an 18 cell rc that was
driving a 4
wheel drive dual motor design with matched motors originally designed for 6
cells. I was able to determine a maximum speed of 58 MPH with this car on
a private airport runway between two cones set 500ft apart and a stationary
video camera (30 frames per second)...for a home brew this was considered
fast.
This is a 1/6th scale car.
Each wheel is about 3.5 inches wide
I built a custom ESC with (fwd/rev) and (high/low) gear which effectively
switched the batteries into different configurations to the motors:
LOW = 9 cells per motor with motors not in parallel
HIGH = 18 cells per motor with motors paralleled
http://www.angelfire.com/wizard/y2kbc//STAMPS/RC/car1.gif
http://www.angelfire.com/wizard/y2kbc//STAMPS/RC/car2.gif
After Sabolich was bought out by Novacare, and then after
the Sabolich/Novacare facility was reclaimed by Hanger Prosthetics,
another buy out, John Sabolich moved the R&D department to his
private airport that he owned. I don't know what is going on there
now, but last I checked in 2004 they were still on the same project
as they were when I left in 2000...doesn't sound like progress to me,
since this particular project started in 1998. Anyway here is the
airport...(search the page for Sabolich)
http://members.tripod.com/airfields_freeman/OK/Airfields_OK.htm
Beau Schwabe
> tx/rx pair across the track. A short "tunnel" would keep ambient light off the
> sensors. Or just recess them in a short (non-reflective) tube]
> This type of sensor can be a challenge because of ambient light.
Actually the best way to improve the behavior of these sensors is to use a
modulated source and "detect" the modulation. Since most remote controls
modulate their IR at 38-41 kHz there are "canned" receivers already tuned
for these frequencies ($1.50 at Radio Shack). Ambient light won't "false"
trigger these sensors. Ether the modulated light source is there or it
isn't. I've used these across 3 and 4 foot gaps (doorways) with acceptable
results. BTW: two of these across a doorway at waste level are good to
generate both count and direction information. Fed to a up/down counter you
can keep a running head count.
--
Enjoy,
George Warner,
Schizophrenic Optimization Scientists
Apple Developer Technical Support (DTS)
> tx, when it detected a break in the signal from the first pair, it
> begins a count , storing the data in a VAR, i assume it would count
> in ms, making the read out if you do math to multiply the VAR and
> get mph more acurate, it would count untill it picked up a break in
> the second pair,
Good so far.
> the whole loop would be started by a simple start
> buton / reset buton back at the led readout,
Nope. lost me here. I just have the first sensor restart (zero) the counter
and the second just "grabs" the counter, calculates the MPH and puts it on a
large 3-digit (LED) display. No "operator" required. ;-)
Depending on how complicated you want to get you could free run a counter
and just remember all the times when the start sensor is tripped and then
when the finish sensor is tripped compute the MPH based on the FIFO sensor
reading. The only problem here is 1) a contestant doesn't finish a race or
2) second car passes (laps) the first.
You could deal with the first case by timing out anything less than "worst
case" performance (if it takes longer than some maximum duration throw away
the first reading).
For the second case you could have separate lanes.
> with 2 wires coming off
> the controll box with rx's, then two tiny boxes with tx's and
> circutry to make it send a signal, then 2 leds to aim the lil boxes
> at the rx's acros the school track near my house, slowest mph about
> 20, hiest i would like to be 100, or better, just incase,,
QED.
--
Enjoy,
George Warner,
Schizophrenic Optimization Scientists
Apple Developer Technical Support (DTS)