Sunday, December 8, 2019

Get your PCBs printed with PCBWay


Get your PCBs printed with PCBWay


We have already designed a PCB for a micro robot in my previous blog post. However, if you are not familiar with PCB designing, you can follow the previous post from this link. Within this post we are going to discuss about the procedure to get printed your designed PCB from an online PCB manufacturer. For that, I selected one of the leading PCB manufacturers in world called PCBWay. You can use any PCB drawing without errors to follow the procedure which I am going to explain within this post.

At the moment you need to have a completely routed PCB drawing. Here I am using the PCB drawing which I already completed for a general purpose small robot using Altium designer 16.0 software. If you would like to take a look at that PCB you can follow this link.



Generating Gerber Files and Drill Drawings
First of all, you need to generate several files called Gerber files which contains the extract of your PCB design in an understandable format for computers. The Gerber format is an open ASCII vector format specially used for printed circuit board designs. It is the a standard used by PCB industry software to describe the printed circuit board images with different layers such as copper layers, solder mask, legend, drill data, etc. Now we are going to generate that Gerber files from the PCB drawing using the same CAD software you used to complete your design. In my case I am using Altium.  In the Altium user interface, go the projects tab which contains the project files and select your PCB design ( .PcbDoc file). Then go through following route from the top sub menus.
Files àFabrication Outputs à Gerber Files

This will open up a new window with several tabs to customize the resulting Gerber files. There you need to edit some of the fields as the following steps, in order to get the PCB printed perfectly. Please note that these setting may differ according to your design.
  1. General    à  Units :inches  ,   Format: 2:5    
  2. Layers    à  In layers to plot tab, select all the layers you want to get printed. (I have attached my layers)
  3. Apertures à  Make sure the Embedded Aperture is set to RS274X
  4. Advanced à Set advanced settings according to your preferences. (I have attached my settings)

Configuration settings for Gerber file generation


After completing the settings, click 'okay' button and it will generate a CAM drawing for the manufacturing process including all the routing details, texts, pads and other data in a single file.

Next you need to generate a drill drawing data file called NC Drill File, following a similar procedure to the previous one. Go through the following route from the top sub menus.
Files àFabrication Outputs à NC Drill Files

There you will get a same type of window to enter several settings. Most of the time, default settings will work fine for your project. Here is the screen shot of my settings window.


Then click okay button. It will generate another CAM file only including all the drill hole data as the following image.


Make sure to save both the Gerber file and the NC drill file in the Project outputs folder of your work-space folder. There you will see some other files inside this project outputs folder. Next you need to add all these files inside this folder in to a .zip or .rar archive.

Online Instant Quoting

Now we can start online procedure with our manufacturer. Before sending the PCB design to them, we need to have some kind of knowledge about the prices and what are the available customization fields they have. As I mentioned at the beginning of the post, we are selecting PCBWay as our manufacturer. Therefore, we need to go to their web site. They have some handy tools to generate a rough quotation according to some user prefer options. Go to the following link to start online instant quoting.
Online instant quote page - https://www.pcbway.com/orderonline.aspx

There you can enter the size of the PCB, color of the top mask, thickness of the board, number of pieces, plating details and etc. After entering all the details, you can easily generate a quotation for your PCB with the shipping cost.

Place an Order

Just after you got an instant quote, you can move on to the Gerber files uploading section which is the starting process for your order placement. For that you need to create an account from the Sign in option at the top corner of the site. After successfully signed in and logged in to PCBWay site, you can start the following steps. Go back to instant quote page and click on the ‘Add to Cart’ button at the bottom of the instant quote results.
There a new window will open up and ask you to upload Gerber files. Other than the Gerber format, you can upload some other file types also if you are using a different CAD software than the Altium. You need to add the zipped project output folder of your PCB project which contains Gerber (RS-274-X) file and NC drill files to that window.

Online Gerber Viewer

After you have uploaded your Gerber files, you can check whether everything is correct or is there anything to be changed using an Online Gerber viewer tool from PCBWay site by following link or directly clicking the Gerber viewer button on the Gerber uploading window.  


