Welcome
Username or Email:

Password:


Missing Code




[ ]
[ ]
Online
  • Guests: 16
  • Members: 0
  • Newest Member: omjtest
  • Most ever online: 396
    Guests: 396, Members: 0 on 12 Jan : 12:51
Members Birthdays:
One birthday today, congrats!
Steve Conner (46)


Next birthdays
04/28 Steve Conner (46)
04/29 GODSFUSION (37)
04/29 Zajcek (37)
Contact
If you need assistance, please send an email to forum at 4hv dot org. To ensure your email is not marked as spam, please include the phrase "4hv help" in the subject line. You can also find assistance via IRC, at irc.shadowworld.net, room #hvcomm.
Support 4hv.org!
Donate:
4hv.org is hosted on a dedicated server. Unfortunately, this server costs and we rely on the help of site members to keep 4hv.org running. Please consider donating. We will place your name on the thanks list and you'll be helping to keep 4hv.org alive and free for everyone. Members whose names appear in red bold have donated recently. Green bold denotes those who have recently donated to keep the server carbon neutral.


Special Thanks To:
  • Aaron Holmes
  • Aaron Wheeler
  • Adam Horden
  • Alan Scrimgeour
  • Andre
  • Andrew Haynes
  • Anonymous000
  • asabase
  • Austin Weil
  • barney
  • Barry
  • Bert Hickman
  • Bill Kukowski
  • Blitzorn
  • Brandon Paradelas
  • Bruce Bowling
  • BubeeMike
  • Byong Park
  • Cesiumsponge
  • Chris F.
  • Chris Hooper
  • Corey Worthington
  • Derek Woodroffe
  • Dalus
  • Dan Strother
  • Daniel Davis
  • Daniel Uhrenholt
  • datasheetarchive
  • Dave Billington
  • Dave Marshall
  • David F.
  • Dennis Rogers
  • drelectrix
  • Dr. John Gudenas
  • Dr. Spark
  • E.TexasTesla
  • eastvoltresearch
  • Eirik Taylor
  • Erik Dyakov
  • Erlend^SE
  • Finn Hammer
  • Firebug24k
  • GalliumMan
  • Gary Peterson
  • George Slade
  • GhostNull
  • Gordon Mcknight
  • Graham Armitage
  • Grant
  • GreySoul
  • Henry H
  • IamSmooth
  • In memory of Leo Powning
  • Jacob Cash
  • James Howells
  • James Pawson
  • Jeff Greenfield
  • Jeff Thomas
  • Jesse Frost
  • Jim Mitchell
  • jlr134
  • Joe Mastroianni
  • John Forcina
  • John Oberg
  • John Willcutt
  • Jon Newcomb
  • klugesmith
  • Leslie Wright
  • Lutz Hoffman
  • Mads Barnkob
  • Martin King
  • Mats Karlsson
  • Matt Gibson
  • Matthew Guidry
  • mbd
  • Michael D'Angelo
  • Mikkel
  • mileswaldron
  • mister_rf
  • Neil Foster
  • Nick de Smith
  • Nick Soroka
  • nicklenorp
  • Nik
  • Norman Stanley
  • Patrick Coleman
  • Paul Brodie
  • Paul Jordan
  • Paul Montgomery
  • Ped
  • Peter Krogen
  • Peter Terren
  • PhilGood
  • Richard Feldman
  • Robert Bush
  • Royce Bailey
  • Scott Fusare
  • Scott Newman
  • smiffy
  • Stella
  • Steven Busic
  • Steve Conner
  • Steve Jones
  • Steve Ward
  • Sulaiman
  • Thomas Coyle
  • Thomas A. Wallace
  • Thomas W
  • Timo
  • Torch
  • Ulf Jonsson
  • vasil
  • Vaxian
  • vladi mazzilli
  • wastehl
  • Weston
  • William Kim
  • William N.
  • William Stehl
  • Wesley Venis
The aforementioned have contributed financially to the continuing triumph of 4hv.org. They are deserving of my most heartfelt thanks.
Forums
4hv.org :: Forums :: Projects
« Previous topic | Next topic »   

AVR Chronograph

Move Thread LAN_403
uzzors2k
Thu Jan 01 2009, 03:05PM Print
uzzors2k Registered Member #95 Joined: Thu Feb 09 2006, 04:57PM
Location: Norway
Posts: 1308
This project started with me finding two identical VFD displays while gutting MOs. Since the MO display boards had both a VF display and suitable mains transformer in place they were ideal for a project. I was keen on using them for something, but without any immediate use I just put them in storage. Then after learning assembly for AVR and acquiring a STK500 through university, I thought I could put together a speedtrap for an upcoming coil gun project.

1230821859 95 FT0 Mo Display Unit

So after some unsoldering, examination of the circuit board and probing I discovered the pin-out of transformer and VFD, and shortly after had a 23V, 5V and filament voltage source along with a 5V TTL compatible VFD. The next step was to make the actual detectors, which consist of just an IR LED/phototransistor pair and comparator setup. That concluded the hardware, which left me with the programming part. After discovering the difficulty of division in assembly, I chose to program in Basic instead given some past experience with basic for PICs. MikroBasic Pro was used.


