hapr2005
Posts: 8
Joined: Thu Dec 31, 2015 3:40 pm

Parts required to connect a Rpi 2 B to a sabertooth 2x25

Thu Dec 31, 2015 3:58 pm

Hello Everyone,

I apologize if this question has been submitted before but I am looking for some guidance in terms of what component should I use to connect a raspberry pi 2 model B to a sabertooth 2x25, I am building a robot and I need to control two DC Motors 12V, so far I have seen not many options but from the ones I seen, I am not sure they are clear to me.

What I know so far:

1. The Rpi can't provide 5V but rather 3.3V and the saberthooth may require 5V.
2. The saberthooth can be used in multiple ways, analog which is the one I thought to use, requires a PWM but the Rpi has only one pin that provides it.
3. Another way to use the sabertooth is serial and I understand that has a USB port, so the Rpi and I wonder if there is a way to connect them using this mechanism (I am sure there is one but not clear in what code / lib to be used for this option)

I appreciate any guidance and direction as I would like to start working on it.

Thx everyone

Hector

User avatar
mikronauts
Posts: 2783
Joined: Sat Jan 05, 2013 7:28 pm
Contact: Website

Re: Parts required to connect a Rpi 2 B to a sabertooth 2x25

Thu Dec 31, 2015 5:30 pm

Just use the Sabertooth's serial mode - it is the easiest way to go.

DO NOT try to power the Sabertooth from the Pi. Personally I'd power the Pi from a USB battery pack, and power the motors/sabertooth from batteries.

1) Use the RC servo mode

Use joan's pigpio to send servo signals to the Sabertooth.

2) use the "TTL" serial port on the Sabertooth, connected as follows:

Pi Tx --> Sabertooth RX
Pi Rx <--- 4k7 resistor to ground, 2k4 resistor <-- Sabertooth

Note: order is: Sabertooth TX to 2k4 resistor, which connects to both Pi Rx and 4k7 resistor which then connects to ground

You could also check out the Parallax HB-25
hapr2005 wrote:Hello Everyone,

I apologize if this question has been submitted before but I am looking for some guidance in terms of what component should I use to connect a raspberry pi 2 model B to a sabertooth 2x25, I am building a robot and I need to control two DC Motors 12V, so far I have seen not many options but from the ones I seen, I am not sure they are clear to me.

What I know so far:

1. The Rpi can't provide 5V but rather 3.3V and the saberthooth may require 5V.
2. The saberthooth can be used in multiple ways, analog which is the one I thought to use, requires a PWM but the Rpi has only one pin that provides it.
3. Another way to use the sabertooth is serial and I understand that has a USB port, so the Rpi and I wonder if there is a way to connect them using this mechanism (I am sure there is one but not clear in what code / lib to be used for this option)

I appreciate any guidance and direction as I would like to start working on it.

Thx everyone

Hector
http://Mikronauts.com - home of EZasPi, RoboPi, Pi Rtc Dio and Pi Jumper @Mikronauts on Twitter
Advanced Robotics, I/O expansion and prototyping boards for the Raspberry Pi

hapr2005
Posts: 8
Joined: Thu Dec 31, 2015 3:40 pm

Re: Parts required to connect a Rpi 2 B to a sabertooth 2x25

Thu Dec 31, 2015 5:53 pm

Thanks so much for your prompt answer mikronauts, for your option 1, where can I find joan's pigpio? wouldn't I need to have some sort of amplifier as sabertooth requires 5V? Rpi uses 3.3V, I apologize if I misunderstood but would't this burn the rpi?

For option 2 the reception in the sabertooth is S1 correct?

I appreciate your help

Cheers
Hector

User avatar
mikronauts
Posts: 2783
Joined: Sat Jan 05, 2013 7:28 pm
Contact: Website

Re: Parts required to connect a Rpi 2 B to a sabertooth 2x25

Thu Dec 31, 2015 6:53 pm

You are most welcome!

http://abyz.co.uk/rpi/pigpio/

no need, the 3.3V output from the Pi is enough to drive the 5V "RC" mode input. Don't forget to connect the Pi's GND to the sabertooth's GND

DO NOT CONNECT THE PI's 3.3V or 5V TO THE SABERTOOTH

Re: S1, check the datasheet, or google it - I don't have a sabertooth
hapr2005 wrote:Thanks so much for your prompt answer mikronauts, for your option 1, where can I find joan's pigpio? wouldn't I need to have some sort of amplifier as sabertooth requires 5V? Rpi uses 3.3V, I apologize if I misunderstood but would't this burn the rpi?

For option 2 the reception in the sabertooth is S1 correct?

I appreciate your help