After adding and inspecting your Gerber files, you can Submit your order. This will take a while to confirm and start processing your order. Their Engineering team will inspect your Gerber files to find whether there are errors or something need to be clarified. If there are no errors, they will start manufacturing process and sending continuous status updates of the whole printing process to your account in PCBWay.

If you would like to see how actually this wonderful PCB manufacturing process is happening, you can watch following video which I found in the YouTube.

PCB manufacturing process: https://www.youtube.com/watch?v=_GVk_hEMjzs   

Reasons for Selecting PCBWay

Since we have discussed how to build a PCB successfully and what is the procedure to follow in  order to get your PCB printed, now it's the time look why do we actually recommend PCBWay for this task.
High quality service and best raw materials are two major factors we can consider. They have a large set of professionals to inspect each and every customer’s order according to newest technology available. Let's consider some valuable factors other than above two.

Real-time Progress Tracking

Just after you submit your order by uploading Gerber files and completing the order, you will see a timeline for your PCB manufacturing process. If you are interested in knowing what is your PCB's current status, this will give an ideal solution for you. They can take several hours to 24 hours in order to complete your order according to your request. My PCB got completed within 24Hrs and after that they issued me the tracking number of the shipping package. It makes easier to monitor shipping process.

PCB Assembly

Other than the PCB manufacturing service, they have a well-recognized PCB assembly service also. If you need to get soldered a bulk of PCBs rather than one or two prototypes, it’s really efficient to follow this service which is a time saving cheaper option for you.  There are both SMT & THT assembly, starting from only $30 with a precise inspection and with free stencil. Other than that, they are providing worldwide free shipping for the assembling customers. The components can be sourced and provided by them, or by clients themselves.  
There also you can find an online quotation generator tool from their site.


Factory video - https://www.youtube.com/watch?v=24ehoo6RX8w           

Layout and Design Service


This is another valuable service providing by the PCBWay. Let’s say you don’t have an expertise on designing a PCB or it’s difficult to attain the targeted requirements on designing an PCB for a particular project of yours. Then, this design service providing by the professional engineers is the ideal solution for you.

Open source Community


When you going through this rough ride on the electronics designing journey you may need to associate with so many new technologies, methods and new problems which you may need the help of leading experts on this field. The PCBWay open source community has opened the door for you to get that expertise through the best professional in the world. Sharing each other’s project experience and assistance in your projects may help you to implement a successful project.   

Other than this, they are doing a community service to help students who are doing projects related to any kind of PCB designs to take their projects to the highest level of success. As an example they sponsored us in our final year project of the university, by supplying PCBs to complete the project with flying colors.    
Student sponsorship , shared PCB projects and so on. - https://www.pcbway.com/project/

Thursday, December 5, 2019

Designing a Micro Robot on a PCB


Designing a Micro Robot on a PCB

Micro robots are becoming popular in robotics and hobby electronics fields rapidly since they have several positive factors with comparison to the bulky designs. Generally, a design of a micro robot is heavily limited by its size and obviously by its hardware components because of they are designed to be light weight. Since these types of robots are designed according to a specific application like swarm-robots, micro mouse or even for educational purposes, we can design them with specific set of hardware which won’t get affected by above limitations that much. Designing of a micro robot can be bit difficult due to its highly compact nature. However, the same compact nature can make the assembling process easier and the building cost lower compared to a regular sized robot.      

One of the key advantages of these type of robots is that the whole hardware assembly can be done on a single circuit board or a stack of circuit boards. It makes them compact and cheaper. Here in this post I am going to discuss on designing a micro mobile robot with four wheels, which is targeted to be a general purpose development robot platform. I will explain the design considerations, how to design the modular schematics, PCB drawing and printing PCBs with a PCB manufacturing Company..

Design Considerations of the Micro Robot  

Base

