Login    Register
User Information
Username:
Password:
We are a free and open
community, all are welcome.
Click here to Register
Sponsored
Who is online

In total there are 72 users online :: 4 registered, 0 hidden and 68 guests


Most users ever online was 155 on Mon Aug 15, 2016 1:40 am

Registered users: Bing [Bot], Google [Bot], MSNbot Media, Yahoo [Bot] based on users active over the past 5 minutes

The Team
Administrators
Global Moderators
global_moderators.png CS

AT89S8253 based chronograph

A place to ask general spud cannon related questions.
Sponsored 
  • Author
    Message

AT89S8253 based chronograph

Unread postAuthor: FighterAce » Tue Jun 10, 2014 9:20 am

Last week I've defended my graduation project and got an excellent mark so I guess now I can finally share this project with you.
It all started 6 months ago with me choosing the project "Microcontroller based projectile speed measurement". The first thing on the list was designing a frame that would hold two pairs of light sources and sensors at a precise distance from each other. After many design changes I've come up with this:

Image

It consists of 6 spacing elements (5,4), 4 mirror housings (3), 2 laser module housings(1) and 2 adjustable mirrors (6). It holds two pairs of mirrors perfectly parallel to each other so a laser beam could bounce a few dozen times inside the 20x30cm area. The angle of the laser beam can be adjusted, thus the number of reflections can be changed depending on the diameter of the projectile. The BPW-34 photodiodes are held in an adjustable fixture on the spacing element, below the laser module housings.

Image

For the project I chose AT89S8253 microcontroller since thats what we mostly used at school. Its running at 24MHz which gives me a time measurement resolution of 500ns. When the laser is directed onto the sensor, the photodiode output voltage is only about .4V which is not enough to set the microcontroller input to "1" so I had to use a LM319N high speed voltage comparator in a basic photo detector circuit. On its output I can get 3.5V when the laser is on the photodiode, and 0.8V when the laser beam is broken. This is just within specs for the AT89S8253 logic "0" and "1" voltage levels. It enabled me to program the microcontroller to check only two ports for the time measurement. Once the first laser beam is brkoen, the microcontroller starts a timer. When the second laser beam is broken, it stops the timer. Then it automatically calculates the speed v=0.3/t (sensors are .3m apart). After that it freezes the result for 1 sec so anything flying behind the projectile won't break the first laser beam and restart the measuring sequence, erasing the previous result. After that 1 sec the measurement can be repeated or the result can be displayed in fps or km/h. Power source is a Leoch hermetically sealed 12V lead acid battery regulated down to 5V with a LM317 voltage regulator.
Here is the inside of the control box:

Image

The two lasers and photodiodes mounted in the aluminum frame connect to the control box with a VGA cable. It has just enough wires to connect everything I need but unfortunately it left a mess inside. On the front of the control box there is a simple power switch. To the right of that is the 20x2 LCD. Under the LCD are two status LEDs. Once the front laser is directed onto the start photodiode, the left green LED will turn on. The same goes for the rear laser/stop photodiode and right LED.
On top of the control box are two buttons which allow for unit conversion. The default is m/s but pressing the appropriate button will display the speed in fps or km/h. This was the 10th measurement at 10 bar: (PS: "Brzina" is "Speed" in Croatian ;) )

Image

I don't have a commercial chronograph to compare the results but I did run a couple of tests. For the first test I've calculated the speed at which a .50 cal paintball will hit the ground after falling from a height of 1.8m. Its around 5.78m/s. Then I measured the speed of the same scenario with my chronograph. After 10 measurements the average measured speed was 5.85m/s which turned out to be an error of about 1%. Heres the setup:

Image

For the second test I've fired 10 .50 cal paintballs from my Barret 98b at a chamber pressure of 10 bar.

Image

The average measured speed was 178.53m/s. The only thing I could compare this to was GGDT. I'm just not 100% certain of the dead volume value since I didn't really measure the volume of the 5cm long safety switch between the barrel and QEV. Even if this value is incorrect by a fraction, the results are still surprising.

Image

GGDT estimates a speed of 178.6m/s which would mean the chronograph accuracy is 99.96%. I know that speed is just an estimate and I'm probably introducing an error with my inconsistent reading of the tiny pressure gauge and really cheap ammunition but these tests at least proved the chronograph is not spitting out complete nonsense. The real test will come when I get to compare it directly to a commercially made chronograph. The only problem is finding somebody willing to do the experiment.
  • 1

