migrate from uno to due ??

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

So please layman's terms.

Hi,
2nS = 1/2E10-9 = 500MHz

What is the application?

The UNO for example runs at 16MHz, the DUE at 84MHz.

Tom.... :slight_smile:

I am attempting to monitor a digital input from a sensor.
the signal from sensor will only be visible for 2ns to 10ns.

How can I do this?

Spent days online & reading imbedded microprocessors books > not any closer to an answer

The only way you can read this is with the signal triggering an RS latch. That will capture the fast pulse but what about the signal repetition rate?

Even a Raspberry Pi with a 1GHz clock can only read input pins at 27MHz.

Explain more about your application for some more help.

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.

"Aiming to read a input at least every 2ns."

Please check your requirement.

Thank You

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.

sorry but not a huge budget for that one.

Hi,
Can you post a link to the sensor concerned please?

A pulse stretcher or monostable will make the pulse longer, what is the frequency of this pulse?

Thanks ... Tom..... :slight_smile:

mmmm...

sort of a self designed one...

Its a IR led and BPV10NF (with a rise/fall time of 2ns).

The sensor works fine with uno but only up to 190 ft/s or so. Then I used port manipulation and got it better, up to 300ft/s or so.

Hence I am trying to aim for the absolute minimum of the BPV10NF, that way I can not miss the pulse if it is a bit slower.

Hi,

2ns rise and fall time, how long does it stay high, why do you need 2ns RESPONSE TIME?
How often does the pulse occur?

What sort of timing application is it that needs 2ns accuracy?

Tom..... :slight_smile:
Sorry but we need the COMPLETE STORY of your application.

Is this part of the measuring the speed of a bullet project that you were working on previously?

May need to stretch the pulses.

:slight_smile: Busted lol

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.

You will not get a 2nS pulse out of that sensor.

Please grow up and stop playing with guns.

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.

(with a rise/fall time of 2ns)

Another XY problem.

Just feed the signal to a One Shot!

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..

As LarryD said,

LarryD:
Just feed the signal to a One Shot!

This page explains SR flip flops.

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.

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.

Thanks all

Tomorrow I will give it another go.

O, Merry Christmas gone past and happy new Year!

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..

Last article: Measuring Projectile Velocity

http://www.competitionelectronics.com/wp-content/uploads/2014/10/ProChrono_Digital_2011.pdf