epiphany diy users manual v2 - out of the box electronics...

23
Electronics and Robotics LLC www.ootbrobotics.com Epiphany DIY Users Manual v2.0 Last Updated January 25, 2013

Upload: others

Post on 12-Mar-2020

15 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Epiphany DIY Users Manual v2 - Out of the Box Electronics ...ootbrobotics.com/wp-content/uploads/2012/07/Epiphany-DIY-Users-Manual-v2-preliminary.pdfJTAG/PDI Programming The Epiphany

Electronics and Robotics LLC www.ootbrobotics.com

Epiphany DIY Users Manual v2.0

Last Updated January 25, 2013

Page 2: Epiphany DIY Users Manual v2 - Out of the Box Electronics ...ootbrobotics.com/wp-content/uploads/2012/07/Epiphany-DIY-Users-Manual-v2-preliminary.pdfJTAG/PDI Programming The Epiphany

Electronics and Robotics LLC www.ootbrobotics.com

Page 3: Epiphany DIY Users Manual v2 - Out of the Box Electronics ...ootbrobotics.com/wp-content/uploads/2012/07/Epiphany-DIY-Users-Manual-v2-preliminary.pdfJTAG/PDI Programming The Epiphany

Electronics and Robotics LLC www.ootbrobotics.com

WARNING READ BEFORE USE !!!

1) DO NOT OVERLOAD OR SHORT POWER RAILS. out of the Box is not responsible

for any damage to personal property through the use of the uTinkerer development platform.

Use at your own risk. ALWAYS check for power and ground connectivity on all power rails before

powering the Epiphany DIY robotics platform. Short circuits on any of the power rails can result in

irreversible damage to the Epiphany DIY as well as any device connected to it, this includes a

personal computer connected over USB. In addition to checking for short circuits the user should

also consult the electrical specifications portion of this manual before interfacing any device with the

Epiphany DIY robotics platform.

2) DO NOT BEND THE BOARD. The Epiphany DIY robotics platform should never be bent or

exposed to ANY bending force. The Epiphany DIY consists of a 6 layer PCB. Bending can cause

undue strain on the copper traces of the PCB. This strain can result in unpredictable behavior and or

failure of the device.

3) Do not touch the switching regulator @U?. This component generates the 3.3V power rail used my

many of the components. Touching the regulator U? can result in the 3.3V becoming unstable, which

may cause irreversible damage to the Epiphany DIY. Heat shrink insulation may be applied, to

isolate the regulator

Page 4: Epiphany DIY Users Manual v2 - Out of the Box Electronics ...ootbrobotics.com/wp-content/uploads/2012/07/Epiphany-DIY-Users-Manual-v2-preliminary.pdfJTAG/PDI Programming The Epiphany

Electronics and Robotics LLC www.ootbrobotics.com

Table of Contents WARNING READ BEFORE USE !!!...................................................................................................... 3

Use of This Document .............................................................................................................................. 6

Basic Features ........................................................................................................................................... 7

Analog ................................................................................................................................................... 8

Configuring the Epiphany for 5V Analog Signals ............................................................................ 8

Analog Input Voltage Level Selection .............................................................................................. 8

Character LCD Port .............................................................................................................................. 9

Table 1 LCD Pinout .................................................................................................................. 9

USB Serial Port ................................................................................................................................... 10

Programming Via the USB Bootloader .......................................................................................... 10

Figure 1 USB-Boot Jumper ..................................................................................................... 10

XBee Wireless Adapter ....................................................................................................................... 11

Add-On Package Features ....................................................................................................................... 12

DC Motor Packages ............................................................................................................................ 13

Built In Thermal and Current Protection ........................................................................................ 13

High and Standard Power Configurations....................................................................................... 13

Dual ................................................................................................................................................. 13

Quad ................................................................................................................................................ 13

Servo Packages ................................................................................................................................... 14

Servo Safe Timeout Function ......................................................................................................... 14

Servo Package ................................................................................................................................. 14

Servo + Package .............................................................................................................................. 14

Getting Started ........................................................................................................................................ 15

Basic Connections ............................................................................................................................... 16

Basic Power Connections.................................................................................................................... 17

Figure 2 Color Key ................................................................................................................. 17

Programming the Epiphany DIY ........................................................................................................ 18

Bootloader Programming ................................................................................................................ 18

JTAG/PDI Programming ................................................................................................................ 18

Appendix ................................................................................................................................................. 19

Glossary .............................................................................................................................................. 19