Basically my target was to design a four wheeled mobile platform with individual motor for each wheel and all the peripherals are embedded in a single printed circuit board. Actually the four wheeled design can also be achieved using only two motors with a simple gear plus bearing set rather than using four motors. However, there is some mechanical part over that implementation and therefore here I chose the simple individual motor design for each wheel. In addition to above two four wheeled designs, this kind of robots can be implemented with two driving wheels plus a free rolling caster ball or a caster wheel. Following images show different design approaches for the same kind of robot platform. 




 Motors and wheels
Since we are interested in designing a micro robot, we cannot use large wheels or bulky motors with big gear boxes. In that case we have a huge advantage, because there’s no need of driving a heavy load due to the light weight design of the robot and still we are using four motors to drive that load. Speed of the motors is also a critical factor according to your application. Since I am designing a general purpose robot, according to my experience and the availability in the market, a considerably medium range RPM value such as 200RPM or 300RPM will be enough for my application.

In this case I used a two cell Li-ion or Li-Po battery (7.2V) as the power supply to the robot. Therefore, I selected 6V motors for my purpose. With above specifications I found micro metal gear motors with plastic brackets available in the online market. These motors are ideal for smaller robot designs since they can provide a desirable torque with the metal gear box.I found a set of plastic wheels which can be fitted in to the above motor shafts with the “D” shaped slot. Selecting the diameter is depending on your application. I chose the following wheels for my project.


Controller

Obviously the heart of any kind of embedded system is its controller. It can be a microprocessor, micro-controller, FPGA or any kind of programmable logic device. For a micro robot, most of the time it will be a micro-controller since it’s easy to program using a common programming language /IDE and  interface all the required peripheral devices to it through I/O pins. In the selection process of a matching microcontroller, first of all we need to identify the required processing power to handle all the processes.
In my design I have added an IR line detecting sensor panel (QTR panel) with 8 sensors, 4 front facing IR emitting LEDs and photo diodes to wall detecting task, 3 sonar sensors in three sides, 2 dual H bridge motor drivers for 4 motors, encoder reading interfacing for two motors, an IMU sensor, an I2C AMOLED display for monitoring or debugging purposes and additional I2C and UART ports for extensional purposes. For all the above mentioned peripheral devices, we need to have a considerable number of I/O pins from the microcontroller. Since it is cheaper and easy to deal with the Arduino IDE, I selected two Atmel Atmega328P-AU surface mounting microcontrollers which can make the design more compact. Communication between two microcontrollers is happening via I2C protocol. Motor controlling, IR sensor array reading, I2C slaves handling and some other tasks are assigned to one chip and the rest of are done by the other chip.     
    

Motor Controller

As I discussed in the motor selection sub section, I need to control four DC micro metal gear motors with the specifications of 6V operating voltage and 1.5A stall current. Since this is a light weight application and need to control four motors, I selected MX1919 motor driver ICs with dual H bridges inside each package. They are available in the market at a very cheap cost and can operate in the 2V-10V supply voltage range. Each H bridge is capable of driving a maximum current of 2.5A. I used two of these ICs for my design. Main advantage of this model is, we can complete the motor driver with lesser amount of extra components other than the IC itself.


Critical Components for the Design 

ATMEL Atmega 328p-AU microcontrollers
MX1919 dual H-bridge motor drivers
Micro Metal Gear DC Motors (6V brushed) 
    

Modular Design Approach          

The next step of our design process is implementation of the CAD drawings of the whole robot’s circuit schematics. Since this is a considerably complex circuit with a large number of components, the best approach is to broke the whole schematic into small modules and connect them through the labeled nets. In my design there are three circuits as follows and used the Altium Designer 16.0 electronic design software package for this design.

1.      Main controller module and power distribution
2.      Sub controller
3.      Motor controller

We will discuss each of them briefly as following.

 Main controller module

This schematic is based on the first Atmega 328P micro controller chip and its peripheral interfaces. QTR panel, encoder reading for one motor, ISP programming interface, I2C port, UART port for Bluetooth communication or FTDI programmer interface are the features included in this module. Other than that, we have the power distribution circuit as well within this module. Since all the sensors we are using and the two Atmega328 chips are working on 5V we need to regulate 5V from the Li-Po battery we are going to use as the power source. Therefore, I placed several ports for plug a switching buck converter and several other switches including main power switch and the motor controller power switch in this module.   


