1300 Henley Court
Pullman, WA 99163
509.334.6306
www.digilentinc.com
Cerebot MC7™ Board Reference Manual
Revised October 23, 2012
This manual applies to the Cerebot MC7 rev. F
Overview
The Cerebot MC7 board is microcontroller development board based on a Microchip® dsPIC 16-bit Digital Signal
Controller.
The Cerebot MC7 is primarily intended to be used as a controller for electro-mechanical devices such as DC
motors. The microcontroller used, a dsPIC33FJ128MC706A, is a member of a dsPIC family optimized for motor
control applications.
Features include:
•
•
•
•
•
•
•
•
•
•
•
•
The Cerebot MC7 board.
A dsPIC33FJ128MC706A microcontroller
Four 24V/5A Half Bridge circuits with current
and voltage feedback and provision for overcurrent interrupt
Power supply voltage up to 24V
5V/4A switching power supply
Integrated programming/debugging circuit
One CAN network interface
Three Pmod connectors for Digilent
peripheral module boards
Eight RC servo connectors
two I2C daisy chain connectors
256Kbit I2C EEPROM
Two push buttons and four LEDs
ESD protection and short circuit protection for
all I/O pins.
The Cerebot MC7 provides four Half-Bridge circuits that are rated for 24V at up to 5A. Each of these Half Bridge
circuits is connected to the dsPIC A/D converter to measure voltage and current for closed loop feedback control.
These half bridges can be used to control two brushed DC motors, two bi-polar stepper motors, one brushless DC
motor, one uni-polar stepper motor. In addition, the board can be used to implement controllers for switched DCDC converters.
®
The Cerebot MC7 works with the Microchip MPLAB development environment and provides built in programming
and debugging support within the MPLAB IDE.
DOC#: 502-185
Copyright Digilent, Inc. All rights reserved.
Other product and company names mentioned may be trademarks of their respective owners.
Page 1 of 22
Cerebot MC7™ Board Reference Manual
Features of the dsPIC33FJ128MC706A
include:
•
•
•
•
•
•
•
•
•
•
•
•
•
•
Cerebot MC7 circuit diagram.
128KB internal program flash
memory
16KB internal SRAM memory
two 40-bit accumulators for DSP
MAC operation
eight channel hardware DMA
Advanced 8-channel motor control
PWM unit
enhanced CAN controller
eight 16-bit timer/counters
eight output compare/PWM units
eight input capture units
two UART serial interfaces
two serial peripheral interfaces (SPI)
two I2C serial interfaces
sixteen 10-bit analog inputs
two analog to digital converters
capable of 10-bit at 1.1Msps or 12bit at 500Ksps
For more information on the dsPIC33FJXXXMCX06A/X08A/X10A data sheet and the dsPIC33 family reference
manual available from the Micrchip website, www.microchip.com.
1
Functional Description
The Cerebot MC7 is designed for use in embedded motor control applications as well as general microprocessor
experimentation. Firmware suitable for many applications can be downloaded to the Cerebot MC7’s
programmable dsPIC33 microcontroller using the on-board programmer/debugger circuit.
Refer to the Cerebot MC7 schematic diagram available from the Digilent web site (www.digilentinc.com) for
detailed information about the arrangement of the various circuit features on the board.
The board provides four independent half bridge circuits capable of up to 5A continuous current. These half
bridges are connected to the Motor Control PWM Module in the dsPIC microcontroller and can be used
individually or in various combinations to drive various external loads, such as brushed DC motors, brushless DC
motors, stepper motors, and so on.
A switching 5V, 4A regulator with input voltage up to 24V is provided on the board to simplify operation of the
board from a single power supply in embedded application, such as robots.
The board has a variety of input/output connection options, and is specially designed to work with the Digilent line
of Pmod peripheral modules with various input and output functions. For more information, see
www.digilentinc.com. In addition to the Pmod connectors, the board provides two push buttons and four LEDs for
user i/o, as well as providing connections for two I2C busses. A serial EEPROM is provided on one of the I2C
busses.
Copyright Digilent, Inc. All rights reserved.
Other product and company names mentioned may be trademarks of their respective owners.
Page 2 of 22
Cerebot MC7™ Board Reference Manual
The Cerebot MC7 can be used with the Microchip MPLAB development environment. In-system-programming and
debugging of firmware running on the dsPIC33 microcontroller is supported using an on-board program/debug
circuit licensed from Microchip.
The Cerebot MC7 features a flexible power supply system with a number of options for powering the board as well
as powering peripheral devices connected to the board. It can be USB powered via the debug USB port, or it can
be powered from an external power supply or batteries.
2
Programming and Debugging Using MPLAB IDE
®
The Cerebot MC7 board is intended to be used with the Microchip MPLAB IDE and the Microchip C30 C compiler
for dsPIC for firmware development, programming and in-system debugging.
In system programming and debuggin is accomplished using a programmer/debugger circuit licensed from
Microchip. Either MPLAB version 8.63 or later or MPLAB-X is required for its operation. The licensed debugger is
accessed via USB, using connector J13. This connector is a micro-USB connector on the upper left corner of the
board. The provided USB cable should be connected from J13 to a USB port on the development PC for access to
the board.
When creating a new project, use the Configure.Select Device menu to specify the dsPIC device in use. Ensure that
the device is set to dsPIC33FJ128MC706A.
To use the on-board programming/debugging circuit it must be selected as the debugger or programmer. Use the
Debugger.Select Tool menu, or the Programmer.Select Tool menu, and select “Licensed Debugger” as the
programmer or debugger.
The dsPIC microcontroller used on the Cerebot MC7 uses a two wire interface for in-system programming and
debugging. There are three alternative pairs of pins that can be used for this purpose. The Cerebot MC7 is
designed to use signal pair 1, PGEC1/PGED1, for the connection to the licensed debug circuit. This selection is
controlled by configuration bits programmed when a firmware image is programmed into the board. This is
selected using configuration macros provided with the Microchip C30 compiler. A statement similar to this should
appear in the main program module of the project:
/* Use PGC1/PGD1 for programming and debugging
*/
_FICD(ICS_PGD1 & JTAGEN_OFF);
Refer to the dsPIC device data sheet, the appropriate section of the dsPIC33F Family Reference Manual and the
C30 compiler documentation for more information.
3
Board Power Supply
Switch SW1, in the lower left corner of the board is the power switch. Place this switch in the ON position to turn
on board power and in the OFF position to turn off board power.
The Cerebot MC7 board has three power supplies. One power supply is used to regulate power for the main
circuitry on the Cerebot MC7 board. This supply provides power to the 5V peripherals on the board, such as the
Copyright Digilent, Inc. All rights reserved.
Other product and company names mentioned may be trademarks of their respective owners.
Page 3 of 22
Cerebot MC7™ Board Reference Manual
CAN transceiver and provides the regulated 3.3V to power the microcontroller and most of the peripherals on the
board. This supply requires a regulated 5V input.
A second power supply is used to provide an independent supply for the licensed debugger circuit. This provides
power to the debug circuit as soon as the power switch is turned on. This power supply uses a Microchip MCP1801
low dropout regulator.
The USB specification requires that USB devices not draw more than 100mA of current until they have enumerated
on the USB bus and requested more current from the host. To meet this specification, the debug circuit turns on
main board power by driving the PWR_ON signal high after successfully enumerating on the USB bus. The bus
labeled on the schematic as BRD5V0 is switched on when this occurs. The BRD5V0 bus powers the input to the
primary voltage regulator, the power supply voltage for the CAN transceiver, and the 5V0 side of the power select
jumpers for the Pmod connectors.
The third power supply is a 5V switching voltage regulator that can produce 5V at 4A from an external source
between 5V and 24V. This power supply can be used to supply the regulated 5V input to the main board power
supply, and also can provide 5V power to power hobby servos connected to the servo connectors. This switching
regulator allows single supply operation of the Cerebot MC7 board from an external power supply or battery at up
to 24V DC.
There are two power options for main power to the board: from an external power source via the on-board 5V
switching regulator or USB powered from the debug USB connector, J13. To power the board from an external
power supply, place a shorting block on JP14 (labeled REG).To select USB power from the USB debug connector,
place a shorting block on JP15 (labeled USB). Note that the dsPIC and other circuitry on the board, plus connected
2
Pmods and I C devices can be powered from the USB connector. External loads such as motors and hobby servos
cannot be powered from the USB connector.
NOTE: A shorting block should be installed on either JP14 or JP15, but never both at the same time. If shorting
blocks are installed on both at the same time, 5V from the on-board switching regulator could back-feed to the
USB port, potentially damaging the USB port of the PC or USB hub.
When powering the board from an external power supply, there are three power supply connectors that can be
used: J21, J22 and J24.
Connector J21 is a screw terminal connector providing an alternative power supply connection for use with battery
packs, bench supplies or other power sources where use of a hard wired power supply is desirable.
Connector J22 is a two pin header connector that can be used with some battery packs or other wired connections.
This connector is rated for a maximum input current of 2A.
The barrel connector, J24, is used to power the board from a “wall wart” style power supply. This type of power
supply is available from many sources. Digilent has an optional power supply available, the 5V Switching Power
Supply, that can be used with connector J17. Connector J17 is a 2.5mm x 5.5mm coaxial connector wired with the
center terminal as the positive voltage.
Connectors J21, J22, and J24 are wired in parallel and connect directly to the input of the switching 5V regulator.
NOTE: The dropout of the switching 5V regulator is approximately 100mV when operated from a 5V input. This
allows operation of the board from an external 5V supply.
The dsPIC microcontroller and on-board I/O devices operate at a supply voltage of 3.3V provided by the BRD3V3
bus. The regulated voltage on this bus is provided by a Microchip MCP1725 Low Dropout voltage regulator, IC22.
Copyright Digilent, Inc. All rights reserved.
Other product and company names mentioned may be trademarks of their respective owners.
Page 4 of 22
Cerebot MC7™ Board Reference Manual
This regulator is capable of providing a maximum of 500mA of current. The DSPIC33 microcontroller will use
approximately 90mA when running at 40 MIPS. The other circuitry on the board will draw 10-20 mA. The
2
remaining current is available to provide power to attached Pmods and I C devices. The voltage regulator is on the
bottom of the board, below Pmod connector JA, and will get warm when the amount of current being used is close
to its limit.
2
The Cerebot MC7 can provide power to any peripheral modules attached to the Pmod connectors, JA-JC, and to I C
2
devices powered from the I C daisy chain connectors, J6 and J8. Each Pmod connector provides power pins that
can be powered from either the switched main power bus, BRD5V0, or regulated voltage, BRD3V3, by setting the
2
voltage jumper block to the desired position. The I C power connectors only provide regulated voltage, BRD3V3.
4
Half-Bridge Circuits
The Cerebot MC7 circuit provides four half bridges. A half bridge is made up of two stacked transistors such that
the high side transistor can source current from the motor power supply and the low side transistor can sink
current to the supply ground.
Each half bridge is made up of an On Semiconductor NTMD4820N dual N-FET to provide the transistors and a
Microchip MCP14700MF FET driver. The FET driver provides a high side transistor drive input and a low side
transistor drive input.
The NTMD4820N FETs are rated for a maximum VDS of 30V, maximum VGS or 20V, and maximum drain current (ID)
of 8A at 25°C, 6.4A at 70°C (t