Noob Schematic Question on Eagle

I am trying to make a PCB for a project. It’s really simple: an LED attached to a pair of pins on each chip (screen shot [here). I’ll hang a AA battery pack off of it for power. And there lies the question:

I’m trying to keep the PCB to one layer. But, since I have a lot of closed loops, I have no way to connect the ground and power pins in the schematic. My plan was have the battery pack connect to different points on the board (indicated by the cyan circles inserted using Photoshop).

Is there a way for me to indicate this in Eagle?

Thanks!](http://www.mindspring.com/~gbeberman/schm.jpg)

What is the reasoning for having each LED connected to 2 I/O pins? :?

Can’t you terminate them to ground with resistors? If so, you could have 2x as many blinky bits… :wink:

btw, cool pumpkins!

Apart from the previous suggestion, it’s a waste of time trying to get all the tracks on one side of a single-sided board. Try using a few wire links on the other side. You might only need a couple.

Leon

FartingMonkey92:
What is the reasoning for having each LED connected to 2 I/O pins? :?

Can’t you terminate them to ground with resistors? If so, you could have 2x as many blinky bits…

A more important question is where is the current

limiting to protect the LEDs?

Driving the LEDs from a IO port without a ballast

resistor will likely destroy the LEDs.

By adding the resistors as TH (through Hole)

components you will gain the PCB jumpers to

attempt a single sided design on the PCB.

Also, you don’t need to wire the LEDs in a particluar

order - try swapping the LEDs to aid PCB layout,

and them “Unswap” those LEDs signals again in

the firmware.

First, thanks Monkey for the pumpkin compliment. My wife is a professional photographer and we have a friend who is amazing at pumpkin carving.

Let’s take things one-at-a-time:

First on the LED comments: This is all based on [this project (more [here) in which the chip is coded to light the LEDs as if they form a Channukah menorah. I thought this would be a fun soldering project some of my kids’ friends. But, soldering directly onto the chip – as they do here – is tough for young solderers. So, I was trying to make a pcb for them to solder onto. Since the designer of this didn’t use resistors, neither did I.

The menorah is also why the LEDs are all lined up and why the order of them matters. The chip programming controls which are lit. That’s why they are connected to the pins.

On what’s limiting the current: I don’t know if anything is. I haven’t yet parsed the program to see if something is there (and I don’t know if the chip even could be coded to do so).

I’ll add the resistors if you guys think I need them. But, I still don’t know how to create the connections in my Eagle schematic for the battery pack.

Thanks!](Deluxe LED Menorah Kit)](Holiday Electronics Projects: Technical details and Reference data | Evil Mad Scientist Laboratories)

The reason why the evil mad scientist’s project doesn’t destroy his attiny is because he is probably scanning the LED matrix. This means a given LED isn’t on constantly and he is probably scanning at such a high rated that it works OK. I’ve seen several designs that do this but it still makes me cringe. I think it’s a bad design.

In your case, the LED between two pins will act like a dead short and probably destroy the two pins if not the whole microcontroller if left on for more than a few seconds.

To summarize several comments. Just connect each LED’s anode to an ATTiny pin and a resistor (say 330 ohms) between the cathode and gnd. The arrow points from + to -.

If you are using a batterypack, use a 2x1 pin header (pinhead library). Solder the battery pack wires into the holes.

noob_for_life:
First on the LED comments: This is all based on here in which the chip is coded to light the LEDs as if they form a Channukah menorah.

Okay, got it - the nine LEDs are in strategic locations.

At last year’s Channuka party the local kids put their

own candle-powered Menorah together (under adult

supervision) and we had a group lighting. To protect

the wooden picnic table someone covered it with

baking foil.

The only Channuka party to be seen from space!!

We borrowed a Menorah from Israeli friends, I was really

only there for the potato latke.

There was a Menorah construction article in [December

2006 issue of N and V, that you might

read for background info.

noob_for_life:
I’ll add the resistors if you guys think I need them. But, I still don’t know how to create the connections in my Eagle schematic for the battery pack.

Yes, I'll second Phil's good advice!](http://tinyurl.com/6k9zkk)

One more question:

If I want to calculate the lowest resistor to get the brightest LED, is there a way for me to know the voltage output from the chip? EvilMadScience uses three AAs to power his configuration.

Thanks again

noob_for_life:
If I want to calculate the lowest resistor to get the brightest LED, is there a way for me to know the voltage output from the chip? EvilMadScience uses three AAs to power his configuration.

The answer lies in two datasheets and the application

of simple math (ohms law).

From your LED datasheet expect to find a

nominal current of 20mA and a voltage drop

of (say) 1.5V for red, green, or orange LEDs.

There are higher efficiency LEDs, particularly in

Red, so also check the rated lumens output.

Caution; LEDs with frosted or diffused lens

will have much lower numbers for light output,

the clear lens ones are brighter but have very

limited beam angle (i.e. a hot spot).

From the uC (AVR) datasheet (fig 149 and fig 150)

the output voltage is about 500mV at 20mA

We know the supply is 4.5V with fresh batteries,

so the voltage across the resistor is

4.5 - 0.5 - 1.5 = 2.5V

For a 20mA current the resistance required is

2.5/.02 = 125 ohms (120 is the nearest standard value).

This assumes the AVR is outputting DC to light the

LED. Most likely it is, but reading the code or asking

the author is necessary to be sure.

In some circuits the LEDs are pulsed and depending

upon the ratio of on to off time the LEDs will be

dimmer. To restore full brightness the DC current

is upped to compensate. The LED data sheet will

give the max pulse current allowed.

For brighter LEDs drive more current, this simple

idea has two problems. The AVR is only rated to

20mA per IO pin, pushing it further is abusive.

Also, the LED has a max DC current rating and

pushing it further is an abuse.

Most of the time you can get away with it, but

its not good engineering practice and it may

come back to haunt you down the road with dead

circuits.