Schematic Capture

The Software

It is time to start the schematic. There are many tools out there for drawing your schematic. Some are very expensive, while others are free. Here is a small list of schematic/PCB design programs. The ones I am talking about here are ones that I have used before.

Eagle

I use Eagle from Cadsoft for schematic capture and PCB layout for most of my designs. You can download the freeware version which limits you to 1 schematic sheet, 4″ x 3.2″ board size (100mm x 80mm), and 2 signal layers (top and bottom). This is good for most small hobby boards. The freeware version cannot be used for commercial purposes. The next version is the is Eagle Lite which has the same limitations except you can use it to make commercial products. Eagle Lite sell for $49. Then there is the non-profit version, which sells for $125. Again you cannot use it for commercial boards but you do get 99 schematic sheets, 6 signal layers, and board sizes up to 6.3″ x 4″ (160mm x 100mm). Eagle Standard has all the features of the non-profit version and allows you to use it for commercial purposes. This version does up the price tag to $747 for schematic, layout, and auto-router. The full unlimited version is Eagle Professional. Like I said there are no limits to board size, number of schematic sheets, or signal layers. This one is double the cost at $1494. The thing is I bought the Pro version several years ago and did not pay this much even including the upgrade to the latest version. I guess everyone is increasing their prices. As a side note, this program is considered semi-professional PCB design software.

PCB Artist

PCB Artist is a freeware program provided by Advanced Circuits. Even though it is a free program, I think it is a good program. You can do everything in PCB Artist that can be done in Eagle. The only difference is some schematic and board design features are easier to use in Eagle. Artist has a large parts library, I think even bigger than Eagle. What is really nice is that the output files, for making the PCB, are already formatted for Advanced Circuits (PCB production company). That seems logical since they are giving you the program. It does output standard Gerber files if you wanted to get your board produced by someone else. Did I mention it is free?! Now I have not tried Advanced Circuits PCB service, but I plan to. I want to see their price, quality, and speed of delivery as compared to Sunstone.

PCB123

PCB123 is software like PCB Artist. PCB123 comes from Sunstone Circuits, another PCB production company. The program is free, comes with an extensive parts library, and can even search Digikey for real-time parts availability. There is even a real-time display showing the cost of the board you are designing. Of course this is the price from Sunstone, but that is to be expected. In the past the program was limited and hard to use. Sunstone has been working on the feature set and ease of use to make the program more accessible. With their new version 4 I think they have done a good job. Here is the only issue, you do not get Gerber files. The file the program makes is only for Sunstone so they can make your board. This is not a huge issue as they are giving away a pretty good program and giving you reasonable PCB prices along with it. You’ll just have to decide if it is for you. Personally I order my small run prototype boards from Sunstone as I like the quality and speed of delivery.

Altium Designer

What can I say – this is the full professional package with a price to match. Altium Designer starts at $5000 and can go up from there. What do you get – everything! Schematic capture, PCB Layout, auto-router, auto-component placement, SPICE simulation, signal analysis, FPGA programming environment, microcontroller programming environment, SQL parts database, and can link with your inventory system. It even does more, but I am not going there. Just remember this is what many professionals use at work. I forgot to mention that $5000 is about half of some other companies professional software. I have used it at work, but I cannot afford it for home hobby use.

Coming up

I am going to cut this post in two. I was going to talk about the power supply and show the initial schematic, but I think splitting it will make it easier for people to digest. If you want to know about the software you can read this post, otherwise you can just skip to the next to see the schematic.

Final Design Ideas

Microcontrollers

Atmel microcontroller atmega328

An Atmel ATmega328 microcontroller

Like I have said from the start I will use the Atmel mega328 as the main controller and a tiny24 as a slave micro. When I started looking into the tiny24 a little closer I noticed that 2 of the timer output pins are also 2 of the SPI port pins. I had originally planned to use the SPI port to talk between the mega328 and the tiny24. If I am using the timer outputs, then that will cost me the SPI port. There are some other tricks I can use, like using the timer to generate an interrupt to toggle I/O pins high and low or running a super loop and toggling the output bits based off the timer count. I will have to figure this out soon so that I can draw the microcontroller section of the schematic.

For those who do not understand what I am talking about, the SPI port is a serial port that uses 3 to 4 I/O pins. The formal name is Serial Peripheral Interface Bus. It is used on the circuit board for communications between a micro and support chips. My original plan was to use the timer to generate the 38kHz for the IR LEDs and use the SPI port for transferring the sensor results back to the mega328. That is why this becomes a problem.

Sensors

infrared sesnor

Panasonic PNA4602M

Since we are dealing with a robot that is going to compete in mini sumo, the I need some way of detecting the opponent. The standard sensor in use is a Panasonic PNA4602M. The sensor detects IR radiation modulated at 38kHz and outputs a high signal if it receives such a signal. So I will use the tiny24 to blink some IR LEDs at 38kHz and a few more pins to read the outputs of the PNA4602Ms. The only thing to watch out for is the PNA4602M is sensitive to noise on its power lines, so you need to add 0.1uf caps across the power and ground pins. This will help cut the amount of false positive detections. Also by only turning on 1 IR LED at a time you will reduce false detections.

Sharp also makes similar detectors to the Panasonic unit, except they expect the modulated signal to only last 600uSec. After which it expects to not detect any modulated IR for another 600uSec. This makes this detector a little more difficult to use, but it does have higher immunity to false detections. So I am going to use the PNA4602M, you can decide for yourself if you want to use the Sharp sensor. You will have to look up which Sharp GP1UX series sensor you would want to use..

Motor Driver

Texas Instruments dual motor driver chip

Texas Instrument SN754410 driver

I have selected the SN754410 as the motor driver chip. Along with the driver, I will need a 74AC14 hex inverter chip. This chip will allow me to use simple sign magnitude motor control instead of locked anti-phase control. I know the 754410 uses bipolar transistors which will drop some voltage across the transistor junction, but the easy of use is why I selected the chip. What I can do later, if I feel like it, is design my prototype daughter board with an upgraded motor driver circuit. The 754410 does not come in a surface mount package, but that really won’t cause problems with the PCB design. Again even if I decided to make this a kit, all the parts would be through hole. Since I like to build circuits, I will make a through hole and a surface mount version for myself.  I will leave the decision up to you of which version you want to build.

Power Supply

The power supply is going to be built using a few extra components. This is a robot brain that I am going to be experimenting on, so things can and will go wrong. I am going to add in a little extra protection. Before power gets applied anywhere a P-channel MOSFET is going to provide reverse battery protection. Once power has been regulated down to 5 volts a Zener diode rated for 5.6 volts is going to protect the circuit from accidentally receiving full battery voltage. What about a fuse you ask? Well I plan to put a fuse inline with the battery pack. Rating the fuse is going to take some work. I don’t want it to blow every time the motors start-up, but still need to protect the electronics. So I will just have to do some research.

Other Electronics

So what else am I going to put on the board? I am going to have 1 diagnostic LED for each microcontroller, and an LED for the power supply to let me know it is on. Then there is that audio circuit I was talking about. After looking over all the stuff getting mounted to the board, I have decided to simplify the circuit down to the LM386 audio amp chip and support components. It will still work, just the quality of the audio will be less than ideal. That is ok, the robot will still beep with the best of them.

Next Issue

Well this turned out to be longer than I thought it would be. Next time I will go through what software I will be using for schematic capture, a preliminary parts list, and I will show you the schematic of the power supply section.