Reclaim your REV Expansion Hubs from your Outreach Bots #588
-
A REV Expansion Hub (“Hub”) can be reclaimed from your outreach bot(s) by using inexpensive COTS alternatives. The REV SPARKmini and REV Servo Power Module can also be reclaimed.
A Hub can be reclaimed for as little as $25 since typically many of the ports on a Hub are not needed. In the case where all 4 motor ports and/or all 6 servo ports are needed, a Hub can be reclaimed for as little as $55. COTS devices can also be used in the development stages of the competition bot to minimize the chances of damaging a Hub during development. Additionally, COTS devices allow teams to implement and demo features not possible to implement with the Hub, which can impress judges during judging. Perhaps the greatest value of using COTS devices is that students gain valuable marketable skills by way of hands-on experience with devices used in the industry. COTS AlternativesThe critical components of the Hub are the four (4) DC Motor ports and the six (6) Servo ports. The following are COTS alternatives:
Note Unless otherwise noted, all COTS devices are compatible with 3.3V and 5V power or logic level. PCA9685 Breakout BoardA NXP PCA9685 Breakout Board (“PCA9685”) provides 16 PWM ports. These ports can be used to control:
Due to the wide variety of uses of the PCA9685, numerous manufacturers have produced breakout boards: The breakout boards are available from numerous vendors. Motor DriversA DC Motor Driver (“Motor Driver”) has one or more Motor Channels, and one or more Input Interface options per channel. Common Input Interface options are:
Many Motor Drivers provide a “Servo Interface”. A Servo Interface is a PWM protocol used by devices commonly referred to as “RC Servo”, “Hobby Servo”, and/or “3-Wire Servo”. Other Motor Drivers provide a “PWM Interface”. A PWM Interface has a different PWM protocol and wiring than the Servo Interface. The PCA9685 supports the Servo Interface and the PWM Interface. Motor ChannelA Motor Driver powers a DC Motor via the 12V robot main battery. The Motor Driver uses the PWM technique to regulate the voltage to a Motor Channel. The effective voltage to a motor connected to a Motor Channel is determined by the duty cycle of the PWM pulses. The no-load RPM of the motor is determined by this voltage. Input InterfacesThere two classes of PWM interfaces on input to a Motor Driver:
Servo InterfaceThe Servo Interface has one analog control signal. The signal is a PWM protocol. Nominally, the signal has:
Typically, the PWM frame frequency of the Servo Interface is 50 Hz (20 ms duration). Although 50 Hz is the nominal frequency, Servos and Motor Drivers support a range of input frame frequencies. Therefore, the duty cycle of the Servo Interface, has no semantics. The semantics are in the pulse widths. The pulse width of the Servo Interface determines the duty cycle and polarity of the PWM of the Motor Channel (i.e. RPM and direction of rotation). The frame frequency of a Motor Channel is vendor specific and is fixed to some frequency, typically between 10,000 and 20,000 Hz. The following motor controllers provide a Servo Interface: PWM InterfacesThe semantics of the PWM Interfaces is simple: The duty cycle of the PWM Interface determines the duty cycle of the Motor Channel. The PWM of the Motor Channel has the exact same frame frequency, duty cycle, and pulse timing as the input PWM Interface. The key information carried by the interfaces are:
Thus, the PWM Interfaces allow the control program to have direct fine-grained control of the PWM of a Motor Channel. The drawback of the PWM Interfaces is that direction of rotation information must get sent out-of-band. Therefore, Motor Drivers having a PWM Interface have two input signals. PWM+DIR InterfaceThe PWM+DIR Interface has a PWM input and a DIR input. Direction of rotation is controlled by the DIR input, which is just a Digital Input channel. PWM and DIR are connected to two channels of the PCA9685. Any PCA9685 channel can be configured as a Digital Output channel. PWM+PWM InterfaceThe PWM+PWM Interface has two PWM inputs, say “PWM1” and “PWM2”. These are intended to drive a phase of a Stepper Motor but can be used to drive a DC Motor as well. Sending a PWM signal on PWM1 only will turn a DC motor in one direction, and sending the signal on PWM2 only will turn the motor in the other direction. PWM1 and PWM2 are connected to two channels of the PCA9685. PCA9685 16-channel I2C LED ControllerAlthough the PCA9685 is a LED Controller, it can be configured to support a Servo Interface or a PWM Interface. There is one key aspect of the PCA9685 to keep in mind. All 16 channels operate on the same chip-wide frame frequency. Typical frame frequencies and their applications are:
A separate PCA9685 board is needed for each type of application: The following I2C bus modes are supported by the PCA9685:
Note SDA and SCL on the PCA9685 have 10 kΩ pullups to VCC. The Hub has 2.49 kΩ pullups to VCC. Thus, connecting 3 PCA9685 boards to a I2C port on a Hub yields 1.43 kΩ pullups to VCC for the bus. FIRST® ENERGIZE℠A key feature of the PCA9685 is Pulse Delay. Each channel can be configured with a different delay to the start of the pulse from the start of the frame. If you have two drive motors, you would delay one of the channels by 50% of the frame duration. When the duty cycle is less than 50% on each channel, the robot main battery is not having to send power to both motors at the same time. Otherwise when the duty cycle is greater than 50% but less than 100%, the duration that the battery has to power both motors at the same time is minimized. Likewise if you have four drive motors, you would delay three of the four drive motor PWM channels by 25%, 50%, and 75% of the frame duration. Or you could implement more elaborate algorithms where the delay of each channel is a function of the duty cycle of all channels at any given time. For example, if one channel is at 30% and another channel is at 70%, you could dynamically delay the second channel by 30% of the frame duration so that the main battery does not have to power both motors at the same time. The Pulse Delay feature is only effective for PWM Interfaces since the timing of Motor Channel pulses cannot be controlled via the Servo Interface. Therefore, we prioritized testing motor drivers which have a PWM+DIR Interface or a PWM+PWM Interface. Tested Motor DriversAvailable from a variety of vendors: CytronThe following Cytron motor drivers have a PWM+DIR Interface:
The Cytron motor drivers will Brake the motor when the duty cycle is 0%. DBH-12VThe unbranded DBH-12V Dual-Channel H-Bridge Stepper Driver has a PWM+PWM Interface typical of stepper motor drivers:
ConnectionsWarning V+ is connected to PWR+ (i.e., battery voltage). To prevent mishaps, you could cut the two V+ pins off the board IN1 & IN2 pins are for the two PWM input signals. Only send a PWM signal on IN1 or IN2; not to both at the same time. Duty cycle of the PWM signal must be less than 98% for the DBH-12V (because a waveform needs to be present?). EN is a digital input pin for enabling and disabling the H-Bridge. The H-Bridge is enabled when nothing is connected to EN. When the H-Bridge is enabled, the motor will Brake on 0% duty cycle. Connecting EN to a PCA9685 channel allows the control program to enable/disable the H-Bridge. When the H-Bridge is disabled, the motor will Coast. CT is an analog output pin (0 to 5V). The voltage is representative of the current draw of the motor. A & B terminals are the two output Motor Channels. Note V+ pins could be used to power low power motors such as the VEX 393 Motor:
Warning Typically you shouldn't pass V+ from board to board via the V+ pin of the PCA9685 as shown above. Instead you should power each board independently as needed via the V+ terminal. JudgingThe emphasis of FIRST® Tech Challenge is on the judging aspect of the competition. Reclaiming a Hub from an outreach bot allows teams to:
Additionally, students can earn the fundamentals of LED control and demonstrate the same on a competition bot. All are great ways of impressing the judges. Moreover, students obtain valuable marketable skills by way of hands-on experience with COTS devices and technologies used in the industry. Note Per GM1 it is perfectly legal to use a PCA9685 for competition, however you are only allowed to use it to control LEDs:
Coming SoonThanks to the OctoQuad from @DigitalChickenLabs, you can reclaim both REV Control Hub and REV Expansion Hub for as little as $150. A fantastic project for the pre-season. PLUS much more! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
A Brillant idea! Our outreach robot (demobot) is always the first to suffer when we need spare parts. Glad you included the OctoQuad. It can be used (out of the box) to add encoders to a ControlHub in a outreach bot. There's even a tutorial for doing it here: https://github.com/DigitalChickenLabs/OctoQuadFtcDriver/tree/master/tutorials |
Beta Was this translation helpful? Give feedback.
-
I presume you're using the REV Control Hub or some other platform with an I2C interface to drive this stack? Do you have sample drivers for this? |
Beta Was this translation helpful? Give feedback.
A Brillant idea!
Our outreach robot (demobot) is always the first to suffer when we need spare parts.
Glad you included the OctoQuad. It can be used (out of the box) to add encoders to a ControlHub in a outreach bot.
This lets you keep your Motor and Odometry encoders connected.
There's even a tutorial for doing it here: https://github.com/DigitalChickenLabs/OctoQuadFtcDriver/tree/master/tutorials