AVRProject Mega PCB
The Mega PCB is designed for the Atmel AT90S8535, Mega-16, and Mega-32 pinout microprocessors. These AVR Processors have Analog to Digital (ADC) ports, larger memories, and many other embedded functions such as serial ports, timer/capture/counters, analog comparators, interface/network methods, and EEPROM internal storage. The major effort in this Protoboard is to clean up the accuracy and noise on the ADCs.

This PCB facilitates those functions by providing:

Theory / Block Diagram
Power Supply configuration:

This power supply provides two features that reduce the noise that adversely effects the ADC converters. First, the Analog and Digital grounds are separated. The AVR Processor provides about 2 ohms of resistance between the two grounds. However, the uProc may be damaged if excessive voltage is applied across the two grounds. For this purpose. Shottky diodes D1 and D2 prevent more than .6V from happening between the grounds. Second noise reduction feature is U5 and U3 are identical 5V regulators capable of providing 100mA suitable for most CMOS based circuits. This keeps noise from digital operation from feeding back to the analog area. If more power is required, additional regulators may be placed in the prototype areas. D3 protects against incorrect polarity voltage being applied (battery installed backwards?). J11 is the 'Unregulated' DC supply input. It can be from batteries, 'wall wart' power pack, or bench supply. AC input is not recommended without additional filtering capacitors between D3 Cathode to DGND.
Analog to Digital Converter Interface:

Selection of resistor values and jumper settings allow the designer to choose the input voltage range and polarity for the desired ADC response. R4 is the Series resistor header (16 pin socket) and R1 is the Dropping (shunt) resistor header. The selection at J1 pins 1-2 sets the bias of ADC4-ADC7 to 5V for monitoring negative or bipolar voltages. Selecting J1 pins 2-3 sets the bias at GND for monitoring positive voltages. If monitoring power supplies or low impedance voltages, it's better to use lower resistance values (in the K ohms range) at R1 and R4 to cut down on RFI induced noise. Higher impedance signals like audio or instrument monitoring often has less drive capability. Using resistors above 22K ohm may start resulting in more jittering in the readings. Readings will get worse above 1Meg ohm. J7 pin 2 would connect to an external reference voltage, otherwise, the two pins at J7 are wired together to set the reference at 5V. J3 provides the 8 Analog inputs, with Analog 5V and Analog GND. The smaller prototype area is intended for analog circuits. There are two busses at the ends of the analog area that are uncommitted.
Conversion of reading to Display Voltage is as follows:
ADC ports A0-A3 and A4-A7 (jumper J1=2-3) Positive value only
Voltage = (reading/1024) * 5 * [(R1+R4)/R1]
ADC Ports A4-A7 (jumper J1=1-2) Bipolar Voltage value gives + or - result
Voltage = [(1023-reading)/1024] * (-5) * [(R1+R4)/R1] + 5
Choose resistor values that will not exceed their wattage value at max voltage. Choose resistor values that will not place excessive load on analog power supply if jumper J1 is in the 1-2 position.
LCD Interface:

The LCD Interface is designed for an HD44780 compatible LCD Display (character only) using the 4 bit mode of operation. The LCD Interface pins are also shared with the ISP Interface allowing more remaining pins for the designer.
R3 provides LED Backlight current for the display. EL backlight is not supported, but a circuit can be added (beyond the scope of these instructions - check LCD Manufacturer). WARNING: Make sure the current through R3 does not exceed the current rating of the backlight. LED Backlight voltages are usually 5V and the current is usually around 100mA nominal. With 15V unregulated in, the voltage drop across R3 is 10V resulting in 100mA for a 100 ohm resistor. Check with the manufacturer's specifications; some displays specify 80mA at 3.3V maximum rating (100 ohms would destroy the backlight). R3 will get hot, so be careful.
R2 potentiometer provides LCD Contrast. The PCB has a very thin trace between pin 3 and GND to allow the trace to be cut and a jumper added to -10V on the PCB from the RS232 converter (VN on schematic). This allows the infrequent display type requiring a negative bias input for contrast.
The design allows either in-line display connection or Ribbon cable types using an IDC type connector. An in-line display can be soldered directly to the PCB with right angle SIP pins for a front-panel type application. For applications with tougher environments as in an automobile, ribbon cables make more sense.
Suitable displays can be found on Ebay by searching for text 'HD44780'. Custom displays are found at
http://www.eio.com/lcdprodt.htm and http://www.allelectronics.com/cgi-bin/category.cgi?item=LCD-82
RS232 and ISP Programming Port:

