Atmega16 development board – Hardware (part1)

 

 

This project, made many years ago, was designed to be a development board based on Atmega16, an 8 bit microcontroller from Atmel. The schematic includes the following modules: MCU, display, I2C, UART, IR, signal generator, RF card interface, keyboard and power supply. The RF card is not included, only the interface for it, based on SPI and UART communication. It is intended to be used with CC1000 RF chip from Texas Instruments.

 

A brief overview on the architecture:

 

Board architecture

 

 

MCU schematic

MCU part: includes the Atmega16 microcontroller + the Xtal (20MHz). There are 4 LEDs for general purpose - not used in my firmware. The Keyboard On/Off switch was intended to be a general On/Off switch but I left it unused as well. There is also the 5th LEDs (LED17) for reflecting the voltage presence on mcu side. The UART interface has 3 users: PC, MCU and RF card. From JP2 the developer can switch between: PC <-> MCU, PC <-> RF card or MCU <-> RF card. All other nets are named accordingly to match the other schematic parts.


 

Power supply schematic

Power supply: contains 3 regulators, for 3V, 5V and 12V. At the input there are 3 rectifiers, it’s enough to place one just for polarity protection. The LEDs (LED10, LED11 and LED12) signal the presence of voltage. For 3V3 I didn’t use a dedicated regulator, but a LM317 with proper resistor divider.





 

UART schematic

UART interface: is based on the typical MAX232 + 2LEDs for TX & RX signalling. One additional LED for voltage presence is also available (LED14).




 
 

 

Display schematic

Display: I used a graphic display from Nokia3310 phone model. It is serially driven by the SPI driver. It has the pinout naming for I2C but I found it matching with SPI interface better. The LCD is powered by 3V3, mcu by 5V so I added a buffer in between. There are some additional pins like: D/C = data/control , SCE = chip enable and RES = reset. I placed 4 LEDs which should be mounted on the bottom layer under the display, for the backlight. The display controller datasheet can be downloaded from here: PCD8544.

 

 

Keyboard schematic

Keyboard: I’m using here a keyboard based on AD levels. Each key, when pressed, enables a resistor divider so different voltage levels will come across the same line. There is also a LED placed here to signal whenever a key is pressed.




 

 

 

I2C schematic

I2C block: there is a 512KB memory in SMD footprint but also a DIP8 socket for reading/writing purpose. The firmware offers an interface over UART with the same commands. I added a 4-pin header for communication with external devices if wanted. In addition, 2 LEDs are available for reflecting which memory chip is currently selected.



 

 

IR schematic

IR interface: there are 2 parts: Rx and Tx. Rx is a TSOP1740, which is able to receive up to 40KHz signals. It integrates completely the bit wave and outputs directly the digital signal. Tx is represented by 2 IR LEDs in series for better output. I added another normal LED to flash whenever the Tx is active.



 



Signal generator schematic

Signal generator: there are 2 options: DA converter and frequency generator. First one is based on a PWM, second one is a normal frequency generator signal, (only rectangular). Both signals come on the same line, PWM1, which is connected to a signal mixer, CD4066. Depending on PWM chip select level (CS_PWM1), the original signal is gated on the 2 outputs:  PWM1_OUT or PWM1_OUT1. When the desired output is DA conversion, the PWM generated is active on PWM1_OUT which is  connected to the operational amplifier U5A. At the input there is a RC filter acting as an integrator. The output signal level is dependent on PWM duty cycle. As a remark, the output line of OP AMP is also connected to ADC input, channel zero. The frequency generator output (PWM1_OUT1) is coupled directly to JP6 connector.



RF CC1000 IF schematic

RF interface: this part was designed to interact with a RF card based on CC1000 transceiver from Texas Instruments. But neither the firmware for it, nor the card itself is not covered in this project. The C1000 has 2 main channels, a control one based on SPI interface and a data one which I chosen to be UART based. The schematic includes a buffer for 5V-3V conversion but also some transistor based gates, used for level conversion too. LOCK_RF signal, represented also by LED7, is coming from CC1000 when PLL is stable and locked. RSSI level coming also from RF chip is available and connected to one of MCU AD inputs. I added a GPIO line as a spare line between MCU and RF chip.





The PCB layout has 2 layers and even so, there are still 2 signals not linked which have to be manually done: RSSI and GPIO_RF from MCU to RF interface. The matching between layers should be done using the corner pads seen in the layout. Initially, the 2 layers printed should be matched perfectly, placed on the PCB board and drilled. In this way, distances between holes will be the same for both layers. Then, using thin nails the printed layers are secured on top and bottom of the board. Here below a snapshot with PCB board and one with assembled boards (2 pieces):

Boards assembled (2)

PCB board

 

 

 

 

 

 

 

 

 

 

 

 

The layers + components layout can be downloaded from here:

Firmware functionality is described in the 2nd part of this project: Atmega development board – (II). With no other hardware modification the Atmega 16 mcu can be replaced with other AVR microcontroller, e.g Atmega32, for more memory space, although this embedded firmware will not work properly.

 

For any question please use “Contact form”.