Serial communication with goBILDA Dual Mode Servos

Hello. I have been doing some projects with goBILDA dual mode servos. These are RC servos that have two different operating modes (regular servo mode or continuous rotation mode). The mode can be selected using a servo programmer that goBILDA makes for this purpose.

I wanted to be able to change the mode while the project is running, instead of having to bring it back in and use the programmer. I already use an Arduino microcontroller to control the servos in my project, so I wanted to use that to change the mode of the servo as well.

I studied the programmer and found that it uses serial communication back and forth with the servo. I found out that the programmer can issue at least two serial commands to the servo.

  1. One of them asks for the mode of the servo. The servo sends a reply indicating which mode it’s in.

  2. The other changes the mode according to the command that is sent.

Other than that, I don’t understand the messages that are being sent between the two devices. Does anyone here know more about it? Are there other commands, like can I use the serial communication to find out the position of the servo?

1 Like

Hi @Chronister and welcome to the forum!

I see that you got pretty deep into this topic, which is good.

I didn’t understand, it the end, if you were able to change the servo mode or not?

Regarding the serial communication. Can you maybe share some sample files where we can see which data is exchanged? I used to do some similar things on my previous job.

As you already mentioned, probably what you see all the time is servo sending out its current position.

Hi igor_X,
I was able to use the Arduino to change the mode of the servo. Here is what the serial communication looks like on the oscilloscope. I put a resistor in the signal wire so that the two signals can be distinguished from one another. The one that doesn’t go to zero is the servo replying to the programmer. As far as I can tell, the servo doesn’t speak unless spoken to. I will post a transcript of the data next. It is long so I will upload it as a txt file.


serial communication.txt (1.2 KB)

1 Like

Hi @Chronister ,

Thank you for the details.

Do these messages that you don’t what are, change if servo has different positions?

In the end, maybe these are just some acknowledge messages?

The other messages must be acknowledge messages as you said (although it seems unnecessary to me). I did some more testing with the servo in a different position and even with different PWM commands sent to the servo. The messages from the servo are not affected by any of this.

1 Like

Hi @chronister,
thank you for sharing your experience. I’ve have a couple of bilda servos, and have been trying to send some serial messages to change them from continuous to servo mode, but I’m a bit confused with the method. Could you share a sample code that you used to achieve this ?

1 Like

Hi Novino,

I will attach the entire code that I am using below. I started by working with a software serial example so you will see the headers for that at the top. Later you will see the actual communication with the servo.

This code works, sometimes. I think it has something to do with noise in the circuit. Sometimes when it goes into continuous rotation mode, the servo just starts running continuously, with no control. Other times it does change mode as it supposed to and then responds to the PWM commands being sent. In one instance, I was able to make it work by changing to a different power source (battery or usb or a power supply).

The intended application is in a radio controlled ornithopter. I have been running this code on a 32U4 that is mounted on a breadboard. I have not tried running it on the actual hardware that would be used in the ornithopter, just for lack of time.

I hope you are able to use this to get your project working. Please let me know how it goes.

Best regards,
Nathan Chronister
servocode.txt (10.6 KB)

1 Like