So is it a hub motor or a crank drive?
If the former, then look for the pas sensor. This is often a plastic disc with magnets in it, mounted on the pedal shaft. It needs to be a consistant 1mm from the detector. The detector often has an led on it that flashes as each magnet passes it. This...