Revision: September 28, 2011
Note: This document applies to REV F of the board.
™ BBooaarrdd
l
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.
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.
Features include:
1300 Henley Court | Pullman, WA 99163
(509) 334 6306 Voice and Fax
• 256Kbit I2C EEPROM
• two push buttons and four LEDs
• ESD protection and short circuit
protection for all I/O pins.
• a dsPIC33FJ128MC706A
microcontroller
• four 24V/5A Half Bridge circuits with
current and voltage feedback and
provision for over-current 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
Doc: 502-185 page 1 of 21
Copyright Digilent, Inc. All rights reserved. Other product and company names mentioned may be trademarks of their respective owners.
Cerebot MC7 Reference Manual
Features of the dsPIC33FJ128MC706A
include:
• 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 12-bit at
500Ksps
For more information on the
dsPIC33FJ128MC706A microcontroller, refer
to the dsPIC33FJXXXMCX06A/X08A/X10A
Data Sheet and the dsPIC33 Family Reference
Manual available from the Microchip web site:
www.microchip.com.
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
www.digilentinc.com page 2 of 21
Copyright Digilent, Inc. All rights reserved. Other product and company names mentioned may be trademarks of their respective owners.
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.
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.
Programming and In-System
Debugging Using the Microchip
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 insystem debugging.
Cerebot MC7 Reference Manual
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.
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 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
www.digilentinc.com page 3 of 21
Copyright Digilent, Inc. All rights reserved. Other product and company names mentioned may be trademarks of their respective owners.
Cerebot MC7 Reference Manual
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
Pmods and I2C devices can be powered from
the USB connector. External loads such as
motors and hobby servos can not 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. 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
remaining current is available to provide power
to attached Pmods and I2C 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.
The Cerebot MC7 can provide power to any
peripheral modules attached to the Pmod
connectors, JA-JC, and to I2C devices powered
from the I2C 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 voltage
jumper block to the desired position. The I2C
power connectors only provide regulated
voltage, BRD3V3.
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
www.digilentinc.com page 4 of 21
Copyright Digilent, Inc. All rights reserved. Other product and company names mentioned may be trademarks of their respective owners.
Cerebot MC7 Reference Manual
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 V
of 30V, maximum VGS or 20V,
DS
and maximum drain current (ID) of 8A at 25°C,
6.4A at 70°C (t<10s) or 6.4A continuous drain
current at 25°C and 5.1A at 70°C. For more
detailed information on the NTMD4820N, refer
to the device data sheet available at the On
Semiconductor web site.
The steady state temperature of the FETs with
all four half bridges switching at 50% duty
cycle and a load current of 5A each has been
measured to be ~55°C. Operation in some
applications may require heat sinking or fan
cooling of the board to maintain continuous
operation at the full 5A output current.
The high side and low side drive inputs for
each half bridge are connected to PWMH and
PWML outputs from the Motor Control PWM
module in the dsPIC microcontroller. The
Motor Control PWM module is an advanced
pulse width modulation generator optimized for
motor control applications. This PWM unit
provides eight outputs arranged as four high
and low side drive pairs for controlling four half
bridge circuits.
The half bridges can be operated
independently, in pairs to form two h-bridges,
or in other combinations using the Motor
Control PWM module.
Connector J20 is used to provide the power
supply voltage for the high side of the half
bridges, and therefore powers whatever
external load is being controlled by the board.
This is a screw terminal connector on the left
side of the board. A power supply or battery of
5V-24V can be used, with a maximum
continuous current of 10A.
The half bridge connections between the
bridge output signals and the Motor Control
PWM module are configured in the following
way:
These outputs from the bridges are available
on connectors J14 & J15 or J16 & J18.
Connectors J14 & J15 are screw terminal
connectors for wire attachment. Connectors
J16 & J18 are 6-pin JST connectors used by
the gear head motors available from Digilent.
Connectors J14 & J16 provide the outputs
VMOT1 and VMOT2, while J15 & J18 provide
the outputs VMOT3 and VMOT4.
Current and Voltage Feedback
Each of the four half bridges is configured for
monitoring the current flow through the low
side transistor of the bridge. A voltage
proportional to the bridge current is applied to
one of the A/D inputs on the dsPIC
microcontroller for each half bridge.
A 10 milli-ohm (0.01 ohm), 1% current sense
resistor is connected between the source of
each low side FET and ground. A differential
amplifier with a fixed gain of 21 and an offset
voltage of 1.0V is used to buffer and amplify
the voltage across the current sense resistors
before being applied to the inputs to the A/D
converter. The following formula relates the
voltage applied to the A/D converter input to
the sensed bridge current:
V = (0.21 * I) + 1.0
Refer to Appendix C for tables showing data
measured from an example board.
In addition to the bridge current, the output
voltage of each half bridge can be monitored
as well. The output voltage of each half bridge
can be connected via a voltage divider to one
of the inputs to the A/D converter. The voltage
divider ratio is as follows:
Vo = 2.2/17.2 * Vi = 0.128 * Vi
www.digilentinc.com page 5 of 21
Copyright Digilent, Inc. All rights reserved. Other product and company names mentioned may be trademarks of their respective owners.
Cerebot MC7 Reference Manual
The voltage monitoring can be
enabled/disabled via jumpers JP9-JP12.
The current/voltage monitoring signals are
connected to the A/D converter inputs in the
following way:
IMON1 AN0
IMON2 AN1
IMON3 AN2
IMON4 AN3
VMON1 AN10
VMON2 AN11
VMON3 AN12
VMON4 AN13
Over-current Detection
The Cerebot MC7 provides an over-current
monitoring mechanism for detecting excessive
current flow through any of the half bridge
circuits.
Four comparators are used to monitor the
current measurement from each half bridge
compared to a fixed reference voltage. The
outputs of these comparators are OR’d
together and applied to external interrupt INT1
on the dsPIC microcontroller.
A fixed reference voltage of 2.33V is used to
set the comparator threshold for determining
an over current condition. This sets the
comparator to signal an over-current condition
at 6A. If the current through any half bridge
exceeds ~6A, an interrupt can be triggered on
INT1.
CAN Interface
The Controller Area Network (CAN) standard is
a control networking standard originally
developed for use in automobile systems, but
has since become a standard used in various
industrial control and building automation
networking applications as well.
The dsPIC33 microcontroller used on the
Cerebot MC7 contains a CAN network
controller. This CAN controller in combination
with a Microchip MCP2551 CAN transceiver
allow the Cerebot MC7 board to operate on a
CAN network. Refer to the
dsPIC33FJXXXMCX06A/X08A/X10A Data
Sheet and the dsPIC33F Family Reference
Manual, plus CAN network documentation for
information on operation of the CAN controllers
and CAN networking in general.
There is no standard connector for use with
CAN networks. The Cerebot MC7 board
provides a 2x6 pin header connector, J9, for
access to the CAN signals. Refer to the
schematic for the Cerebot MC7 board for
information on the connectors and signals.
Digilent 6-pin or 2x6 to dual 6-pin cables can
be used to daisy chain Digilent boards together
in a CAN network. A Digilent 6-Pin cable in
combination with a Digilent PmodCON1 Screw
Terminal Connector module can be used to
connect the Cerebot MC7 board to other
network wiring configurations.
The CAN network standard requires that the
network nodes at each end of a network
provide 120 ohm termination. The Cerebot
MC7 provides the termination resistor and
jumpers to enable/disable this resistor
depending on the location of the board in the
network. Jumper JP6 is used to enable/disable
the termination resistor. Install a shorting block
on the jumper pins to enable the termination
resistor, or remove the shorting block to
disable the termination resistor.
RC Servo Connectors
The Cerebot MC7 provides eight 3-pin RC
hobby servo connectors for direct control of
servos in robotics and embedded hardware
actuator applications. These connectors are
on the upper right side of the board.
The servo connectors S1-S8 are connected to
PORTD bits 0-7 in the dsPIC33F
microcontroller. These signals also appear on
Pmod connector JC, and PORTD bits 4-7 are
also used by the on-board LEDs. Devices
connected to Pmod connector JC may interfere
with operation of servos on the servo
www.digilentinc.com page 6 of 21
Copyright Digilent, Inc. All rights reserved. Other product and company names mentioned may be trademarks of their respective owners.
Cerebot MC7 Reference Manual
connectors, or alternatively, devices connected
to the servo connectors may interfere with
operation of a device connected to JC. Refer
to the dsPIC33F data sheet for information on
how to access the I/O pins.
The three pins on a servo connector provide
the control signal, power and ground. There is
no standard color coding for the wires on
hobby servos. They are wired so that the
center pin of the connector provides power to
the servo. Because of this configuration with
power on the center pin, the servo will not be
damaged if it plugged in backwards. Generally,
the center pin will have a red wire. On many
servos, the ground pin will have a black wire
and the signal wire will be a light color such as
white or yellow. Not all servo manufacturers
adhere to this convention however. The servo
connectors on the Cerebot MC7 board are
configured so that the signal pin (pin 1) is on
the left side (toward the center of the board)
and the ground pin is on the right side (toward
the board edge).
RC Servos use a pulse width modulated
signal, PWM, to control the servo position.
The dsPIC33F microcontroller provides eight
output compare units that can be used to
generate the necessary pulse width modulated
signal. PORTD bits 0-7 correspond to output
compare unit outputs OC1-OC8. The output
compare units can be operated from either
Timer 2 or Timer 3. It is also possible to use
timer interrupts to accomplish the generation of
the PWM outputs to drive the servo
connectors. Using timer interrupts allows a
single timer to be used to control the signal
timing for all eight servo connectors. This can
be useful if some timers need to be used for
other purposes.
The pulse width modulation timing varies
between servo manufacturers. Generally, a
pulse width of 1000us (1 milli-second)
corresponds to the center of rotation, with a
500us (0.5ms) pulse width being full rotation in
one direction and 1500us (1.5ms) being full
rotation in the other direction. Servo
manufacturers also vary on which direction of
rotation is produced by narrower and wider
pulses. Finally, some manufacturers produce
continuous rotation servos. These generally
require wider pulses. For these servos, a
1500us pulse width will result in the servo
stopped and no rotation, 500us will produce
rotation at full speed in one direction and
2500us full speed rotation in the other
direction. This varies widely between
manufacturers, however. Refer to
manufacturer data sheets for the servos, or
experiment to determine how specific servos
operate.
RC hobby servos generally operate at 5V.
Many are specified for operation at up to 6V,
and some specialty servos require higher
voltages. There are two power supply options
for providing power to the servo connectors:
The on-board 5V switching regulator, or an
external power supply
For the first case: Install shorting blocks on
JP5 and JP8 to connect the VS servo power
bus to the REG5V0 power bus. This
connection allows for operation from a single
high voltage power supply and allowing use of
the servos. There are two jumpers, as the
current rating on these jumper blocks is 2A,
and the eight servos can potentially draw up to
4A of current from the REG5V0 power bus.
For operation from an external servo power
supply, remove the shorting blocks from
jumpers JP5 and JP8 and connect the external
power supply to screw terminal connector J4.
An external power supply should not be
connected to J4 without removing the shorting
blocks from JP5 and JP8. Be sure to observe
the proper polarity when connecting the
external power supply.
I2C™ Interfaces
The Inter-Integrated Circuit (I2CTM) Interface
provides a medium speed (100K or 400K bps)
synchronous serial communications bus. The
I2C interface provides master and slave
operation using either 7 bit or 10 bit device
addressing. Each device is given a unique
address, and the protocol provides the ability
to address packets to a specific device or to
www.digilentinc.com page 7 of 21
Copyright Digilent, Inc. All rights reserved. Other product and company names mentioned may be trademarks of their respective owners.
Loading...
+ 15 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.