1230821859 95 FT0 Vfd Dark Board 1230821859 95 FT0 Speed Detector Pipe

The program is rather simple, with the most complex portion being multiplexing the display. The program continously sends the value in the speed variable to the VFD. Interrupts on INT0 and 1 start the timer and stop it respectivly. INT1 interrupt also takes care of calculating the speed. Timer 0 is used and setup for 400kHz, giving 2.5µs resolution. Currently I coded it to read speeds from as low as 0.92m/s up to 594.06m/s before the precent error reaches 1%. Of course at closer to 600m/s consideration must be paid to the sensors themselves among other things, and 600m/s from a hobbyist coil gun is a bit optimistic.
1230821859 95 FT0 Chronograph In Box 1230821859 95 FT0 Completed Chronograph


So there you have it! Fun to build, design, and use. I like doing "calm" projects once in while where nothing runs the risk of exploding. I'm disappointed with the VFD because it's much less intense than desired, and that I measured wrong when cutting out the display hole. angry (The dark hides it pretty well) The VFD was taken from garbage so I shouldn't be surprised. Other than that I'm satisfied with it.

EDIT: I've had to correct some serious errors in the code, but it's all sorted out now. The fixed .hex file can be found in my site.
Back to top
rp181
Thu Jan 01 2009, 03:45PM
rp181 Registered Member #1062 Joined: Tue Oct 16 2007, 02:01AM
Location:
Posts: 1529
Nice useful project, but i must ask, why is the box so big? You should consider fitting the tube into the chrono so you shoot through the chrono :)
Back to top
uzzors2k
Fri Jan 02 2009, 06:15PM
uzzors2k Registered Member #95 Joined: Thu Feb 09 2006, 04:57PM
Location: Norway
Posts: 1308
Hehe, I bought the box a few weeks ago before I was sure of the size required. I hate having project boxes to big, but too small is even worse. I pulled out my coil gun to do some testing today, and I'm having extreme difficulty getting both sensors to trigger. I see the pro chronographs use some kind of large sensor window which would be excellent to have. It seems to me that they are optical, and must use the white plastic as a reflector. Anyone know how they work?
Back to top
rp181
Fri Jan 02 2009, 06:31PM
rp181 Registered Member #1062 Joined: Tue Oct 16 2007, 02:01AM
Location:
Posts: 1529
In retail ones, both emitter and detector are at the bottom, the plastic is a reflector.
Back to top
uzzors2k
Sat Jan 03 2009, 09:43PM
uzzors2k Registered Member #95 Joined: Thu Feb 09 2006, 04:57PM
Location: Norway
Posts: 1308
I moved the LEDs to the same side as the detectors and it seems to have a larger sensing area now. There were some serious flaws in the code. The Timer0 interrupt routine took longer than it's own overflow did, and there was no false trigger detector. Now the speed will default to zero if the first trigger is hit but not the second. The timer problem has been solved as well of course. Modifying the program in assembly for better efficiency could greatly improve the accuracy at high speeds, but I don't see the need to do so when only working with coil guns at sub 100m/s speeds. I tried it successfully on my old coil gun just now and the speeds correspond nicely to the expected values, so I assume everything is working as anticipated.
Back to top
rp181
Sat Jan 03 2009, 09:45PM
rp181 Registered Member #1062 Joined: Tue Oct 16 2007, 02:01AM
Location:
Posts: 1529
Ive had sucess using a detector across from a emitter, with black heat shrink on both. resistance goes from several 100k down to less then 10k.
Back to top
uzzors2k
Sun Jan 04 2009, 11:26AM
uzzors2k Registered Member #95 Joined: Thu Feb 09 2006, 04:57PM
Location: Norway
Posts: 1308
Didn't you have to hit both sensor beams though? That's the problem I had before, the beams were hard to hit in succession.

As for the code, I updated it one more time. This time I added some code to use the remainder in Timer0's register which in effect gives 50ns resolution. The error a sub 100m/s speeds is in the order of 0.01%.
Back to top
rp181
Sun Jan 04 2009, 04:20PM
rp181 Registered Member #1062 Joined: Tue Oct 16 2007, 02:01AM
Location:
Posts: 1529
The fact that the PVC was white (i think) helped some. I also try to use as small diameter pipe as possible. You could make several of different diameters to swap out for different projectiles.
Back to top

Moderator(s): Chris Russell, Noelle, Alex, Tesladownunder, Dave Marshall, Dave Billington, Bjørn, Steve Conner, Wolfram, Kizmo, Mads Barnkob

Go to:

Powered by e107 Forum System
 
Legal Information
This site is powered by e107, which is released under the GNU GPL License. All work on this site, except where otherwise noted, is licensed under a Creative Commons Attribution-ShareAlike 2.5 License. By submitting any information to this site, you agree that anything submitted will be so licensed. Please read our Disclaimer and Policies page for information on your rights and responsibilities regarding this site.