Some tips on EagleCAD

I’ve been very busy since the start of the year and haven’t managed to post anything new. There will be some posts coming up now though. I received some new PCBs today, will post some pictures and info soon. Also I will be making a post about the stuff that I’ve been working on for the past few months. But more about that when I find some time. Will be awesome, I promise you that.

But now, to the topic on hand. Many people don’t usually use hotkeys, macros, commands etc in the programs they use. Most of the time I don’t either, but given that I use EagleCAD alot, I decided to optimize my workflow. I started out with using the command line input, but after some time it felt kind of slow, so I also made some hotkeys and macros to improve my workflow even further. I have to admit, I was quite surprised how much faster I got my work done. So here is a short overview how I managed that.

Commands I use frequently:
Schematic editor
gr on //displays grid
a //opens component adding menu
v //add value to the component
fr //draw frame
sm //smash
pack //displays the alternative packages menu
er //ERC test
tex //add text

Board editor
gr on //(grid on) displays grid
gr mm //change the grid units to mm
gr a mm //change alternative grid units to mm
gr .2 //change grid size to 0.2 mm
gr a .05 //change alternative grid size to 0.05 mm
pack //displays the alternative packages menu
dr //DRC test
po //polygon tool
c w .3 //change trace width 0.3
c w .2;vi //changes via drill to 0.2 and selects via tool
c is .3 //changes isolation to 0.3
c sto on //changes stop on

And some minimized displaying commands for most used layers
di none //clears all
di v //display Via
di p //display Pads
di u //display Unrouted
di d //display Dimension
di t //display Top
di b //display Bottom
di tor //display tOrigin
di bor //display bOrigin
di td //display tDocu
di bd //display bDocu
di tp //display tPlace
di bp //display bPlace

Useful in both
sh c* //shows everything that starts with the letter c, mostly capacitors. sh r* can be used to show the resistors for example. I suggest you read more about the wildcards in the Eagle manual, very useful stuff
sh @ c23 //shows and draws a box around the C23 capacitor

If you are using the route tool for example, you can change the width of trace by just writing “.3″ and it changes the width to 0.3mm, very useful and fast

Hotkeys and macros I use constantly (they can be set under Assign menu):
Schematic editor
Ctrl + Q > move
Ctrl + W > net
Ctrl + E > group
Ctrl + R > show
Ctrl + A > copy
Ctrl + D > delete
Ctrl + F > info
Ctrl + T > name
Ctrl + G > label

Board editor
Ctrl + Q > move
Ctrl + W > route
Ctrl + E > group
Ctrl + R > show
Ctrl + A > copy
Ctrl + D > rip
Ctrl + F > info

F1 > set POLYGON_RATSNEST OFF; rat; SET POLYGON_RATSNEST ON //only calculates the airwires, won’t recalculate the polygons, alot faster on boards with lots of components
F2 > rat

Ctrl + 1 > disp none unrouted dimension vias pads top bottom tplace bplace torigin borigin tdocu bdocu
Ctrl + 2 > disp none unrouted dimension vias pads top tplace torigin tdocu
Ctrl + 3 > disp none unrouted dimension vias pads bottom bplace borigin bdocu
Ctrl + 5 > disp none dimension unrouted vias pads top
Ctrl + 6 > disp none dimension unrouted vias pads bottom

Some useful ULPs
Schematic
run bom //generates bill of materials

Board
run statistic-brd //lots of stats about the board
run length //calculates the trace lengths
run count //counts drills, pads, vias etc

If you find any mistakes or have some further suggestions, feel free to contact me.

Share

My SMD component library

People seem to like my mobile component library, so I decided to make a post about it in my blog also, maybe someone who likes it also, can build one for him-/herself.

It is a box from the BOX-ALL series by Aidetek. I got mine from eBay for about 30 dollars from http://myworld.ebay.com/smtzone. The box was well packaged in bubble wrap and included labels with adhesive and some kind of cheap tweezers that were kind of useless. About the labels; you can get a .doc template for the labels from Aideteks homepage, but I have to warn you, be very careful when inserting the label page into your printer, mine decided to eat it diagonally and ruined the whole page, also some of the labels got stuck inside the printer. Very annoying. So, my friend who owns the same box, found similar labels and made a new template, and problem solved.

But now to the box itself, it has 144 enclosures, each 18.3 x 16.7 x 10.2 mm in size and the box itself is 229.2 x 156.8 x 37.4 mm, so quite compact I’d say. The build quality is quite good, the plastic outside feels solid and durable, inside the comparment lids feel a bit cheap though and few of the lids don’t want to stay closed, so I improvised a hack to fix the problem; I cut out a piece of paper approximately the size of the box and inserted it between the two sides, since the compartment lids interlock somewhat, the piece of paper improves the locking of the lids.

So what do I keep in my library? Resistors, capacitors and LEDs mostly… Specifically 50 values of 0603 and 0402 resistors, some 0402 and 0603 capacitors for decoupling and bypassing and LEDs for indication, debugging etc.. Where are the components from? I bought 0603 and 0402 resistor kits from eBay for about 13 dollars a kit, LEDs also ordered from eBay and the capacitors  are from Farnell. Capacitors seem to be cheaper in Farnell and if you order X7R than you get X7R. The specific values of the components can be seen on the images. Will probably add some SMD buttons, slide switches and connectors when I get some time…

In conclusion, I have to say that I like the box a lot. It makes assembly/soldering a lot more comfortable and faster, no need to strip the tape of the resistor strip etc. Well worth investment.

Share

ATMEGAxxU4 development board

I needed a small board, I could use to test and prototype things with, so I decided to make such a board.
The question that might arise is, why didn’t you just order something from the wide range of Arduino branded products or a Teensy. First, I don’t like Arduino because it uses a 328 and that chip lacks hardware USB support. So that rules out Arduino. Next, Teensy, I looked at it, and I didn’t like how it was designed: some pins brought out in stupid places, uses more layers than two, has hard to acquire, and annoying to rework (at least in Europe) QFN style ATMEGA, should you kill the one soldered on at the first place etc…

So I what I wanted to achieve
- Components on one side only, so I could also use it as an SMD device
- No more than two layers (easier and cheaper to acquire)
- Decent ground plane with two layers design
- Uses TQFP package ATMEGA (easier to rework and acquire)
- Most of the pins brought out and only on the sides
- Buttons for both Reset and HWB
- LED to indicate that the board has power
- Silkscreen on both sides indicating the pins

So here is what I came up with. This is actually version 2B, I had some version As made, but I unfortunately lost the schematics and board files, so I had to redo the work. But now the revision B is here. I will also add some images of the 2A version boards I ordered and assembled.
Eagle schematic and board included and available for download here

Sample code for the board, blinks the debug LED with 1 second delay
NB! Optimization is required for this code to work!

#define F_CPU 16000000

#include <avr/io.h>
#include <util/delay.h>
#include <avr/interrupt.h>

int main() {
	// Remove CLKDIV8
	CLKPR = 0x80;
	CLKPR = 0x00;

	// DISABLE JTAG - take control of F port
	MCUCR = _BV(JTD);
	MCUCR = _BV(JTD);

	// Set PE6 (LED) as output
	DDRE |= _BV(PE6);

	while(1) {
		_delay_ms(1000); // sleep 1 second
		PORTE ^= _BV(PE6); // toggle LED pin
	}

}

Sample code .c and ready to flash .hex available here

Share

a5d-project-hub

Here I will post info and updates related to my projects or just random (useful?) stuff.

Share