Friday, November 6, 2015

DIY Homemade ARM Board Running Linux with LCD ,Part 2 : Schematic and PCB Design

            this is second part in the series of making a ARM linux Board at home, in last part we have decided what we need and why. now we are going to build schematic for our board. as we are using Allwinner A13 CPU , we need it's datasheet and other reference manuals.although there is only a limited amount of data available direct from manufacturer,but there is pleanty of data there from other source , sunxi website is good place to start. all the reference docs i have used are available in my github

I have found this datasheet for our CPU.As A13 is quite common processor in cheap Chinese tablets, and olimex also has few boards with same CPU. there is tons of reference material available online.


when you are making your own board the place to start is processor's datasheet          , there you need to look at few key points, pinout, package, power rails , clock , configuration gpio(if there),external memory interfaces RAM and ROM. It is descent size CPU , it has 16 bit DDR2/DDR3 interface ,there are going to many connections. to get minimum system schematic the good point to start is the reference schematic provided by the manufacturer it self ,as we know allwinner does not have much direct support. but i have found few offical looking schematic from the allwinner itself , you can download them here,as all olimex board are open source schematic and PCB design file are available to download from there github repo

the CPU
          there is lots of data available through various source,available data is more then what we need. click here to goto my github repo to view all the document available with me.
the processor is though Chinese but has some decent hardware , specification are given blow
Allwinner A13
ARM Cortex-A8 @ 1Ghz
NEON, VFPv3
DDR2, DDR3 (max 512MB @ DDR800)
Mali 400 MP1 GPU
LCD,Mic, Headphone
Storage    NAND (max 2 * 32GB), SD Card 3.0
USB    2 (1 HOST, 1 OTG)
eLQFP176 package

CPU peripherals
One USB 2.0 OTG controller for general application and one USB EHCI/OHCI controller for host application
Three high-speed memory controllers supporting SD version 3.0 and eMMC version 4.3
One UART with only TX/RX and one UART with RTS/CTS
Three SPI controllers
Three Two-Wire Interfaces
IR controller supporting CIR remoter
6-bit LRADC for line control
Internal 4-wire touch panel controller with pressure sensor and 2-point touch
Internal 24-bit Audio Codec for 2-Ch headphone and 1-Ch microphone
PWM controller


what we need get minimum system

1. Power
2. CPU
3. clock
4. RAM
5. ROM, (SD card or flash)

1. Power , all highspeed CPU need many power rails , our  CPU need
     ~1.2V for CPU ,
     1.2V for internal logic,
     3.3V for I/O logic,
     3.0V analog Supply ,
     1.5V for DDR ram.

there are many ways to manage the power , one way it to have simple switching regulator for every different voltage rail you need. 

another way is to use dedicated power management IC, which will have many switching and linear regulator built in to just one singal IC. it is possible to  configure this chip by the host processor for various parameters , like regulator output voltage.

most CPU in spend a large amount of time in sleep or slow speed mode , as running always on maximum clock not always necessary so CPU keep on switching between different frequency  to save power, this is call scaling . so when CPU changes its clock frequency it is required to change the CPU power Voltage and other power parameters.  

so getting Power management IC will save lot of power  ,if used properly.

we are going to use AXP209 PMU is by the X-Powers, a company of Allwinner.

AXP209 has two switching regulators, 1.6A and 1.2A capable and total 5 LDO, all outputs are configurable over I2C from the host.has ADC , soft start ,li-Ion battery charger  and many other things. AXP209 comes in QFN package . almost all the reference schematic have same IC.

2. CPU ,
     Allwinner A13 is the CPU, it comes in eTQFP176 package , does not have many configuration gpio , only uboot pin ,reset line and few other stuff is there. we just connect them as per reference schematic.

3. Clock ,
    A13 need 24 Mhz crystal as clock source , the CPU has on chip PLL , everything else is taken care by the internal clock block. just hook up the crystal to correct pins , that is  all.

4. RAM
      RAM is most critical component in our system after CPU , we are using 512MB SAMSUNG DDR3 ram in BGA 96 Package. BGA 96 can be easily soldered by hot air or hot plate method. we are operating at 400 Mhz,CPU support maximum 16 bit RAM our RAM is also 16 bit word.
     
      RAM need 1.5V supply , the most critical thing about such a high speed RAM  the PCB and PCB trace  length.PCB need to impedance control and traces need to be match , there are many rules need to be followed ,we will discuss this again after a little while . instead going do all the high speed PCB black magic my self , i just copied RAM layout from reference PCB design.

