SparkFun Forums 

Where electronics enthusiasts find answers.

Questions relating to designing PCBs
By reklipz
#38833
Hey everyone!

First off, I'd like to say thanks to everyone that helped me with the questions I had while making this board. I truly appreciate it.

I've uploaded what I hope to be the final board and it's gerbers to my server, available here:

Eagle schematic + board + libraries
Gerbers

alternates:
http://rapidshare.de/files/37946436/torc-eagle.zip.html
http://rapidshare.de/files/37946437/tor ... r.zip.html


I've already submitted the board to the BatchPCB bot, and everything checked out OK. I'm hoping someone, or many someones, could take a peek at my design and let me know if I'm breaking any major design rules, or if it's all good and ready to be ordered.

My main question is, how do I put the two boards in one order, and not get charged for extra space between the two boards?
Also, I didn't do any configuration of Eagle when I designed the board. Are there going to be issues with the drill data or the likes?

-Nate
Last edited by reklipz on Fri Nov 30, 2007 4:49 pm, edited 1 time in total.
By Azoore
#38863
Links aren't working for me :(
User avatar
By bigglez
#39512
reklipz wrote:Yep, seems the switch at my place is going to crap...

I'll have to restart the server when I get home, sorry about that!

Alternate links until I fix the switch:
http://rapidshare.de/files/37946436/torc-eagle.zip.html
http://rapidshare.de/files/37946437/tor ... r.zip.html

Sorry for the inconvenience!
Greetings Nate,

Did you ever fix these links? I still can't download or
view anything. Doesn't look as though anyone else
did either...

Comments Welcome!
By reklipz
#39518
Thanks for notifying me of that.

The alternate links work, but it is through a free web file sharer. You have to click the "Free" button in the lower left, and then type in the authentication code, kind of a pain.

I had the server fixed, but I recently decided to actually fix the switching problem instead of working around it (you know how it is, :),) and this involved a reformat of the server, which has not yet had ftp reinstalled.

I'll get these links up ASAP.

P.S. - I tried my hand at re routing the board again, trying to save some space (and therefore money), so that will get posted as well.

-Nate

ftp://desmas-s.dyndns.org/torc-eagle.zip
ftp://desmas-s.dyndns.org/torc-gerber.zip
ftp://desmas-s.dyndns.org/torc-2.zip
User avatar
By bigglez
#39526
reklipz wrote:ftp://desmas-s.dyndns.org/torc-eagle.zip
ftp://desmas-s.dyndns.org/torc-gerber.zip
ftp://desmas-s.dyndns.org/torc-2.zip
Greetings Nate,
I have no idea what to do with those links...

You don't need to supply separate EAGLE libraries,
as the components used in a schematic and board
file are copied automatically.

I have two schematics of yours from downloading
the previous link. One has a transistor switch on the
USB 5V pin the other one has a diode to 3.3V - not
sure what that all about?

In the buck converter section there are two 1N4148
diodes - odd for a high frequency converter, are these
supposed to be fast-recovery types?

Back to the power supply. A diode in series with the
3.3V supply would drop it to about 2.7V is this
intended? Also, the schematic with the transistor
switch would apply 5V to the USB port when (and
only when) the local 12V supply is off. As the 5V
rail is derived from the 12V rail, what does this
switch circuit do?

Finally, there's a bus symbol in EAGLE that would
make your schematic easier to follow. It
replaces the eye-numbing parallel lines with a
single bus and net-named breakouts.

Comments Welcome!
By reklipz
#39546
I have no idea what to do with those links...
In order to save the files, it is necessary to right click the links, and choose "save link as" from the context menu.
You don't need to supply separate EAGLE libraries,
as the components used in a schematic and board
file are copied automatically.
This is good to know, thanks.
I have two schematics of yours from downloading
the previous link. One has a transistor switch on the
USB 5V pin the other one has a diode to 3.3V - not
sure what that all about?
The one with the transistor switch is the same as the torc-eagle.zip file(schematically, I believe I made a bit more room for the switching circuit, and removed a redundant AC connection).
In the buck converter section there are two 1N4148
diodes - odd for a high frequency converter, are these
supposed to be fast-recovery types?
Indeed you are correct, these should not be 1N4148's. The diodes I have are in fact fast recovery diodes, in the same package as the 1N4148 in the schematic. I should have changed the name in the schematic at least, sorry for the confusion!
Back to the power supply. A diode in series with the
3.3V supply would drop it to about 2.7V is this
intended? Also, the schematic with the transistor
switch would apply 5V to the USB port when (and
only when) the local 12V supply is off. As the 5V
rail is derived from the 12V rail, what does this
switch circuit do?
The 2.7V is fine, as it is an PIC18LF2550 I intend to use (again, probably should have changed the name). As for the switching circuit; The 5V is not derived from the 12V rail, it is only supplied when the device is plugged into USB (or when it is being programmed). In order to allow the device to be operable while powered from mains power and while being hooked up to a computer via USB, this switch is needed.
Finally, there's a bus symbol in EAGLE that would
make your schematic easier to follow. It
replaces the eye-numbing parallel lines with a
single bus and net-named breakouts.
Sorry about that! I knew about this bus feature, and had used it at one point. When I realized I would need a ribbon cable to connect the two boards, I had to do a way with it, and the nets had already been named, thus causing trouble when making two buses. A mistake on my part.

