elicorrales
Posts: 16
Joined: Fri Aug 18, 2017 7:03 pm

Motor Controllers With Raspberry instead of Arduino - lack of software support

Fri May 25, 2018 4:08 pm

Is it just me, or is everyone ok with the state of software support of motor controllers? I refer to the more expensive ones , example Sabertooth, or Roboclaw. They both offer Arduino examples, but then there's header files .. I don't have an Arduino, I don't want one, how do I start the porting? I did do some searching for (example) arduino.h how to get it.. didn't come across that.

But my point really is - these companies both told me lots of customers use Raspberry. So, why the bad support? If i spend say several hundred dollars on one of those products, one would think it shouldn't be that hard to get some real use out of it.

To me, there just seems to be this disconnect between the hardware and software.

And if I did want to go the route of doing my own thing, there didn't seem to be much information (like a software data sheet equiv) on how to get started.

Typically, they offer arduino examples, C#, and possibly python (which may be outdated) (2.7).

What am I missing here.

pcmanbob
Posts: 7083
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Motor Controllers With Raspberry instead of Arduino - lack of software support

Fri May 25, 2018 9:33 pm

You should really be complaining to the companies that make the motor controllers ( Sabertooth, or Roboclaw ), if anyone its them that should be providing the support for their products or at least good quality data sheets with plenty of information.

If you are going to buy such products do some research first and only buy products with support, if that's what you need.

There is little or nothing anyone can do to make the companies do this, unless people stop buying there products and so hit them in there pocket which might make them think about providing support.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

wh7qq
Posts: 1340
Joined: Thu Oct 09, 2014 2:50 am

Re: Motor Controllers With Raspberry instead of Arduino - lack of software support

Fri May 25, 2018 10:40 pm

I have been through some of the same issues in dealing with stepper motors with the RPi but several points have to be considered.

First, the availability of software for the RPi. as with all Linux, is based on the interest of persons with sufficient skill and time to develop it. These are usually volunteers who have their own reasons for developing the software and do it for their own sake first and foremost. That goes for everything from desktops to motor controllers. Unlike commercial operations like microsoft and apple where programmers are paid for their efforts, most of these folks are volunteers.

Second, there exists an abundance of inexpensive controllers on the market that will do the job without big investments in time to work out complex sequences of control. From small PC boards to larger cased controllers. lots of stuff is out there without reinventing the wheel. I am now using a stepper controller that drives my NEMA 23 stepper motor very nicely with a wide range of micro-stepping choices and it cost just under $20 for a nice unit with a case and integral heat sink.

Third, you are probably as ignorant of Arduino usage as I was (and still am) because it really is not all that bad to work with. There are a lot of "example" sketches that are easily modified or combined for your particular need. The devices are small, inexpensive and can work with a wider range of supply and input/output voltages and even have on-board A-D conversion capability. For many stand alone control jobs, they are simply a better choice. You don't have to be a genius programmer to work with the scaled down Arduino C++ code, and tutorials to get you started are as abundant or more so than exist for Python.

Don't get me wrong, the RPi is a wonderful creation and does many tasks easily but software is as you find it, as opposed to paying for it. There are all sorts of sensor and controller boards and prototyping boards available from folks like Adafruit and Sparkfun to name just two. Often, these folks have worked out software for the boards they sell or have dug up existing software to publish for their products. Finally, the RPi has never been represented as a Windows substitute...it is a DIY project, a component as opposed to a finished product.

elicorrales
Posts: 16
Joined: Fri Aug 18, 2017 7:03 pm

Re: Motor Controllers With Raspberry instead of Arduino - lack of software support

Fri May 25, 2018 11:08 pm

all good points above. Someone at the makers of Roboclaw finally did get back to me regarding porting Arduino C++ over to Raspberry... hopefully this will happen, and I can post it somewhere for others. And maybe generalize a bit more for newbies who really don't want to get into Arduino but are faced with that necessity.

Someone else did do something with Boost C++ for Roboclaw... but a) while their project was great and all.. they left out huge amounts of code... and b) it's back in 2016... and c) Boost supposedly can be overkill and bloat(?)

anyway..

User avatar
Z80 Refugee
Posts: 358
Joined: Sun Feb 09, 2014 1:53 pm

Re: Motor Controllers With Raspberry instead of Arduino - lack of software support

Sat May 26, 2018 8:08 am

BEWARE of using interfaces designed for Arduino with an RPi. Arduino uses a 5V interface, RPi a 3.3V interface. Connecting an RPi input to an Arduino-compatible output could be damaging, and connecting an RPi output to an Arduino-compatible input may not work.
Military and Automotive Electronics Design Engineer (retired)

For the best service: make your thread title properly descriptive, and put all relevant details in the first post (including links - don't make us search)!

ghans
Posts: 7876
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: Motor Controllers With Raspberry instead of Arduino - lack of software support

Sat May 26, 2018 8:30 am

Arduino users are seem to be mostly unaware that they use C++. It seems the secret to their happiness. When you come to the Pi, there is no obsfucation but the error messages of g++ when it chokes on template inference ;)

C++ is infamous for its complexity. But as they say, the job of C++ is to make complex things possible. (Not easy things easy ? :lol: )

Perhaps Python isn't such a bad choice. Both Debian and Raspbian rely on Python2.7, it is and will be included for quite some time to come ...

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

elicorrales
Posts: 16
Joined: Fri Aug 18, 2017 7:03 pm

Re: Motor Controllers With Raspberry instead of Arduino - lack of software support

Wed May 30, 2018 3:18 pm

I found some limitations with Python - performance - speed. just didn't cut it. (that and I hate the required code-formatting).

elicorrales
Posts: 16
Joined: Fri Aug 18, 2017 7:03 pm

Re: Motor Controllers With Raspberry instead of Arduino - lack of software support

Wed May 30, 2018 3:24 pm

correct me if I'm wrong here but I chose RPI over Arduino for the following:

-- USB?
-- Wifi?
-- OS?
-- if / when my sdcard craps out from too much read/write during all the development I do.. just replace it.. but with the Arduino ?

I think I would rather buy and add some A-to-D for the RPI, than to go the other way for the Arduino. And I haven't yet seen the need to have both.

just my humble opinion

Plus yeah the 'being blissfully unaware of C++'... I like to have control :-)

ghans
Posts: 7876
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: Motor Controllers With Raspberry instead of Arduino - lack of software support

Wed May 30, 2018 4:51 pm

You cannot have guaranteed response times (those which must be NEVER exceeded) with Raspbian Linux. There will always be jitter, random jitter.
This is inherent to electronic systems (and operating systems !) which are not designed to be "real-time". This is undeniable. The users of microcontrollers and Arduinos have to come to rely on fully predictable real-time behaviour. After some frustrating experimentation with (Raspbian) Linux and damning it to hell they either escape to the bare metal subforum or go back to their ISRs, register poking, uncached and scheduler-free endeavours ;)

Of course, this is also one of the reasons the forum regulars are quite entertained at some other people who want to replace the real-time ECU of their car with a Raspberry or plan on replacing the realtime controllers inside their new Airbus with Raspberry Pis to save costs...
so far nobody has come to harm (that i know of)

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

User avatar
typematrix
Posts: 20
Joined: Sun Jul 02, 2017 3:55 pm
Location: Europe
Contact: Website

Re: Motor Controllers With Raspberry instead of Arduino - lack of software support

Wed May 30, 2018 7:35 pm

Hi

Do you have specific parts numbers, examples ,links of want you want?

I am currently writing a library for motors in python for raspberry for multiple components.
I would be interested in coding.
Although I cannot justify buying expensive parts LOL.

See here:
https://github.com/gavinlyonsrepo/RpiMotorLib


Regards

albertson
Posts: 2
Joined: Wed Jun 21, 2017 11:05 pm

Re: Motor Controllers With Raspberry instead of Arduino - lack of software support

Mon Mar 04, 2019 1:22 am

THis is an old thread, I know. But just to add anote,

I have a Raspberry Pi3B controlling a Roboclaw. The Roboclaw connects to the Pi3's USB port. I'm using the manufactur's Python software non the Pi. Specifically two parts.
1) The python library that simply provides a bunch of function calls (methods)
2) The "roboclaw_node" ROS node with uses the above library This node subscribes to "twist" messages and publishes odometery and diagnostics.

Using this and other nodes running on either the Pi3 or on any other Linux computer on my network can control the Roboclaw and read status

Using a "movebase" node runing on thePi3 or some other computer I can tell the robot to go to a specif place, say 4 meters ahaed and 2 meters to the left.

None of this required writing a line of Pythn or C++ code.

That said, the Pi ihas VERY poor USB perfromance as the network and the SD card and the roboclaw all connect through one USB bus. Data gets dropped.

Return to “Troubleshooting”