Designing a Time Delayed Relay

chopnhack

Apr 28, 2014
1,576
Joined
Apr 28, 2014
Messages
1,576
Turn's out this phase is quite crucial. More hidden gems were uncovered.. I forgot to order the heat sink as well as I didn't order enough jumpers if I should want to make a second unit. Quite alright, gives me an excuse to order the rain sensor parts while I am at it ;-) Also, K1 needed to move more towards the center of the board to give enough clearance for CN5's connector. Here are a couple of pics of a partially populated board. I dare not remove the SMD parts, I have been sneezing lately, I can imagine it would be hard to find these little "flakes"! This is most of the large/tall items and it is very clear that the soldering must be done in a very specific order.

IMG_20141005_003424_zpse7312e34.jpg

IMG_20141005_003513_zps8a1e072c.jpg
 

chopnhack

Apr 28, 2014
1,576
Joined
Apr 28, 2014
Messages
1,576
I hope that this was the last revision :-0 - minor one, needed to move the lower right corner mounting screw location next to C1 instead of where it was now by the TIP29, the heatsink partially blocks some of it and depending on screw heads it may keep it from directly contacting the board. Should the heatsink be soldered to the board? Can it even be soldered to the board? LOL Would CPU heatsink paste be a better solution?
 

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
Heatsinks are often made of aluminium, and/or anodised, so no, you don't solder them. Yes, I suppose you could use heat-conductive paste between the heatsink and the PCB, and you probably should use it between the transistor and the heatsink.
 

chopnhack

Apr 28, 2014
1,576
Joined
Apr 28, 2014
Messages
1,576
Nothing exiting, but when I looked over my printout of the board, the traces under the switching regulator had some faint traces that could short out. I am sure it was only the limitations of an inkjet printer showing up, but I figured if I get a tin whisker under there I will never find it!! I redid some of the traces and man you can go on forever like this, LOL
I circled the changes in purple, the new is on the right - I think its cleaner and fewer orphaned areas.

What says the collective mind on shipping a board off for production at this time of year? Is it suicide because of the holiday rush?

upload_2014-11-8_11-5-18.png
 

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
I redid some of the traces and man you can go on forever like this, LOL
No, in my experience, you do eventually run out of improvements to make!
I circled the changes in purple, the new is on the right - I think its cleaner and fewer orphaned areas.
I agree. It looks better every time.
What says the collective mind on shipping a board off for production at this time of year? Is it suicide because of the holiday rush?
I don't know.
 

chopnhack

Apr 28, 2014
1,576
Joined
Apr 28, 2014
Messages
1,576
Thanks Kris, do you think I can make it smaller? I am thinking about investing the time to throw it through diptrace.
 

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
Yes, you can definitely make it smaller. You can't do much about the clearance requirements for the high-voltage sections, apart from optimising the component positioning, but the low-voltage stuff could definitely be compacted quite a bit.

I would be interested to hear your experience with diptrace if you decide to switch over to it.
 

chopnhack

Apr 28, 2014
1,576
Joined
Apr 28, 2014
Messages
1,576
Yes, you can definitely make it smaller. You can't do much about the clearance requirements for the high-voltage sections, apart from optimising the component positioning, but the low-voltage stuff could definitely be compacted quite a bit.

I would be interested to hear your experience with diptrace if you decide to switch over to it.

Not sure if I can save any meaningful space since three sides contain the items that need to be kept away from each other. It would be nice to make this more compact, more free space in the box for wires, etc. I will give it some time and consideration and see what I can come up with. I think I will give another go with diptrace as well, giving it some constraints of placement and locking those items before using autoplacement.

FYI - and @Supercap2F - DipTrace does allow for importation of not only Eagle schematic but Eagle board layout!! This could be a sleeper hit of software :) More folks should give it a try and would be easily able to since they can import easily. Nice to have options. I looked and found that they had a fairly active internet forum as well as documentation.

First attempt with Diptrace auto placement and autorouter - not bad for not having any parameters with regard to high/low voltage separation.

upload_2014-11-8_19-41-59.png
 

chopnhack

Apr 28, 2014
1,576
Joined
Apr 28, 2014
Messages
1,576
I was able to consolidate the layout a little more and moved three components to the back side. (The resistor that is smashed between the capacitors is on the reverse side and the two smd caps in blue below). It netted me a 11% decrease in size! 3.17x3.45 vs 3.5x3.5

