How to install a rear wheel hub motor on a bike

Created by Golden Motor, Modified on Tue, 20 May at 3:45 PM by Golden Motor



Rear Hub Motor Replacement and Magic Pie Edge Installation Guide


Welcome to the detailed guide on removing the existing Magic Pie rear motor from your bike and installing the latest Magic Pie Edge motor, a 48V 500W rear hub motor. This guide covers every step you need for a smooth installation, compatibility checks, and wiring setup.




Step 1: Preparation and Wheel Removal


Begin by flipping your bike upside down. This standard positioning gives you easy access to the rear wheel and drivetrain components.


Using appropriate tools, loosen the axle nuts on both sides of the rear wheel. Remove the nuts, washers, and any torque arms installed. In this case, the bike already has torque arms due to the existing motor; your bike may differ. Save the torque arms because they will likely fit the new wheel and should be reused.


Note that washers are positioned between the bike frame and the shoulders of the axle where it widens. There are washers on both sides—make sure to keep track of their locations and orientations as you remove the wheel.


After removing the hardware, carefully take the rear wheel off the bike. If your wheel has a brake disc installed, remove it so you can reinstall it on the new motor wheel.



---


Step 2: Testing Freewheel Compatibility and Fit


Before mounting the new Magic Pie Edge wheel, test fit various freewheels to check compatibility and ensure smooth chain operation.


Available freewheel options include:


Six-speed Shimano


Seven-speed Shimano


Seven-speed DNP


Eight-speed DNP



You will need a freewheel removal and installation tool to swap freewheels. A standard freewheel tool might not work; ensure you have the correct tool for the specific freewheel type.


Start with the six-speed Shimano freewheel. Mount it onto the new motor wheel and observe the fit. The chain may sit close to the motor but typically will not rub. Use the included spacer behind the freewheel if necessary.


Next, try the seven-speed Shimano freewheel. It must be installed carefully to avoid cross-threading; keep the wheel flat and align the freewheel properly before tightening. You may need to use an additional washer or spacer behind the freewheel to prevent the chain from rubbing on the motor or frame.


The seven-speed DNP freewheel fits well with adequate clearance behind the freewheel. Generally, it requires no spacer.


Finally, test the eight-speed DNP freewheel. This one fits closer to the motor and will require a spacer ring behind it to provide sufficient clearance for the chain.



---


Step 3: Freewheel Spacer and Washer Placement


For proper chain clearance and frame protection, use washers and spacer rings strategically:


Place washers between the bike frame and the shoulders of the axle to keep the frame from contacting the freewheel directly.


For freewheels that fit close to the motor (like the eight-speed DNP), a spacer ring behind the freewheel is recommended to maintain adequate space.


Verify clearance by observing the chain path and ensuring it does not rub on the motor housing or frame.




---


Step 4: Rear Hub Variants — Freewheel vs Cassette


There are two main rear wheel types available for the Magic Pie Edge motor:


1. The freewheel version accepts 5-7 speed freewheels. It has a shorter spline length suitable for these clusters.



2. The cassette version accepts 8-10 speed cassettes. It features a longer spline designed to accommodate more gears.




This installation guide uses the freewheel version with an eight-speed freewheel for compatibility with the existing setup.



---


Step 5: Brake Disc Installation


When reinstalling the brake disc on the new wheel, prevent interference with the motor controller housing by placing washers behind the heads of the brake disc mounting screws.


Standard bicycle screws may be too long and cause the disc to rub on the motor controller. To check this, install one screw loosely and spin the wheel with a wrench. If the wheel turns stiffly or the screw bites into the housing, use washers to space the disc away.


Tighten all screws with washers in place, and confirm the brake disc spins freely without rubbing.



---


Step 6: Cable Management and Valve Extenders


Install the clip on the wire harness to hold cables away from the wheel and disc brake, preventing wear from rubbing.


Use valve extenders on the tire tubes to prevent the inner tube valve from pulling inside the rim during installation, which can be tricky without extenders.


When reinstalling the wheel, lift the chain to slip the wheel between sprockets. It might help to have a helper hold the chain open.


Ensure the brake disc aligns properly in the caliper. If misaligned, loosen caliper bolts and adjust.


Route cables backward or downward along the frame to create a drip loop. This prevents water from running down cables into sensitive areas, instead allowing it to drip safely onto the ground.




Step 7: Final Wheel Mounting and Torque Arm Alignment


Install washers inside and outside the dropouts to protect the frame and maintain proper spacing.


Attach torque arms and align them straight with the frame.


Tighten axle nuts flush with the axle ends to secure the wheel firmly.


Zip tie wiring along the frame, maintaining the drip loop and ensuring cables are clear of moving parts.




Step 8: Wiring Connections and Controller Setup


The Magic Pie Edge motor’s controller housing splits the wiring into three main cables:


One cable leads to the smart display or USB port for programming and monitoring the controller.


The red and black battery wires connect to the battery pack. These can be connected by stripping, twisting, and securing wires with connectors such as MORITZ connectors or electrical tape.


The main 10-pin wiring harness connects to the throttle, brake levers (with cut-off switches), cruise control buttons, horn, and lighting system.



If lighting is not used, that wire can be cut safely.


Most users omit pedal assist wiring, as it is rarely used and adds complexity.




Step 9: Optional Accessories and Final Setup


Install Golden Motor brake levers and control buttons for motor cut-off and cruise control functions.


Throttle placement is user preference.


Add optional accessories such as a smartphone mount or cycle analyst (performance monitor) to complete your setup.




Compatibility Notes


The installation process and wiring harness are compatible with all Magic Pie motor versions: Edge, Vectors, Magic Pie 4, and 5 series. Only the motor itself changes, keeping installation and wiring consistent across models.




Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article