I will use this circuit to limit the current (my ebike controller has a limit but it's too high) use by my ebike.   There's also the possiblity to implement a cruise-control with the same hardware.   The code haven't been tested yet, I will update it when I receive the PCB and test it.

Parts are listed int the design.

 

The VCC and GND from the source have to be soldered directly on the arduino.