I am working on a project where I need to adjust the timing of 4 signals and was considering an Arduino. I'm not sure if it's fast enough though. They are square waves, just a graph for time scale.
I will have 4 input signals running at up to 250khz and need to delay them equally by somewhere between 50us minimum and 5ms at the most. I assume I would need to very quickly sample and buffer the information so that the output can then be delayed and created from the buffered data.
Any thoughts, would an Arduino be capable of this? I'm probably looking for what I think is called a line delay IC, but I need to tune the delay so I was hoping to find a software solution. Thanks!
equally means all four signals have to be delayed for the same amount of µseconds?
Must each single square-wave be measured because the HIGH-low-phase can vary in each cycle
which would mean when it rises and when it falls the pulse-length must be the same
only delaying it for 50 µsecs up to 5 milliseconds?
or
will it be a constant frequency until next "task"
250 kHz means period is 4 µsec.
if each and every rise and fall-time can be different but must be delayed for 5000 µsec this means you have to store 5000 / 4 = 1250 * 2 = 2500 values
B707, I have multiple 16Mhz Arduino, but was leaning towards the Arduino Nano for its size. Uno and Mega are available as well.
I made that graphic in a graphing calculator. Not sure how to make a square wave there.
StefanL38,
Each signal is sometimes continuously varying in frequency. They need to be preserved individually for each waveform. I agree with your idea of polling every 4 uS. Any thoughts would the Arduino have enough time to read, save, lookup, and write for all Io pins every 4us? My quick calculations show 64 clock cycles in 4 uS. I have no idea how many cycles it would take to process. Any thoughts?
I'm troubleshooting a laser cutter I'm making. I think the laser if firing too late, so I want to delay the stepper driver inputs. Kinda hacky, but I just wanted to see if that would fix the issue.
hm I doubt that.
delaying the stepper-motor for such short times like 50 microseconds up to 5 milliseconds
what kind of things are you cutting?
If your laser is not moving around at speeds of 3000 mm per second
Making the stepper-motors to start moving 50 µS to 5 milliseconds later makes no difference for the cutting.
And of course very hacky. You should find the source of the late firing instead of delaying the axles
That would be one of the better approaches. Some ideas: consider DSP (Digital Signal Processing), that is what I would consider the amount of computer power required for the frequencies involved. You could also consider an A/D, shift registers and D/A to form your delay line one for each channel. Good luck and let us know how you do.