So after a few exciting weeks we are well into this project. Ill break it down into areas of work.
PCB
The PCB for this project will utilize a custom PCB with an STM32F072 at its core. This MCU was chosen as a robust automotive chip with a few key features. 2 DAC outputs so we keep that smooth throttle, onboard CANBUS and USB for communications and upgrades, and its relatively affordable. Best of all its in stock!
The remainder of the board is supporting power, filters, and opamps to support a full swing 0-5V buffered output most of these Drive By Wire systems expect.
Thanks to OSHPARK for fast prototype PCB at a super low cost.
Firmware
Much work needs to be done here. We want to maintain a core function set that doesn't get too cluttered with extra features. The board is operating your throttle, we need it to be super reliable. All the functions will be written to fallback on a basic non cruise operation and any errors will only be printed on demand.
The basic plan is as such:
- Disconnect & read Throttle position (TPS)
- Simulate TPS with buffered output
- Get information via CAN
- Cancel Cruise under applied brakes, clutch, or wheel slip!
- Keep all the same functions as any automotive cruise, Accelerate, Decel, Set, Resume, Cancel.
- Interface with the stock KTM 890 cruise switches or a basic toggle.
There will also be a third party review of the firmware before we ship to try and get all the bugs out.
As of yet there doesn't not seem to be any major hiccups and we will continue to bang away on the keyboard.
I would like to thank Dan Plastina from ADVrider his post was very helpful to getting the CAN bus messages off the ground, not everything lined up with the 1190 but close enough to earn him a thank you.
Wiring
Many hours of reading KTM drawings and probing with a multimeter. We have most of the wiring figured out for the KTM 1190 and 390. Much further testing is needed to verify all this research but its coming along.
Housing
A suitable housing has yet to be decided however we are leaning towards something fully potted for 100% waterproofing and robustness. Only an 18 pin connector and IP67 USB-C connector will be exposed.
1 comment
Interested in the Cruise control for the KTM adventure 390. Keep us posted. From Kenya.