Page 5: Epiphany DIY Users Manual v2 - Out of the Box Electronics ...ootbrobotics.com/wp-content/uploads/2012/07/Epiphany-DIY-Users-Manual-v2-preliminary.pdfJTAG/PDI Programming The Epiphany

Electronics and Robotics LLC www.ootbrobotics.com

Electrical Specifications ...................................................................................................................... 21

Table 2 Basic Unit Electrical Specifications ........................................................................... 21

Table 3 Motor Driver Electrical Specifications ...................................................................... 21

Table 4 Servo Controller Electrical Specifications ................................................................. 22

Device List and Related Documentation............................................................................................. 23

Page 6: Epiphany DIY Users Manual v2 - Out of the Box Electronics ...ootbrobotics.com/wp-content/uploads/2012/07/Epiphany-DIY-Users-Manual-v2-preliminary.pdfJTAG/PDI Programming The Epiphany

Electronics and Robotics LLC www.ootbrobotics.com

Use of This Document

The Epiphany DIY robotics platform was designed with emphasis towards hobby and educational use. In

kind this document was crafted towards readers who may be unfamiliar with microprocessors,

microcontrollers etc. Many technical and obscure terms encountered in this document are defined in the

Glossary. Often as well links are provided to sources of greater detail.

Page 7: Epiphany DIY Users Manual v2 - Out of the Box Electronics ...ootbrobotics.com/wp-content/uploads/2012/07/Epiphany-DIY-Users-Manual-v2-preliminary.pdfJTAG/PDI Programming The Epiphany

Electronics and Robotics LLC www.ootbrobotics.com

Basic Features

Page 8: Epiphany DIY Users Manual v2 - Out of the Box Electronics ...ootbrobotics.com/wp-content/uploads/2012/07/Epiphany-DIY-Users-Manual-v2-preliminary.pdfJTAG/PDI Programming The Epiphany

Electronics and Robotics LLC www.ootbrobotics.com

Analog

The ATxmega128A1U and many other

microcontrollers of its generation have moved to

lower voltage inputs to their analog to digital

converters (ADCs). Speculating, this is likely due to

the desire for higher resolutions and conversion

speeds. Such specifications are more easily attained at

lower voltages. Regardless of reasoning for lower

voltage input levels, a disparity exists in that a

considerable amount of signals do not lie within the bounds of the

ATxmega128A1U’s default analog input level(s).

The Epiphany DIY, in an effort to reduce external circuitry size and complexity, has built in pre-amplifier

circuits for all port “A” pins. The pre-amplifier circuits essentially remap the range of the ADC from the

internally reference range of 0 - 2.0625V to a more flexible 0 – 5V. The pre-amplifier circuits are

designed to work with the internal ADC voltage reference (VREF) of VCC/1.6V (2.0625V when

VCC=3.3V).

Configuring the Epiphany for 5V Analog Signals

The analog front end of the Epiphany DIY in order to achieve 5V level inputs requires a 5V regulated

power input to the system. There are two methods for inputting a regulated 5V signal into the Epiphany.

1) Purchase the Servo + package, and take advantage of the included 5V regulator. This regulator

automatically will generate the 5V power signal required for 5V analog signal readings.

2) Apply a regulated 5V power rail to the Epiphany DIY directly to the 5V power, screw terminal

(Figure ?) .

Analog Input Voltage Level Selection

Though the Epiphany DIY’s 8 special analog inputs are scaled appropriately for 5V signal levels, the full

range of the signal is limited by the input level selection dictated by the solder jumper in Figure ?. If a

5V power rail exists, the user may short the center and 5V side of the jumper, therefore enabling 5V

analog inputs to be read into the Epiphany. Otherwise, the default configuration, 3.3V must be used.

This is achieved by shorting the center pad, and the pad on the side labeled 3.3V. The user should

NEVER short all three pads of the jumper together since this could result in irreparable damage to the

Epiphany DIY. A final note, failing to short the center pad of the jumper to either 5V or 3.3V will inhibit

analog inputs to all the pins on port A. An available voltage source must be selected.

Page 9: Epiphany DIY Users Manual v2 - Out of the Box Electronics ...ootbrobotics.com/wp-content/uploads/2012/07/Epiphany-DIY-Users-Manual-v2-preliminary.pdfJTAG/PDI Programming The Epiphany

Electronics and Robotics LLC www.ootbrobotics.com

Character LCD Port

The Epiphany DIY comes with a dedicated port for a

character LCD. The LCD port includes power inputs

as well as the LCD contrast, controlled by the

potentiometer displayed in figure ?. The LCD port at

the circuit level is simply made of Xmega i/o signal

lines duplicated from the GPIO header. The power of

