Introduction
A self-driving vehicle requires a robust Drive-By-Wire (DBW) system. DBW allows the vehicle’s onboard computer to control the car’s motion using electrical signals. Most modern cars already come with a great electronics system. For example, you can even hack into a Toyota Camry and control the braking, throttle, and steering with open source software. However, my 1998 Yamaha golf cart is almost purely mechanical, with the exception of the motor control system.
After successfully designing and implementing the all-new steering system, it’s time to move on and build an electronic braking system.

Terminologies:
- Linear actuator: an actuator that creates motion in a straight line, in contrast to the circular motion of a conventional electric motor.
- ROS (robot operating system): a collection of software frameworks for robot software development. It provides services designed for hardware abstraction, low-level device control, implementation of commonly used functionality, message-passing between processes, and package management.
- ROS Nodes: a process that performs computations. Nodes are combined together into a graph and communicate with one another using streaming topics, RPC services, and the Parameter Server.
- Arduino: Open source microcontrollers for robotics and so much more.
- Deep Learning: is part of a broader family of machine learning methods. Not task-specific algorithms. Vaguely inspired by information processing and communication patterns in biological nervous systems yet have various differences compared with biological brains.
Hardware Implementation
I designed the braking system with two goals in mind. First, it has to be precise and reliable. I strived to eliminate points of failures. Second, it has to be human-overrideable. In other words, in an emergency, the human safety driver could step on the brake pedal and immediately stop the moving golf cart.
Here is the design I landed on. It includes a metal cable and a linear actuator.


Software Implementation
The software implementation of the braking system is very similar to the steering system. In fact, they rely on a lot of the same code. I also use the same xbox gamepad to manually control braking.

Demo
Conclusion
This is a quick and simple overview of the new electronic braking system. I can’t wait to combine the object detection system with the braking hardware. Hopefully, in the next few weeks, I will take this out on a test ride. Thank you very much for visiting my blog. Please like this post if you enjoyed it. Also, you can contact me at contact@neilnie.com.
If you are interested in learning more about the self-driving golf cart project, you might enjoy the following posts.
- Deep learning steering prediction
- Semantic segmentation
- Robot Operating System
What linear actuator did you use?
LikeLike
You can find great linear actuators here: https://www.servocity.com/motors-actuators/linear-actuators/heavy-duty-linear-actuators. The one I used was rated at 115 ib.
LikeLike
Hi Neil,
Love your work. I’m thinking of doing the autonomous golf cart thing (http://allegrobotics.com/eMule.html), and may as well stand on the shoulders of giants and copy your design!
The linear actuator pulling the brake line sounds like a great idea, but force-feedback would be useful (deceleration should be roughly proportional to brake cable force (excluding driving slope)).
Did you do anything like that, or do you rely on good calibration and a slightly flexible cable?
Ali.
LikeLike
Thanks Ali, good luck with your project! I didn’t use force feedback. The design was rather crude, to be honest with you. I used flexible braided metal cables for the braking system. There’s certainly lots of room for improvement.
LikeLike