Pololu-Romi-32U4-Carte-Ajouter-Electronique

De MCHobby - Wiki
Sauter à la navigation Sauter à la recherche

Ajouter de l'électronique

Cette section contient des trucs et astuces pour connecter des éléments électroniques complémentaires sur la carte de contrôle Romi 32U4.

Les broches I/O encore libre

Si vous voulez ajouter des périphériques complémentaires (ou recevoir des informations depuis l'AVR), vous aurez besoin de les connecter sur une ou plusieurs broches I/O de l'AVR. La section sur l'assignation des broches liste de toutes les broches et leur utilisation. De nombreuses entrées/sorties sont déjà utilisées par la carte mais il y a encore 8 broches I/O disponibles: 0, 1, 5, 12, A0, A2, A3 et A4. Toutes ces broches I/O disponibles peuvent être utilisées en entrée ou en sortie; chaque broche dispose également de fonctionnalités spéciales.

Broche 0 (PD2) et broche 1 (PD3) sont les lignes RX et TX du port série TTL de l'AVR.

Broche 5 (PC6) est une sortie PWM matérielle et utilisable avec la fonction Arduino analogWrite(). La broche 12 (A11/PD6) peut aussi être utilisée comme sotie PWM mais n'est pas supportée par analogWrite(), et utiliser la broche 12 en PWM pourrait entrer en conflit avec la broche 6 (qui contrôle le Buzzer) puisque ces deux broches sont des sorties complémentaire du Timer4 canal D.

Les broches 12 (A11/PD6), A0 (18/PF7), A2 (20/PF5), A3 (21/PF4) et A4 (22/PF1) peuvent être utilisée comme entrées analogiques.

Libérer plus de broches I/O

Si les entrées/sorties disponibles (libre d'usage) ne sont pas suffisants pour connecter les périphériques dont vous avez besoins, il est possible de désactiver (ou déconnecter) quelques fonctionnalités de la carte contrôleur Romi 32U4 pour libérer des I/O supplémentaires.

Si vous n'avez pas besoin que l'AVR mesure la tension des piles, vous pouvez utiliser la broches A1 (19/PF6) à d'autres fins. Cette broche peut être utilisée comme entrée/sortie numérique ou comme entrée analogique. Pour utiliser cette broche, il serai nécessaire de couper la piste entre les deux pastilles du cavalier "A1 = BATLEV" de façon à déconnecter la broche du diviseur de tension (du bloc pile). Si vous voulez utiliser A1 en sortie uniquement alors vous pourriez omettre de couper ce cavalier.

Si vous le connectez pas un LCD sur le connecteur LCD alors la broche 11 (PB7) et broche 4 (A6/PD4) son disponibles. ces deux broches peuvent être utilisées comme entrées/sorties numériques. De surcroît, la broche 11 peut être utilisée en sortie PWM (et une interruption "pin change") tandis que la broche 4 peut être utilisée comme entrée analogique.

If you are not connecting an LCD to the board’s LCD connector, you can use the LCD contrast potentiometer for other purposes. The output of the potentiometer is a 0 V to 5 V signal which is accessible on the LCD connector. It can be connected to any free analog input if you want to read it from the AVR, or it might be useful to connect it to the other electronics that you are adding.

If you do not need to use the buzzer, you can free up pin 6 (A7/PD7) by cutting the surface-mount jumper labeled “6 = Buzzer”. Pin 6 can be used as a PWM output, digital I/O line, or analog input. Disabling the buzzer also frees up Timer4, which has several PWM output pins. These pins can be used as PWM outputs if they are not needed for their normal tasks.

If you do not need encoders, you can free up pin 7 (PE6), pin 8 (A8/PB4), PE2, and pin A5 (23/PF0). Each of those pins has a corresponding surface mount jumper on the bottom of the board that can be cut in order to disconnect the encoder output from the AVR.

Be careful about connecting electronics to pin 13 (PC7), pin 17 (PB0), and pin 30 (PD5). These pins are used to control the LEDs on the Romi 32U4. All three of these pins are controlled as outputs by the bootloader. Pin 17 (PB0) and pin 30 (PD5) are used as RX and TX indicators, so if you are sending or receiving data over USB then the Arduino USB code will drive those pins in its interrupt service routines while your sketch is running.

Périphériques I2C

It should be possible to attach additional I²C slave devices to the control board’s I²C bus as long as the additional devices’ slave addresses do not conflict with that of the LSM6DS33, which uses 7-bit address 1101011. The ATmega32U4’s I²C pins (2 and 3) operate at 5 V. If you are connecting a 3.3 V device, you can connect it to the 3.3 V side of the bus instead (accessible through Raspberry Pi GPIO pins 2, for SDA, and 3, for SCL, even if a Raspberry Pi is not connected). Separate level shifters might be necessary to interface with devices that use other voltages.

If you do not want to use the inertial sensors on the I²C bus, you can cut the surface-mount jumpers labeled “IMU SDA Jmp” and “IMU SCL Jmp”. This frees up pin 2 (PD1) and pin 3 (PD0) for limited use as digital inputs and outputs as long as a Raspberry Pi is not attached to the control board. Note that the AVR’s I²C pins will remain connected to the on-board I2C level shifters and will therefore still be pulled up to 5 V.

Alimentation

The control board’s power nodes are accessible in several areas on the board. If you power additional devices from VSW, then they will be powered whenever the control board’s power is in ON, and they will receive whatever voltage the batteries are outputting. If you power them from VREG, they will get 5 V power whenever the batteries are installed and the power is on (but they cannot be powered from USB). If you power them from a 5V pin, then they will receive 5V power whenever the control board’s logic components are powered. If you power them from 3V3, they will receive 3.3V power whenever the control board’s logic components are powered. For more information about these power nodes and how much current they can provide, see Section d'alimentation.

It is also possible to add your own power switch to control power to the Romi 32U4 Control Board, as described in Section d'alimentation.

Masse

You should make sure that all the grounds in your system are connected. The Romi 32U4 Control Board’s ground node can be accessed from pins labeled “GND”. It should be connected to the ground node of every other circuit board or device you add to the robot.


Basé sur "Guide utilisateur de la carte de contrôle Romi 32U4" de Pololu (https://www.pololu.com/docs/0J69) - Traduit en Français par shop.mchobby.be CC-BY-SA pour la traduction
Toute copie doit contenir ce crédit, lien vers cette page et la section "crédit de traduction". Traduit avec l'autorisation expresse de Pololu (www.pololu.com)

Based on "Pololu Romi 32U4 Control Board User’s Guide" from Pololu (https://www.pololu.com/docs/0J69) - Translated to French by shop.mchobby.be CC-BY-SA for the translation
Copies must includes this credit, link to this page and the section "crédit de traduction" (translation credit). Translated with the Pololu's authorization (www.pololu.com)