the LCD header comes from the code base within the

Epiphany Software.

Table 1 LCD Pinout

Data 4 Enable

Data 5 Read/Write

Data 6 Register

Select Data 7 Contrast

+ 3.3 V + 3.3 V

GND GND

Page 10: Epiphany DIY Users Manual v2 - Out of the Box Electronics ...ootbrobotics.com/wp-content/uploads/2012/07/Epiphany-DIY-Users-Manual-v2-preliminary.pdfJTAG/PDI Programming The Epiphany

Electronics and Robotics LLC www.ootbrobotics.com

USB Serial Port

The Epiphany DIY comes standard with a USB Serial

Port (Figure ?). This feature serves many purposes

including but not limited to programming, debugging,

interface to PC based programs

Programming Via the USB Bootloader

The Epiphany DIY ships with a bootloader program allowing for hardware programmer free flashing of

the onboard processor. To elaborate, this means that the Epiphany Is programmed by uploading compiled

code over a simple USB connection. Ordinarily

programming would include the use of a hardware

programmer, which is a device dedicated to uploading

compiled code to processors such as the one on the

Epiphany DIY.

In order to disable/enable the bootloader functionality

of the Epiphany DIY the bootloader enable jumper

displayed in figure ?, must be configured correctly.

Figure 1 USB-Boot Jumper

To enable the bootloader on the Epiphany the jumper must be closed (soldered)

To disable the bootloader auto reset on the Epiphany the jumper must be opened (unsoldered)

Page 11: Epiphany DIY Users Manual v2 - Out of the Box Electronics ...ootbrobotics.com/wp-content/uploads/2012/07/Epiphany-DIY-Users-Manual-v2-preliminary.pdfJTAG/PDI Programming The Epiphany

Electronics and Robotics LLC www.ootbrobotics.com

XBee Wireless Adapter

The Epiphany DIY has an XBee radio socket located

on the underside of the board (figure ?). A XBee

radio is a wireless complement to the USB serial port.

The code interface for both modules is identical.

Page 12: Epiphany DIY Users Manual v2 - Out of the Box Electronics ...ootbrobotics.com/wp-content/uploads/2012/07/Epiphany-DIY-Users-Manual-v2-preliminary.pdfJTAG/PDI Programming The Epiphany

Electronics and Robotics LLC www.ootbrobotics.com

Add-On Package Features

Page 13: Epiphany DIY Users Manual v2 - Out of the Box Electronics ...ootbrobotics.com/wp-content/uploads/2012/07/Epiphany-DIY-Users-Manual-v2-preliminary.pdfJTAG/PDI Programming The Epiphany

Electronics and Robotics LLC www.ootbrobotics.com

DC Motor Packages

The Epiphany DIY robotics platform is so

deemed because of the capabilities to control,

and drive actuators in addition to the on board

processing, sensing etc. The Epiphany DIY

motor drivers are feature rich highly

configurable, and easy to use. The Epiphany

DIY software framework includes drivers to

control motors with only a few lines of code.

The drivers were even configured to drive at frequencies far above 20 kHz to eliminate audible switching

noise that could annoy the user.

Built In Thermal and Current Protection

The motor drivers selected for the Epiphany DIY are highly featuring rich. They not only drive motors

with a fair amount of current and voltage, the drivers are also very robust. The drivers (L6205s) have

over current and over heat safety. What this means is that in the event the motor diver(s) hit a peak

temperature or current beyond their intended use, they shut down automatically to prevent damaging

themselves.

High and Standard Power Configurations

The Epiphany motor drivers by default offer a current capability of ~3Amps continuously with peaks

upwards of ~6Amps (for further detail Motor Driver Electrical Specifications). However in applications

where more current is needed, the motor drivers are configurable to output double current, while still

making use of all the internal protections such as over heat and over current shutdowns. The only cost is

the number of motors drivable. The Epiphany DIY can support up to 2 motors with high power output or

up to 4 with standard power output.

Dual

The Epiphany Motor Driver Dual package includes all the circuitry in order to drive up to 2 DC motors

with standard power, or 1 DC motor with high power output.

Quad

The Motor Driver Quad package includes all the circuitry in order to drive up to 4 DC motors with

standard power, or up to 2 DC motor with high power output.

Page 14: Epiphany DIY Users Manual v2 - Out of the Box Electronics ...ootbrobotics.com/wp-content/uploads/2012/07/Epiphany-DIY-Users-Manual-v2-preliminary.pdfJTAG/PDI Programming The Epiphany

Electronics and Robotics LLC www.ootbrobotics.com

Servo Packages

The Epiphany DIY has the capability to control

