Please check my PCB

Go To Last Post
12 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi, I'm an amateur at pretty much everything here, and I designed this PCB. I want to print it with BatchPCB, but before I do that, I want to make sure it's set up correctly. I've set up a breadboard version, and I'm sure the schematic is correct, but I don't know if the PCB will work correctly.

Notes about design: the sensor is a temperature resistor. The NMOS powers a 12-volt electric motor.

Have any of you had experience dealing with BatchPCB? Is it a good place to go? Is there some place better?

Thanks

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Welcome to AVRFreaks.

Where do I start?

What is the purpose of your serial-related connections at JP7. You have tied the /Reset line through a cap to DTR. So any time that DTR goes low, you will reset your uController. Is that what you want to happen?

You have the NMosfet on the high side of the "switch". This means that the drive to the gate MUST be higher than your raw Vin to switch on the mosfet. The Nmosfet should be on the ground side of the circuit and be a "logic level" type.

You need a bypass cap very close to the uController's supply pins.

That's just for starters... without even looking at your pcb layout.

I wouldn't send your design off to anyone yet unless you like to waste your money. But don't be discouraged.

Cheers,

Ross

Ross McKenzie ValuSoft Melbourne Australia

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
You have tied the /Reset line through a cap to DTR
Most likely an Arduino style enter bootloader mode??

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

valusoft wrote:

What is the purpose of your serial-related connections at JP7. You have tied the /Reset line through a cap to DTR. So any time that DTR goes low, you will reset your uController. Is that what you want to happen?

I probably should have said this to start. I'm using Arduino with this device. Those are so I can upload different/updated software onto the device. I do want the setup to work that way, the Arduino software resets the device through that pin (I think).

valusoft wrote:

You have the NMosfet on the high side of the "switch". This means that the drive to the gate MUST be higher than your raw Vin to switch on the mosfet. The Nmosfet should be on the ground side of the circuit and be a "logic level" type.

Okay. I fixed it. Here's an updated version. I had it the right way on my breadboard but forgot to change that part. Will a logic level type n-mos play nicely with Pulse wave modulation?



Note: you can't really tell but there are large wires between the nmos and the Vin

valusoft wrote:

You need a bypass cap very close to the uController's supply pins.

Okay, added.

valusoft wrote:

I wouldn't send your design off to anyone yet unless you like to waste your money. But don't be discouraged.

That's what I was afraid of.

Do you see any more problems?
Thanks for your help.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Your temperature sensor must have at least 2 connections, but you only show/allow for one connecting to your circuitry.

I would also add a diode across your motor to catch the back emf.

As for layout, I would put the nmosfet and the motor connections close to your power input connector. No point and running high current carrying traces around your pcb.

What are you using for your clock?

I also suspect that you could do this design on a single sided pcb.

Cheers,

Ross

Ross McKenzie ValuSoft Melbourne Australia

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

valusoft wrote:
Your temperature sensor must have at least 2 connections, but you only show/allow for one connecting to your circuitry.

This device goes inside a car and the temperature sensor goes to common ground. The only connection I will have with the sensor is the input voltage.

valusoft wrote:

I would also add a diode across your motor to catch the back emf.

Okay sounds good. Would it have to be high amperage?

valusoft wrote:

As for layout, I would put the nmosfet and the motor connections close to your power input connector. No point and running high current carrying traces around your pcb.

Okay. Should I just have them share holes?

valusoft wrote:

What are you using for your clock?

The internal 8MHz clock inside the ATMEGA328.

valusoft wrote:

I also suspect that you could do this design on a single sided pcb.

I doubt it but I could try.

Thanks for your help. I'm glad I'm not wasting money.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Your project is coming along nicely.

In addition to the excellent advice already provided, you might want to:

Consider mounting holes on the PCB

Use one or two spare pins for LEDs, (Resistors and LEDs).

A "Heart Beat" LED, driven by an interrupt, is nice to show that the circuit ahs power and is running.

You could also use one to show when the transistor is On.

If the device is going in a vehicle then power isn't an issue. Even if the PCB is where the LEDs can not be seen, then might prove useful during software development.

The diode on the input is great for reverse polarity protection.

The 7805 isn't a great choice for vehicle power supplies. Several regulars on the Forum say they work fine in that environment. I would prefer to use a regulator designed for that environment.

The voltage regulators designed for use in vehicles have "load dump" protect built into the regulator, as well as an extended temperature operating range. You might find some with increased vibration tolerance ratings, but that is a lesser concern.

As there is lots of spare room on the PCB you might want to make the traces a little bit wider.

It might be worth while to put a big Pin #1 Marker on the PCB, by the Micro's Pin #1. Consider adding a date, Version #, (V.1), and your initials on the PCB, also. This is your masterpiece, and like any artist you ought to "sign" your work.

The Ver # is so that if you end up making a Ver 2 in the future, it will be easy to tell which PCB you have in hand when working with them.

JC

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
A "Heart Beat" LED, driven by an interrupt,
Well maybe that the led will flash bit nothing else is working. :-)

I usually have a timeout flag for the led toggle which is looked at in the main code, the actual toggle is done in main. This way you know that BOTH the main program and the timer interrupt are working, otherwise it is possible that the main program is stuck somewhere (ie TWI peripheral not responding or other cause) but the led is still happily blinking away driven by the interrupt.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Here are the updated versions of my PCB which I'm about to send to OSH Park.


I managed to get it one-sided. I made the traces wider. I added mounting holes. I added a transistor LED and a power LED. I changed the regulator to this one:
http://www.digikey.com/product-detail/en/LF50CV/497-8357-5-ND/1038560

What diode should I use for catching the back emf? Should it be high-voltage/low-voltage, high-power/low-power? I find this one but I feel that it's a bit over-the-top:
http://www.digikey.com/product-detail/en/1N5357BRLG/1N5357BRLGOSCT-ND/917643

Thanks for all of your help. I would be clueless without it.[/url]

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

And remember, the Titanic was built by professionals, the ark by amateurs.

 

"We trained hard... but it seemed that every time we were beginning to form up into a team, we would be reorganized. I was to learn later in life that we tend to meet any new situation by reorganizing. And a wonderful method it can be of creating the illusion of progress while producing confusion, inefficiency and demoralization." Petronius Arbiter, approx. 2000 years ago.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Dear Pita.
the led i serie will gate for mosfet will not work.
mosfet has very high impedance.
set i parallele with R serie.
LEd power led: it is clever to use a IO from CPU. you can use it to show alarm if temperature sensor is out the range or another missing think..
Your last layout look better. Try to not use 90degres for copper bane, no problem for your design but good rules for higher frequency.

Thierry

Thierry Pottier

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You might wanna check your mosfet again, I looks upside down to me and the "SOURCE" and "DRAIN" labels apear on the wrong pins.