[Full Tutorial] How to convert a Ninebot Max (G30) for Personal Use (ESC/BMS/BLE Flashing, Rewiring, and CFW)

User avatar
Unicycle Santa
Posts: 15
Joined: Sat Feb 22, 2020 9:42 pm

[Full Tutorial] How to convert a Ninebot Max (G30) for Personal Use (ESC/BMS/BLE Flashing, Rewiring, and CFW)

Postby Unicycle Santa Thu Mar 12, 2020 5:12 am

Disclaimer: This guide is not a how-to for stealing a scooter and converting it. This is intended for people who legally aquired a Ninebot Max that was originally designed for rental use. Do not steal. There, now that thats out of the way...

I have been in the process of converting a Lyft Ninebot Max to personal use, and through my trials and tribulations I realized that there is no single source of information on how to do this. Instead, I had to rummage through many threads across multiple forums to gather the information to get this done. This guide is my remedy for that. Everything you need to know is right here.

To convert a Ninebot Max, three main things need to happen; flash the electronic speed controller (ESC), flash the battery management system (BMS), and flash the dashboard. There is also some rewiring needed for Lyft models, but that will be covered later. We will start with what you need to get this job done.

The forum has a max image size that can be posted. If you need it to be larger, right click and open in a new tab.

Required Materials
- Ninebot Max (G30)
- T15 Security Torx (this is a great set)
- 3mm Hex Key
- Dashboard
- Dashboard cover
- ST-Link V2
- Soldering Iron
- STM32 ST-Link Utility
- ST Visual Programmer (STVP)
- Windows 10
- Max ST-Link Dash BLE555 Autoprogrammer (direct download)
-Battery Management System flash file. Right click bms134_fulldump.hex and save. Should save as a .hex file.
- Digital Multimeter for testing continuity (used when rewiring)

Note about multimeters: You can get a cheap one like the one linked or one from Harbor Freight for $7, however investing in a better one is highly recommended. You may think you will never use it again, but look where you are right now... You like electronics :D

Good Luck!
Last edited by Unicycle Santa on Thu Mar 12, 2020 5:21 am, edited 1 time in total.
User avatar
Unicycle Santa
Posts: 15
Joined: Sat Feb 22, 2020 9:42 pm

Re: [Full Tutorial] How to convert a Ninebot Max (G30) for Personal Use (ESC/BMS/BLE Flashing, Rewiring, and CFW)

Postby Unicycle Santa Thu Mar 12, 2020 5:12 am

Part 1: Flashing the Dashboard

This section will cover how to flash the dashboard with a custom firmware called BLE555. This is necessary to flash the scooter with custom firmwares later to change the way it rides. This will be covered later.

1. If you have a scooter that came with a stock dash (Spin, possibly others), unplug all the wires going to the dash then skip to step 2. Lyft scooters do not come with a Ninebot Max dash. If you have a Lyft scooter, take off the cancerous blob of plastic mounted to the handlebars and disconnect all wires.

Take everything off till you are left with this:

Image

2. Put the smallest tip on the soldering iron, set to 350-400. I don't know if this is the optimal temp, but its what worked for me.

3. If your dashboard has silicone all over it, such as in the pic below, use a plastic tool to remove the material around the marked capacitor and the solder pads on the right. These will be used to program the board.

Image

4. Remove the C2 capacitor from the front of the board. I heated mine on the top and bottom and pushed on it a bit till it popped off:

Image

5. If your dash is out of the scooter (such as mine), solder a lead to this pin and connect it to the +5v line on the ST-Link:

Image

6. Solder leads to the 3 programming pads GND, SWCLK, SWDIO and connect them to the corresponding pins on the ST-Link. Be careful with the pads, they can easily come off the board, bringing the trace with it (trust me...). I hot glued mine for some extra durability.

Image
Image
Image

7. Install STM32 and STVP from the Required Materials section. Reboot PC after installation for safe measure. Open both to make sure they are installed properly, then close them.

8. Plug in the ST-Link with all the wires connected (GND, SWDIO, SWCLK, +5v (if needed)). It should beep and light up, but it wont be responsive to button presses etc:

Image

9. Open the downloaded max_BLE555_stlink.zip from the Required Materials section and extract folder.

Image

10. Run connect_dashboard.bat. A CMD window should open and take care of the rest:

Image
Image

When it is finished successfully, you should see ***Programming Finished***.

The dashboard is now successfully flashed with BLE555, which will come in handy later. You can now desolder the programming wires and +5v line. Set the dash aside till later to be safe. Lyft scooters will need a rewiring, so do NOT plug the dash into the scooter. You will fry it.
User avatar
Unicycle Santa
Posts: 15
Joined: Sat Feb 22, 2020 9:42 pm