and self power up to 24 hobby servos by using a

dedicated on board servo controller. All of the

major processing of the servo control is handled

by a supplementary processor, both eliminating

high i/o usage on the Xmega, as well as

processing time. The Servo interface only

utilizes 2 pins from the Xmega,

Servo Safe Timeout Function

The ATtiny processor responsible for servo control has a built in timeout function. If a control signal

message is not received every half second or less the ATtiny will display a communication error, while

also releasing servos (servos are unpowered and allowed to relax). The communication error is displayed

by a rapid and erratically blinking led seen in figure ?. The timeout function is designed specifically to

prevent damage to servos if a program hang in the Xmega occurs. Likewise when debugging the servo

interface it is easy to tell when communication errors exist, when the respective led begins to blink

erratically.

Servo Package

The Servo Package for the Epiphany DIY is a basic package, that only includes the capability to control

servos. Powering the servos requires a 5V input into the respective screw terminals seen in figure ?.

Servo + Package

The Servo Plus Package has all the capabilities of the Servo package with the addition of a 16A 5V

regulator that pulls its input power form the Epiphany’s main power input.

Page 15: Epiphany DIY Users Manual v2 - Out of the Box Electronics ...ootbrobotics.com/wp-content/uploads/2012/07/Epiphany-DIY-Users-Manual-v2-preliminary.pdfJTAG/PDI Programming The Epiphany

Electronics and Robotics LLC www.ootbrobotics.com

Getting Started

Page 16: Epiphany DIY Users Manual v2 - Out of the Box Electronics ...ootbrobotics.com/wp-content/uploads/2012/07/Epiphany-DIY-Users-Manual-v2-preliminary.pdfJTAG/PDI Programming The Epiphany

Electronics and Robotics LLC www.ootbrobotics.com

Basic Connections

Page 17: Epiphany DIY Users Manual v2 - Out of the Box Electronics ...ootbrobotics.com/wp-content/uploads/2012/07/Epiphany-DIY-Users-Manual-v2-preliminary.pdfJTAG/PDI Programming The Epiphany

Electronics and Robotics LLC www.ootbrobotics.com

Basic Power Connections

Figure 2 Color Key

Color Signal

Yellow Vin 8.4-14 V

Green Gnd

Red 5V

Purple ADC 3.3V/5V*

Page 18: Epiphany DIY Users Manual v2 - Out of the Box Electronics ...ootbrobotics.com/wp-content/uploads/2012/07/Epiphany-DIY-Users-Manual-v2-preliminary.pdfJTAG/PDI Programming The Epiphany

Electronics and Robotics LLC www.ootbrobotics.com

Programming the Epiphany DIY

Bootloader Programming

The Epiphany DIY comes preloaded with a bootloader for programming, removing the need for a

hardware programmer,. The bootloader utility program can be found here. This utility uses the Epiphany

USB connection to upload compiled code (hex file). The bootloader works at any baud rate though

115200 is recommended

JTAG/PDI Programming

The Epiphany DIY can be programmed and debugged using a hardware programmer via the PDI or JTAG

connections found on the board. Utilizing these protocols will require the use of Atmel Studio

Page 19: Epiphany DIY Users Manual v2 - Out of the Box Electronics ...ootbrobotics.com/wp-content/uploads/2012/07/Epiphany-DIY-Users-Manual-v2-preliminary.pdfJTAG/PDI Programming The Epiphany

Electronics and Robotics LLC www.ootbrobotics.com

Appendix

Glossary

ADC – Short for Analog to Digital Converter. An ADC in the most basic sense takes in an analog signal,

and outputs a number linearly interpolated from the resolution of the ADC and its respective VREF.

Atmel – Manufacturer of AVR microcontrollers such as the Xmega line that the uTinkerer is based upon.

DAC – Short for Digital to Analog Converter. A DAC is the complete opposite of and ADC. A number

is sent to the DAC, which then generates a voltage in accordance with the input resolution and voltage

range of the device.

Datasheet – Document that describes the functionality of a device. In electronics all circuit board

components even resistors have their own respective datasheet(s).

Debug – Or debugging in the context of this document, refers to the use of an interface tool such as the

AVR Dragon to peer into the inner workings of the microcontroller. This is done at a line per line basis in

the user’s code, or though running to a breakpoint placed by the user. Debugging the processor allows the

user to see register settings, memory location values etc. at any given instant. Debugging is nearly

identical to simulating, except that a simulator does not run on the application hardware. Simulators

depend on a software model of the processor architecture, and have no inherent knowledge of the