Sub controller Module

The second Atmega micro-controller and its peripherals are the main parts of this module. Wall or obstacle detecting front 4 IR sensors, 3 sonar sensors into three sides, Encoder readings for one motor, a buzzer, I2C interface, UART interface for FTDI programming and ISP programming interface are the peripherals which get connected to the second micro-controller chip.


Motor Controller

As we discussed earlier, I have used two MX1919 dual H bridge motor controlling ICs in my design. Since this IC package contains most of the components needs to implement the dual H bridges, we have to place only two zenar voltage regulators and two capacitors to complete the motor controller.

Competed Circuit schematics can be found in the following link:

PCB Design

After completing the schematic designs by connecting each module on separate sheets using labels for each net, we need to do the most difficult and time consuming task of the project which is the PCB designing part. Here I used the Altium PCB designer to do the task. Since there are lots of components to be integrated in a small circuit board, organization of the component assembly is very critical. First of all, we need to define a board shape according to our purpose and shape. I chose a simple shape as the following images shows. In the front of the robot I placed the QTR panel, IR sensors, Sonar and two micro-controller chips. Then four motors are placed in the rear side of the board considering wheel and motor dimensions. Motor controlling part is placed in the middle of the PCB and power management and switches are placed in the far rear side of the PCB. You can customize this orientations according to your need.

For the routing purpose I selected a two-layer PCB design since we have to route a complex circuit in a small space. Thicknesses of each copper trace is very important because they must be capable of carrying different amount of currents according to the type of the trace. As an example, a copper trace carrying current to a motor must be capable of carrying at least the stall current of that motor. Micro-controller I/O traces may be thinner than a power supply traces since they are carrying a less amount of current.

Finally, I added a Copper polygon pour to both top and bottom copper layers and assigned labels and texts to each port and component on the Top overlay layer (Silk layer) and competed the design by placing some mounting holes for motor brackets and the PCB itself.         
Following images shows that the both sides of the PCB from the design view and 3D view.       



Legacy 3D view of the PCB
printed Circuit boards from PCBWay.com



 You can find the completed Altium PCB drawing from the following link:

Printing the PCB with PCBWay

After completing my PCB design, I chose a leading PCB Manufacturing company in China called the PCBWay to get printed my Micro Robot’s PCB since they are recognized over the world as one of the best quality PCB manufacturers with so many additional services at a fair price. In my next post I will discuss how to generate the Gerber files of this PCB design to send for manufacturing to the manufacturers.      

Services of PCBWay 
1. PCB prototyping and manufacturing
They can not only produce FR-4 and Aluminum boards, but also advanced PCB like Rogers, HDI, Flexible and Rigid-Flex boards, with very reasonable price. Online instant quote page - https://www.pcbway.com/orderonline.aspx
Online Gerber viewer: https://www.pcbway.com/project/OnlineGerberViewer.html
PCB manufacturing process: https://www.youtube.com/watch?v=_GVk_hEMjzs
2. PCB assembly
SMT & THT assembly, starts from only $30 with free stencil and free worldwide shipping.
The components can be sourced and provided by us, or by clients themselves
Rough quote online - https://www.pcbway.com/pcb-assembly.html
Factory video - https://www.youtube.com/watch?v=24ehoo6RX8w
3. Layout and design
Partnering with quality service providers to offer design services - https://www.pcbway.com/design-services.html
4. Open source community
Student sponsorship , shared PCB projects and so on. - https://www.pcbway.com/project/
More details:
https://www.pcbway.com/why.html
https://www.pcbway.com/capabilities.html
https://www.pcbway.com/high-quality-pcb.html
       


The Featured Post

A Deep Dive into Deep Packet Inspection

This blog post aims to unfold the details of DPI, exploring its definition, methods, applications, modern technologies, and the challenges i...