Thank you very much for your input! I'm sorry it has been such a pain to get the files to work properly!

Let me know if there are any other questions.

-Nate
User avatar
By bigglez
#39566
reklipz wrote:
bigglez wrote:Back to the power supply. A diode in series with the
3.3V supply would drop it to about 2.7V is this
intended? Also, the schematic with the transistor
switch would apply 5V to the USB port when (and
only when) the local 12V supply is off. As the 5V
rail is derived from the 12V rail, what does this
switch circuit do?
The 2.7V is fine, as it is an PIC18LF2550 I intend to use (again, probably should have changed the name). As for the switching circuit; The 5V is not derived from the 12V rail, it is only supplied when the device is plugged into USB (or when it is being programmed). In order to allow the device to be operable while powered from mains power and while being hooked up to a computer via USB, this switch is needed.

Greetings Nate,

Thanks for the clarification on your power sequencing.
Let's see if I got it right this time.

(1) Project connected to the PC via USB, and no AC
mains turned on.
(1A) Power from the 5V USB port is fed
into the PIC (presummably for programming?). PIC
operates from 5V.

(2) Power from the AC mains is applied, and the
USB is still connected.
(2A) Power from the AC supplies the 3.3V and 7V
rails, everything comes to life, the USB port power
is removed. PIC has a 2.7V supply.

(3) Power from the AC mains only, USB disconnected.
(3A) Same as (2A).

Comments Welcome!
By reklipz
#39577
bigglez wrote:Thanks for the clarification on your power sequencing.
Let's see if I got it right this time.
That is correct.

Also, after reviewing the datasheet for the PIC18F2550, it shows the max voltage for a high input to be VDD. Depending on the type of diode used to isolate the 5V rail, the inputs could be as high as .7V above VDD. Is this really all that much of an issue, or is it something that I need to fix?

I've come up with three potential fixes;
  • 1] Add diodes between the 3.3V rail and other devices that use this rail. Increase the 3.3V rail to account for the difference in voltage.
    2] Add diodes between the inputs of 3.3V signals and the PIC.
    3] Change the diode type currently used to isolate the 5V rail to something with a lower drop (schottky diode comes to mind.
From what I gather, option 1 will be the cheapest and easiest solution that is guaranteed to work, so long as the diodes chosen can handle the power draw (this is a non issue).

Option 3 is the easiest to implement, but only works if the datasheet is lying (lying is not the best word, but sometimes the datasheets cut corners where things are usually obvious).

Option 2 is just the most obvious solution (if the input is too high, make it lower!), so it is included in the list.

For now, I just went ahead and added the single diode that was required for the first solution. I have not updated the schematics or files, but I can if anyone would like.

-Nate
User avatar
By bigglez
#39582
reklipz wrote:Also, after reviewing the datasheet for the PIC18F2550, it shows the max voltage for a high input to be VDD. Depending on the type of diode used to isolate the 5V rail, the inputs could be as high as .7V above VDD. Is this really all that much of an issue, or is it something that I need to fix?
Greetings Nate,

Really? I'm not sure how the VDD is *higher* than five volts.

Wouldn't a diode in series between the 5V and VDD lower
VDD by approx 0.7V?

The IC has internal diodes, either as part of an ESD
protection on the IO pins or a parasitic diode from the
semiconductor fab process.

Any input (or output) that is forced above VDD or
below ground will forward bias the diodes. Doing so
can cause latch-up in CMOS structures and also
dissipate power that may destroy the die.

So, never take an input or output beyond 0.7V
wrt (with respect to) ground or supply.

You may have to rethink your supply switching
scheme...

Comments Welcome!
By reklipz
#39583
bigglez wrote:Really? I'm not sure how the VDD is *higher* than five volts.
Maybe a little more explanation will help.

The situation I was referring to is as follows; The PIC is being powered via the 3.3V rail. The 5V rail (USB/programming) protection diode will lower this to ~2.7V. This can be lowered by using another type of diode; a schottky will only lower this to ~3.0V or 3.1V (actually, after looking at the datasheet for a schottky I spec'd for use, there really isn't much benefit in using it vs a regular diode, the If vs Vf curve shows Vf to be ~.6V in my situation, maybe another schottky diode will give better results though).
This means VDD will be about 2.7V. The LCD and temperature sensors are being powered at 3.3V still, this means that the inputs received from these two devices will be .6V-.7V above VDD of the PIC, causing the problem.

Here are the three potential fixes I came up with a post ago:
  • 1] Add diodes between the 3.3V rail and other devices that use this rail. Increase the 3.3V rail to account for the difference in voltage.
    2] Add diodes between the inputs of 3.3V signals and the PIC.
    3] Change the diode type currently used to isolate the 5V rail to something with a lower drop (schottky diode comes to mind)