Given the isolation areas required (pours and dotted outlined area, does anyone think this can be shrunk further?

upload_2014-11-12_22-22-59.png
 

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
Cool!

Yes it's definitely possible to shrink it further, but is it worth the trouble? When does the return diminish so far that it's not worth the effort? That's your call.

Edit: I don't like the idea of putting just a few small components on the other side. It just seems untidy and a possible source of error during assembly.
 

chopnhack

Apr 28, 2014
1,576
Joined
Apr 28, 2014
Messages
1,576
Cool!

Yes it's definitely possible to shrink it further, but is it worth the trouble? When does the return diminish so far that it's not worth the effort? That's your call.

Wow, I am surprised! I didn't think that it could be shrunk more. I think the point of diminished returns was past some months ago Kris :p:D I can't see ways of making it smaller and still maintaining the isolation zones for the various components so from a novice standpoint I would call it done. If you think there is anything I could easily understand and implement I would ask you to suggest it.

Edit: I don't like the idea of putting just a few small components on the other side. It just seems untidy and a possible source of error during assembly.

Understood, I thought it would be a good idea since its a double sided board anyway to clear up some real estate on top. I picked the items that were lowest profile so clearance to box wouldn't be an issue. I will wait for your response and think of a few things in the mean time ;)
 

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
Whether you're past the point of diminishing returns depends on your priorities, I guess. I think what you have now is fine, if it will fit OK. Since you asked, I'll suggest how I might try to tighten it up, but I'm not saying that I think you should. That's your decision entirely.

With that design there are not so many tracks that tracks are a big factor limiting component density, so try turning off the copper layers and just look at the gaps between the components. That space is where you could tighten it up, if you want to.

It might also help to place some fills on a mechanical layer to show where the isolation barriers are.

At first glance, I think I would swap the relay output connector over with the power transistor and rotate the relay output connector 90 degrees. Then you would have two horizontal isolation barriers, with the main components on a strip in between that you could optimise the hell out of.

I think the small capacitor outlines are bigger than they need to be. Also, 1/4W or 1/3W resistors can be spaced at 0.1" pitch, and you can often save space by putting several of them in a group rather than scattering them round the board.

Clearances of 10 thou are fine - for THT designs, I used to use 15 thou tracks and 10 thou clearances on a 25 thou grid, and this made for very manufacturable boards.

But as I said, I think you've done a good job and if it's small enough, then it's small enough!
 

chopnhack

Apr 28, 2014
1,576
Joined
Apr 28, 2014
Messages
1,576
Whether you're past the point of diminishing returns depends on your priorities, I guess. I think what you have now is fine, if it will fit OK. Since you asked, I'll suggest how I might try to tighten it up, but I'm not saying that I think you should. That's your decision entirely.
It's somewhat academic and to be honest, somewhat prideful - compared to manufactured boards, it looks a bit novice so I was wanting to shrink it as much as possible. From a size standpoint anything under 3.5" should theoretically be fine - the more room now, the better, I still have to stuff all the wiring in!!

It might also help to place some fills on a mechanical layer to show where the isolation barriers are.
Ya lost me there buddy :confused: - fills on a mechanical layer? Can you explain.


At first glance, I think I would swap the relay output connector over with the power transistor and rotate the relay output connector 90 degrees. Then you would have two horizontal isolation barriers, with the main components on a strip in between that you could optimise the hell out of.
Agreed, I did a test and it looks promising!



I think the small capacitor outlines are bigger than they need to be. Also, 1/4W or 1/3W resistors can be spaced at 0.1" pitch, and you can often save space by putting several of them in a group rather than scattering them round the board.
The outlines are fairly accurate - not in the sense of actual package layout, but the physical piece does extend to the boundaries in some places - I couldn't find an exact package when I was building the schematic so I took what would closely mimic it.



But as I said, I think you've done a good job and if it's small enough, then it's small enough!
Thank you! Please humor me a little longer, I think I am almost finished with the layout, LOL :rolleyes::D

Edit:
Well, a 21.6% reduction from original, woohoo!! Some concerns: the red ground plane is not as contiguous as before, however the bottom layer does make it continuous throughout. Also, the blue trace to the transistor is ground - any issues putting it between those two planes? The second pic shows the red planes gaps.
upload_2014-11-13_23-43-16.png

upload_2014-11-13_23-47-25.png
 
Last edited:

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
Ya lost me there buddy :confused: - fills on a mechanical layer? Can you explain.
The PCB software should support several "mechanical" layers - layers for miscellaneous information that doesn't normally form part of the manufactured board but is useful during design. If it doesn't support mechanical layers, you might be able to use an otherwise unused layer - e.g. an internal copper layer. Otherwise, you can just lay down some fat tracks or fills on the overlay and delete them before you send the board for manufacture - or even leave them there on the overlay.
Edit: Well, a 21.6% reduction from original, woohoo!! Some concerns: the red ground plane is not as contiguous as before, however the bottom layer does make it continuous throughout.
That's OK.

Nice work there with compacting the switching power supply section!

What's the clearance under the Allegro chips now?
Also, the blue trace to the transistor is ground - any issues putting it between those two planes? The second pic shows the red planes gaps.
Yes, I would run the track to the power transistor's emitter around the transistor's mounting screw so it doesn't go near the isolated relay stuff.

Also you seem to have rotated the transistor. Are you going to mount the board in a different orientation so the airflow is still through the fins of the heatsink?

And the copper fill on the right side of the relay contact circuit is pretty close to the body of the transistor. I'd shave a bit off it!
 

chopnhack

Apr 28, 2014
1,576
Joined
Apr 28, 2014
Messages
1,576
The PCB software should support several "mechanical" layers - layers for miscellaneous information that doesn't normally form part of the manufactured board but is useful during design. If it doesn't support mechanical layers, you might be able to use an otherwise unused layer - e.g. an internal copper layer. Otherwise, you can just lay down some fat tracks or fills on the overlay and delete them before you send the board for manufacture - or even leave them there on the overlay.
Ok, but in this case is the black areas between the copper pours not evident in being the isolation areas? I might be missing your message, sorry.

Nice work there with compacting the switching power supply section!
Thanks! :)

