Lynxmotion 3DoF Robot Arm: Replacing 2IO Adapter w/ Arduino

Hello,

I’m writing to ask about the Lynxmotion 3 DoF robot arm. I assembled the arm following this guide (3 DoF Robotic Arm - XWiki) and used the 2IO board to interface with the three LSS via the Arduino Library.

However, I need to be able to use serial communication to send commands to the LSS as well receive input data from my laptop. I’m not sure if/how SoftwareSerial would be implemented on the 2IO board, so I’m looking to use an Arduino UNO.

How would one replace the 2IO with the Arduino or implement SoftwareSerial with the 2IO Adapter board? When attempting to control the LSS using Arduino, I believe I inadvertently shorted an UNO which I do not wish to repeat.

I would greatly appreciate guidance on this matter.

Hi Lynxbot_Student,

The LSS-2IO was added to the Lynxmotion 3DoF Arm to be able to use the RC servo gripper with the same serial protocol as the rest of the LSS.
It’s possible to use the LSS-2IO to act as a Serial Adapter but you probably already have the LSS-Adapter for that purpose.

Our LSS-2IO feature “buffers”, which are essentially ON/OFF switches, controlled by digital I/O to control the serial lines. Have a look at the diagrams on the product page HERE.

Can you explain what is your goal with this setup ?

All the best,

1 Like

Hi dialfonzo,

Thank you for your reply.