“The combined synergy of a man and rifle is matchless.
The steadiness of hand, the acuity of vision and finally
the art of knowing how to make the rifle an extension of the
body all equate to the ultimate synthesis of man and machine.”
User avatar
FighterAce
1st Lieutenant
1st Lieutenant
 
Posts: 286
Joined: Fri Oct 23, 2009 1:28 pm
Location: Croatia/Zagreb
Country: Croatia (hr)
Reputation: 1

Re: AT89S8253 based chronograph

Unread postAuthor: POLAND_SPUD » Tue Jun 10, 2014 10:22 am

Heh awesome build
  • 0

Children are the future

unless we stop them now
User avatar
POLAND_SPUD
Chief of Staff
Chief of Staff
 
Posts: 5405
Joined: Sat Oct 13, 2007 4:43 pm
Country: Israel (il)
Reputation: 10

Re: AT89S8253 based chronograph

Unread postAuthor: mobile chernobyl » Tue Jun 10, 2014 1:10 pm

Really cool!

I love the idea of bouncing the laser back and forth like that to essentially create a "plane" the projectile must pass through.

Now just for positive object identification so that particulate in the air/wadding doesn't through false positives when measuring muzzle velocity close to the barrel!
  • 0

User avatar
mobile chernobyl
Colonel
Colonel
 
Posts: 732
Joined: Sun Dec 03, 2006 11:53 am
Reputation: 9

Re: AT89S8253 based chronograph

Unread postAuthor: wyz2285 » Tue Jun 10, 2014 2:55 pm

Things like this make me wish I had learnt more about electronics... :cry:
Excellent, well done. Love the laser wall :thumbright:
  • 0

CpTn_lAw wrote::D "yay, me wanna make big multishot pnoob with 1000 psi foot pump compressor using diamond as main material. Do you think wet bread make good sealant? " :D
User avatar
wyz2285
Major General
Major General
 
Posts: 2244
Joined: Sat Mar 06, 2010 7:50 am
Location: Porto, Portugal
Country: Portugal (pt)
Reputation: 12

Re: AT89S8253 based chronograph

Unread postAuthor: jackssmirkingrevenge » Wed Jun 11, 2014 8:14 am

Fantastic!

As part of this school project, I had to figure out how calculate velocity in the absence of a chrony, so with the help of my physics mentor came up with the system illustrated below (we happened to be covering capacitors at the time). The time across the two foil strips is calculated as follows:

time = resistance x capacitance x ln(voltage across resistors/initial battery voltage)

I never compared this system to a "proper" chrony but for the launcher being tested I got an average velocity of 30 metres per second which sounds about right.

Image
  • 0

User avatar
jackssmirkingrevenge
Donating Member
Donating Member
 
Posts: 24225
Joined: Thu Mar 15, 2007 11:28 pm
Country: Holy See (Vatican City State) (va)
Reputation: 66

Re: AT89S8253 based chronograph

Unread postAuthor: jimmy101 » Wed Jun 25, 2014 6:28 pm

Someday people will realize they have a high performance analog to digital system at their finger tips (literally) that can do everything a laser+uP or some caps+battery+DVM can do. And do it better. And usually without any external circuitry, or at most $5 worth of parts.

Every person that teaches math, physics, chemistry ... at the high school or college level needs to be retrained so that "laptop" is their first response any time a timing problem presents itself.
  • 1

Image

jimmy101
Lieutenant General
Lieutenant General
 
Posts: 3127
Joined: Wed Mar 28, 2007 9:48 am
Location: Greenwood, Indiana
Country: United States (us)
Reputation: 7

Re: AT89S8253 based chronograph

Unread postAuthor: FighterAce » Thu Jul 03, 2014 1:09 pm

Jack that really reminds me of the first ballistic chronograph designed by Kiryako Arvanetakis. I've had an entire segment about him in my presentation ;) Nice to see the design hasn't been forgotten, or perhaps reinvented?

Jimmy, the whole point of my graduation project was using the things I was taught during high school (PCB design, programming, analog circuits, machining, mechanical drafting, etc.) and applying them in a single project. Using a laptop to do all the work would make things too easy and probably wouldn't get me a silver medal from the Faculty of mechanical engineering and naval architecture inventors competition.
  • 0

“The combined synergy of a man and rifle is matchless.
The steadiness of hand, the acuity of vision and finally
the art of knowing how to make the rifle an extension of the
body all equate to the ultimate synthesis of man and machine.”
User avatar
FighterAce
1st Lieutenant
1st Lieutenant
 