processor’s interaction with additional hardware. All peripheral interactions viewed in a simulator stem

from direct manipulation of the programmer. Real time hardware interaction versus user insertion is the

defining difference between debugging and simulation.

EBI – Short for External Bus Interface. This is a specific peripheral name unique to Atmel. The EBI

peripheral exposes the processor’s data and address buses. Through the exposure of the data and address

buses the microcontroller can be interfaced directly to external hardware.

IC = Short for integrated circuit.

MCU – Short for Micro Controller Unit

Microcontroller – a microprocessor that includes on-chip memory mapped peripherals.

PCB – Stands for Printed Circuit Board.

Peripheral – in the context of this document peripheral refers to an external or internal memory mapped

system or device.

Power rails – Positive and negative/neutral power signals for any given power voltage level.

Pre-Amplifier – An amplifier used to condition a signal prior to its desired application.

Page 20: Epiphany DIY Users Manual v2 - Out of the Box Electronics ...ootbrobotics.com/wp-content/uploads/2012/07/Epiphany-DIY-Users-Manual-v2-preliminary.pdfJTAG/PDI Programming The Epiphany

Electronics and Robotics LLC www.ootbrobotics.com

Secure Digital Card – Also referred to as an SD Card. A type of non volatile (retains configuration after

power is removed) mass storage memory device.

Short Circuit - A low resistance connection between two signals, generally power rail signals. Shorts

between power rail signals cause the power supply to output large currents. Shorts often result in

irreversible damage to electronic devices.

VCP – Stands for Virtual Serial Port. A VCP is a specific USB protocol device that functionally mimics

a hardware serial port device.

Video encoder – A video encoder takes in video component signals and encodes them to a signal video

signal. In the context of the uTinkerer, the video encoder takes in RGB color components, and then

outputs a single video signal of the NTSC standard.

VREF – Short for voltage reference. This is a widely used acronym, but in the context of this document

it specifically refers to the voltage referenced of an ADC. The reference is generally the highest level

signal an ADC can convert. By setting the ADC VREF you therefore set the acceptable input range of the

ADC.

XBee – A standard of wireless radio interface devices produced by Digi International.

Xmega – A microcontroller line developed my Atmel. The uTinkerer is based on the ATxmega128A1U.

Page 21: Epiphany DIY Users Manual v2 - Out of the Box Electronics ...ootbrobotics.com/wp-content/uploads/2012/07/Epiphany-DIY-Users-Manual-v2-preliminary.pdfJTAG/PDI Programming The Epiphany

Electronics and Robotics LLC www.ootbrobotics.com

Electrical Specifications

Table 2 Basic Unit Electrical Specifications

Item Minimum Typical Maximum Unit

Input Voltage* 8.4 12.0 14.0 V

PORT A inputs 0.0 5 V

Xmega input levels 0.0 3.3 3.6 V

i/o current -25 25 mA

3.3V Current Output 1500 mA

5V terminal input voltage** 5.0 5.5 V

Base current consumption** 30 mA

*If the Servo + regulator is not attached to the Epiphany DIY the minimum input is 7V and the maximum is 36V **Assumes that the Servo + regulator is not present on the Epiphany DIY.

Table 3 Motor Driver Electrical Specifications

Item Minimum Typical Maximum Unit

Low Power Motor Configuration

Peak current 5.6 A

Continuous Current 2.8 A

High Power Motor Configuration

Peak Current 11.2 A

Continuous Current 5.6 A

Input voltage 8 50 V

Page 22: Epiphany DIY Users Manual v2 - Out of the Box Electronics ...ootbrobotics.com/wp-content/uploads/2012/07/Epiphany-DIY-Users-Manual-v2-preliminary.pdfJTAG/PDI Programming The Epiphany

Electronics and Robotics LLC www.ootbrobotics.com

Table 4 Servo Controller Electrical Specifications

Item Minimum Typical Maximum Unit

Servo Input Power* 5.00 5.50 V

Servo Reg Power** 4.83 4.95 5.08 V

Servo Signals 3.30 V

Signal Precision 3 µS

Signal Accuracy 5 µS

Angle Accuracy* ~.5 º

*User supplied input voltage. Needed if the Epiphany DIY does not have a Servo + regulator. **The voltage output range of the Servo + regulator

Page 23: Epiphany DIY Users Manual v2 - Out of the Box Electronics ...ootbrobotics.com/wp-content/uploads/2012/07/Epiphany-DIY-Users-Manual-v2-preliminary.pdfJTAG/PDI Programming The Epiphany

Electronics and Robotics LLC www.ootbrobotics.com

Device List and Related Documentation