What's the clearance under the Allegro chips now?
70 thou (0.07") between copper pours (high voltage and ground planes.

Yes, I would run the track to the power transistor's emitter around the transistor's mounting screw so it doesn't go near the isolated relay stuff.
Found a better solution, I think see updated layout.

Also you seem to have rotated the transistor. Are you going to mount the board in a different orientation so the airflow is still through the fins of the heatsink?
The board will be mounted as shown in layout so that the transistor's top metal tab will point "up". There will be an inch of space past the heatsink before the connector above it.

And the copper fill on the right side of the relay contact circuit is pretty close to the body of the transistor. I'd shave a bit off it!
Done ;)

Looking at the "green" pic, I think I have too many via's - decreasing total surface area! Would I be better off to get rid of say half of them?

upload_2014-11-14_23-4-15.png

upload_2014-11-14_23-3-51.png
 
Last edited:

chopnhack

Apr 28, 2014
1,576
Joined
Apr 28, 2014
Messages
1,576
Small update with some changes - fewer vias and the physical layout showed that the J2 needed to be moved slightly. Quite happy with the results, very compact!!

@KrisBlueNZ - Kris, do I need to include a diode after the inductor? I was reading up on SMPS and on a simple buck circuit, they showed a diode on the output side after the inductor. I tried to reason it out and figured that as the stored current is discharged, the intent is to keep it from going in the wrong direction? If I have it right, do I need to install one on this circuit? My guess would be that it would be between R9 and ground.

upload_2014-11-17_15-52-37.png
 
Last edited:

chopnhack

Apr 28, 2014
1,576
Joined
Apr 28, 2014
Messages
1,576
If the board is suitable to send off, my thoughts are starting to shift to the programming of the pic.

To that effect I produced a flowchart of what I think is going on with the chip and its gates. I am not sure of the terminology yet, just wanted to see if I was on target with the logic.

upload_2014-11-18_17-23-50.png
 

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
Sorry for the slow reply!
Small update with some changes - fewer vias and the physical layout showed that the J2 needed to be moved slightly. Quite happy with the results, very compact!!
Yes, nice!
Kris, do I need to include a diode after the inductor? I was reading up on SMPS and on a simple buck circuit, they showed a diode on the output side after the inductor. I tried to reason it out and figured that as the stored current is discharged, the intent is to keep it from going in the wrong direction? If I have it right, do I need to install one on this circuit? My guess would be that it would be between R9 and ground.
The catch diode isn't needed with the TPS54062 because the IC contains a second MOSFET that performs the same function. This is called a synchronous converter. When the pass MOSFET turns OFF and the back EMF from the inductor tries to drive the "PH" pin (pin 8) negative, the IC turns on its internal MOSFET, which clamps the PH pin to 0V. The two MOSFETs operate synchronously, hence "synchronous converter".

I will reply on the control logic later.
 

chopnhack

Apr 28, 2014
1,576
Joined
Apr 28, 2014
Messages
1,576
Sorry for the slow reply!
No worries, we keep you busy enough on the site! - Many thanks :)

The catch diode isn't needed with the TPS54062 because the IC contains a second MOSFET that performs the same function. This is called a synchronous converter. When the pass MOSFET turns OFF and the back EMF from the inductor tries to drive the "PH" pin (pin 8) negative, the IC turns on its internal MOSFET, which clamps the PH pin to 0V. The two MOSFETs operate synchronously, hence "synchronous converter".
LOL :oops: I recently posted about smps and talked about upper/lower gates and I didn't even realize that this chip has it onboard.... oops! :D

Out of curiosity, would it have been safer to isolate the bridge rectifier output to the converter with a transformer?

I will reply on the control logic later.
No worries there mate, I was just beginning to flesh out some of my thoughts on it. Take your time.

If you think the board is good to send off, I will look it over one more time and clean up the silkscreen and place the order. :)
 
Top