Page 23 of 23 FirstFirst ... 131920212223
Results 221 to 227 of 227

Thread: PhantomX controlled by a Raspberry Pi

  1. #221
    Join Date
    Dec 2012
    Los Angeles, CA
    Rep Power

    Re: PhantomX controlled by a Raspberry Pi

    A USB2AX is plugged into the raspberry pi USB port. The same way an Arbotix-M or Arbotix Pro is. Essentially all three serve the same purpose. They just have various additional features.

  2. Re: PhantomX controlled by a Raspberry Pi

    Quote Originally Posted by KurtEck View Post
    ? Not sure what you are wanting to do? To use a USB2AX, you simply plug it into one of the USB ports on the Raspberry Pi. And then I typically used an AX wire to connect it to an AX powered hub where I apply the 12v power...

    Again I am not srue what you are trying to do? With some of my boards that I use Teensy boards (T3.2 or T3.6), I do connect up the 3.3v TTL level signals out of the RPI connection header to my board and I use that as an alternative to USB.

    Side note: The USB2AX is not an FTDI device, it as actually a Atmel ATmega32u2 processor that has USB built into it. So it creates devices like /dev/ttyACM0 whereas FTDI devices will create devices like /dev/ttyUSB0
    Hi Kurt,

    thank you for your answer. I would like to realize the "Charlotte project" with the possibility to control the robot through internet in order to avoid the use of the joystick. For the moment I would like to find a solution firstly for the control through internet as you can see in this example in order to control a simple hardware like some leds weired to an Arduino managed from a Php page installed on the Rpi.

    In order to do that I would like to know if it is necessary to use the USB2AX or is possible to use the GPIO port on the Rpi with the FTDI wiring.

    The arbotix-m installed on my Hexapod has the AX connectors already employed for servos, but there is a last place on the hub, can I use it to connect the USB2ax or is it necessary the pro version like in all the guides I've seen?.
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	wire2.jpg 
Views:	8 
Size:	179.3 KB 
ID:	7072  

  3. #223

    Re: PhantomX controlled by a Raspberry Pi

    No, you do not necessarily need an USB2AX. There are many different ways to do this.

    If you have a Arbotix-M, you can obviously use it. You will simply need to load a program on it that listens to the Serial port and then controls the servos. The simplest ones simply listen to the commands and forward them to the AX bus serial port and know when they expect to receive data back from the AX-BUS and forward it back to the host over the Serial port...

    I have different versions of this that I have played with. Also I think the Arbotix at least the beta 1.6 version libraries and the like may come with a version (ROS sketch?)

    Now how to connect up the Arbotix-M to the RPI. You could use some form of USB to Serial adapter, such as the FTDI adapter. If so your program on the RPI would talk to device like /dev/ttyUSB0..

    Or you could connect potentially connect up the RPI Usart pins that are part of the expansion (hat) connector to the TTL pins on the Arbotix-m. However RPI pins are 3.3v and I think the Arbotix-M is 5v so you would need some form of TTL level conversion. I have not done this with the Arbotix-m. I have done it with Teensy 3.2 and 3.6 boards, but these also are 3.3v so the ttl level shifter is not needed.

    As for using Joystick or Internet or... to control your robot... That is all sort of independent of what hardware controller to use to control the servos....

  4. Re: PhantomX controlled by a Raspberry Pi

    OK, this is very interesting

    I supposed that the control from internet or from any joysticks didn't depend on the communication between the boards, so in order to realize it, it’s necessary an adapter FTDI-USB or I can directly connect some specific pins between the FTDI port on arbotix-M and the GPIO port on RPI as in the photo?
    Quote Originally Posted by minimalfra View Post
    possible connection with a FTDI wiring like this: ?

    Can I use the Uartsbee? Considering the RPI as a PC that, in one case, I used to load test skech on Arbotix?

    And then, once defined the connection between the two boards, on the arbotix is it enough to modify your sketch? and is it enough on the rpi to download this hexapod ros in order to check that they communicate?

    Last edited by minimalfra; 3 Days Ago at 04:06 PM.

  5. #225
    Join Date
    Sep 2010
    Rep Power

    Re: PhantomX controlled by a Raspberry Pi

    The RPi pins are not 5V-tolerant, so you must use a 3.3V UART converter. Some are hard wired at 3.3V, others are hardwired at 5V, and some can be configured at anything using a reference pin. If your UARTsbee is not configured to 3.3V, do not use it or you will damage the RPi pins.
    Please pardon the pedantry... and the profanity... and the convoluted speech pattern...
    "You have failed me, Brain!"

  6. Re: PhantomX controlled by a Raspberry Pi

    Quote Originally Posted by tician View Post
    The RPi pins are not 5V-tolerant, so you must use a 3.3V UART converter. Some are hard wired at 3.3V, others are hardwired at 5V, and some can be configured at anything using a reference pin. If your UARTsbee is not configured to 3.3V, do not use it or you will damage the RPi pins.
    Hi tician,

    I have the possibility to set the UARTsbee on the 3.3 or on the 5V but I have to do the connection as if the Rpi is a normal pc?
    In order to enable this connection I have to write something in particular in the sketch that I have to load on the Arbotix-m and what kind of application package I need to install on the Rpi?
    In addition, the alternative would be the use of the USB2AX?

    Thanks again

  7. #227

    Re: PhantomX controlled by a Raspberry Pi

    Sorry I am not Tician, but thought I might chime in again.

    Again I am not exactly sure what you are trying to do... Or exactly which code you are going to connect where... And which RPI you have...

    RPI2 or RPI3? You may need to go through some steps to enable the Serial port on the RPI expansion connector. Likewise you may need to disable some things like using this port for System console outputs... I always have to look up some of this each time I setup an RPI... You will find lots of hits using google, like:

    If RPI3, you may also need to consider how this interacts with Bluetooth. That is if memory serves me correctly on RPI2 the serial port is something like: /dev/ttyAMA0 where bye default is for AMA0 to be used by BT and /dev/ttyS0 used by the UART on the connector. Also I ran into some issues with it as ttyS0 at higher baud rates... So there is a way to swap them such that the UART gets the higher priority device... Again in the link I provided...

    In my PhantomX code for RPI, my version of the Bioloid library tries to find the servo controller on either /dev/ttyACM0 or /dev/ttyUSB0 is it handles the two types of USB Arbotix like controllers... Arbotix-Pro creates /dev/ttyUSB0 whereas USB2AX creates /dev/ttyAMA0... Note the 0 may not be correct, if multiple FTDI or AMA devices...

    So my code first looks for a specific device /dev/ttyDXL. When I am using it with USB devices I will often setup a UDEV rules file that knows which FTDI or AMA device is by Serial# and assigns the alias (/dev/ttyDXL) If I am wanting to use the Serial port on the connector, I will either try to figure out a UDEV rule that will work and/or I simply have my profile create a symbolic link to it...
    Something like: sudo ln /dev/ttyAMA0 /dev/ttyDX

    Beyond this, for the most part, the underlying code does not care which device it is... Code up at:

    The one exception to this, is my code tries to guess if it is running on an FTDI device. Why, I found that the internal buffering of the data was slowing things down and for example Read requests, we would do the write stuff, and then start a timeout waiting for the other side to return data. Problem was there could be a rather large delay before the FTDI would actually output the data and was randomly timing out... So added code to do logically like Arduino.flush() which is to call tcdrain which forces the data out. Works great for FTDI, however on some other devices like AMA and maybe UART is hurt a lot. It was almost like the tcdrain did not have any underlying driver support, so they simply do a long delay.... So again my code tries to deduce if it is FTDI and only if it is call tcdrain...

    But again not really sure what it is you are wanting to hook up to this UART? If you are simply wanting to hook up to Arbotix-M, then you can sort of connect them directly to each other without a USB converter. You probably need some form of TTL level conversion as mentioned earlier. Probably something like: would work.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Question(s) Raspberry Pi
    By Robonaut in forum Robot Computers
    Replies: 20
    Last Post: 07-07-2013, 10:46 AM
  2. Raspberry Pi Camera coming soon
    By sarendt in forum Robotics General Discussion
    Replies: 1
    Last Post: 03-16-2013, 10:15 PM
  3. About to give up on the Raspberry Pi
    By jwatte in forum Software and Programming
    Replies: 5
    Last Post: 01-14-2013, 10:57 AM
  4. Just For Fun My Raspberry PI
    By rebel in forum Arbotix, Microcontrollers, Arduino
    Replies: 0
    Last Post: 12-31-2012, 05:57 PM
  5. For learning: PhantomX Hexapod vs PhantomX Quadruped
    By Leugim in forum Humanoids, Walkers & Crawlers
    Replies: 4
    Last Post: 10-26-2012, 08:50 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts