Hi.
Falling into confusion again and all I want to know is if I clime the learning curve for Due.
Would/How much faster can I read inputs?
*Aiming to read a input at least every 2ns.
*Cant read the input fast enough even with port manipulation on Uno
*not an electrical engineer // just a hobbiest
You'll have to use that narrow pulse to trigger an external flip flop so a long enough pulse/level can be created for a slower uC can see it.
I don't what will clock off a 2ns pulse - even a speedy BJT based 74F74 and 74ALS74 needs 4nS and 5nS wide pulse, see the bottom of page 2-3:
You'll have to drop to lower voltage level switching to get faster, like 74AUC family:
Catch the quick pulse there, then shift it to Arduino 3.3V or 5V levels.
The flip flop is a good idea.
I will have to study /again/ to learn about RS latches.
Repetition not a problem got a good few hundred or so microseconds before next pulse on a different pin.
O, would there be a oscilloscope out there that I could use to actually measure the pulse?
Would buy one that's how desperate I am.
Yes I am still working on that, but the setup has changed. The IR light is now reflected of a small mirror giving me a much better signal and better area catching the pellet.
Even when the pellet goes astray it brakes the sent or returned from mirror beam.
I am persevering with this to learn about possessor timings and fast signals and all the rest of it.
Turns out that bullets are really slow (I had no idea).
Wikipedia says, "Muzzle velocities range from approximately 120 m/s (390 ft/s) ... to more than 1,200 m/s (3,900 ft/s)"
or 8.3 to 0.83 milliseconds per m
or 8.3 to 0.83 microseconds per mm
Worst case, a 10mm wide projectile passes a 1mm wide sensor window in 8.3 microseconds, perhaps fully blocking it for 6 microseconds.
Does that sound right?
'Ballistic Chronographs" appear to have two or more sensors about 300mm apart, so you'll see a 6 microsecond pulse, a wait of about 250 microseconds then another 6 microsecond pulse.
Maybe I'm dumb, but when I punch in the numbers I don't get anywhere near 2nS.
That small (4mm?) projectile must block the light to the IR sensor >=2uSec.
Don't know how long an interrupt takes to register, but it sure is long enough for a common Cmos logic FF to set/reset.
The gates seem to be 20-25cm apart.
I don't see how that timing (~4mSec) could be a problem for an Arduino.
Maybe OP could show/explain his calculations.
Leo..
Using two separate sensors, connect the near sensor to the "S" and the far sensor to the "R".
If you are currently using mirrors to generate two pulses from one one sensor, then change it back to the original design.
The pulse from the near sensor will change the output of the flip flop and the second pulse from the far sensor will change it back again. The result will be a single pulse that is the time difference between the first and second. Feed this into the Arduino.
The Arduino PulseIn function can read pulses to 4 microsecond resolution, so a 250 microsecond pulse is long enough to give sensible measurements.
Buying a cheap digital or analogue storage oscilloscope will save you hundreds of hours of debugging time when dealing with high speed signals.
Tjaart:
If only It was that simple.
Bullet dimension 4.7 mm radial and 6mm long.... and lead traveling between 600ft/s to 1400ft/s.
There are heaps of attempts on net.. real fuzzy do not think anyone accomplished this.
I would like to see how you have done this. Mechanically and electrically.
I think capturing the bullet through the gates will be the hardest part of the project.
But electrically it's not that fast.
I calculate 15usec for a 6mm object to pass the gate.
Nowhere near nanoseconds.
Leo..