My dodgy BeagleBone Black powered robot.
Motor controller is a Sabertooth 2x12 driving two 12V DC motors, it also has a 5V, 1A output powering the BBB.
Collision avoidance is via a couple of (very) short range IR proximity sensors. Once I get the PRU sorted I should also have an HC-SR04 ultrasonic for longer range.
Control of the robot is achieved from a browser using WebSockets.
BBB - Python
Client - HTML/Javascript (Bootstrap, JQuery and some glue)
Code available at https://github.com/tdack/BBB-Bot
Did you connect the Sabertooth 2x12 to the BBB via PWM or Serial?
My first attempt was using PWM, but control of the motors wasn’t reliable, particularly around the “stop” voltage. I did try level shifting the PWM voltage (3.3V to 5V) with a couple of transistors, this improved control a bit, but not much. Converting the PWM to a voltage (RC filter on the output of the level converter) improved it a bit more, but still not good enough.
In the end I went for the serial connection and wrote a small Python class for the Sabertooth, it works much better than PWM.
Nice! Thank you for sharing this information! I’m glad I finally found somebody else using the sabertooth motor controller with the BBB.
Glad I found this, are you using packetized Serial Connection with your BBB and Sabertooth?
@Michael_Wilhite , yep, packetised serial it is. Code is here https://github.com/tdack/BBB-Bot/blob/master/server/Sabertooth/Sabertooth.py
The code isn’t feature complete but handles basic fwd, rev and stop per motor.