Re: [Full Tutorial] How to convert a Ninebot Max (G30) for Personal Use (ESC/BMS/BLE Flashing, Rewiring, and CFW)

Postby Unicycle Santa Thu Mar 12, 2020 5:12 am

Part 2: Flashing the Battery Management System (BMS)

This section will explain how to flash the battery management system. Without flashing the BMS, many different problems can arise. The most common is the scooter will lose power after riding for approximately 10 seconds. Other things such as error codes, limp mode, etc may also occur. To be safe, flash the BMS.

1. Use a T15 security Torx to remove all the fasteners on the bottom panel of the scooter. You may need to use a flathead screwdriver to pop the panel on if the foam gasket is stuck:

Image

2. Under this panel you will find the battery housed in a metal shield. Remove the 10 3mm hex fasteners (5 on top, 5 on bottom):

Image

3. Take the battery pack out and remove the phillips fasteners holding the top panel on. Then, use the small notch (blue) to start prying the top cover off the pack. Follow the gap around till it splits apart:

Image

4. Now its time to remove the actual battery bank from the housing. There are 8 screws covered by white silicone. Scrape this stuff off till you can access the phillips screw underneath then remove. The section that allows the wires to pass through the housing also needs to be removed. Luckily it is just slotted into place with some adhesive. Get a screwdriver under the bottom of the plastic insert and pop it out. Now the tricky part is getting the battery bank out of the housing. I used a flathead screwdriver to slightly pry the walls of the housing away from the cells to break the seal, then I used the housing edge as leverage to pry the battery bank out of the housing. It is adhered to the bottom so you need to pry in a few different places till it pops off.

Note: I am not recommending using metal tools to do this. Work within your skillset and do as you see fit.

Image

5. The BMS is located on the end of the battery, it will be potted in grey foam. Luckily, this stuff easily comes out in chunks. Remove enough to expose the programming contacts (I just pulled it all out):

Image

6. This is the pinout for the BMS programming pads. Solder ST-Link leads accordingly:

Image
Image

7. Connect the leads to the ST-Link and plug the ST-Link into the computer:

Image

8. Open STVP (not ST-Link Utility) and click the configure icon to enter these settings:

Image
Image

9. Click the Read All button. Both the Program Memory and Data Memory tabs should populate:

Image
Image
Image

10. Backup the Program Memory and Data Memory tabs by opening the corresponding tab and clicking File -> Save As and name it Program or Data respectively. These are just incase anything goes wrong. The Data Memory backup is very important.

Image

11. Open the Program Memory tab and go to File -> Open and navigate to the bms134_fulldump file downloaded in the Required Materials section. Make sure the console says File successfully loaded.

Image

12. Once again, BE SURE YOU ARE IN THE PROGRAM MEMORY TAB. Click the Program button. Look in the console for PROGRAM MEMORY successfully verified. This means the flash was successful.

Image
Image

Put everything back together in reverse order, the battery has been successfully modified to work as a retail unit.

Note: If the battery indicator light does not flash blue as it did before the flash, holding the reset button on the BMS for ~10 seconds may reset the BMS and restore functionality. If this does not work, hook the battery back up to the ESC and plug in the charger, it is possible this will jump-start the BMS and restore functionality (credit to meister_sd).
Last edited by Unicycle Santa on Sat Mar 14, 2020 5:43 pm, edited 1 time in total.
User avatar
Unicycle Santa
Posts: 15
Joined: Sat Feb 22, 2020 9:42 pm

Part 3: Flashing the ESC

Postby Unicycle Santa Thu Mar 12, 2020 5:13 am

Part 3: Flashing the Electronic Speed Controller (ESC)

This section covers flashing the ESC to allow it to function like a retail unit. This is the most important step, as when you get a scooter from a rental company, the ESC is locked down to prevent usage. Flashing a dash and BMS wont get you anywhere without this.

Note: Another tutorial out there about unbricking an ESC says to navigate to a specific memory address and copy and paste some data. None of that worked for me, the addresses didn't exist, etc. I ended up just flashing the ESC with a fulldump file and it worked perfectly. This is my process.

1. Use a T15 security Torx to remove all the fasteners on the bottom panel of the scooter. You may need to use a flathead screwdriver to pop the panel on if the foam gasket is stuck:

Image

2. You will see the ESC tucked to the side of the battery near the rear of the scooter. Start by untucking as many wires as you can to get better access. Then, unscrew the ESC using a 3mm hex key on the 2 fasteners holding it in.

Image

