Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

RE: [AVR-Chat] Speed Trap

2004-03-10 by LightYearCS

Depends on what the tolerances are.

 

I think I'll just stick to asking questions.

 

I'm mainly here to learn about AVR.  I'm setting up a port for the
uC/OS-II Real Time Operating System.  We looked at AVR and thought it
would be an excellent platform for our product.

 

Good luck with that magnetic cannon.

 

-----Original Message-----
From: Wagner Lipnharski [mailto:wagner@ustr.net] 
Sent: Wednesday, March 10, 2004 8:55 AM
Subject: Re: [AVR-Chat] Speed Trap

 

LightYearCS wrote:
> You would most likely need a high speed timer to do this.  The
> microprocessor can read the results but I'm not sure if the built in
> timers would be fast enough to record the events.  You would have to
> define the parameters regarding accuracy.
>
>
>
> What are your acceptable tolerances?
>
>
>
> Barry


Wow, a 4MHz clock and timer running at full clock, would give him 250ns
resolution.
Suppose a 10cm apart sensors, and the projectile launches at 331m/s
(sound
speed), then the two sensors distance 10cm would be covered within
302.115
microseconds.  The AVR counter would count a value of 1208.
Isn't that enough?

The correct division would generate 1208.4592 counts, but it will count
only
1208.

The 250ns resolution would give him speed span of 10cm/250ns =
400km/second.
A round integer counting of 1208 would means 331.125m/s, but, if
counting
bumps to 1209 it would mean 330.9m/s, at this range, one count would
represent a delta 0.225m/s

For further resolution, you can always use a faster clock (see AtTiny26)
or
increasing the distance between the sensors.

I guess the worse nighmare would be to adjust exactly the distance
between
the sensors. An physical installation error of 1mm (will happens easily)
(instead of 10cm you install them 9.9cm apart); a 331m/s projectile will
cover 99mm distance in 299.094 microseconds, 4MHz clock will count a
round
integer of 1196, but you thinking it was 100mm distance will lead to a
wrong
calculation, resulting in 0.1 / 1196 x 250ns = 334.448m/s.

So you see, the biggest problem in accuracy is to positionning exactly
the
sensors.
Far distance between the sensors, better accuracy.

You could always calibrate the unit, but finding a "referente high
speed"
will always be a problem.
You can't simply go to the store and ask for a 1000km/h speed reference.
:)

The only easy way is to get a sinchronous AC motor, lets say 600rpm
(10rps),
install a 1m diameter large disk at the shaft, make a mark at the edge,
measure the speed of that mark with the installed sensors 10cm apart.
1m
diameter = 3.14159 m circunference, 10rps = 31.4159m/s, 10cm apart =
3.178741ms, 4MHz counter should count 12714.96.  Reversing the numbers:
0.1
/ 12714 x 250ns = 31.46138m/s



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.600 / Virus Database: 381 - Release Date: 2/28/2004




  _____  

Yahoo! Groups Links

*         To visit your group on the web, go to:
http://groups.yahoo.com/group/AVR-Chat/
  

*         To unsubscribe from this group, send an email to:
AVR-Chat-unsubscribe@yahoogroups.com
<mailto:AVR-Chat-unsubscribe@yahoogroups.com?subject=Unsubscribe> 
  

*         Your use of Yahoo! Groups is subject to the Yahoo! Terms of
<http://docs.yahoo.com/info/terms/>  Service.

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.