Hi there,
I recently bought a DIY ebike kit from ebay. It comes with a motor controller and a dinky LCD screen for showing you your speed, distance, battery remaining, etc.
I'd like to replace the LCD screen with a smartphone so that I can write a little app for it that will also incorporate GPS.
Unfortunately, I have no idea where to start in terms of connecting the motor controller wire to my smartphone's microusb.
What I've tried and found out so far:
Somebody has already figured out the protocol between the motor controller and the lcd, and it's quite straightforward. If the connection between the controller and my phone existed, I would know what to do from there.
I've tried searching for variations of "create custom usb wire", "create custom usb device", "convert usb to another wire" but i've only been able to find irrelevant things like order forms for custom-branded flash drives.
I've learned a little bit about how the (original) usb wire and spec works, but have a very shallow understanding. Basically, power, ground, and data, with data being transmitted over 2 twisted wires in order to help reduce noise.
What I still don't know:
The controller has 5 pins that attach to the lcd. 4 of them are the same as the usb, but there's also a VB- pin and I have not been able to figure out what that means. You can see the diagram here:
https://images-na.ssl-images-amazon.com/images/I/51kBrfSeXlL._SL1000_.jpgThe document describing the protocol between the controller and the lcd mentioned "9600 baud". I know that that's the bitrate, but I'm not sure if that's something that I have to handle in the hardware or in software.
There are other wires that I might also want to tell my smartphone about. If I have multiple different wires providing data, how would I put them all together in the same usb wire?
My background:
15 years writing software professionally, but rarely at a low level.
Very shallow understanding of electronics and circuits. I could tell you about kirchoff's laws, but would not be able to build a multimeter without considereable effort.
Really appreciate any help that anybody might offer!