Aller au contenu


efarnioli

Inscrit(e) (le) 03 janv. 2022
Déconnecté Dernière activité janv. 16 2022 04:41
-----

Messages que j'ai postés

Dans le sujet : Help - Freemove Car Kit on Vigibot

13 janvier 2022 - 10:34

 

With some specific examples :

 

L9110 is a board that use PwmPwm,  the driver have only inA and inB, reversing those inputs reverse the motor direction.
L298 is a board that use PwmDirDir, the driver have a PWM/enable  + inA and InB.  For the particular case we can use PwmPwm if enable pin is forced to " run state " 
Cytron is a board tha use PwmDir, the driver have only two inputs, pwm and direction. Pwm mode alone can be used if you don't need to reverse the direction of the motor.
Servo driveris a board that require the same servo signal as for servo with only one input. 
PCA servo can be used to drive servomotors or any other of the board above by setting correctly the gpio and type and specifying pca address

PCA with motor driver included  this one include pca board + t6612fng woking with PwmDirDir mode.


You need to understand what are the different mode available, and understand how is working the board you want to use. The you just have to choose the matching one =)  

 

( And thank you for the translation ;) )

 

 

Added these examples too :)

 

Cheers


Dans le sujet : Help - Freemove Car Kit on Vigibot

11 janvier 2022 - 03:28

Hi all,

I published the english version of the guide about how to set up your robot on vigibot, please let me know if something is not clear enough in the translated version.

 

From my perspective, the thing that is less clear is how to conlcude if your robot needs the type PwnmPwm, PwmDir or other...

Maybe few examples more about this could be beneficial for people who are new to this


Dans le sujet : How to configure my vigibot robot to control Motors, Relays and LEDs?

11 janvier 2022 - 03:25

What is a PCA9685?

 

A pca9685 is a fairly widespread component allowing you to provide 16 additional PWM outputs which connects to I2C (GPIO 2 and 3 of your raspberry pi = SDA and SCL).

 

How to configure a PCA9685 on Vigibot?:

0) Connect your PCA to your raspberry pi on the I2C pins 2 and 3 (SDA and SCL)

1) Know the I2C address of your pca9685 (in decimal)

Method 1: read your card documentation

Method 2: run an I2C scan on your raspberry pi you will see all of the I2C peripherals present. (search for "raspberry pi i2cdetect")

 

=> Notice, often the I2C addresses are displayed in hexadecimal and not in decimal ...

In this case it will be necessary to convert the hexadecimal I2C address into decimal)

 

Example for a PCA9685 with the default I2C at 0x70, the decimal value is 112.

 

2) Add the address of Your PCA in your hardware configuration.

Go to Hardware Configuration, search for PCA9685ADDRESSES, and add your I2C address (in decimal!) Then save your configuration.

=> If you entered a valid I2C address, with a PCA connected your robot robot should still function as if nothing had changed.

=> If you have entered an invalid I2C address, or if your PCA is no longer connected, your robot will no longer be able to connect and will turn red on vigibot. (Removing the invalid address or correcting it with the valid address will correct the problem.

3) Configure the outputs you want to use with a PCA

In Hardware Configuration, modify the OUTPUTS that you want to use with the PCA9685 and in the "address" box replace -1 by 0 to assign it to the first PCA9685 whose address you have saved in PCA9685ADDRESSES.

In GPIOS, also check that the output numbers you want are between 0 and 15!

Save your configuration, if no configuration error normally your robot should work as desired and the output of your PCA be driven.

4) Bonus, connect several PCAs:

Add as many addresses as there are PCA9685 that you have in the PCA9685ADDRESSES table.

To select the PCA in OUTPUTS, change the -1 in address by 0 to select your first pca, by 1 to select the second 1 etc ...

 

Example of a card with PCA9685:

https://www.robot-ma...moteurs-32.html


Dans le sujet : How to configure my vigibot robot to control Motors, Relays and LEDs?

11 janvier 2022 - 03:22

Use Case

 

Let’s consider the case in which I have a robot that uses an L298 type motor driver to move

(instead of a motor driver that drives like a servo motor, which is configured by default)

A ) I look at which Outputs are currently configured in the actual configuration, and I locate the OUTPUTS[4] and OUTPUTS[5] whose names are "Left wheels" and "Right wheels". It is therefore only these two outputs that we are going to modify.

B ) I’ll take the corresponding type for the output ( L298 => PwmDirDir ) 

C) I add two gpios in the GPIOS table to have the 3 gpios required for the PwmDirDir type, and I choose the GPIOS among the available gpios:

for a standard config the available Gpios are 0, 1, 4 9 10 11 12 13 24 25 26 27. (26 and 27 are used for the engines but you are working on the engines, so these two Gpios are also available ...)

Reminder: 2 and 3 are used by the I2C, 14 and 15 are for the UART 16 to 23 are the 8 Gpio of the switches, 5 to 8 are used for the head and the clamp)

(Note: To add parameters, choose text code editing mode or tree mode.)

D) I add 2 sleepmodes to have as many sleepmodes as there are gpios. For a motor driver setting all sleepModes to Low is a good idea. (Especially do not put the PWM in sleepmode to High one of the direction pins to High and the other to Low otherwise your robot will go to standby!)

E) I modify the values of outs to match the range of -100 to 100 of the PwmDirDir mode and I put as many outs as there are in.

By default 4 ins are configured: -100 -1 1 100, that's why I have 4 outs.

In general the two ends of the outs you can put them at -100 and at 100 to go to the maximum speed.

And the two central values are to be adjusted so that your robot moves forward as soon as you send a small impulse to move forward.

Example of valid outs: -100 -10 10 100 but -100 -1 1 100 is also valid, it depends on your robot.

If my robot does not drive straight I can adjust the outs of the motor which is going too fast to correct the fault observed by reducing the maximum speed for example.

What it gives as a modified configuration:

 

"NAME": "Left wheels",

"TYPE": "PwmDirDir", 

"ADRESSE": -1,

"GPIOS": [

        9,

        24,

        25

      ],

"SLEEPMODES": [

        "Low",

        "Low",

         "Low"

      ],

"OUTS": [

        -100,

        0,

        0,

        100

      ]

 

All the other entries can be left as by default

 

 

Here below, other example about the correct type to use for your specific case:

 

L9110 is a board that use PwmPwm,  the driver have only inA and inB, reversing those inputs reverse the motor direction.

L298 is a board that use PwmDirDir, the driver have a PWM/enable  + inA and InB.  For the particular case we can use PwmPwm if enable pin is forced to " run state " 

Cytron is a board tha use PwmDir, the driver have only two inputs, pwm and direction. Pwm mode alone can be used if you don't need to reverse the direction of the motor.
Servo driveris a board that require the same servo signal as for servo with only one input. 
PCA servo can be used to drive servomotors or any other of the board above by setting correctly the gpio and type and specifying pca address

PCA with motor driver included  this one include pca board + t6612fng woking with PwmDirDir mode.


Dans le sujet : Help - Freemove Car Kit on Vigibot

06 janvier 2022 - 03:18

ah good thanks a lot :)

today i am busy with other stuff, tomorrow I should have the possibility to spend time on it