Posts: 286
Joined: Fri Oct 23, 2009 1:28 pm
Location: Croatia/Zagreb
Country: Croatia (hr)
Reputation: 1

Re: AT89S8253 based chronograph

Sponsored

Sponsor
 


Re: AT89S8253 based chronograph

Unread postAuthor: jimmy101 » Tue Jul 08, 2014 6:31 pm

FighterAce wrote:Jimmy, the whole point of my graduation project was using the things I was taught during high school (PCB design, programming, analog circuits, machining, mechanical drafting, etc.) and applying them in a single project. Using a laptop to do all the work would make things too easy and probably wouldn't get me a silver medal from the Faculty of mechanical engineering and naval architecture inventors competition.
Probably true, but as a potential employerthe laptop approach would have impressed me more.
  • 0

Image

jimmy101
Lieutenant General
Lieutenant General
 
Posts: 3127
Joined: Wed Mar 28, 2007 9:48 am
Location: Greenwood, Indiana
Country: United States (us)
Reputation: 7

Re: AT89S8253 based chronograph

Unread postAuthor: tahirmaqsood » Wed Mar 23, 2016 3:59 am

FighterAce
sir your project ; AT89S8253 based chronograph;
is very grat
sir i want make this project for cricket ball speed
plz send me code and schematic
thanks
  • 0


tahirmaqsood
Private
Private
 
Posts: 2
Joined: Wed Mar 23, 2016 3:15 am
Country: Pakistan (pk)
Reputation: 0

Re: AT89S8253 based chronograph

Unread postAuthor: FighterAce » Fri Mar 25, 2016 11:05 am

Hey if you think you can reproduce this, go ahead. I couldn't find my last code with m/s to km/h and fps conversion so I'm posting the original one I submitted in paper.

Code: Select all
Dim A As Byte , Brojac As Word ,
Broj As Long , Ukup As Long ,
Time As Single , V As Single ,
Targ As Iram String * 6   

$crystal = 24000000            
Config Timer0 = Timer ,          
Gate = External ,             
Mode = 1            
On Timer0 Pot
Enable Timer0            
Enable Interrupts   
         
Config Lcd = 20 * 2            
Config Lcdbus = 4            
Config Lcdpin = Pin ,
Db7 = P1.4 , Db6 = P1.5 ,          
Db5 = P1.6 , Db4 = P1.7 ,
E = P2.1 , Rs = P2.0            
Cursor Off               

Prov:               
A = 0                  
Counter0 = 0               
Cls                  
Lcd " Brzina:"               
Locate 2 , 10               
Lcd Targ ; " m/s"            
Do
If P1.0 = 0 Then            
Goto Kreni               
End If                  
Loop

Kreni:                  
Start Timer0               
Do
If P1.1 = 0 Then            
Goto Stani               
End If                  
Loop

Stani:                  
Stop Timer0               
Brojac = Counter0
Goto Mat               
Pot:                  
Incr A               
Return   
               
Mat:                  
Do
Broj = 65535 * A            
Ukup = Broj + Brojac            
Time = Ukup / 2000000         
V = 0.3 / Time            
Targ = Fusing(v , #.##)      
Goto Prov:               
Loop



The electrical schematic is in the attachment. Good luck ;)
  • 0

Attachments
elektricna.png
Electrical schematic
“The combined synergy of a man and rifle is matchless.
The steadiness of hand, the acuity of vision and finally
the art of knowing how to make the rifle an extension of the
body all equate to the ultimate synthesis of man and machine.”
User avatar
FighterAce
1st Lieutenant
1st Lieutenant
 
Posts: 286
Joined: Fri Oct 23, 2009 1:28 pm
Location: Croatia/Zagreb
Country: Croatia (hr)
Reputation: 1

Re: AT89S8253 based chronograph

Unread postAuthor: tahirmaqsood » Sat Mar 26, 2016 9:15 am

bundle of thanks sir
plz say me how to you use compiler for this code
Thanks
  • 0


tahirmaqsood
Private
Private
 
Posts: 2
Joined: Wed Mar 23, 2016 3:15 am
Country: Pakistan (pk)
Reputation: 0

Return to General Spud Cannon Related

Who is online

Registered users: Bing [Bot], Google [Bot], MSNbot Media, Yahoo [Bot]

Reputation System ©'