I'm opening this thread in hopes of getting input from others who like ASI's controllers and are interested in a custom full-featured display. Once I finish my prototype, I would like to develop some popular requests so that others can benefit from the underlying work, and I would like to begin collecting those requests here. Eventually, this post will have a BOM, SD image, and .STL's for printing a case so anyone can build their own. EDIT: BOM, image, case on Git! 8)
EDIT: Updates here are in excruciating detail. The software is ready on git, including JBD bms integration. If you want a basic overview please look at the readme.
https://github.com/Xenodius/ASI_AmpyDisplay/tree/master
The problem: Generic displays like Kingmeter/Bafang don't display all the info I want. The amazing CycleAnalyst could replicate every function I want except for on-the-fly retuning of whole controller profiles, and would require an external shunt. This is my endgame zero-compromise bike, so, that's not quite good enough :lol: I really want to retune profiles... I have to be able to quickly change field weakening and phase current, if I want to have max power quickly available yet not sacrifice efficiency all the rest of the time when I don't need it. Currently there is no convenient way to do this for ASI but the capability is there. I also want trip functions so I can quickly ballpark my range and self-regulate, and have a trip limiter to guarantee I arrive at my next charge. I want all features fed by ASI's serial interface so I can use its internal shunt, and all associated sensors. It even has accelerometers that could be used to detect a crash and commit a dashcam recording!
Hardware: Raspberry Pi4 with a build of piCore, a fork of tinyCore linux that is exceptionally minimalist and runs entirely in memory for fast boot times, zero risk of SD corruption from abrupt power loss, and plenty of remaining overhead for development of other functions like a dashcam logger with auto-backup through local wifi, a lowjack tied into the controller antitheft and and a horn/alarm, etc. The Raspberry Pi Zero W is more than powerful enough for display functions only, but I'll be testing on a Pi4. For sunlight readability I've chosen a 7.8 inch 1872x1404 Waveshare e-ink display and capacitive touch overlay.
With the PyQT5 gui, the simple GUI app QT Designer can be used to arrange or style widgets as desired. Then, the command-line tool pyuic5 converts that .ui configuration to python that can be interpreted by the app. I will eventually make a few other .ui's configs for smaller displays, if there is interest.
The gui test;
Base GUI widgets:
Possible concerns:
EDIT: Updates here are in excruciating detail. The software is ready on git, including JBD bms integration. If you want a basic overview please look at the readme.
https://github.com/Xenodius/ASI_AmpyDisplay/tree/master
The problem: Generic displays like Kingmeter/Bafang don't display all the info I want. The amazing CycleAnalyst could replicate every function I want except for on-the-fly retuning of whole controller profiles, and would require an external shunt. This is my endgame zero-compromise bike, so, that's not quite good enough :lol: I really want to retune profiles... I have to be able to quickly change field weakening and phase current, if I want to have max power quickly available yet not sacrifice efficiency all the rest of the time when I don't need it. Currently there is no convenient way to do this for ASI but the capability is there. I also want trip functions so I can quickly ballpark my range and self-regulate, and have a trip limiter to guarantee I arrive at my next charge. I want all features fed by ASI's serial interface so I can use its internal shunt, and all associated sensors. It even has accelerometers that could be used to detect a crash and commit a dashcam recording!
Hardware: Raspberry Pi4 with a build of piCore, a fork of tinyCore linux that is exceptionally minimalist and runs entirely in memory for fast boot times, zero risk of SD corruption from abrupt power loss, and plenty of remaining overhead for development of other functions like a dashcam logger with auto-backup through local wifi, a lowjack tied into the controller antitheft and and a horn/alarm, etc. The Raspberry Pi Zero W is more than powerful enough for display functions only, but I'll be testing on a Pi4. For sunlight readability I've chosen a 7.8 inch 1872x1404 Waveshare e-ink display and capacitive touch overlay.
With the PyQT5 gui, the simple GUI app QT Designer can be used to arrange or style widgets as desired. Then, the command-line tool pyuic5 converts that .ui configuration to python that can be interpreted by the app. I will eventually make a few other .ui's configs for smaller displays, if there is interest.
The gui test;

Base GUI widgets:
- Time of day
- Battery SOC (by comparing pack voltage to Li-NMC SOC:voltage curve, not ASI's linear approximation)
- Peak voltage drop over x seconds
- Controller fault codes
- Instantaneous wh/mi
- Trip average wh/mi
- Trip total wh or ah
- Trip distance
- Estimated range
- Speed (mph default, analog gauge + text)
- Power (kW, analog gauge + text)
- Trip range slider (limit peak power to ensure a minimum range)
- Profile selector (retune any number of controller variables, between three profiles. For example, to enable/disable field weakening or adjust phase current from a reasonable thermal limit, down to saturation limit, to optimize either efficiency or max power)
- Digital assist level selector (If using torque sensor or PAS, allows you to control the digital assist level from the display)
Possible concerns:
- piCore is an ultralight OS that is resilient and stable by operating entirely in memory and is thus read-only, but it will still require 7-10 seconds to boot. As well, the raspberry pi is a full-fledged computer, although it costs as much as an Arduino that's ~150 times slower and has no GPU. For those who don't want to sacrifice ~2 watts to computing power, or a few seconds to boot, and who don't need a large or high-resolution display, it should be possible to port the project from Python 3.8 to CircuitPython to run all features on Arduino. EDIT: As I have striven for unprecedented precision a CircuitPython port has become somewhat improbable since many of the libraries I depend on for integrations, etc do not exist in CircuitPython. Also, the space is quite limited. So, while this could be ported to CircuitPython, it would require rewriting most functions with different libraries and some functions could not be implemented due to space limits. Presently I am not interested in developed a crippled mini-Ampy display.
- I have tried to make this project as plug-and-play as possible, certain vehicle-specific parameters needed are easily set via keyword arguments-- you can SSH into the pi over wifi from any OS to do this. However, the custom profiles are more involved and users will have to edit these register writes to setup their desired profiles. Thankfully, even if you have no experience in python this is extremely easy, as I've parsed all parameter names and attributes from the AsiObjectDictionary.xml and created functions that do most of the work for you. You need only to name the parameter and a value just as shown and entered in BacDoor, e.g. add the line 'self.writescaled('Maximum_Field_Weakening_Current', 50)' under Profile1 in BACModbus to write 50% field weakening current when enabling Profile1. Even if/when ASI changes the parameter addresses in a major revision, e.g. 7.xx, you will only have to replace the ObjectDictionary.xml to update the app just as you would for BacDoor.