I'm thinking solution #1 is the best of the three, and will work the best.

Do you agree, or is there something else I am missing, making these solutions non-applicable?

-Nate
User avatar
By bigglez
#39584
reklipz wrote: The situation I was referring to is as follows; The PIC is being powered via the 3.3V rail. The 5V rail (USB/programming) protection diode will lower this to ~2.7V.

This means VDD will be about 2.7V. The LCD and temperature sensors are being powered at 3.3V still, this means that the inputs received from these two devices will be .6V-.7V above VDD of the PIC, causing the problem.
  • 1] Add diodes between the 3.3V rail and other devices that use this rail. Increase the 3.3V rail to account for the difference in voltage.
    2] Add diodes between the inputs of 3.3V signals and the PIC.
    3] Change the diode type currently used to isolate the 5V rail to something with a lower drop (schottky diode comes to mind)
Greetings Nate,

Why are you using 5V instead of 3.3V? It looks as though the
only 5V issue is when the USB port supplies 5V, right?

Why not use an LDO (with disable) to get 3.3V from the
USB 5V, and shut that LDO off when the AC power is
available.

All your remaining logic circuitry will be 3.3V compliant.

The use of PMOS switches in place of diodes will
reduce your voltage drops to less than the 5% tolerance
on a 3.3V rail.

Some time ago I worked on an IC product that had a
USB (5V) or local supply (3V3) and had to be USB and
PCMCIA (PC Cards) compliant. Other vendors had
a wide range of logic translation devices as 3V3 devices
entered to the legacy 5V world.

Comments Welcome!
By reklipz
#39585
bigglez wrote:Why are you using 5V instead of 3.3V? It looks as though the
only 5V issue is when the USB port supplies 5V, right?
Correct. I'm not sure why you're thinking I'm using 5V instead of 3.3V, I'm only using 3.3V when the PIC has "come to life". This mode is entered when there is mains power, regardless of USB power.

When I do use 5V, there is no communications between the PIC and the other devices on the board, only with the PC, so using 5V is fine then. This mode allows for reprogramming the PIC via bootloader, and to change data stored in EEPROM. There is no user input(or output) from the board in this mode.
bigglez wrote:Why not use an LDO (with disable) to get 3.3V from the
USB 5V, and shut that LDO off when the AC power is
available.
Because I would then have redundant regulators for one of the rails.
bigglez wrote:The use of PMOS switches in place of diodes will
reduce your voltage drops to less than the 5% tolerance
on a 3.3V rail.
I'm afraid I've not heard of these; I will have to look them up.

I really appreciate your help. I'm learning new things, some of which I don't think I would be able to learn in class; that only real world experience can provide. Thank you.

Will the first solution I proposed not work properly then? It requires only another diode, and a simple change in resistor value for the regulator.

-Nate
User avatar
By bigglez
#39587
reklipz wrote: I'm not sure why you're thinking I'm using 5V instead of 3.3V, I'm only using 3.3V when the PIC has "come to life". This mode is entered when there is mains power, regardless of USB power.
Greetings Nate,
My assumption is that 5V power is supplied by the USB port.
When connected the PIC communicates with a USB host (PC)
using five volt power and five volt logic levels.
reklipz wrote: When I do use 5V, there is no communications between the PIC and the other devices on the board, only with the PC, so using 5V is fine then. This mode allows for reprogramming the PIC via bootloader, and to change data stored in EEPROM. There is no user input(or output) from the board in this mode.
But there is circuitry on the PIC that is not powered.
These can cause loading of the PIC (where the PIC
is a driver). I suppose firmware in the PIC could
Hi-Z these ports when in the USB programming mode?
reklipz wrote:
bigglez wrote:Why not use an LDO (with disable) to get 3.3V from the
USB 5V, and shut that LDO off when the AC power is
available.
Because I would then have redundant regulators for one of the rails.
Correct. An LDO small enough to power just the PIC is
not costly or taking up a lot of space. Power management
circuits are not trivial and do need board space.
reklipz wrote:Will the first solution I proposed not work properly then? It requires only another diode, and a simple change in resistor value for the regulator.
I think it has merit. You could monitor the 3V3 rail after
the ORing diodes, and the buck converter would actually
compensate for the diode drop.

I'd be more inclined to deal with the USB 5V section
and keep all the other circuits at 3V3, though.

Here's a few candidates, or at least a bit of background
reading to understand how others solved the USB
power issues.

Comments Welcome!
By reklipz
#39589
reklipz wrote:I'm afraid I've not heard of these; I will have to look them up.
Brainfart! Of course I know what this is.

I'm going to test a couple of the solutions mentioned and see which ones work best. If none are up to par, then I do believe using an LDO or one of the USB power controllers you suggested will have to be used.

Thanks for the help!

Other than that problem, are there any things you would recommend changing in the board layout? That is the part I am most concerned about, although I do realize that there are a few pending changes. I feel that if what I have done so far looks good, then that means I'm getting the gist of what is the proper way, and any changes I make won't be horribly wrong.

Thanks!

-Nate