3. Once everything is disconnected, you will notice the entire board is potted in clear silicone. I used a knife to carefully cut a square in the silicone for where I want to remove the material. If you do this, do NOT hit the board. Then I used a plastic spudger from a phone repair kit to clear the material out down to the board.

This is the board completely depotted, which you do not need to do. Just interesting to see.

Image

4. Solder the ST-Link leads to the corresponding pads. These are actually through hole solder pads, so if you know what you are doing you can solder the leads straight through for more durability. I did this and potted it in hot glue to make it more durable as I left the leads connected for possible future use.

Image

5. Plug the ESC into the ST-Link and plug the ST-Link into the computer. Open STM32 Utility (not STVP). Click Target -> Connect. The Utility should now be connected to the ESC and the table will populate. Press CTRL + B to disable Readout-Protection.

6. Go to File -> Open File and navigate to esc126_fulldump.bin downloaded from the Required Materials section.

7. Go to Target and click Program. The ST-Link will now program the ESC. Wait until you get a message saying the process has been completed, then disconnect the ESC and ST-Link and reassemble in reverse order.

8. When reinstalling the ESC, I chose to apply some thermal compound to the bottom side of the ESC to ensure thermal conductivity with the frame of the scooter. This is especially helpful later in the guide if you chose to up the power output of the scooter.

The ESC has now been flashed to fuction as a stock Ninebot Max. Do not plug anything in before verifying proper wiring of the scooter in the next part of this guide. Doing so may fry the dash or cause other problems as some of these scooters (All Lyfts, maybe other brands) come wired differently from the factory.
Last edited by Unicycle Santa on Thu Mar 12, 2020 5:22 am, edited 1 time in total.
User avatar
Unicycle Santa
Posts: 15
Joined: Sat Feb 22, 2020 9:42 pm

Part 4: Rewiring

Postby Unicycle Santa Thu Mar 12, 2020 5:15 am

Part 4: Rewiring

Lyft scooters (and maybe others) come from the factory wired differently in order to work with the cancerous plastic blob of a headunit that the scooter comes with. Many people have plugged in a dash and had it go up in smoke. It is possible other scooters will have a similar issue, I don't know for sure since I have not had anything but a Lyft. I would recommend verifying your scooter's wiring before plugging everything back together to make sure its wired correctly.

Rewiring a Lyft is fairly straightforward, but this will apply to anyone who needs to verify the wiring of their scooter. The dashboard has 4 wires: red, black, green, and yellow. The wiring the scooter comes with has all different colors, so I do this based on the pin location. The plug that comes on the dash will be different than the green plug the scooter came with. You can either save the other half of the green plug from the GPS unit or you can cut both connectors and solder the wires together. I soldered mine, it doesnt matter which wire you solder where because we will sort that out at the other end.

The stock lyft connector will look like this:

Image

What we want is this (colors correspond to colors at the dash):

Image

Unplug the connector in the ESC and plug the dash in/solder it up at the handle bars. Set the multimeter to continuity mode (it will beep when the leads are touched together). Put a lead on the red pin at the dash, then probe the pins on the ESC plug to find which one the red goes to. Mark it and repeat this for all 4 colors (red, black, green, yellow).

Once you have identified which dash wires correspond to which pins at the plug, cut the extra wires to clean up a bit. Then, you have two choices. You can either pop the pins out of the plug and move them to be in the correct position, or you can cut the connector and resolder the wires in the proper position.

Either way, make it so the dash colors go to these pins:

Image

The scooter is now properly wired. You can either trim off the excess wires to clean up a bit.

At this point, the scooter should turn on but its possible there will be an error on the dash. When I turned mine on I got error 27. You can bypass this by holding down the throttle as you turn the scooter on, but that gets annoying to have to do every single time. On top of that, the scooter doesn't have any guts to it the way it comes from the factory. Maybe thats just me, since I come from a background of motorcycles and gas scooters. But still, we gotta fix that. This leads to the final part of this tutorial.
User avatar
Unicycle Santa
Posts: 15
Joined: Sat Feb 22, 2020 9:42 pm

Re: [Full Tutorial] How to convert a Ninebot Max (G30) for Personal Use (ESC/BMS/BLE Flashing, Rewiring, and CFW)

Postby Unicycle Santa Thu Mar 12, 2020 5:15 am

Part 5: Flashing Custom Firmware

Flashing a custom firmware to the scooter will allow you to tweak some settings regarding power output, throttle behavior, and even stop annoying error codes from being displayed. Note I have an Android phone, so I will be showing my process on Android. If you have an iPhone or whatever else exists out there, do some research to see how you can get this done.