5. ROM , 
    you need some some storage to boot from , may be SD card or NAND flash IC,the CPU has two SDIO interface available , you can connect either two SD card or two Flash IC or one Flash+one SD card.

Drawing Schematic 

 i have access to alitium Designer through the  company i work, so we are going use altium.

download PDF version from and source from

https://github.com/circuitvalley/ttyMAY_linux_board

Download PDF from my GitHub for higher resolution



PCB Design 

1. Power ,  Power Managed by a PMU AXP209 , AXP209 comes in QFN Package , PMU has two 1.5A DC DC Converters ,DC DC converters are used for    ~1.2V for CPU , CPU voltage change according to CPU clock as the CPU clock rise to 1Ghz CPU power jumps to 1.4V, PMU is programmed by the Host CPU over the I2C bus ,it just need to change few registers to change DC-DC output voltage, second DC-DC converter is used 1.2V for internal logic, PMU also has many linear regulators ,only one of is used for providing analog  Supply 3.0V to the CPU.

CPU also 3.3V logic Supply for I/O ,3.3V rail is provided by separate Dedicated DC-DC converter TLV62565DBVT from Texas Instruments.

TLV62565DBVT also used for RAM power supply 1.5V , you see it in SOT23 package near the DDR3 RAM.





DDR RAM, DDR Ram PCB schmeatic has been taken reference from this schmeatic, and DDR RAM layout need very special care of need to be taken there are many rules, all the same class signal should be length matched with certain tolarance , clock like need to be little longer then other signal so that other signals reach before the clock edge apear. thhere is absolutely tonnes of sutuff which need to considered before going in to DDR routing , i did have much time so i decided to go easy way , i just copied DDR layout from a reference PCB layout , and it just worked for me.

PCB Specification pushed a little due to BGA RAM,  we need to place via between BGA pads , via hole size ,annular ring size and clearance is the concern. at our specification we need 10mil drill, 4 mil annular Ring and 5 mil clearance. due to these tight specification, i got a little hard time finding a manufacturer. cheap Chinese manufacture also does not support this specification you may need to go for premium service. the best possible option i could able to find is from oshpark pcb. oshpark has very high made in USA quality. price is cheapest at this specification.


ROM and LCD , i have SD card on one SDIO bus and NAND Flash on another SDIO bus, it is possible to load file system from USB device also but you need to first load the bootloader from either of the SDIO interface , i am not sure but A13 does not support USB as primary mediam of boot.



i have plan to use either 5 inch LCD or 9 inch LCD. 9 inch LCD (like for most >=7 inch LCD)  need relatively high LCD votlage and many power power rails, large LCD does not have any on module DC-DC converter to genrate various LCD bias and power voltages.so we need to provide seprate DC-DC boost converter. most large LCD comes with 50 pin flex cable. small lcd mostly have required circuit to genrate LCD voltage on module , they just need power and drving signals , small LCD which i have uses 40 pin flex cable. so i have put both 50 pin and 40 pin Flex connector to connect LCD.
 




there are few components on the back also nut much, 



Source , all the source and Gerber files are available on my github repo,

https://github.com/circuitvalley/ttyMAY_linux_board


if have any questions or suggestions please make a comment, 


9 comments:

  1. Interested , have been searching for quite a long time , thanks , i require some assistance on the work you have done , what a wonderful work , my email vhafuwi@gmail.com

    ReplyDelete
  2. I have a question about the resistor on LCD data line , it seems 0ohms , I wonder why there are there , is it something related to impedance matching ?

    ReplyDelete
  3. from where do you get pcb manufactured for your projects

    ReplyDelete
  4. Do you have BOM files for the Project , will appreciate

    ReplyDelete
    Replies
    1. all of the source and design files are available at my github account
      https://github.com/circuitvalley/ttyMAY_linux_board

      you can export bom

      Delete
  5. What type of LCD are you using, can you please give me the code of it? Thank you

    ReplyDelete
  6. Hello, Do you have the complete design file for A10? thanks

    ReplyDelete