Cette page présente les différentes composantes physiques qui se retrouve sur une carte électronique CrcDuino. C’est une lecture assez chargée, mais elle en vaut la peine!
All voltage values given on this page are using a GND
pin as reference. All GND
pins are connected to one another, so using any of them in all situation is acceptable.
Components
I/O
I/O are the way for robot controllers like the CrcDuino to interact with the outside world. They are .100” pitch male terminals. These are widely used in the hobby electronics world, making it easy to find compatible sensors and actuators.
To use the I/O in your code, use the appropriate:
To avoid damaging the micro-controller, the current drawn from any individual SIG
, MISO
, MOSI
, SCK
or SS
I/O pin of the CrcDuino should never exceed 20mA and must never exceed 40mA. The total current drawn from all the SIG
, MISO
, MOSI
, SCK
or SS
I/O pin of the CrcDuino must never exceed 200mA.
Analog inputs
Analog inputs are used to transform voltage from the outside world into a digital value that can be used for calculation by the micro-controller.
Analog Inputs are not to be mistaken with Analog Channels, which are the joystick of your remote controller. Many sensors (like ultrasonic range finders and light Infrared Light sensors) "produce an output signal or voltage which is generally proportional to the quantity being measured", as well said by this great reference website.
4 analog pin sets, called ports, are available on the board. Each port consists of 3 pins:
SIG
: The signal pin, the pin to apply the voltage you want to read to.5V
: Continuous 5V voltage pin. Most sensors require this continuous 5V feed to operate. If the LED marked “5V” right above the “DIG” mark is not lit, no 5V continuous signal will be available on those pins.GND
: Ground pin.
The board will transform the voltage between a given SIG
pin and GND
into a digital value thanks to the 10-bit analog to digital converter built into the micro-controller. Analog pins can read voltage values ranging from 0V to 7.5V and transforms them into a digital value ranging from 0 to 1023 when using CrcLib::GetAnalogInput()
.
For more information on how analog to digital converter work and how to interpret the value returned by CrcLib::GetAnalogInput()
, refer to this website and the GetAnalogInput() page.
Digital I/O
Digital I/O are used to read or write digital signals. A digital signal is a signal that can only take 2 values: True or False.
True is often represented by the number 1, or
HIGH
in the Arduino jargon, and is characterized by the presence of voltage.False is often represented by the number 0, or
LOW
in the Arduino jargon, and is characterized by the absence of voltage.
12 digital pin sets, called ports, are available on the board. Each port consists of 3 pins:
SIG
: The signal pin, the pin that will read or give the signal.5V
: Continuous 5V voltage pin. Most sensors require this continuous 5V feed to operate. If the 5V LED right above the “DIG” mark is not lit, no 5V continuous signal will be available on those pins.GND
: Ground pin.
Digital input
Use CrcLib::SetDigitalPinMode()
to configure a digital I/O as an input. Once configured, use CrcLib::GetDigitalInput()
to read wether voltage is applied on the SIG
pin of the concerned port or not.
The input voltage threshold for the
HIGH
→LOW
transition is around 2.1V.The input voltage threshold for the
LOW
→HIGH
transition is around 2.6V.
Digital output
UseCrcLib::SetDigitalPinMode()
to configure a digital I/O as an output. Once configured, use CrcLib::SetDigitalOutput()
to read wether voltage is applied on the SIG
pin of the concerned port or not.
For more information on how to use Digital I/O, refer to the SetDigitalPinMode() , GetDigitalInput() and SetDigitalOutput() pages.
Note that a 10kΩ pull-up resistor is connected to all digital pins of the CrcDuino board. Google is a great place to learn about pull-up resistors (and its sister, the pull-down resistor), but this page is a good introduction.
PWM outputs
12 PWM pin sets, called ports, are available on the CrcDuino. Each port consists of 3 pins:
SIG
: The signal pin, the pin that will read or give the signal.5V
: Continuous 5V voltage pin. Most sensors require this continuous 5V feed to operate.PWM port #1 to #4: No 5V voltage is supplied on the center pin. These ports should therefore only be used for applications that do not require a 5V continuous power. Standard and continuous servos won't work on these ports. Electronic Speed Controllers (ESCs, like the Victor SPx) will work, since they take their control power from the 12V battery instead of the 5V supply from the 3-wire control cable.
PWM port #5 to #8: These 4 ports are supplied by the same power supply. A maximum total of 1A can be drawn from the
5V
pin of ports #5 to #8. If the 5V LED marked “A” right above the “PWM” mark is not lit, no 5V continuous signal will be read on the5V
pin of PWM #5 to #8.PWM port #9 to #12: These 4 ports are supplied by the same power supply. A maximum total of 1A can be drawn from the
5V
pin of ports #9 to #12. If the 5V LED marked “B” right above the “PWM” mark is not lit, no 5V continuous signal will be read on the5V
pin of PWM #9 to #12.
GND
: Ground pin.
For more information on how to use PWM I/O, refer to the InitializePwmOutput() and SetPwmOutput() pages.
Although SIG
pins of the PWM ports are linked to PWM capable pins on the Mega2560 chip, CrcLib uses them as "Servo PWM", using the servo.h standard Arduino library to control them instead of the native Arduino function analogWrite(). Refer to the Micro-controller section below for possible timer conflicts.
Therefore, analogWrite() can be used on a SIG
pin if it has been set as an OUTPUT using pinMode() and has not been initialized using CrcLib::InitializePwmOutput()
. Using analogWrite() is not recommended to control a servomotor or a motor controller. For more information, visit https://gist.github.com/ajfisher/8c5146bff264b88d04cc.
Everything you've ever wanted to learn about PWM signals and servo-motors is explained on these pages written by John Salt. They are must reads for all members of the robot sub-team:
Communication ports
Communication ports are used to communicate with the outside world using various communication protocols relying on a series of timely organized digital impulses.
No CrcLib functions are wrote to be used with the communication port I/O pins. Their pinMode() are not set by CrcLib::Initialize()
.
I2C and Serial pins (SDA
, SCL
, TX1
and RX1
) are interrupt-capable pins, so they instead could be used to monitor additional encoders instead of managing I2C or Serial communication, or used for any other task requiring interrupt input capability. They would then must be first set as INPUT
using the native Arduino function pinMode().
SPI Communication Port
The Serial Peripheral Interface (SPI) port is a set of 4 digital I/O pins that adds SPI communication capabilities to the CrcDuino when used with the Arduino standard SPI library. The port consists of 6 pins:
SS
: The Slave Select pin.SCK
: The Serial Clock pin.MOSI
: The Master Output, Slave Input pin.MISO
: The Master Input, Slave Output pin.5V
: Continuous 5V voltage pin. If the 5V LED right above the DIG mark is not lit, no 5V continuous signal will be available on this pin.GND
: Ground pin.
I2C Communication Port
The Inter-Integrated Circuit (I2C, pronounced I-squared-C) port is a set of 2 interrupt-capable digital I/O pins that adds I2C communication capabilities to the CrcDuino when used with the Arduino standard Wire library . The port consists of 4 pins:
SDA
: The Serial Data Line pin. This pin is aligned with the “MISO” mark of the SPI port.SCL
: The Serial Clock Line pin. This pin is aligned with the “MOSI” mark of the SPI port.5V
: Continuous 5V voltage pin. If the 5V LED right above the DIG mark is not lit, no 5V continuous signal will be available on this pin.GND
: Ground pin.
SERIAL Communication Port
The serial port, also known as UART or USART, is a set of 2 interrupt-capable digital I/O pins that adds UART communication capabilities to the CrcDuino when used with the native Arduino Serial communication functions. It is linked to Serial Port #1 of the ATMEGA2560-16AU micro-controller controlling the CrcDuino. The port consists of 4 pins:
TXD1
: The TX pin. This pin is aligned with the “MISO” mark of the SPI port.TRX1
: The RX pin. This pin is aligned with the “MISO” mark of the SPI port.5V
: Continuous 5V voltage pin. If the 5V LED right above the DIG mark is not lit, no 5V continuous signal will be available on this pin.GND
: Ground pin.
Encoder Port
Encoder ports are meant to be used to read digital signals coming from a quadrature encoder.
No CrcLib functions has currently been prepared to be used with the encoder ports I/O pins. These pins are set as INPUT
by CrcLib::Initialize()
.
ENCO Port
The encoder port is a set of 2 interrupt-capable digital I/O pins that are meant to read digital signals coming from a quadrature encoder when used with an encoder library. We recommend using Paul Stoffregen’s library named Encoder, as detailed here. The port consists of 4 pins:
ENCO_A
: The pin reading the A-channel of the encoder. This pin is aligned with the “MISO” mark of the SPI Communication port.ENCO_B
: The pin reading the B-channel of the encoder. This pin is aligned with the “MOSI” mark of the SPI Communication port.5V
: Continuous 5V voltage pin. If the 5V LED right above the DIG mark is not lit, no 5V continuous signal will be available on this pin.GND
: Ground pin.
Micro-controller
The micro-controller is the brain of a robot. This black chip is where the magic happens. The chip reads information (inputs) from the outside world (the robot's sensors, the remote controller, etc.), treats this information according to the program downloaded inside it and then enacts the appropriate action (through outputs) to the outside world (the robot's servo-motors, ESCs, etc.). To learn more about micro-controllers and how they work, here's a good read.
Power terminals and power supply circuits
These green terminals power the CrcDuino with electricity. Internal circuitry brings the 12V power coming from the robot battery to a more convenient 5V and 3.3V. Refer to this page for more information!
The total supply of the following 3 power supplies is PTC limited to 2.35A @ 12V.
5V
pins of PWM ports #5 to #8 are supplied by a dedicated 1A @ 5V power supply.5V
pins of PWM ports #9 to #12 are supplied by a dedicated 1A @5V power supply.5V
pins of all DIO, ANA and communication/encoder ports are supplied by a dedicated 0.350A @5V power supply.
The micro-controller is supplied by a dedicated 5V power supply which is PTC limited at 300mA @ 12V.
The Xbee module is supplied by a 3.3V voltage regulator. This voltage regulator is fed by the 5V micro-controller power-supply.
Status LEDs
These LEDs are used for debugging purpose.
CPU
: CPU power indicator. Lits when 3.3V is fed to the Xbee module, which also implies that 5V is fed to the micro-controller. Beware: this LED is back fed by the micro-USB connector and will therefore light up if the USB cable is connected to the board and a computer, even if no 12V supply is applied to the power terminals.ST
: Status indicator. Flashes periodically to indicate the program is running normally. Will change state approximately each second when running the most basic program, containing onlyCrcLib::Initialize()
andCrcLib::Update()
Fail
: Failure indicator. Lits when the board is in Error mode. Refer to the Error Codes page for more information.X1
: XBee status light X1. Lits when the Xbee module is at the ON state.X2
: XBee status light X2. Lits when the Xbee module is connected to another Xbee module. When the connection is lost, it may take a couple of seconds before the LED goes out.X3
: XBee status light X3. Flashes when the Xbee module is operating properly.
Special behavior: ST
and Fail
flash alternatively when the factory initial program is loaded into the micro-controller.
Neopixel LED
The Neopixel is an RGB LED light used by CrcLib for error diagnosis. Refer to the Debugging - CrcLib Error Codes page to understand what error each color pattern corresponds to.
Reset Button
When the reset button is pressed, power to the micro-controller is cut. When released, the micro-controller powers back up and starts executing its code from the beginning.
Output behavior on chip reset
When the micro-controller is reset, some of your outputs might be set to HIGH
automatically for a short period of time by the micro-controller even if they are initialized as INPUT
in your code. It is a "normal" behavior of the AVR chip caused by its internal operating sequence upon reset. A chip reset happens, among other cause, when you press the reset button, when a new sketch is uploaded or when it is powered on.
XBee Module - Optional
The Xbee module is an optional device that can be easily installed or removed from the CrcDuino. The Xbee module is required to use the remote controller capabilities made possible by CrcConnect. For more information, refer to the CrcConnect page.
It is recommended to install/remove the module while the CrcDuino is powered off.
To install, simply align the pins of the module with the CrcDuino socket and insert them into it. Make sure that the polarity is right by respecting the edge marks on the board.
To uninstall, simply remove the module from the socket.
Temperature sensor - Optional
Although not factory installed, a LM35D temperature sensor can be installed on every CrcDuino board and its data accessed using the analog input defined as CRC_LM35D
. It can be easily soldered in the dedicated holes right below the “Q240” marks on the board, respecting the pin polarity indicated by the truncated oval mark on the board.
Board Revision
Since CRC Robotics always wants to improve, different hardware generations exist to keep up to date with technological advances and/or improve the design and functionality of the board. Because of these hardware changes, stuff might be wired differently on the board, sometime causing the pin numbers associated with certain functionality on the chip change between hardware revision. To avoid problems, the most up to date CRCLib associated with the hardware revision should be used.
9880A: Generation A. Initial Beta release.*
9880B: Generation B. Improved power supply circuitry to better handle battery voltage drops caused by power motors in-rush current. No impact for CrcLib.
*All 9880A boards in circulation have been upgraded to be equivalent to a 9880B board.
Articles liés
-
CrcDuino: détails matériels (Système CrcDuino System) —
Cette page présente les différents composants physiques qui se retrouvent sur une carte électronique CrcDuino. C’est une lecture assez chargée, mais elle en vaut la peine!
Toutes les valeurs de voltage indiquées sont par rapport à la broche
GND
. Celles-ci sont toutes connectées entre elles, alors elles peuvent toutes être utilisées à votre guise. -
CrcLib: accéder aux broches IO (Système CrcDuino System) —
Cette page présente les constantes symboliques définies dans CrcLib en utilisant la directive du pré-processeur
#define
.Broches
-
Déverminage - Codes d'erreur CrcLib (Système CrcDuino System) —
Cette page présente les codes associés au mode d’erreur de CrcLib.
Qu’est-ce que c’est ?
-
GetAnalogInput() {FR} (Système CrcDuino System) —
Objectif
Obtenir l'état d’une entrée analogique du CRCduino
Quand l’utiliser
-
InitializePwmOutput() {FR} (Système CrcDuino System) —
Objectif
Permet l’utilisation d’une broche PWM en configurant ses paramètres internes.
Quand l’utiliser
-
SetPwmOutput() {FR} (Système CrcDuino System) —
Objectif
Contrôler la sortie d’un port PWM
Quand l’utiliser
Add Comment