2017-03-14

Quote:

Originally Posted by Alec


Quote:

Originally Posted by skatefriday


If you are referring to this...

https://www.adafruit.com/product/2348

...the problem is you can only drive toy motors as it's limited to 1.2A per port. Beefy H-Bridge modules that can handle the 7 to 10A FTC robots throw at them are significantly more costly, which is why you don't find them very often on hobby robots or projects.

Ok thanks. I think it is possible that Adafruit would be inclined to build a more powerful I2C motor controller board for FTC teams. In the meantime their existing I2C motor controller seems sufficient for a proof of concept of a Pi/I2C FTC control system.

There is also the option of connecting HiTechnic motor and servo controllers directly to the Pi via I2C. I've heard that HiTechnic's I2C is non-standard. If that's the case, a protocol converter may be needed.

Also, for CAN-Bus fans, there are couple of off the shelf CAN-Bus boards for the Pi (PiCAN2, CANPi). When I was looking around for a off the shelf motor controller that supports CAN-Bus, I found the RoboteQ SDC2130. The SDC2130 has USB, RS232, Analog, and CAN-Bus interfaces. Interestingly, the SDC2130 datasheet says:

"Use USB only for configuration, monitoring and troubleshooting. USB is not a reliable communication method when used in a electrically noisy environments and communication will not always recover after it is lost without unplugging and replugging the connector, or restarting the controller. Always prefer RS232 communication when interfacing to a computer."

The important thing to note is that a Pi/I2C/SPI/CAN-Bus FTC control system can be built with off the shelf components, and teams can gain valuable experience by engineering their own control system in addition to engineering their robots. Alternatively, teams can continue to waste valuable time attempting to make USB perform in a manner that it is not designed to perform. Allowing teams to engineer their own control systems brings much more value to students.

Digging into the RoboteQ SDC2130 motor controller datasheet a bit further, I found that you can connect the SDC2130 motor controller directly to the UART of the Raspberry Pi 3 (RPi3) via the TTL serial interface. The RoboteQ motor controllers would connect to each other via the CANBus interface. The RPi3 can connect to all of the RoboteQ motor controllers on the CANBus network via a single TTL serial connection to one of the RoboteQ motor controllers on the network. Thus, you don't need to buy a CANBus board in order to be able to connect the RPi3 to the RoboteQ CANBus network.

For the purpose of a RPi3 proof of concept, I would use a less expensive motor controller, specifically the RoboClaw 2x7A Motor Controller or the RoboClaw 2x15A Motor Controller, at $52.50 and $67.50 respectively (with the ServoCity FTC team discount).

The RoboClaw motor controllers have a USB interface and a TTL serial interface. According to the datasheet, "The motor controllers USB port should be used for configuration and debugging. The USB protocol is not designed for electrically noisy environments. The USB port will likely disconnect and not automatically recover during operation in electrically noisy environments. To recover from a dropped USB port, the motor controllers USB cable may require being unplugged and re-plugged in. The TTL serial control should be the preferred method of control in electrically noisy environments."

You can daisy chain the TTL serial interface on the RoboClaw motor controllers, thus you can control up to 8 RoboClaw motor controllers via a single TTL serial connection to the UART of the RPi3.

There are many servo controllers and many options for connecting a servo controller directly to a RPi3. For a proof of concept, I would use the Adafruit 16-Channel PWM / Servo HAT for Raspberry Pi at $17.50. The Adafruit servo controller HAT uses the RPi3's I2C interface. Note that unlike the MR servo controller, where you may need several servo controllers due to power limitations, you only ever need one Adafruit servo controller on a FTC bot provided you supply the Adafruit servo controller with enough current to power all the attached servos.

The RoboClaw motor controllers have a "a high efficiency switching regulator" that can supply 5VDC to other components. The RoboClaw 2x7A motor controller can supply up to 1.2 amps and the 2x15A motor controller can supply up to 3 amps. 1.2 amps is sufficient to power the RPi3.

Thus, for the purpose of a proof of concept, all you need is 2 RoboClaw motor controllers, 1 Adafruit servo controller HAT, and a RPi3. Teams will already have the rest of the components needed for a proof of concept. A 12V Tetrix battery can be connected to a Tetrix power switch, and directly power the 2 RoboClaw motor controllers. One of the motor controllers can serve as the 5VDC power supply for the RPi3, and the other motor controller can serve as the 5VDC servo power supply of the Adafruit servo controller HAT.

Connect the 2 RoboClaw motor controllers to the RPi3 in a TTL serial daisy chain. Connect 4 DC motors and encoders to the RoboClaw motor controllers. Connect your servos to the Adafruit servo controller HAT (attached directly to the RPi3). Finally connect a HDMI monitor and a USB mouse to the RPi3 and you are ready to install RTAndroid (Real-Time Android) on the RPi3.

With 2 RoboClaw motor controllers and the RPi3/Servo HAT combo you can control up to 4 DC motors and up to 16 servos with only three modules, and for less than $200. Compare that with the 6+ modules needed in the current control system and costing $500+ (1 Android phone, 1 PDM, 2 Motor Controllers, 2+ servos controllers, and 5+ USB cables for a total of 10+ points of failure).

Plus, check out the RoboClaw specs and all the nifty things you can do with the RoboClaw which you can't do with the MR motor controllers. For example, you can connect limit switches directly to the RoboClaw for zero latency limiting vs. the [potentially deadly] latency of a limit switch connected four nodes or interfaces away from the motor controller (DIM + USB + phone + USB). RoboClaw datasheets, manuals, software, utilities, and programming examples can be downloaded from http://www.ionmc.com/downloads.

And check out all the different ways that you can connect sensors to the RPi3, either directly or via HATs. You can even attach a Arduino compatible HAT and Arduino shields to the RPi3.

The programming involved to get your opmodes to control the RoboClaw motor controller and the Adafruit servo controller HAT should be fairly simple. First get the RPi3 working with the MR modules via the USB interface. Then get the RPi3 working with the RoboClaw motor controllers via the TTL serial interface, and the Adafruit servo controller HAT working via the I2C interface.

The research, wiring, and programming = marketable skills learned, and is a great summer exercise, and great experience for FTC students. Compare sensor options, sensor latencies, motor/servo response times, ESD/EMI resilience, space savings, cost savings, and overall capabilities and expansion options with the current control system.

Note: the single Tetrix battery configuration suggested above is for proof of concept purposes only. For a competition bot or a outreach bot you would want to have 2 batteries, one battery to supply DC motor and servo power (motion battery), and the other battery to supply power to the RPi3 and to the RoboClaw logic circuitry (logic battery). This is analogous to the 2 batteries on the current control system, i.e. the phone battery and the Tetrix battery.

Show more