Advice on Arduino capability for a project

Ok I'm not sure if this is possible with Arduino.

Basically low voltage DC pulses would come into the device, and the output would match the same pulse frequency. If the pulses were to exceed a certain input frequency for a period of time, the pulses would need to be counted, and then output at a frequency just below the set frequency threshold, until the same number of pulses that came in are achieved on the output. Once the pulses are output, the input and output would match frequency again.

Is it possible?

It doesn't anything more than a simple counting exercise, but what is the point of this? Wouldn't it be simpler to have Arduino send out reliable pulses irrespective of what is coming in from wherever?

Did the OP just use 448 words to describe a PLL?
Otherwise, I have no clue what he is asking.

bigaaron:
Ok I'm not sure if this is possible with Arduino.

Basically low voltage DC pulses would come into the device, and the output would match the same pulse frequency. If the pulses were to exceed a certain input frequency for a period of time, the pulses would need to be counted, and then output at a frequency just below the set frequency threshold, until the same number of pulses that came in are achieved on the output. Once the pulses are output, the input and output would match frequency again.

Is it possible?

Yes, maybe and no.

The answer would depend on what you are actually trying to do.

You need to describe the actual project.

What is the input level and the output level, and the frequency in question?
Could be as simple as a comparator to buffer the signal and output a higher voltage level.

Sounds like you want to output the same number of pulses as you receive on the input, but with a set minimum interval between pulses (hence the set maximum frequency). If the input pulses come in too rapidly, you are keeping track of how many are received so that you can output the same number, but spaced farther apart to match the minimum interval.

As long as the total number of input pulses over the long term does not exceed the number that can be output at the maximum rate over that same time period, it should be possible. Simple method would be to have the input pulse increment a counter each time a pulse is received, and then you check the counter, if it is above zero you generate an output pulse, decrement the counter, and keep a record of when you outputted the pulse. At the end of the minimum time between pulses, you start checking the counter again. As long as the input interval exceeds the minimum interval, the output will follow the input, when the input is more frequent the counter will accumulate the excess pulses until the input slows down enough for the output pulses to catch up.

Thanks for all the replies so far!

Ok honestly the application would be for an ebike with a 20mph speed limit. There are simple ways around the limiter, but none would keep accurate track of mileage. As you pedal a magnet passes a pickup, when it exceeds a certain rpm there is a motor cut. My idea would limit the pulse rate to just below the cut, lets say 19mph, but keep track of how many pulses happen while you are exceeding 19mph, and when you slow down below 19mph it would continue making pulses until it is caught up, then drop back down down to the current speed you are at. Does that make more sense? Since it is "pedal assist" it would not keep the motor running while the mileage is catching up, the controller would see it as you just cruising at 19mph with no torque on the pedals.

I'm good with electronics, I have a scope and I can figure out the voltages for input and output, but I have no idea how to program, or what the Arduino capabilities are. I think a Raspberry Pi would be physically too big and complicated. This would need to be small and lightweight and simple.

I was pedaling to jump a flight of stairs last weekend, and right as I approach it the stupid 20mph limiter kicks in and almost made me eat it. LOL Its so lame, I can easily go over 20mph on a pedal bike with no motor, so why does my ebike need to limit me? I can decide what is a safe speed, just like when I'm driving a car that has no speed limiter!

david_2018:
Sounds like you want to output the same number of pulses as you receive on the input, but with a set minimum interval between pulses (hence the set maximum frequency). If the input pulses come in too rapidly, you are keeping track of how many are received so that you can output the same number, but spaced farther apart to match the minimum interval.

As long as the total number of input pulses over the long term does not exceed the number that can be output at the maximum rate over that same time period, it should be possible. Simple method would be to have the input pulse increment a counter each time a pulse is received, and then you check the counter, if it is above zero you generate an output pulse, decrement the counter, and keep a record of when you outputted the pulse. At the end of the minimum time between pulses, you start checking the counter again. As long as the input interval exceeds the minimum interval, the output will follow the input, when the input is more frequent the counter will accumulate the excess pulses until the input slows down enough for the output pulses to catch up.

I think you might have explained exactly what would be required! Hopefully now I expanded on the application info it makes it easier to understand what the project goal is. I don't mind making it open source to help people out. I don't want to make money on the idea, I want to enjoy riding my ebike and I have found that for freeriding and jumping 20mph is often slow enough to be an UNSAFE speed to approach jumping a gap, because I need to go FASTER for a short time. I would NOT use it to bomb down crowded trails in an unsafe manner for long distances, or to exceed any posted speed limits.