Cheers
Hector
http://Mikronauts.com - home of EZasPi, RoboPi, Pi Rtc Dio and Pi Jumper @Mikronauts on Twitter
Advanced Robotics, I/O expansion and prototyping boards for the Raspberry Pi

hapr2005
Posts: 8
Joined: Thu Dec 31, 2015 3:40 pm

Re: Parts required to connect a Rpi 2 B to a sabertooth 2x25

Thu Dec 31, 2015 6:58 pm

Thanks so much again very much appreciated your prompt answers

drekthrall
Posts: 44
Joined: Sat Oct 17, 2015 12:43 pm

Re: Parts required to connect a Rpi 2 B to a sabertooth 2x25

Mon Jan 04, 2016 6:20 pm

hapr2005 wrote: 2. The saberthooth can be used in multiple ways, analog which is the one I thought to use, requires a PWM but the Rpi has only one pin that provides it.
There are 2 PWM channels on Raspberry Pi 2 B ( I am 100% sure because I am using it ).

I want to control sabertooth 2x25 too but idk if I can connect RPi's PWMs (3,3V) to Sabertooth :-/

hapr2005
Posts: 8
Joined: Thu Dec 31, 2015 3:40 pm

Re: Parts required to connect a Rpi 2 B to a sabertooth 2x25

Sat Jan 09, 2016 5:33 pm

You can always use a 74HC125, this is a Quad Buffer IC and offers 4 inputs and 4 outputs, so you could input the 3.3V from the RPI and convert to 5V from the respective output that you could connect to one of the Sabertooth's inputs (S1 or S2)

hapr2005
Posts: 8
Joined: Thu Dec 31, 2015 3:40 pm

Re: Parts required to connect a Rpi 2 B to a sabertooth 2x25

Sun Jan 17, 2016 4:40 pm

Hi Mikronauts,

I managed to control the DC motors with the serial mode as you suggested, it worked nicely, thanks so much.

I am trying now to control them using a remote control and I was thinking on using one of those hobby remote control transmitter / receiver, connecting the receiver to the gpio of the Rioja but I am not sure if I can read pwm on a regular pin. I appreciate your thoughts.



mikronauts wrote:You are most welcome!

http://abyz.co.uk/rpi/pigpio/

no need, the 3.3V output from the Pi is enough to drive the 5V "RC" mode input. Don't forget to connect the Pi's GND to the sabertooth's GND

DO NOT CONNECT THE PI's 3.3V or 5V TO THE SABERTOOTH

Re: S1, check the datasheet, or google it - I don't have a sabertooth
hapr2005 wrote:Thanks so much for your prompt answer mikronauts, for your option 1, where can I find joan's pigpio? wouldn't I need to have some sort of amplifier as sabertooth requires 5V? Rpi uses 3.3V, I apologize if I misunderstood but would't this burn the rpi?

For option 2 the reception in the sabertooth is S1 correct?

I appreciate your help

Cheers
Hector

User avatar
mikronauts
Posts: 2783
Joined: Sat Jan 05, 2013 7:28 pm
Contact: Website

Re: Parts required to connect a Rpi 2 B to a sabertooth 2x25

Sun Jan 17, 2016 9:34 pm

You are most welcome.

If a regular remote control is good enough for your uses, look into "lirc"

If you need an analog joystick, look into PS2/3/4/XBOX wireless controllers as used on RetroPi

It all depends on what you need, and what range you want to control from.
hapr2005 wrote:Hi Mikronauts,

I managed to control the DC motors with the serial mode as you suggested, it worked nicely, thanks so much.

I am trying now to control them using a remote control and I was thinking on using one of those hobby remote control transmitter / receiver, connecting the receiver to the gpio of the Rioja but I am not sure if I can read pwm on a regular pin. I appreciate your thoughts.



mikronauts wrote:You are most welcome!

http://abyz.co.uk/rpi/pigpio/

no need, the 3.3V output from the Pi is enough to drive the 5V "RC" mode input. Don't forget to connect the Pi's GND to the sabertooth's GND

DO NOT CONNECT THE PI's 3.3V or 5V TO THE SABERTOOTH

Re: S1, check the datasheet, or google it - I don't have a sabertooth
hapr2005 wrote:Thanks so much for your prompt answer mikronauts, for your option 1, where can I find joan's pigpio? wouldn't I need to have some sort of amplifier as sabertooth requires 5V? Rpi uses 3.3V, I apologize if I misunderstood but would't this burn the rpi?

For option 2 the reception in the sabertooth is S1 correct?

I appreciate your help

Cheers
Hector
http://Mikronauts.com - home of EZasPi, RoboPi, Pi Rtc Dio and Pi Jumper @Mikronauts on Twitter
Advanced Robotics, I/O expansion and prototyping boards for the Raspberry Pi

Return to “Automation, sensing and robotics”