Slaves to Turing Pi 2
# │forum
y
Hi everyone, I’m building a Robot with around 20 12v servo motors. I’m considering RoboClaw 2x7A Motor Controller for each 2 motors. Having a total of 10 Controllers. (These Controllers can communicate via USB, TTL Serial, RC Radio, PWM, Analog or others like Arduino and Pi.) I want to communicate from my control station directly to my Main Processing Unit (Turing pi 2) for it to communicate somehow with RoboClaw controllers and I wonder what would be the best way to do it. I initially thought about serial communication but I would be limited by serial ports. I would appreciate the help a lot!!
d
Maybe ESP32/ESP8266 on the robot and than you can communicate via WiFi? I've used this way of communication on a quadruped and could send hundreds of frames per second. You might want some microcontroller between the ESP device and the servos. If you have an access point that'll connect to the ESP device then you might use LAN from said AP to the TP2. Or you can have WiFi card in the Mini PCIe slot of the TP2 than you can use either with a single node or bridge with LAN so all of the nodes can have a communication with it.
Actually, you might control servos directly from the ESP device if the servo controllers support I²C or SPI since this would let you connect multiple controllers easily (I²C would use addresses on the bus and with SPI you'd chain them)
y
I should have added that I cannot use Wifi. I am restricted to 900MHz and 2.4Ghz bands. I am considering a long range wireless ethernet bridge. (I’m an electrical engineer, I don’t know much about communications)
d
WiFi uses 2.4 GHz band (this is one of the bands it can use, depends on the radios used)
I'm also an electrical engineer after school, but I later changed the direction more towards programming, neural networks, electronics, etc 🙂
Actually, maybe I misunderstood you. Is TP2 going to be mounted on this robot or is it going to be stationary somewhere aside?
y
Onboard
We have a control station with communication systems (to be determined) and Laptops
d
What's exactly this control station?
y
We haven’t developed any, but I do have documents with all the restrictions from the competition
d
Also, I thought TP2 is going to be set aside and you're searching for a way to communicate with it and WiFi would be one of the choices. If it's an onboard thing, WiFi does not make sense, of course
Ok, so there are controllers (RoboClaws), there will be some sort of the control station that would be connected to both controllers and TP2, and there will be TP2 that needs to communicate with this control station, all of that onboard? Sorry for so many questions, just trying to understand the architecture you're going after
y
If you put it that way, yes. But I wanted to only control the TP2 from the CS. And somehow interface (onboard) the TP2 with Controllers. Having these controllers as Slaves for the TP2. No worries, I try my best to explain considering my knowledge in communications.
d
Ok, I think I got it now
So indeed you're going to be short on serial ports to communicate with the controllers. But they can be controlled via USB that can be super convenient. If you look at the TP2 basic block diagram:
Node 4 exposes 2 USB 3.0 ports and a header for 2 additional USB 3.0 ports.
You could use a USB hub to connect all of them to Node 4. I'm assuming USB encapsulates a serial port so they'll all be available as the serial ports to the node
Then,
TP2 has onboard network switch and all 4 nodes are connected to it as well as 2 LAN ports on the back. LAN is probably the best way to communicate between nodes in TP2. Whatever your CS is going to be, it might be best to connect it via LAN then.
The question also is if you need a separate CS or maybe you can use one of the nodes on TP2 for this purpose (I'm not sure what's unique about CS that could not be implemented on one of the nodes). Node 1 and node 2 both have Mini PCIe ports available, so you could use either of these and a WiFi card (working on a 2.4 GHz bans since you mentioned you're allowed to use this band) to act as an Access Point and you could easily connect to it with your laptop(s) (alternatively TP2 can be a WiFi client if you'll have some access point that you'll connect laptop(s) to as well)
So Node 4 could be connected to the controllers, Node 1 or Node 2 could be your CS (these do not have to be their only functions, though)
Any idea, btw, which modules are you going to use as the nodes? CM4s?
Look what I also found, although it might be super inconvenient to connect on a robot: https://www.startech.com/en-eu/cards-adapters/pex16s550lp
This is 16 serial port on a PCIe card. As I mentioned, you have 2 Mini PCIes available and you could convert one to PCIe with a simple passive adapter. If this is an option
Oh, just realized the price. not sure if it's reachable, don't know about your budget
But I still think USB hub would do a good job, you'll just have to secure plugs so they do not disconnect (hot glue?)
y
The communication via USB hub since it is concurrently dropping bandwidth trough the USB hubs would that be an issue? Also, can I only send commands trough the USB hub to slaves or can I also have feedback?
d
I don't know the protocol or details about how USB works with these controllers. I'm guessing it encapsulates serial port over USB. If this is true then USB 1.1's bandwidth is 12 Mbps and this should be already enough and it's unlikely they're using USB 1.1. With USB 2.0 the bandwidth is 480 Mbps - way way way more than you'll ever need with these controllers. USB and serial connection is bi-directional by design. But again, I do not know these controllers, so I cannot say much about them.
It indeed is being detected as a virtual serial (COM) port, but the documentation also mentions their driver might be required for it to work. So you'll need to check if required driver is available for Linux. The communication is bi-directional and you can read data from the drivers
There is however a note:
Copy code
The motor controllers USB port should be used for configuration and debugging. The USB protocol is not designed for
electrically noisy environments. The USB port will likely disconnect and not automatically recover during operation
in electrically noisy environments. To recover from a dropped USB port, the motor controllers USB cable may require
being unplugged and re-plugged in. The TTL serial control should be the preferred method of control in electrically noisy
environments.
But keep in minds it's because of the USB design and most likely it'll work fine, but definitely you'll have to check and maybe some additional shielding will be required in case there will indeed be any problem with USb connections
https://www.basicmicro.com/downloads - since there's only a Windows driver and there's a section with examples for raspberry Pi, I think Linux does not need a separate driver (or it's easy to install), and it should work just fine with Raspberry Pi microcomputers, so you should be fine.
Keep in mind I said all of that based on the research and I've never used these controllers personally.
y
Hi, question: I have a Power Over Ethernet component with 1A and 24v rating. Can a connect this component to the ethernet port of the Turing Pi 2?
d
Hi!
I'm not sure how do you want to connect it, but PicoPSU requires 12V. 1A is nearly not enough to make it running too
u
I’m sure you could get ethernet over it, but it wouldn’t power the Turing Pi without some modifications.
d
PoE is Power over Ethernet, in other words ethernet cable carries additionally power so yes, the ethernet is the main part of this I think?
u
I’ve never plugged a non-POE device into a POE switch, any issues caused by the power delivery if the device isn’t expecting it? Edit: it appears not, PoE is negotiated before being applied to prevent damage to non PoE devices
c
When you said "Slaves to Turing Pi 2" I thought you were starting a support group.
2 Views