1. Download XiaoFlasher

2. On your Android phone, go to the Custom Firmware Generator at Scooterhacking.org

3. Basics
- Compatibility Patches [ON]
- Version Spoofing [ON]
- Remove Charging Mode [OFF] (unless you are running a custom battery setup)

4. Power & Speed
- Motor Power Constant: this is going to affect the torque output of the system. Lowering this value increases torque, but also decreases battery life and range. The default value is 51575, you can test in 5000 increments to see what you like most. To give some perspective, I tried 48000 (too weak), so I dropped it to 35000 which was a major improvement. I still wanted more, so I used the old version of the website to drop it to 30000. This is where I am keeping it. Plenty of torque and if I want I can change to eco or d to save battery.
- Top Speed: max it out. Patch for all serial numbers just to be safe.
- Motor Start Speed: I set mine to 2km/h, do as you see fit.

5. Cruise Control
- Cruise Control Delay: set this to what you want. I wanted it disabled so I cover that in the notes after this section.

6. Advanced
- Stealth Mode [ON]
- Current-based Throttle Algorithm: turn this on if you want, I haven't noticed a difference. If anything it feels a touch slower with it on.

7. Click "Finished, time to cook" and select NineFlasher to get a zip file. The file will download to your Android device.

8. Get your scooter and turn it on. If you have to override error 27, hold the throttle down as you turn it on.

9. Once it is on, the bluetooth light will flash. Open XiaoFlasher and you will see the scooter listed. Connect to it.

Image

10. You should get a screen that looks like this. Click Select Zip File and navigate to the file you downloaded.

Image

11. The file name and size should show next to Selected File. Click Flash Selected Zip File.

12. The process will finish on its own.

Image
Image

13. At this point, the scooter will disconnect. Close the app and turn the scooter off then back on.

The flash has completed and your scooter should function properly, but with a bit more power depending on how you set it up.

Notes:
- To disable cruise control, rename the scooter, or change energy regen (when letting off throttle it decelerates to charge battery) you need to downlod the Ninebot app from Segway and connect to the scooter. This is why we set up version spoofing to prevent the app from installing an official firmware.
- If XiaoFlasher says Flash Failed, too many errors, fully exit the app and reboot the scooter, then reconnect and try again. Personally, it always works on the second try.
User avatar
Unicycle Santa
Posts: 15
Joined: Sat Feb 22, 2020 9:42 pm

Re: [Full Tutorial] How to convert a Ninebot Max (G30) for Personal Use (ESC/BMS/BLE Flashing, Rewiring, and CFW)

Postby Unicycle Santa Thu Mar 12, 2020 5:16 am

Your Ninebot Max is now fully converted for personal use, while maintaining (and surpassing) the features and performance of the retail unit. If there are any questions or issues, please post it in the thread. While this is all fleshed out and working, new developments are happening all the time. This thread will stay updated as things change.

~Donations Welcome~
Geedub
Posts: 2
Joined: Wed Apr 08, 2020 2:34 pm

Re: [Full Tutorial] How to convert a Ninebot Max (G30) for Personal Use (ESC/BMS/BLE Flashing, Rewiring, and CFW)

Postby Geedub Mon Apr 13, 2020 12:08 pm

Followed all the steps and now I'm not getting any output from the battery it also looks like the battery is discharging very slowly when plugged in to charge.
Geedub
Posts: 2
Joined: Wed Apr 08, 2020 2:34 pm

Re: [Full Tutorial] How to convert a Ninebot Max (G30) for Personal Use (ESC/BMS/BLE Flashing, Rewiring, and CFW)

Postby Geedub Sat Apr 18, 2020 3:13 pm

Trying to refresh the battery and the stvp cannot communicate with device and the battery will not work. Converted another max g30 without having to flash the battery and have no issues. This was this first scooter i did and followed the tutorial and have issues with the battery. How can I get it to connect with the stvp?
Ticky-Tavy
Posts: 1
Joined: Mon Dec 02, 2019 9:12 am

Re: [Full Tutorial] How to convert a Ninebot Max (G30) for Personal Use (ESC/BMS/BLE Flashing, Rewiring, and CFW)

Postby Ticky-Tavy Sun Apr 19, 2020 6:40 pm

hi. Thanks for your knowledge. Im having trouble with a couple of the steps on a lyft scoot. First a couldn find the file for the esc even thou i loaded all of the things instructeded next I dont know how toconvert the battery bin file to a herx to load onto it. please help. ive a;ready just donated 20 for your cause. thank you

Return to “Ninebot KS Max”

Who is online

Users browsing this forum: No registered users and 6 guests