A complete drive by wire implementation using OSCC on the Kia Soul EV

Faraz khan
Opencaret
Published in
5 min readJun 5, 2018

This was step 1 to building my highway autopilot system. You can find more information about the entire project here

A month ago I started down this road of implementing polysync’s OSCC for myself in order to get drive by wire control of my car. I had the option of buying Polysync’s drivekit— but then I realized that since my main aim is to learn here my time would be better spent trying to install their opensource car control setup on my own.

The polysync folks have done some kick ass work and opensourced not only the software but even the hardware schematics and board designs! This helps folks like me a TON!

While the hardware and software part as it relates to the boards is 100% complete — there’s some detail missing on how to actually get this to work in a car. This blog and my wiki will document this process so anyone can get started. The cost of this kit ends up being less than $500 with all parts and shipping considered. The only permanent modification you have to make is with the steering torque sensor connector.

NOTE: This is not a replacement for Polysync’s drivekit. The drivekit is a hardened high quality kit using proper wiring and harnesses. If you are a startup please support them by buying their kit and save yourself a lot of time :) Its the cheapest DBW Kit on the planet. If you are tinkerer like me read on!

Testing it out!

This is a quick overview of what I did. If you want actionable detail head over to the project wiki which is in the process of being populated.

Hardware

Things you’ll need:

  • OSCC Boards
  • Accelerator, Brake and Steering connectors / mating connectors
  • CAN to USB adapter like Carloop or Canable
  • OBD-2 Connector to tap for power and car can
  • Power connectors and signal (4-way) connectors
  • Xbox controller
  • A ODB2 “professional” code reader which can reset your brake/accel/steering faults. I used this one — its the cheapest that actually works even though the car isn’t strictly supported.

Putting the boards together

If you take a look in the boards directory in the repo you’ll find a number of eagle board files and schematics. Explained as follows:

  • gateway: You need 1 of these, this interfaces primarily with the vehicle CAN bus to get you stuff like vehicle speed, steering angle, brake pressure, etc and drives a debug LCD display. I was lazy so I didn’t bother hooking this up till the end.
  • sensor_interface: This is the analog sensor spoofing module and you need 2 of these (1 for accelerator, 1 for steering).
  • vehicle_control_module: This is designed to handle brakes. Its basically the same thing as the sensor_interface except it also drives 1 additional relay (for brake lights)

Now to actually getting the boards made: just use Macrofab! They are a bit pricey ($50–60 per board) but they will produce extremely high quality boards, solder all the minuscule SMD components on there and test for weird connectivity issues.

Boards in their android sheild enclosures (from amazon)

BOM (Parts)

Macrofab automatically extracts schematics and device info from the board files but you still have to search for the correct part number which was a bit frustrating. You can use this BOM to save you time if you are ordering from macrofab.

I had to order SOME elements directly from mouser since macrofab either didn’t have them OR it was adding significantly to the timeline. Its upto you how you wish to do this. Soldering all but the SMD components by hand isn’t that hard.

Controlling with my XBOX controller

I used a canable USB to CAN convertor to get my laptop to talk can to the boards. OSCC assumes that you have a separate can bus for just the boards. Luckily due to how simple CAN is, this basically means connecting all the cans together :)

Hope you like my fluorescent lime e-stop canister! If you have a crappy 3-d printer like I do, let me know and i’ll send you a modified STL file without the extrusions on the top — my printer doesn’t like those at all.

Whats next?

Now that theres a car that’s drive by wire capable I’m going to jump on the software/sensor side. Next step sensor wise is to get them installed:

  • Camera: Mid/Rearview mirror mounted ZED Stereo camera
  • Radar: Get a nice mount made for the toyota radar, maybe even mount it inside the bumper on the chassis if possible.

I’m not going to bother with an actual compute/CPU on the car just yet — instead try to iterate quickly simply using my laptop. Things that need to be decided:

  • Whether to use ROS/ROS2 or go with a barebones ZeroMQ approach. I’m leaning towards ROS/ROS2
  • Whether we even need a stereo RGBD Camera.

Join In and test stuff out on this car!

The purpose of this project is to create a community that can churn out amazing autopilot software. Whether you want to do this for yourself or simply join in to test stuff out on the car you are welcome to do so! Join our Slack channel and let me know what you have in mind!

If you want to build this yourself check out the wiki for details for info on the build process.

This is all based out of my house but soon moving over to Circuitlaunch in Oakland starting July so we’ll have a place to hang out and test stuff. Alameda Point next door is a great safe public place to test this stuff out.

Testing the DBW at alameda point. Lighter was used to make heat shrink tubing in car!

--

--