Currently, I am using Physical Pin 13[labeled D9] (IDE 9) to control the servo gripper using Arduino Servo. Pin 15 [labeled D11] (IDE 11) is connected to the power regulator as per the assembly setup. This leaves Physical Pin 14 (aka D10; IDE10).
If I use Arduino Software Serial, could this pin be used for the serial communication I need between the 3DoF and my laptop? Would I be able to use this pin for as both Rx and Tx in my instantiation of a SoftwareSerial object (https://docs.arduino.cc/learn/built-in-libraries/software-serial#softwareserial)?

I did assemble the LSS Adapter via the kit instructions, but I’m not quite sure how one would use it as a serial adapter. Does that require additional hardware?

Respectfully,
Lynxbot_Student

Hi Lynxbot_Student,

What I would like to know if the goal of your experiment.
Usually the whole system only requires you to connect to the USB on the LSS-Adapter and you actually control the robot through there.

In this situation the LSS-2IO is only use “as an LSS” to act like a slave for the RC servo only.

1 Like

Hi dialfonzo,

My apologies for the late response; I did not see your reply.

Due to trouble I had getting the desired movement, I am not using the FlowArm app to control the device. I moved to controlling the arm with an Arduino sketch which I have uploaded to the 2IO. Currently, the sketch can control the three LSS and the RC servo.

The robot needs to be able to receive input from my computer to determine how/where to move and send confirmation messages in return. This input and output is sent in the form of serial data. Through testing, I am able to successfully interact via Serial with an extra Arduino I have on hand, and would like to now how to do so with the robot instead.

To summarize, the Arduino sketch requires the ability to control the LSS (done), the RC servo gripper (done), and communicate with my laptop (in progress; done separately but not integrated into the system). I am asking if/how it would be possible to configure the robot to communicate on two different serial ports. The reason I inquired about the 2IO is because the description on the wiki says it can be used in place of an Arduino.

I hope that brings a little more clarity to my situation. Thank you for your time.

All the best,
Lynxbot_Student

Hi Lynxbot_Student,

The LSS-2IO was not created to handle an Arduino code and to be used as a serial adapter at the same time.
What I think would be the best is to use your Arduino UNO under the LSS-Adapter as it’s a shield and to use the LSS-2IO with the intended code (Lss2IO / example code).

That’s because the TX / RX lines cannot be used at the same time for the USB port and the Serial port, take a look at the diagrams on the wiki page.

:slight_smile:

Got it, so no to the 2IO and use the Arduino instead.

If this is the case, how would I wire it? I am not well versed with electronics, and when I originally attempted to use an Arduino in place of the 2IO (trying to follow the wiki diagrams), I shorted it such that it would no longer upload new sketches.

To receive data from the laptop, my Arduino must be connected to it via USB which also supplies it with power. How do I then connect the Arduino to the LSS Bus such that it can communicate to send LSS commands?

On the software side, is the controlling of the LSS to be done using SoftwareSerial? As in, could I connect Arduino pins 8 and 9 to the LSS Adapter Bus to receive and send data?

I appreciate your continued patience and understanding for this matter; I am rather inexperienced and ask a lot of questions to get a comfortable grasp of the situation.

Hi Lynxbot_Student,

The LSS-Adapter is made to be used as an Arduino shield, you just mount it on top of your UNO (or similar).
Examples can be found on the wiki HERE.

I am not well versed with electronics, and when I originally attempted to use an Arduino in place of the 2IO (trying to follow the wiki diagrams)

There are no such diagram, how have you connected them ?

In order to use the LSS-Adapter and the Arduino just stack them as intended with the switch set to XBee (to use the pins D8 & D9).

Example code that take the Arduino UNO serial input (USB) and pass it to the SoftwareSerial on pin D8 & D9. In this mode you can open a serial monitor to the appropriate COM port and send commands, it will be sent to the servo through the SoftwareSerial. EX: #0D0 or #0QLED
LSS_Adapter_SoftwareSerial_PassThrough.zip (529 Bytes)

Example code that will run code in the Arduino UNO to be sent to the SoftwareSerial on pin D8 & D9 making the servo move.
LSS_Adapter_SoftwareSerial.zip (552 Bytes)

All the best,

Hi dialfonzo,

There are no such diagram, how have you connected them ?

No wiring diagrams, true, but I attempted to connect based on the pictures shown on this page. This was months ago, but I attempted to connect the Arduino (I say Arduino, but I’m currently using an Elegoo Uno after shorting the Arduino Uno), but I had the Arduino connected to the laptop via USB, and also connected Vin to V, G to G, and used an extra LSS cable to connect to digital pins on the board via M-M connectors.

Is it possible to connect the two using M-M connectors using the connections on the linked page?

And thank you for the code, I’ll give it a study. I really do appreciate your help…

I don’t understand what you “shorted” on your Arduino UNO.
The Adapter can supply power to the Arduino UNO when connected to the XT60 supply. It will power through the VIN pin which is usually 12V compatible.

I feel like there is confusion as there are no such Male Male connectors that can be connected from the LSS-Adapter to the Arduino UNO.
The LSS-2IO should be mounted as per the user guide, daisy chained with the LSS. (running the proper code)

Original code / example loaded to the LSS-2IO board:

The LSS-Adapter shield should be stacked on top of an Arduino board.

I agree; I think we’re talking past one another, and I don’t have a picture of what my original configuration to send.

Regardless, I think with the image and code you’ve provided, I should be able to make the system work. I currently have the robot oscillating between two rotating positions on the rotating base.

I’ll respond again if I have additional questions.

1 Like

Great - Feel free to ask :slight_smile:

Hi dialfonzo,

So, I’ve made progress and was able to interact with both the robot and my laptop.

Currently, however, I have an issue of the Elegoo running (very) hot, so I want to ensure I have not connected anything incorrectly. I’ll try to attach two images of my setup. Due to no longer using the 2IO, I have connected the mini-gripper servo to the LSS Adapter which is connected to the Elegoo. It is connected to pins 13, +5V, and Ground.

The Elegoo is powered through my laptop via USB, and I am also utilizing the 12V power supply for the robot.

After discovering the board ran hot, I attempted to ensure the 2IO was mitigated from influencing the system and uploaded the BareMinimum program. When connected to my computer, however, it looped through the Factory Reset LED blinks. I was still able to upload the program (exiting the loop), but the behavior was unusual, so I thought I would relay it. Should I keep the 2IO in “Direct” mode and the LSS Adapter in XBee?

The images are taking a long time to upload on the forum, so I’ve linked them.

Probably not, since it’s connected to the LSS-Adapter the power is coming from pin labeled “V” on the LSS-Adapter and probably “VIN” on your Arduino board. This provide 12V to your Arduino before the regulators.

The way you have it setup, the gripper is using the Arduino 5V regulator which is putting a big load on it’s on-board 5V regulator.
It can also be the specs of your particular Arduino, verify that it can be powered at 12V.

Again, the LSS-2IO is made to be used as a controller for RC style servos (gripper) using the LSS serial protocol.
Best to use it that way and don’t forget to load the original code example to it.

The product description page lists the operating VDC as 7V-12V, so it should be fine, correct?

Again, the LSS-2IO is made to be used as a controller for RC style servos (gripper) using the LSS serial protocol.
Best to use it that way and don’t forget to load the original code example to it.

Ok, perhaps I’m misunderstanding. If I use the Arduino to control the LSS Servos, and load the example LSS2IO code to the 2IO to control the RC mini gripper, how will I be able to determine when the gripper opens and closes? How do I communicate between the two?

Assume I know absolutely nothing.
What is the explicit, step-by-step configuration process for setting up this system in which the Lynxmotion 3DoF LSS are controlled via Arduino with signals coming from my laptop to determine where to move (ex. sending ‘0’ as a byte would result in moving to a determined position) and the mini-gripper RC Servo is controlled via 2IO?

Should be OK if the manufacturer claim to support 12V. However it would be best not to power the RC servo from the 5V on it.

The LSS-2IO with it’s example code will act like an LSS and respond to the commands sent to the right ID.
Use the available commands listed HERE.

EX: #209D0
Send the RC servo on pin D9 to position 0 in degrees.

EX: #209P1500
send the RC servo on pin D9 to center in Pulse RC (1000 to 2000)

Just be careful about RC servos and mechanical force.
If you force close a RC servo to a position it will never be able to reach, it can overheat and die.

Got it working. No heat issues so far, but I’ll keep testing and update if necessary. If the Elegoo overheats, I may switch to an actual Arduino Uno as sources online say they can handle up to 20V.

Just be careful about RC servos and mechanical force.
If you force close a RC servo to a position it will never be able to reach, it can overheat and die.

Got it; I’ll have to play around with this until I get a comfortable close angle. Same with the movement speed of the Lynx servos.

Thanks again,
Lynxbot_Student

What do you mean exactly ?

  1. Got the LSS-2IO loaded with the original example code ?
  2. Used the LSS-2IO to control the gripper servo (RC) with serial commands ?

What do you mean exactly ?

Got the LSS-2IO loaded with the original example code ?
Used the LSS-2IO to control the gripper servo (RC) with serial commands ?

Both. I’m currently able to control both the gripper and the LSS servos. I’ve controlled the mini gripper both explicitly via (#209D) write commands and by declaring the mini gripper as an LSS object [ LSS mini_gripper = LSS(209); ] and using mini_gripper.move().

By the way, for some reason, moveRelativeT() does not result in a timed movement on the LSS servos for me, but moveT does. Don’t know why, but I’m just using moveT instead.