Yo yo
Controller is on freewheel (chain) side. You do not need to remove the freewheel.
Check some notes on this post
http://goldenmotor.com/SMF/index.php?topic=2103.0To remove the controller do this:
-Undo the hex bolts on the chain (freewheel) side
-With a wooden/rubber mallet or a hammer using a block of wood in between, bash the disc brake side of the motor hitting the axle with hard hits displacing as much force over the axle end without damaging the nut thread.
-Hit the disc brake side until you have enough space on the chain side to pry the wheel cover off carefully, in a crabwalk action lifting the left side, then right, then top, then bottom until you hear a loud PING which is the cover squeezing from the freewheel bearing
-With this cover removed you can access the internal controller
-Take a photo of your connections to refer to.
-Desolder all of the internal controller wires
-Remove the hex bolts holding in the aluminum heatsink, to remove the internal controller whole
-Before you install the replacement controller, apply a strip or 2 of electrical tape to the copper PCB track UNDERNEATH the phase wires (see attached pic) this will prevent your phase wires shorting to the negative (ground) track.
-Install your controller and re-solder all of the connections. Refer to your picture you took earlier to assist.
-Once all of the connections are in place, carefully reinspect and then before putting the cover on, connect a throttle to the wiring harness and connect power. Listen for beeps etc. and give it the slightest press/twist on the throttle to check if the wheel jerks. This will give you a smile on your face while you put it back together thinking of how cool you are you just fixed it lol
Should be good to go
I'm sure I left 1 or 2 things out, I'm sure someone will jump in here
peace out