These two connections provide the two simple communication methods to the host computer. The ISP (In System Programming) interface attaches to the PC/Laptop parallel printer port. The RS232 interface attaches to the PC/Laptop serial COM port (or some other RS232 device). Under most circumstances, both cables may be left connected between the PC and the AVRProject until a program is completely debugged.
The ISP interface reuses the same pins as the LCD Interface. The LCD display may 'go nuts' during programming, but will not be damaged. J6 is the standard connector for the BASCOM-AVR Sample programmer (set up in compiler options-programmer menu to use the Sample Programmer with the parallel port). Other ISP Programmer dongles use a different pinout and many require 5V from the AVRProject. J5 was added in line with J6 to add 5V and SS (Single Step debug) signals to form a larger programming connector for these dongles needing +5V. Consult the manufacturer to find the needed pinout of the dongle. The corresponding programming signal names are stamped on the AVRProject Mega PCB.
A MAX232 chip does the RS232 conversion. It connects to the embedded serial port in the AVR, converts to RS232 signals, and connects to a 5 pin SIP header that matches the top row of pins leading to a PC's COM port (pins 1-5). See below for construction details for cable assembly:
Also supplied from the MAX232 converter is +10V and - 10V at a limited current. These pins can power additional MAX232 converters (without the need for capacitors) or other circuits like the LCD contrast as mentioned in the LCD section. The extra RS232 pins are clearly labeled. Pins 1 and 4 of RS232 connector J10 have extra pads as well. These could be used for additional hardware data handshaking (i.e. RTS/CTS).

Crystal Oscillator and Reset Circuit:

C1 and C2 are loading capacitors. If critical timing accuracy is required, an adjustable capacitor may be substituted for C2 (Input side). In timing applications, there has never been more a couple seconds a day drift seen from quality components, though. For the AT90S8535-8, the maximum crystal frequency is 8Mhz. Check with your Atmel AVR Specification sheet for the processor you are using to find the accepted range of crystal frequencies.
The use of a Reset controller like the DS1233 is the only way to guarantee the integrity of the internal EEPROM on the AVR processor. Without this 3 pin reset chip, havoc can be wrought from a brown-out or repeated power on/off. The Atmel manual, in a subtle manner, recommends not using the internal EEPROM data storage for this reason. I didn't accept that excuse when I designed this PCB. If you plan on using the AVR Internal EEPROM, make sure you have a DS1233 chip in U2.
Warning: The SilkScreen for U2 on the PCB is BACKWARDS.
This 'EEPROM reset' problem does not corrupt the program Flash memory. If you don't plan on using the data EEPROM, U2 would help in only a few occurrences.
Assembly Tips:


clean iron tip on sponge,
tin soldering iron tip with solder,
heat up pad and component lead (usually about 1 second
flow solder into joint. Use enough solder to fill the gap around the lead.
heat up next pad,
flow solder into next joint, -- Repeat
- clean and re-tin soldering iron about every 10 solder joints.
The leads will need bend as shown to dissipate heat away from the PCB. This component will get hot, so keep it away from wires and other components.

IDE-10 DB25P
a) Without the AVR Processor installed, power the unit on and verify proper power at the processor socket. There should be +5V with the positive probe on socket pin 10 and negative probe to pin 11. Check again with positive probe to pin 30 and negative probe to 31 for the +5V Analog. Troubleshoot as required. Without the AVR Processor installed, there is no resistance between the two grounds. The Diodes D1 and D2 will give .4V difference in ground voltages. Troubleshoot as required.
b) If the voltages are correct, plug in the processor (note orientation of part) and it is ready.
Robert J Reeder
