Draco
Contents
- 1 Introduction
- 2 Features
- 3 Interface
- 3.1 Microcontroller
- 3.2 Power Supply
- 3.3 Reverse Voltage Protection
- 3.4 On/Off Switch and Power LED
- 3.5 Reset Circuit with Pull-up Resistor
- 3.6 ISP Programmer Connector
- 3.7 16MHz External Crystal / Oscillator
- 3.8 16x2 LCD with Green Backlight
- 3.9 LCD Contrast adjust trim pot
- 3.10 ISP Isolation resistors
- 3.11 External Push buttons
- 3.12 Button Jumpers
- 3.13 RGB LED
- 3.14 RGB LED Jumpers
- 4 Ports & Pins
- 5 Extended Pins and Additional Features
- 6 Test Program
- 7 Application Ideas
- 8 Demonstration
- 9 Resources
- 10 Support
- 11 Get this
Introduction
Dracois an advanced development board designed for Atmel AVR 28 Pin MCU's. Development board measures 3.25" x 2.3" (82.55 x 58.42mm) with 6 pin ISP programmer pins and barrel jack stretched out.
Features
Draco Board Details
This board is designed to be helpful for a user with any level of expertise. If you are new to electronics, refer the manual, use the default settings and start programming. However, if you already know how to work with microcontrollers, then this board provides you with a host of tweaks and hacks to help you create complex projects.Salient features of this board are:
Product Features
Note: Default Selection : Draco Bare Board + Atmega328P Microcontroller + 16x2 LCD. If you choose a different microcontroller, features may vary!
- Atmega328 or Atmega328P Microcontroller onboard
- 2.1mm Power jack for external power source
- 2 pin polarized battery connector for external power source
- Regulated 5V power supply with reverse Voltage protection
- Reset Circuit with separate easily accessible Reset Button
- On/Off Switch to quickly cut off power to board
- Atmel Standard 6 Pin AVR ISP Programmer Connector
- 16MHz crystal for maximum frequency
- 16x2 LCD with Green Backlight - HD44780 controller
- LCD Contrast adjust trim pot
- Resistor based ISP isolation with LCD Pins for convenient programming
- 3 Push buttons for external Interrupts
- Interchangeable Button Pins through jumpers
- 1 User programmable RGB LED with LED voltage drop compensated resistors
- Interchangeable RGB LED Pins through jumpers
- 3 Pin expansion connectors across all IO pins for easy Sensor and Servo connection
- 3mm hole for attaching an external heat sink
- UART and SPI pins expansion to simplify connections to external peripherals
- 1 additional trim pot for Analog input, or as a voltage divider
- User controllable power supply across PORTD which can be either battery power or 5V. Easy for servos
- Diffused Green Power LED
- 3mm mounting holes for easy mounting.
- LC Filter between VCC and AVCC for clean ADC performance
- Separate AREF pin for external voltage input
- Wide range (7V - 16V) Input voltage tolerance
Microcontroller Compatibility
The onboard microcontroller is Atmega328 or Atmega328P. However, users can replace the default microcontroller with a 28 Pin AVR microcontroller of their choice. Below is the list of supported microcontrollers.
| AVR Microcontroller | Flash | EEPROM | SRAM | SPEED |
|---|---|---|---|---|
| ATMEGA8 | 8Kbytes | 512Bytes | 1Kbytes | 0-16MHz |
| ATMEGA8L | 8Kbytes | 512Bytes | 1Kbytes | 0-8MHz |
| ATMEGA8A | 8Kbytes | 512Bytes | 1Kbytes | 0-16MHz |
| ATMEGA48 | 4Kbytes | 256Bytes | 512Bytes | 0-20MHz |
| ATMEGA48V | 4Kbytes | 256Bytes | 512Bytes | 0-10MHz |
| ATMEGA48A | 4Kbytes | 256Bytes | 512Bytes | 0-20MHz |
| ATMEGA48PA | 4Kbytes | 256Bytes | 512Bytes | 0-20MHz |
| ATMEGA88 | 8Kbytes | 512Bytes | 1Kbytes | 0-20MHz |
| ATMEGA88V | 8Kbytes | 512Bytes | 1Kbytes | 0-10MHz |
| ATMEGA88A | 8Kbytes | 512Bytes | 1Kbytes | 0-20MHz |
| ATMEGA88PA | 8Kbytes | 512Bytes | 1Kbytes | 0-20MHz |
| ATMEGA168 | 16Kbytes | 512Bytes | 1Kbytes | 0-20MHz |
| ATMEGA168V | 16Kbytes | 512Bytes | 1Kbytes | 0-10MHz |
| ATMEGA168A | 16Kbytes | 512Bytes | 1Kbytes | 0-20MHz |
| ATMEGA168PA | 16Kbytes | 512Bytes | 1Kbytes | 0-20MHz |
| ATMEGA328 | 32Kbytes | 1Kbytes | 2Kbytes | 0-20MHz |
| ATMEGA328P | 32Kbytes | 1Kbytes | 2Kbytes | 0-20MHz |
Interface
Microcontroller
The brain of this board is Atmel's AVR microcontroller. There is a 28 pin Atmega328 pin onboard microcontroller plugged into a 28 pin socket. If you replace onboard microcontroller with other 28 pin AVR equivalents, please refer respective datasheets.
Some of the important features of this microcontroller are:
- 131 Powerful Instructions – Most Single Clock Cycle Execution
- 32 x 8 General Purpose Working Registers
- Fully Static Operation
- Up to 20 MIPS Throughput at 20MHz
- 32KBytes of In-System Self-Programmable Flash program memory
- 1KBytes EEPROM
- 2KBytes Internal SRAM
- Two 8-bit Timer/Counters with Separate Prescaler and Compare Mode
- One 16-bit Timer/Counter with Separate Prescaler, Compare Mode, and Capture Mode
- Real Time Counter with Separate Oscillator
- Six PWM Channels
- 8-channel 10-bit ADC in TQFP and QFN/MLF package
- 6-channel 10-bit ADC in PDIP Package
- Internal Temperature Sensor (to read CPU’s temperature)
- Programmable Serial USART
- Master/Slave SPI Serial Interface
- Byte-oriented 2-wire Serial Interface (Philips I2C compatible)
- Programmable Watchdog Timer with Separate On-chip Oscillator
- On-chip Analog Comparator
- Interrupt and Wake-up on Pin Change
- Six Sleep Modes: Idle, ADC Noise Reduction, Power-save, Power-down, Standby, and Extended Standby
- 23 Programmable I/O Lines
You can refer the datasheet for complete specifications and features of the microcontroller. Note that few pins are already utilized by the board and not available to the user. Crystal / Oscillator pins are not expanded. Reset pin has its own reset circuitry. If you are using LCD, 7 more pins are utilized for LCD. Read section Pins & Ports for detailed description of which pins are available and which pins are already utilized.
Power Supply
2.1mm Power jack and Polarized battery connector There are many different ways to power the board. Power Connectors available are:
- 2.1mm barrel jack connector to connect a AC-DC adapter
- Polarized connector for connecting a battery
- Two pin interface across the board to connect regulated 5V
Reverse Voltage Protection
The board has a rectifier diode used to protect the circuitry against reverse polarity.
On/Off Switch and Power LED
A six pin On/Off switch is used to quickly turn on and turn off power to the board. This is useful if external power source does not have a power switch.
Reset Circuit with Pull-up Resistor
Reset pin of the microcontroller is used to reset the circuit as a default configuration. A pull-up resistor holds the reset pin high in normal operation. When the reset button is pushed, it momentarily grounds the pin resetting the entire circuit. There are many ways through which the circuit can be reset. This dedicated button makes it easy to reset the board.
ISP Programmer Connector
ISP programmer connector is used to load firmware into the microcontroller. To achieve this, you need to connect an external programmer from the boards ISP pins to your computer. There are many programmers available and supporting software for each. This board is tested using USBASP programmer and AVRDUDE.
The board has a 6 pin (2x3) standard ISP connector. If a 10 pin (5x2) programmer is used, a separate adapter may be required.
16MHz External Crystal / Oscillator
A 16 MHz crystal is connected across XTAL1 and XTAL2 pins of the microcontroller. The default configuration of the board works at internal 1 MHz clock, but users can set the fuse bits to configure the board to use external crystal.
Note: Setting wrong fuse bits might brick your microcontroller temporarily, and you would need to send appropriate clock pulses to bring it back to normal operation. In case reset bit is accidently disabled, user would need a high voltage programmer to reset the device. Use extreme caution while setting fuse bits.
16x2 LCD with Green Backlight
Draco board has dedicated connector to connect a 16x1 or 16x2 Liquid Crystal Display (LCD). The pin can also be used to house a bigger LCD (20x4 or bigger), but access to few pins may be lost as LCD sits atop those pins.
LCD Contrast adjust trim pot
Dedicated contrast-adjust pot helps users to set the LCD contrast. The pot can be accessed only by removing the LCD. This is designed in such a way for few reasons:
- Adjusting LCD contrast is a one-time task and you may have to repeat it only if the display is replaced, or changed
- Placing it below the LCD panel saves precious space and access to other pins are easily provided.
- In case users decide to omit using the LCD, the available jumper can be removed and this pot can be used as a voltage reference point for analog input.
ISP Isolation resistors
The LCD pins are decoupled from ISP pins through resistors. Users do not have to remove the LCD to program the microcontroller.
External Push buttons
The board has 3 tactile switches attached to receive inputs from external world. The pins connected to these buttons are normally held high through a pull-up resistor and when user pushes the button, it momentarily grounds it.For connections, refer PORTS section which details which button is connected to which pin.
Button Jumpers
All three button provided on the board is connected to pins through jumpers. This is useful in the following two scenarios:
- If user decides not to use the button, the jumper can be pulled out and the pins can be used for normal Input-Output operation
- If user decides to use an external push button, the same can be plugged into the board by removing the jumper and plugging the external button connector to these pins
RGB LED
Another highlight of this board is the RGB led on board. Since the board is used on different projects, RGB led can be exploited for different requirements. For example, if this board is mounted on a robot, the LED can indicate different colors for different situations. A stop can turn it red, forward is green, backwards is blue, rotate left is Pink, rotate right is yellow etc. Users can generate numerous colors and the resistors values are calculated compensating the voltage drop across different colors. However, the users program should handle slight variations for accurate colors.
RGB LED Jumpers
All three pins connected to RGB LED are connected through jumpers. If user decides not to use RGB LED, or use only one or two pins for two colors, the jumper can be pulled out and the pins can be used for normal Input-Output operation
Ports & Pins
Ports on AVR microcontroller are bi-directional and have true Read-Modify-Write functionality when used as general digital I/O ports. This means that the direction of one port pin can be changed without unintentionally changing the direction of any other pin. Draco board further eases the operation of this board by extending most of IO pins together with power pins. This makes it easier to connect sensors, actuators, motor drivers, servos and other external components.
PB0-PB7
Port B is an 8-bit bi-directional I/O port with internal pull-up resistors selectable for each bit. These pins have alternate functions as shown below. Draco board doubles few of those pins as LCD control pins. If the user intends to not use LCD module, the pins are extended as PORTB pins (as shown in Image 3 above) and can be used as general IO pins. Three of the Six pins are further connected to AVR ISP programmer. Since the LCD pins are decoupled from ISP pins through resistors, users do not have to remove the LCD to program the microcontroller.
Alternate functions of PortB Pins:
| Port Pin | In-built alternate functions | Draco Board Alternate functions |
|---|---|---|
| PB7 | XTAL2 (Chip Clock Oscillator pin 2) | PB7 is connected to an external 16MHz Crystal |
| TOSC2 (Timer Oscillator pin 2) | Pins cannot be directly accessed | |
| PCINT7 (Pin Change Interrupt 7) | ||
| PB6 | XTAL1 (Chip Clock Oscillator pin 1 or External clock input) | PB6 is connected to an external 16MHz Crystal |
| TOSC1 (Timer Oscillator pin 1) | Pins cannot be directly accessed | |
| PCINT6 (Pin Change Interrupt 6) | ||
| PB5 | SCK (SPI Bus Master clock Input) | SCK - Connected to ISP programmer pins |
| PCINT5 (Pin Change Interrupt 5) | General purpose IO Pin with Extended power pins | |
| Doubles as LCD Data 7 control pin | ||
| PB4 | MISO (SPI Bus Master Input/Slave Output) | MISO - Connected to ISP programmer pins |
| PCINT4 (Pin Change Interrupt 4) | General purpose IO Pin with Extended power pins | |
| Doubles as LCD Data 6 control pin | ||
| PB3 | MOSI (SPI Bus Master Output/Slave Input) | MOSI - Connected to ISP programmer pins |
| OC2A (Timer/Counter2 Output Compare Match A Output) | General purpose IO Pin with Extended power pins | |
| PCINT3 (Pin Change Interrupt 3) | Doubles as LCD Data 5 control pin | |
| PB2 | SS (SPI Bus Master Slave select) | OC1B Timer/Counter1 channel |
| OC1B (Timer/Counter1 Output Compare Match B Output) | General purpose IO Pin with Extended power pins | |
| PCINT2 (Pin Change Interrupt 2) | General purpose IO Pin with Extended power pins | |
| PB1 | OC1A (Timer/Counter1 Output Compare Match A Output) | OC1A Timer/Counter1 channel |
| PCINT1 (Pin Change Interrupt 1) | General purpose IO Pin with Extended power pins | |
| PB0 | ICP1 (Timer/Counter1 Input Capture Input) | ICP1 / CLKO / PCINT0 |
| CLKO (Divided System Clock Output) | General purpose IO Pin with Extended power pins | |
| PCINT0 (Pin Change Interrupt 0) | Doubles as LCD Data 4 control pin |
PC0-PC6
Port C is a 7-bit bi-directional I/O port with internal pull-up resistors selectable for each bit. These pins have alternate functions as shown below. Draco board utilizes few of these pins as LCD control pins. If the user intends to not use LCD module, the pins are extended as PORTC pins (as shown in Image 3 above) and can be used as general IO pins. PortC pins are connected to ADC channels and are used for Analog to digital conversions. If the LCD is connected, users cannot use all the pins for ADC.
Alternate functions of PortC Pins:
| Port Pin | In-built alternate functions | Draco Board Alternate functions |
|---|---|---|
| PC6 | RESET (Reset pin) | Connected to External reset button with pull-up resistor |
| PCINT14 (Pin Change Interrupt 14) | Pin cannot be directly accessed | |
| PC5 | ADC5 (ADC Input Channel 5) | ADC5 (ADC Input Channel 5) - with extended Power pins |
| SCL (2-wire Serial Bus Clock Line) | SCL (2-wire Serial Bus Clock Line) with Power Pins | |
| PCINT13 (Pin Change Interrupt 13) | PCINT13 (Pin Change Interrupt 13) | |
| PC4 | ADC4 (ADC Input Channel 4) | ADC4 (ADC Input Channel 4) - with extended Power pins |
| SDA (2-wire Serial Bus Data Input/Output Line) | SDA (2-wire Serial Bus Data Input/Output Line) with Power Pins | |
| PCINT12 (Pin Change Interrupt 12) | PCINT12 (Pin Change Interrupt 12) | |
| PC3 | ADC3 (ADC Input Channel 3) | ADC3 (ADC Input Channel 3) - with extended Power pins |
| PCINT11 (Pin Change Interrupt 11) | PCINT11 (Pin Change Interrupt 11) | |
| PC2 | ADC2 (ADC Input Channel 2) | ADC2 (ADC Input Channel 2) - with extended Power pins |
| PCINT10 (Pin Change Interrupt 10) | PCINT10 (Pin Change Interrupt 10) | |
| Doubles as LCD RS pin | ||
| PC1 | ADC1 (ADC Input Channel 1) | ADC1 (ADC Input Channel 1) - with extended Power pins |
| PCINT9 (Pin Change Interrupt 9) | PCINT9 (Pin Change Interrupt 9) | |
| Doubles as LCD Read/Write pin * | ||
| PC0 | ADC0 (ADC Input Channel 0) | ADC0 (ADC Input Channel 0) - with extended Power pins |
| PCINT8 (Pin Change Interrupt 8) | PCINT8 (Pin Change Interrupt 8) | |
| Doubles as LCD Enable pin |
* For advanced users: A jumper connects LCD Read/Write pin to PC1 pin. In any case you need to save another pin from LCD usge, break this line by cutting a lead. Image 2 shows a jumper below the LCD connector which should be cut. Once done, another jumper next to top left capacitor can be connected by touching a drop of solder across. This connects LCD R/W pin to ground. This is useful if all you do is only write to LCD and do not read anything from it. Advanced users only and the technique can spare another ADC channel. Be careful and cut the jumper and solder at your own risk!!
PD0-PD7
Port D is an 8-bit bi-directional I/O port with internal pull-up resistors selectable for each bit. These pins have alternate functions as shown below. Draco board utilizes three of these pins for connecting external buttons for interrupts, and other three for controlling an on-board RGB LED. If the user intends to not use buttons, or RGB LED, respective jumpers can be removed and can be used as general IO pins.
| Port Pin | In-built alternate functions | Draco Board Alternate functions |
|---|---|---|
| PD7 | AIN1 (Analog Comparator Negative Input) | Connected to Button 3 through a Jumper |
| PCINT23 (Pin Change Interrupt 23) | General purpose IO Pin with Extended power pins | |
| PD6 | AIN0 (Analog Comparator Positive Input) | Connected to RGB LED through a Jumper |
| OC0A (Timer/Counter0 Output Compare Match A Output) | General purpose IO Pin with Extended power pins | |
| PCINT22 (Pin Change Interrupt 22) | Remove jumper to connect disconnect LED | |
| PD5 | T1 (Timer/Counter 1 External Counter Input) | Connected to RGB LED through a Jumper |
| OC0B (Timer/Counter0 Output Compare Match B Output) | General purpose IO Pin with Extended power pins | |
| PCINT21 (Pin Change Interrupt 21) | Remove jumper to connect disconnect LED | |
| PD4 | XCK (USART External Clock Input/Output) | Connected to Button 2 through a Jumper |
| T0 (Timer/Counter 0 External Counter Input) | General purpose IO Pin with Extended power pins | |
| PCINT20 (Pin Change Interrupt 20) | Remove jumper to connect external Interrupt | |
| PD3 | INT1 (External Interrupt 1 Input) | Connected to RGB LED through a Jumper |
| OC2B (Timer/Counter2 Output Compare Match B Output) | General purpose IO Pin with Extended power pins | |
| PCINT19 (Pin Change Interrupt 19) | Remove jumper to connect disconnect LED | |
| PD2 | INT0 (External Interrupt 0 Input) | Connected to Button 1 through a Jumper |
| PCINT18 (Pin Change Interrupt 18) | General purpose IO Pin with Extended power pins | |
| PD1 | TXD (USART Output Pin) | TXD pin pulled out for external connection |
| PCINT17 (Pin Change Interrupt 17) | General purpose IO Pin with Extended power pins | |
| PD0 | RXD (USART Input Pin) | TXD pin pulled out for external connection |
| PCINT16 (Pin Change Interrupt 16) | General purpose IO Pin with Extended power pins |
Extended Pins and Additional Features
UART and SPI Pins
TXD and RXD with a combination of VCC and Ground pins can be used for UART communication. Though users can utilize the three pin connector (Gnd, VCC, Signal) for this, four additional pins are specifically designed for connecting UART modules. However, note that these four pins can easily be accessed only when LCD module is removed. This connector is especially useful if any project does not use LCD, but data is sent to two different output locations (ex. Debugging data is displayed on a terminal and the same data is transmitted wireless to another module.
Separate AREF Pin
AREF is the analog reference pin for the A/D Converter. Reference Voltage for Analog-to-Digital Conversion can be Internal 1.1V, AVCC or AREF. AREF pin is decoupled with a capacitor for better noise performance and the pin is available for connecting external reference voltage.
AVCC Block and LC Filter
An inductor acting as an LC filter is connected right inside the microcontroller socket between AVCC and VCC. This acts as a filter for clean AVCC for ADC usage. In case user does not require this circuit, VCC and AVCC can be connected directly by soldering two tiny jumper points behind the board. We suggest to keep them as is.
Analog input trim pot
Draco AVR Development board has an additional trimmer pot. This can be used for ADC calculations, AREF input, or for any other requirements which require variable voltage. Trimmer pot voltage can be accessed through a separate pin (VR) available above the trimmer pot. Refer Image-3.
Mounting Holes
Yes!! Board has 4 mounting holes which can hold M3 screws. Another hole right below the 5V regulator is used to attach a heat sink from the bottom side of the board. Heat sink is necessary if your board draws too much current.
Two more tiny holes can be used to hold the LCD in place by using 2mm tiny screws. However, this may not be necessary as mounting holes can be used as LCD holders by using 1/2" spacers.
Test Program
/*!
* ********************************************************************************************************
* \file main.c
* \brief Draco board test program
*
* \author : Praveen Kumar
* \date : Mar 24, 2014
* Copyright(c) : Praveen Kumar - www.veerobot.com
* Description : Draco board test program to turn on and off different colors of RGB LED
*
* LICENSE : Redistribution and use in source and/or binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* - Redistributions of source code must retain this copyright notice, list of conditions and disclaimer.
* - Redistributions in binary form must reproduce this copyright notice, list of conditions and disclaimer in
* documentation and/or other materials provided with the distribution.
*
* DISCLAIMER : THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" WITHOUT ANY
* KIND OF WARRANTIES. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE
*
* ********************************************************************************************************
*/
#include <avr/io.h>
#include <util/delay.h>
#ifndef F_CPU
#define F_CPU 1000000UL // Set frequency
#endif
#define RED PD3 // Pin for Red
#define GREEN PD5 // Pin for Green
#define BLUE PD6 // Pin for Blue
#define LED_PORT PORTD // LED-Port
#define LED_DDR DDRD // DDR LED-Ports
int main(void)
{
int stay_delay = 1000;
while(1)
{
LED_DDR |= _BV(RED) | _BV(GREEN) | _BV(BLUE); // Set DDR as Output
LED_PORT |= _BV(RED) | _BV(GREEN) | _BV(BLUE); // Set Port as Output
LED_PORT &= ~_BV(RED); // Red On
_delay_ms(stay_delay);
LED_PORT |= _BV(RED); // Red Off
LED_PORT &= ~_BV(GREEN); // Green On
_delay_ms(stay_delay);
LED_PORT |= _BV(GREEN); // Green Off
LED_PORT &= ~_BV(BLUE); // Blue On
_delay_ms(stay_delay);
LED_PORT |= _BV(BLUE); // Blue Off
LED_PORT |= _BV(RED) |_BV(GREEN) | _BV(BLUE); // All LED OFF
}
}
Application Ideas
- Coming soon...
- Coming soon...
- Coming soon...
Demonstration
- Using Ultrasonic Sensor with Draco Board : This example shows how to use HC-SR04 ultrasonic module with Draco board. Making a sonar range sensor is as simple as connecting 4 wires and distance is displayed on the LCD.
- Coming soon...
- Coming soon...
Resources
Support
If you have any questions or queries related to this product, share it in the forum, or contact us
