I have decided to redesign the Dynamixel interface and put it again in stock on my Tindie store, this redesign include some status LEDs that visually let you know if the motor is communicating to the motors and vice-versa, I have also decided to change the connector orientation which makes the board a little bit compact and more compatible with small dimensions projects.
The circuit for the LED indicators uses some NAND gates that let the user know when data is going to the servo and from the servo to the microcontroller without the need for a logic analyzer.
This update is a very simple update and it does not affect the functionality of the interface, it is just a visual benefit for the user.
Here is the schematic in case you have the components and wish to make your own interface.
Test code:
#include <DynamixelSerial.h>
#define SERVO_ID 1
int Temperature,Voltage,Position;
void setup(){
Dynamixel.setSerial(&Serial1); // &Serial - Arduino UNO/NANO/328P, &Serial1, &Serial2, &Serial3
Dynamixel.begin(1000000,2); // Inicialize the servo at 1 Mbps and Pin Control 2
Serial.begin(9600); // Begin Serial Comunication
}
void loop(){
Temperature = Dynamixel.readTemperature(SERVO_ID); // Request and Print the Temperature
Voltage = Dynamixel.readVoltage(SERVO_ID); // Request and Print the Voltage
Position = Dynamixel.readPosition(SERVO_ID); // Request and Print the Position
Dynamixel.move(1,random(200,800));
Serial.print("Temperature: "); // Print the variables in the Serial Monitor
Serial.print(Temperature); Serial.print(" celcius, ");
Serial.print("Voltage: ");
Serial.print(float(Voltage)/10);Serial.print(" volts, ");
Serial.print("Position: ");
Serial.println(Position);
delay(1000);
}
In the above breadboard photo, are you connecting CTRL to Ground on the Arduino Micro near pin 2?
Hi Joshua, CTRL pin of the interface is connected to pin 2 of the Arduino, as this is the signal that tells the interface the communication direction flow between the motor and the Arduino.
dang – totally missed the comment “Inicialize the servo at 1 Mbps and Pin Control 2” Derp. Thank you!
Hi Josue!
I purchased recently your Dynamixel interface and I’m trying to figure out how to make it work with a nodemcu esp8266 instead of Arduino (allowing remote connection over Wifi).
But so far no sucess 🙁 I though that it might be due to 3.3v output voltage from Esp instead of 5v but even with a signal converter, it doesn’t seem to work.
So maybe something related to the dynamixel library on ESP8266?
And just to be sure could you please tell me:
– Is there any specific requirement when choosing the Ctrl pin on Arduino/ESP?
– Do the dynamixel interface works only with 5v or also with 3.3v?
If you have any advice on how to proceed, that would be great, thanks!
Cheers and thank you!
Hi Laurent, the interface does work with 3v3 if your RX pin on your ESP is 5v tolerant, I have even connect the interface to non 5v tolerant microcontrollers without any problem.
What library are you using? And what servo are you trying to communicate with?
There are no special requirements for the ctrl pin.
Hi Josue,
Thanks for your reply.
Well, I also tried directly with 5V because the NodeMCU- ESP8266 should be 5 V tolerant for Rx input (even if it’s not recommended ). But it doesn’t work either, same for other types of configuration, like with other pins or SoftSerial instead.
I tried the libraries: DynamixelSerial and DynamixelSoftSerial downloaded directly from your website. The Servo are AX-12+.
I can at least notice that when I send something the TX led is blinking on the Dynamixel interface whereas the RX led is always on when the dynamixel bus is powered up but nothing is received (even with the ping () command).
I guess that I should try with other devices and proceed step by step to find out the cause. I don’t have any Arduino board but a Raspberry PI 3 B+.
With a USB2AX module and SMPS2dynamixel for power, I can interact with the same servos without any issue. The voltage read from servos is around 8.3V.
So maybe I could try to use instead your Dynamixel interface with the Raspberry and GPIO. Would you think that it could work and if so do you have any advice ? Can I power up the dynamixel bus with a SMPS2dynamixel instead of the interface VMOT pin ?
In parallel I will also try the ESP with other serial communication tests to see if there is
somthing related with it.
Thanks
Hi Laurent, at 1Mbps the RX LED flashes so fast that is hard to see. Sure you can power the Servos with the SMPS2Dynamixel or any other power supply, When connecting to the Raspberry don’t forget to use your signal level converter, the easiest way to determinate a failure in the communication with this motors is a logic analyzer, if you have one it is pretty easy to see the problem, there are some very cheap logic analyzer on eBay.
I have a post for the Raspberry Pi Zero using Python that you could use for fast debugging.
Greetings
Ok, great thanks for the tip ! 😉