Hacking the bike
This won’t necessarily be actually hacking the bike, but rather more advanced upgrades.
This is the multi-page printable view of this section. Click here to print.
Hacking the bike
This won’t necessarily be actually hacking the bike, but rather more advanced upgrades.
The current battery monitor 5 bars is reasonably basic
I have built battery monitors in the past that have a better idea of battery.
I have started this, see Projects Battery Monitor
A basic version that just monitors voltage will already be useful. Capturing all data should be good to experiment with.
An interesting idea is to keep track of voltage over time.
This is a good start. Nice thing about a bettery monitor is we can watch this over time rather than the instantanious reading. This means we can give you more real world approximation of remaining power
Using a shunt, looses a tiny bit of voltage (usually about 0.1V) and allows you to measure very high currents. This kind of setup of setup is a little more complicated. If I can do it that allows me to not only view the current used but also put into the battery, should allow me to very accurately measure state of charge.
A display can easily be used to show the current information we know about.
Radio to connect to WiFi, uploading data. Bluetooth to see on your phone instead of display above. Or LoRa for access to data anywhere LoRa is. Could also use cellular for another cost.
Far Drive have an Android/iPhone app and Bluetooth dongle
Now technically, this is just a serial to bluetooth dongle - probably taking TTL serial data, some power and creating a bluetooth dongle. It was cheap enough that I just purchased it from China and will play with other connections later.
Plug to find
Note: The plug is actually connected to a lead that goes into the rear seat, but with only the transmit wire from the controller. I’m assuming this is to allow people to connect bluetooth dongles or similar and read values but not make any changes.
Bluetooth dongle installed
I connected it into the originanl plug, removing the wire to the rear seat, allowing full control.
This connector is serial and power - and is used for this dongle and for direct connection to a windows laptop (although I still can’t source the software).
This bluetooth dongle, is just a regular bluetooth to serial dongle, and you could use others. Even the software on my android phone, picks up other bluetooth serial devices in the area.
Which serial, RS485, RS232, TTL is yet to be checked. I think it is RS485.
Next step will be to find the CAN bus addresses and messages. Some of them are pretty standard I think, such as speed - but not yet sure about voltage, and current.
It is easy to install and easy to use.
Be aware there is ZERO security. If you leave this attached, then anyone with a laptop can change your settings. Use at your own risk.
TODO - I will be getting a dump of the data soon to analyse the information. I should then be able to extract the necessary data.
I didn’t get any further into looking at what they call curves (I would have called graphs, dials, and curves graphs/charts).
Found a link to the code, yet to be tested
CAN bus - the standard vehicle bus
CAN bus, very nice. Need to see what it does and what it provides. Could be ideal for adding devices / hacking.
Heads up display
I was thinking of something REALLY simple.
Simple LED indicators in the helmet. I think this would be better than an auto canceller with all the complexities.
Don’t want it always up, reduce glare etc. Possibly a button to show, or a led that flashes briefly as down to last 25%
Log everything
To start with logging that includes:
A simple ESP32, that only comes on when the bike is on, would allow for logging of all trip information.
Then when it returns home, leaving it on long enough to reconnect to WiFi and send data. It could also do bluetooth real time.
This could be also a good way of connecting to the HUD
Documentation shows Serial Port
The documentation talk about a serial port. Look at connection, and check what settings (baud et al) it uses, wheter it is 3.3/5 volt TTL, RS 232, RS 485.
And most importantly, see what it is telling us.
If I can get the software (looks like some Windows software) then I can read all the serial in and out and see what the protocol is.
The bluetooth dongle, seems to connect to not just my android phone, but my laptop and desktop too. However I can’t seem to connect to it. ie, its probably not a standard Bluetooth profile. I should still be able to connect direct and see.
I don’t currently have a USB/RS485, ordered
The ESP32 I have has a RS485 connection, going to do a capture of all serial data from that. No idea the board rate, but most RS485 uses 115200 unless long distance.