Author Topic: i need a design Review  (Read 2738 times)

0 Members and 1 Guest are viewing this topic.

Offline hsn93Topic starter

  • Regular Contributor
  • *
  • Posts: 114
  • Country: bh
i need a design Review
« on: June 06, 2018, 07:53:10 am »
Hello, i was working on my first PCB for past few weeks .. (i've read and watched tutorials, asked questions to achieve this) ..


I did ask here in a previous post but got only 1 reply which was helpful... but i think i had post it in early design stage ..
Previous Post: https://www.eevblog.com/forum/beginners/pcb-design-help-110518/

now i think i've completed the design i want review from you guys as im new to the field and this is for industrial product ..
mostly its pneumatic control system

the plan is to send this to PCB manufacturer next week.. ( thinking of JLCPCB )

DONT GET ME WRONG:
im not posting the whole design for someone to check and review the whole design but if someone can spot any big mistake in it...
and would be helpful to get comments on it..

so I'll start with the schematic:
Top Level:



Power:
Sw regulator:

mux and LDO:



Microcontroller
USB:

MCU SAMD21G18 (i've choose this bcz its arduino compatible if i couldnt program it through ATMEL ASF) i will use ARDUINO to generate HEX:


Solenoid valve driver

i ve got this darlington chip advice from previous post thanks to @Hero999

sensors:


Communication: RS485


now to the PCB:
Ground planes : top + bottom layers.. (didnt put them bcz its easier to see without them)

planes on layer3:
mcu plane : 3v3
left side plane: 24v <-- should i put it on the top plane?
planes on layer2:
5V output from mux



all


rs485


regulator (should i use electrolytic cap or ceramic is enough these days?)
small piece is TVS .. Vbr (28 - 30 - 32) [min typ max]
Pmos for polarity has MAX VDSS -30V


sensors and usb


3d view
i changed to USB type B i think its better and more industerial .. + its for programming only ..

------------------------------------------------------------

is there any test pad tips i should i do somthing ? because im going to order pcb, solder and test my self .. should i put the vias because i hide them all (better looking)


should i put some capacitors here .. bulk? right ?? what type and what range of capacity would be enough?
i've read and watched davids videos that electrolytic type get damaged and leak .. so ceramic is good ?
« Last Edit: June 06, 2018, 08:11:27 am by hsn93 »
-------------------------------------
 

Offline capt bullshot

  • Super Contributor
  • ***
  • Posts: 3033
  • Country: de
    • Mostly useless stuff, but nice to have: wunderkis.de
Re: i need a design Review
« Reply #1 on: June 06, 2018, 09:54:24 am »
I did just a quick scan over your design:
- You have ground planes, that's fine, ensure they don't have too long and too many cutouts and slots.
- Your RS485 doesn't have a ground. RS485 without ground reference (third wire or shield connected to ground at both sides) doesn't work reliably.
Safety devices hinder evolution
 
The following users thanked this post: hsn93

Offline hsn93Topic starter

  • Regular Contributor
  • *
  • Posts: 114
  • Country: bh
Re: i need a design Review
« Reply #2 on: June 06, 2018, 10:40:14 am »
Hello, yeah thank you very much good note ..

the plan was to use a cable with 4 wires


2 pair 22AWG wires for 24V and 2 for RS485 ..

which both come from different controller that i need to design later .. or is it bad idea? i dont really know, i've done some research on this topic but really didnt find any clear answer .. its not long distance, around 10 meters ..


i have read that RS485 should have special impedance controlled signal of 120ohms .. but i dont know should i really care for such a distance specially with cable prices that i've found, and one cable would be easier to install than 2 different cables (power + communication) ... im not sure really what i should do.. i just went for this option is it critical ?


------------------------------------------



actually your comment made me post this two ground planes.. i've forgot to post them ..





ok about cut outs.. i dont know how long is long .. but i will start placing vias between grounds every where ..
« Last Edit: June 06, 2018, 11:05:39 am by hsn93 »
-------------------------------------
 

Offline dmills

  • Super Contributor
  • ***
  • Posts: 2093
  • Country: gb
Re: i need a design Review
« Reply #3 on: June 06, 2018, 12:21:07 pm »
Cff1 in the switcher is suspicious, I would have expected 22pF here not 22nF, but I have not checked the datasheet.

Have a look at the head diameter of your mounting screws, I usually use an M3 screw in a 3.2mm hole and assume a 6.5mm head diameter, I think your mount near the USB connector is probably way too close. Also since you are not grounding thru the mounting screws (reasonable in this sort of thing) you might want to either make the annular rings much bigger or place a keepout to chase the ground pours away from the screw heads.

Any reason not to just use a second ULN for the valves? It saves you 11 parts which is probably more valuable then the cost of the chip?

A resistor and LED across each solenoid connection will be something you (during software development) and your users (during commissioning) will worship. On that subject a power indicator is well worth the cost in reduced frustration. If you have a spare pin or two on that micro then LEDS and test pads are worth the time, just having an led that you can make flash to indicate the processor is still up is a good and worthwhile thing.

Since the 24V line connects to the sensor wiring and also the solenoid wiring, a polyswitch or fuse or something might be a good idea, maybe a 1A or so polyswitch on the sensor supply (With a red led and resistor across it to indicate a fault), and whatever makes sense for the solenoids. This is as much to protect the cables as anything, you probably don't want a few amps or tens of amps accidentally ending up on a damaged sensor cable, for the same reason a fuse or polyswitch at the input is a good plan, as it avoids destroying the input transorb when bubba hooks the supply up backwards (Or make the input transient protection a bidirectional part!). 

The 1k resistors on the sensor inputs should be sized to tolerate a short to 24V, so need to be rated for 0.5W or so, also 100pF filter cap? The pressure change is THAT FAST? I would have thought 100nF more like it. 

The RS485 needs to be a three terminal connection with a ground (Or better in an industrial controller, an isolated RS485 part, with the cable ground connected to the isolated ground on the chip). R5 needs to have an option jumper so it can be taken out of circuit except for the boards at the ends of the lines, and please label this jumper 'termination' or something similar.

What is that RC network doing on the USB shield connection? There is all sorts of tosh done with these, but really IMHO it should just be tied directly to chassis.

If you make the three wire sensor connectors have +24 on the middle pin, then it is likely that a sensor will survive being plugged in backwards, which is nice.

Given the USB is just for configuration, why bother to do anything much with VBUS? Instead power the board from the 24V rail all the time.
It is just extra parts that buy you nearly nothing, and you could then run the switcher at 3.3V output directly, eliminating the 3.3V regs on both the mux page and the one on the RS485 sheet.

The switcher is overkill, I figure maybe 100mA @ 3.3V on a bad day, there has to be something smaller and cheaper that can do that?

Finally, look to your silk screen, label connectors (Right down to what pin does what) and LEDs, and if you are fitting connectors rather then soldering wires (please tell me you are fitting connectors!) then some text saying what the mating half needs to be is always a good thing, "Mating Plug Molex Mate-N-Lock XXX-YYYY" can save a lot of cursing in 5 years time.  Also, PCB Name and revision number are good as is some text saying what it does.

Hope something in there is useful.

Regards, Dan.
 
The following users thanked this post: hsn93

Offline tron9000

  • Frequent Contributor
  • **
  • Posts: 423
  • Country: gb
  • Still an Electronics Lab Tech
    • My Hack-a-day project page
Re: i need a design Review
« Reply #4 on: June 06, 2018, 12:39:55 pm »
The 24V plane, it necks down too much, I see what you're trying to do by keeping it away from other circuitry by going round the outside, and as a result your necking the plane down. This should really be avoided. let the plane flow round the pins of the solenoid connectors to allow the pins 24V/Vsupply pins to connect. It would be a good idea to move this plane to an outside layer. Some bulk capacitors in the areas you've highlighted won't hurt and would take the sting out of any transient from the solenoids turning on.
Partsbox.io - orangise your parts!
"If you're green you can only ripen. If you're ripe you can only rot!"
 
The following users thanked this post: hsn93

Offline capt bullshot

  • Super Contributor
  • ***
  • Posts: 3033
  • Country: de
    • Mostly useless stuff, but nice to have: wunderkis.de
Re: i need a design Review
« Reply #5 on: June 06, 2018, 12:46:36 pm »
Hello, yeah thank you very much good note ..

the plan was to use a cable with 4 wires

2 pair 22AWG wires for 24V and 2 for RS485 ..

which both come from different controller that i need to design later .. or is it bad idea? i dont really know, i've done some research on this topic but really didnt find any clear answer .. its not long distance, around 10 meters ..

i have read that RS485 should have special impedance controlled signal of 120ohms .. but i dont know should i really care for such a distance specially with cable prices that i've found, and one cable would be easier to install than 2 different cables (power + communication) ... im not sure really what i should do.. i just went for this option is it critical ?

ok about cut outs.. i dont know how long is long .. but i will start placing vias between grounds every where ..

So, your cable looks ok for this purpose, the pair you intend to use for RS485 is specified for 120 Ohm impedance. BTW, as a rule of thumb, most twisted pairs do that job nicely. Your 24V GND can do the job of the RS485 GND connection, assuming the other side RS485 transceiver is tied to that GND. Anyway, you should connect the cable braid to GND on both sides also.
Same goes for USB. Connect the GND pin and the connector shield to your ground plane.
The ground planes you made look OK for this kind of circuit, Placing some vias won't hurt. Place them to bridge the slots created by the traces, but this doesn't look like critical stuff, so don't flood the PCB with vias.

You've used that LMZ whatsoever regulator - this thing will go into burst mode at the low load current that I'd expect with that circuit. This causes a large ripple on the 5V supply voltage, maybe disturbing your analog sensor circuitry. From that point of view, I'd recommend againt that regulator.
« Last Edit: June 06, 2018, 12:51:21 pm by capt bullshot »
Safety devices hinder evolution
 
The following users thanked this post: hsn93

Offline hsn93Topic starter

  • Regular Contributor
  • *
  • Posts: 114
  • Country: bh
Re: i need a design Review
« Reply #6 on: June 07, 2018, 07:14:51 am »
Hope something in there is useful.

Regards, Dan.

Thanks Dan very helpful..

- In the typical application of the switcher the Cff is 0.022uF.. they did'nt provide calculation but this value in the schematic.

- I've changed the mounting holes to 3.2mm and put some silkscreen circle of 7mm .. thanks for the advice.

- thank you again, i will change the ULN part in the next design since im telling my company there will be second version of the PCB. i want to try different methods to teach my self as much as possible..

- about the leds, i saw arduino circuit which uses same uC using mosfet to turn led from GPIO, though the pin can drive to max 7mA if VDDIO supplied with 3v3. which should be enough to turn 2mA led with the ULN in parrallel.. thanks again..

-
Quote
for the same reason a fuse or polyswitch at the input is a good plan, as it avoids destroying the input transorb when bubba hooks the supply up backwards (Or make the input transient protection a bidirectional part!). 
I didnt get this part, wouldnt the pMos design prevent reverse polarity + uni-directional TVS have smaller negative clamping voltage?

-
Quote
The 1k resistors on the sensor inputs should be sized to tolerate a short to 24V, so need to be rated for 0.5W or so, also 100pF filter cap? The pressure change is THAT FAST? I would have thought 100nF more like it. 
i will change but just to teach me something, if i assume the adc will be shorted to 24v:
this means the zener diode 3v3 rated power should be larger than 75mW right?:
current: 24/1000 \$\Omega\$ = 24mA -> (split into 2k resistor 1.65mA and 22mA on the zener ?
the 100pF is'nt calculated or somthing i just placed a filter cap, i will replace it to 100nF i dont know how fast is the change..


-
Quote
The RS485 needs to be a three terminal connection with a ground (Or better in an industrial controller, an isolated RS485 part, with the cable ground connected to the isolated ground on the chip). R5 needs to have an option jumper so it can be taken out of circuit except for the boards at the ends of the lines, and please label this jumper 'termination' or something similar.
Sure, i will put isolated part on the next version. thanks. and the termination jumper.


Quote
- Also since you are not grounding thru the mounting screws (reasonable in this sort of thing) you might want to either make the annular rings much bigger or place a keepout to chase the ground pours away from the screw heads.
- What is that RC network doing on the USB shield connection? There is all sorts of tosh done with these, but really IMHO it should just be tied directly to chassis.
can i know, why "reasonable in this thing, i really looked for chassis grounding but really i think its complicated i found different methods and opinions. when and how i should connect the chassis GND?
different people say different things..
i got this RC from Atmel Evaluation board for the same uC:


-
Quote
If you make the three wire sensor connectors have +24 on the middle pin, then it is likely that a sensor will survive being plugged in backwards, which is nice.
Noted, thanks..



-
Quote
Given the USB is just for configuration, why bother to do anything much with VBUS? Instead power the board from the 24V rail all the time.
It is just extra parts that buy you nearly nothing, and you could then run the switcher at 3.3V output directly, eliminating the 3.3V regs on both the mux page and the one on the RS485 sheet.

this gives me great idea, although im using 5V LDO for RS485 part. i know it will have low drop so maybe 4.9V or something but i wanted to stabilize it but combining switching regulator and Linear regulator is best to elimenate the ripple voltages right? which is good for the adc of MCU right? i've read this somewhere from TI to use the LDO after switching regulator is best practice.
- thanks this give me idea of doing termination jumper of USB Vbus instead of mux so if i want to program it near the PC without 24V.

Quote
The switcher is overkill, I figure maybe 100mA @ 3.3V on a bad day, there has to be something smaller and cheaper that can do that?
since now i buy it allready, i will use it for this application and next design i'll use smaller power one.


Quote
Finally, look to your silk screen, label connectors (Right down to what pin does what) and LEDs, and if you are fitting connectors rather then soldering wires (please tell me you are fitting connectors!) then some text saying what the mating half needs to be is always a good thing, "Mating Plug Molex Mate-N-Lock XXX-YYYY" can save a lot of cursing in 5 years time.  Also, PCB Name and revision number are good as is some text saying what it does.
im using JST connector with crimping on the cable side, you mean to place some text with naming some connector like "Xn:Yn" female male connectors?






-------------------------------------
 

Offline dmills

  • Super Contributor
  • ***
  • Posts: 2093
  • Country: gb
Re: i need a design Review
« Reply #7 on: June 07, 2018, 10:14:31 am »
The pmos will protect the rest of the thing from reverse polarity, but the transient protector is per your diagram ahead of the pmos part, so should probably be a bidirectional one, the pmos will protect the rest from reverse polarity but you need the transient diode to survive also.
Personally I would have a fuse right at the input, but whatever.

One thing to check on the ULN series parts is that you do not exceed the total emitter current, the things have a per pin and total current rating and the total is smaller then 7 * the number of pins, just something to watch.

The zenner diodes will need sufficient power handling of course (75mW is right on the line), but when designing industrial you HAVE to assume that the fuckup fairy will come calling (Usually in some way you would not have anticipated).

I would be very tempted to have a look at those clip on din rail PCB brackets, in an industrial environment din rail is much quicker then mucking about with screws, so making the board size work with these might be an idea. On that, having all the connectors for wiring along ONE edge will make the panel builders job easy.

What I meant by silk screen connector details was, "Mating connector is JST-XXXXYYYY" where XXXXYYYY is whatever the JST part number of the mating connector is. I might however suggest that the phoenix contact style pluggable screw terminals will get you hated less by maintenance techs then anything involving a crimped connection.

No need to stabilise the RS485 power, and in fact if you shop around you can find RS485 parts that are 3.3V, and even have ESD ratings good enough to allow you to forgo the external protection, (less parts on the BOM is always good right). 

Got to admit, given the low current requirement on the 3.3V rail, I would probably have just stuck a linear reg in there, maybe in combination with a power resistor, ~2W losses at full song by my estimate, and it is not like you are short on copper to heatsink the thing.

The USB header is just for configuration, so do whatever, there are religious issues here.

Regards, Dan.
 
The following users thanked this post: hsn93

Offline hsn93Topic starter

  • Regular Contributor
  • *
  • Posts: 114
  • Country: bh
Re: i need a design Review
« Reply #8 on: June 07, 2018, 12:38:37 pm »
The 24V plane, it necks down too much, I see what you're trying to do by keeping it away from other circuitry by going round the outside, and as a result your necking the plane down. This should really be avoided. let the plane flow round the pins of the solenoid connectors to allow the pins 24V/Vsupply pins to connect. It would be a good idea to move this plane to an outside layer. Some bulk capacitors in the areas you've highlighted won't hurt and would take the sting out of any transient from the solenoids turning on.

im not sure i got you .. this is how i improved the design, the 24v plane now have better looking the pins are connected inside the plane is that what you mean as the pad has heat relief and which has low width ?

 and that hole (2) i connect it to the shield plane which is connected to chassis .. thats right?

=========================================================================


Hello, yeah thank you very much good note ..

the plan was to use a cable with 4 wires

2 pair 22AWG wires for 24V and 2 for RS485 ..

which both come from different controller that i need to design later .. or is it bad idea? i dont really know, i've done some research on this topic but really didnt find any clear answer .. its not long distance, around 10 meters ..

i have read that RS485 should have special impedance controlled signal of 120ohms .. but i dont know should i really care for such a distance specially with cable prices that i've found, and one cable would be easier to install than 2 different cables (power + communication) ... im not sure really what i should do.. i just went for this option is it critical ?

ok about cut outs.. i dont know how long is long .. but i will start placing vias between grounds every where ..

So, your cable looks ok for this purpose, the pair you intend to use for RS485 is specified for 120 Ohm impedance. BTW, as a rule of thumb, most twisted pairs do that job nicely. Your 24V GND can do the job of the RS485 GND connection, assuming the other side RS485 transceiver is tied to that GND. Anyway, you should connect the cable braid to GND on both sides also.
Same goes for USB. Connect the GND pin and the connector shield to your ground plane.
The ground planes you made look OK for this kind of circuit, Placing some vias won't hurt. Place them to bridge the slots created by the traces, but this doesn't look like critical stuff, so don't flood the PCB with vias.

You've used that LMZ whatsoever regulator - this thing will go into burst mode at the low load current that I'd expect with that circuit. This causes a large ripple on the 5V supply voltage, maybe disturbing your analog sensor circuitry. From that point of view, I'd recommend againt that regulator.

hello thanks again, the LMZ regulator will be changed to 500mA one in next design thanks...

about the cable, i did choose it becasue it has 4 conductors (1 twisted of 24AWG which is common for RS485 [im not speaking of experience but i looked into the RS485 cables available in digikey]) .. but this one where can you determine that its really 120 ohms?
i mean i can see it has 93.25 ohm / KM ..
isnt the RS485 cables have 120 ohm impedence at all lengths?

the second thing about grounding Braid at two positions:
i saw this video which talks about ground loops:

what do you think..
« Last Edit: June 07, 2018, 12:41:39 pm by hsn93 »
-------------------------------------
 

Offline capt bullshot

  • Super Contributor
  • ***
  • Posts: 3033
  • Country: de
    • Mostly useless stuff, but nice to have: wunderkis.de
Re: i need a design Review
« Reply #9 on: June 07, 2018, 01:10:52 pm »

about the cable, i did choose it becasue it has 4 conductors (1 twisted of 24AWG which is common for RS485 [im not speaking of experience but i looked into the RS485 cables available in digikey]) .. but this one where can you determine that its really 120 ohms?
i mean i can see it has 93.25 ohm / KM ..
isnt the RS485 cables have 120 ohm impedence at all lengths?

You mix up the DC resistance with the impedance. That's two totally different things, impedance is indeed independent of length and is determined by the cables inductance and capacitance per length unit parameters. Ususally these aren't specified (sometimes the capacitance per length), but the impedance. And indeed, the impedance is specified in the datasheet you showed, bullet point 5. of the electrical characteristics. Also the construction details show this cable is well suited for your purpose as it haves the 24AWG pair for data usage. The other pair (AWG22) appears to be intended for power supply. So IMO this cable is a quite good choice for your purpose.

the second thing about grounding Braid at two positions:
i saw this video which talks about ground loops:

what do you think..

I don't think. I know from experience, and the correct answer is: It depends, but connecting the shield in only one place is wrong in 99.9% of all use cases.

In most cases, results in terms of minimum suspectibility to EMC and minimum radiated EMC are best if you boldly connect the cable screen / braid  to your circuit GND plane, no matter how many GND wires you additionally have inside the cable. There are environents  such as bridging between buildings, within large buildings (not your average home), industrial environments using heavy electrical machinery, where it is advised to break the ground loop. But you don't do that by connecting the cable screen on one end only. You do this by isolating the relevant part of the circuit from the local ground - that might be your whole circuit, or an isolated RS485 transceiver.

In a domestic environment, isolating the whole circuit from safety ground usually does the job well. If you need to safety ground your box (e.g. because it is metal and you've got mains potential inside), usually you want to connect the circuit ground plane to the box / chassis for best EMC results. You still keep connecting the cable shield to your circuit GND plane (or chassis, or both) here. This will form a ground loop through the safety ground wires in the electric installation, but in a typical domestic installation (you stay within a typical house where one family lives in), this is just fine, the ground loop won't do any harm. Things get different if you go for wider areas. Anyway, the best way to avoid ground loop problems in said domestic environments is to keep your chassis  and circuit ground isolated from the mains safety ground. Not a big deal if you use a appropriate SELV (safety extra low voltage) supply.

If you're isolating parts of your circuit (like the transceiver), you'll still have to care to propagate the isolated reference potential to each isolated transceiver - this is what the GND wire is intended for, the shield does this job as well.
Safety devices hinder evolution
 
The following users thanked this post: hsn93

Offline tron9000

  • Frequent Contributor
  • **
  • Posts: 423
  • Country: gb
  • Still an Electronics Lab Tech
    • My Hack-a-day project page
Re: i need a design Review
« Reply #10 on: June 08, 2018, 08:17:11 am »
The 24V plane, it necks down too much, I see what you're trying to do by keeping it away from other circuitry by going round the outside, and as a result your necking the plane down. This should really be avoided. let the plane flow round the pins of the solenoid connectors to allow the pins 24V/Vsupply pins to connect. It would be a good idea to move this plane to an outside layer. Some bulk capacitors in the areas you've highlighted won't hurt and would take the sting out of any transient from the solenoids turning on.

im not sure i got you .. this is how i improved the design, the 24v plane now have better looking the pins are connected inside the plane is that what you mean as the pad has heat relief and which has low width ?

 and that hole (2) i connect it to the shield plane which is connected to chassis .. thats right?


Spot on, that's much better. Make sure that the plane wide enough for the max current flowing in that plane. I use the Saturn PCB application to calculate this as a guide.

If you need to make the thermal relief traces wider, you can tweak the rules or make a new rule just for those connectors (Design -> Rules) and decrease the expansion or increase the air gap, and increase conductor width. This way you still get thermal relief and increase current capacity. Remember: minimum trace width in these rules is your calculated trace width to carry the total current divided by number of trace in thermal relief.

So long as the its just the USB housing connected to pad number 2, and the coupling resistor and capacitor, it should be ok.
Partsbox.io - orangise your parts!
"If you're green you can only ripen. If you're ripe you can only rot!"
 

Offline hsn93Topic starter

  • Regular Contributor
  • *
  • Posts: 114
  • Country: bh
Re: i need a design Review
« Reply #11 on: June 11, 2018, 07:44:04 am »
thank you everybody:

this is my update design:








things that i need to change next design:
- RS485 Isolation
- maybe JST connectors
- LMZ to use lower power module
- to remove power mux and cut usb power.
- polyfuse or current protection for sensors.

important things i should care of:
- importance of leds
- importance of silkscreen text
- screw holes and heads
- reduce component BOM is important
- use same footprint as much as possible (for feature assembly)
- use one layer on component when i've space (reduce stencil cut)
- to care of necking power nets ..
- placing pcb name, version ( i added after this post )
now im going to send this to PCB fabrication i will need to generate gerber files thank you everybody ..


« Last Edit: June 11, 2018, 09:21:58 am by hsn93 »
-------------------------------------
 

Offline dmills

  • Super Contributor
  • ***
  • Posts: 2093
  • Country: gb
Re: i need a design Review
« Reply #12 on: June 11, 2018, 09:45:13 am »
ULN2 pin 9 needs to be connected to the 24V line to make the internal flyback diodes work, which I am thinking you probably want.

Regards, Dan.
 
The following users thanked this post: hsn93


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf