Hello,

I use Adafruit16CServoDriver in the InMoov head.

scheme:

USB <-> Arduino Uno (pin 4,5) <-> (pin SCL,SDA) Adafruit16CServoDriver (pin 0,1,2...) -> Servo 1, Servo 2 ...

Servo 1 is jaw, servo 2 is left eye X, servo 3 is left eye Y, servo 4 is left eyelid, servo 5 is reight eye X ..... etc.

I have difficulties with understanding how to adjust the work in mrl?

I pour MrlComm.ino into Arduino. I strted in runtime Arduino service, choose COM port and connect.

But I dont know how to connect Adafruit16CServoDriver service to Arduino service. How to assign pins on Arduino, and to assign pins on Adafruit16CServoDriver.

How to connect other services to Adafruit16CServoDriver service for example i01.head.eyeX etc.?

GroG

5 years 8 months ago

Hello VALL-E !

Originally MrlComm was modified and the ada fruit library was used.  But it has been quite a while since then, and MrlComm.ino is better, but it doesn't have the "hack" that made it work.

What is needed is MrlComm needs to be updated with a Adafruit16 device and the appropriate firmware code needs to be exctracted.

Setting min/max are just properties of the Servo service and that shouldn't need to change.   I'll look to see if I still have this same controller...

I've added it to my list here -> https://github.com/MyRobotLab/myrobotlab/issues/463

thank you for the answer

I just started studying mrl and I don't know the way to solwing this issue.

Is it needed programming COM-Arduino communication protocol to support Adafruit16 device?

Or Java programming Arduino service? Or Pyton programming something else?

I want to try to solwe this issue, instead of waiting while You or sombody else do it.

Hi 

As GroG writes, the original implementation of Adafruit16CServodriver relied on having device specific code in MRLComm. That design was abandoned years ago to decrease the dependency on external libraries, and to reduce the size of MRLComm.

Instead a generic ic2 interface was built into MRLComm and it's used by many services. That makes it possible to incorporate new i2c devices without any change to MRLComm. And it also made it possible to use ithe same i2c devices on other hardware like Raspberry PI and ESP8266.

How you connect servos using Arduino and Adafruit16CServoDiriver is described here:

http://myrobotlab.org/service/Adafruit16CServoDriver

If you want to test just using the GUI:

Start Arduino, select com-port and connect

Start Adafruit16CServoDriver and attch the Arduino service, Use bus 0 ( this will use pin 4/5 as SDA / SCL ) and 0x40 since that is the defauilt i2c address for the Adafruit16CServoDriver.

Start a Servo Service and attach it to the Adafruit16CServoDriver ( not the Arduino ). You select the pin that you want to use ( between 0 and 15 )

The Servo service woks the same way as it would have done if you connected the servo directly to the Arduino. So you set min and max values the same way.

/Mats

 

Thank you very much for Your help.

I'll try it.

And should I change controller for i01.left on my arduino?

And should I change controller for example for i01.head.rothead on my Adafruit16CServoDriver?

Should I set min and max values by "Input MAP" and "Output MAP" values? How to set translation coefficient from degrees to PWM?

 

Hi VALL-E

You should change controller for the servos that you have connected to the Adafruit16CServoDriver.

i01.left is one of the Arduinos, so you shouldt change it. 

i01.head.rothead is the servo that rotates the head left/right, If that servo, located in the head, is connected to the  i01.head.rothead, the you should change controller on that servo.

The translation from degrees to pwm is already done in the Adafruit16CServoDrive servicer, so you don't have to worry about that. You can use degrees directly.

The only mapping you have to do is in case your servos are mounted a bit different that the default. 

You can find the default mapping here: http://inmoov.fr/default-hardware-map/

So if you map, the values from this table will be your input map, and the values you want will be your output MAP. 

So for example if the eyes center different then in Gaels build, uåyou may map it like this:

i01.head.eyeX.map(60,120,70,130)

This would cause your servo to center around 100, instead of the default 90.

Thank You very much!

I came to understand. I have connected mouth servo to mrl and it works well.

I think the other servoes will cause less problems. :)))