View previous topic :: View next topic |
Author |
Message |
pratik
Joined: 13 Oct 2005 Posts: 55
|
Posted: Sun Aug 09, 2009 7:13 pm Post subject: How to calculate speed of object |
|
|
Need help to calculate speed of object traveling at the speed of sound (343 meters)
Any tips will be very helpful
Thanks
Pratik |
|
Back to top |
|
|
rileyesi
Joined: 19 Dec 2006 Posts: 398
|
Posted: Sun Aug 09, 2009 10:10 pm Post subject: |
|
|
Hi,
Need more details. What size is the object? Is it traveling in air? What methods do you have to measure the speed (ultrasonic, radar, video, stop watch!, etc.) Do you need BASCOM for the project?
Pete |
|
Back to top |
|
|
pratik
Joined: 13 Oct 2005 Posts: 55
|
Posted: Mon Aug 10, 2009 11:45 am Post subject: |
|
|
Hi,
I want to make a chronometer for my air rifle.
Link for the basic understanding of chronograph
http://www.prmay.demon.co.uk/PRMay/chronograph/chronograph.html
My thinking
Connect a 6 inches pipe to the barrel
Install 2 pair of IR sensors
Calculate time taken by the pallets to pass from 1st to 2nd sensor
How to calculate time using BASCOM & AT Mega8 |
|
Back to top |
|
|
pratik
Joined: 13 Oct 2005 Posts: 55
|
Posted: Wed Aug 12, 2009 6:01 am Post subject: |
|
|
please help |
|
Back to top |
|
|
rileyesi
Joined: 19 Dec 2006 Posts: 398
|
|
Back to top |
|
|
pratik
Joined: 13 Oct 2005 Posts: 55
|
Posted: Thu Aug 13, 2009 9:43 pm Post subject: |
|
|
can this work ?
$regfile = "m8def.dat"
$crystal = 4000000
$hwstack = 40
$swstack = 10
$framesize = 30
Dim T As Word
Dim A As Bit
' connecting first sensor to INT0
' Second Sensor to INT1
Config Int0 = Falling 'generates an interrupt when pallets pass throught first sensor
On Int0 Start_count 'start counting the time
Config Int1 = Falling 'generates an interrupt when pallets pass throught second sensor
On Int1 Stop_count 'stop counting the time
Enable Int0
Enable Int1
Config Timer1 = Timer , Prescale = 8
T = 0
Timer1 = T
Enable Interrupts
Do
If A = 1 Then
Print "timer count=" ; T
End If
Loop
Start_count:
Start Timer1
A = 0
Return
Stop_count:
Stop Timer1
T = Timer1
Timer1 = 0 ' reset timer1
A = 1
Return |
|
Back to top |
|
|
|