Designing a Time Delayed Relay

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
That's a lot better. I would avoid the track from pin 6 on the top side. I can't see the copper on the bottom layer but I assume it duplicates the copper on the top.

It's a number of years since I did any PCB layout so I'm pretty rusty on the details. I'm working on my own layout for the Allegro chip area which I may upload sometime.

What size are the via holes in that area? 30 thou would be fine; probably 24 would be no problem too. You could find out in advance from your intended PCB manufacturer.

Personally I use 15 thou tracks and 10 thou clearances for general signal routing unless the layout is tight, and this gives a very manufacturable board.
 

chopnhack

Apr 28, 2014
1,576
Joined
Apr 28, 2014
Messages
1,576
I would avoid the track from pin 6 on the top side. I can't see the copper on the bottom layer but I assume it duplicates the copper on the top.

Changed pin 6 and yes the top and bottom layers are identical.

It's a number of years since I did any PCB layout so I'm pretty rusty on the details. I'm working on my own layout for the Allegro chip area which I may upload sometime.

I would be interested to see what you come up with!

What size are the via holes in that area? 30 thou would be fine; probably 24 would be no problem too. You could find out in advance from your intended PCB manufacturer.

The via holes are 50 thou per your instruction in post# 53, I changed it to a 27 thou drill size - it was one of the standard Eagle presets. I went to upload the board to Seeed Studios, but I got an error - apparently the CAM is looking for layers that are not offered in the free version of Eagle! Doh :-( I may have to restart the whole process in another software.

Personally I use 15 thou tracks and 10 thou clearances for general signal routing unless the layout is tight, and this gives a very manufacturable board.
Good to know, ty - I will keep the power traces at the larger size 26 thou if I recall and the rest are set for 16 thou - another preset from Eagle.
 
Last edited:

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
The via holes are 50 thou per your instruction in post# 53,
I meant the via size, not the hole size!
I changed it to a 27 thou drill size - it was one of the standard Eagle presets.
Cool.
I went to upload the board to Seeed Studios, but I got an error - apparently the CAM is looking for layers that are not offered in the free version of Eagle! Doh :-( I may have to restart the whole process in another software.
Does Seeed Studios have a FAQ to advise you what software they support and recommend? And what settings to use?
I will keep the power traces at the larger size 26 thou if I recall and the rest are set for 16 thou - another preset from Eagle.
16 thou is fine for the signal tracks, but the high-current connections to the relay contact should be as fat as possible, i.e. fills on both sides, like you did for the Allegro chip.
 

chopnhack

Apr 28, 2014
1,576
Joined
Apr 28, 2014
Messages
1,576
Hahaha - I was wondering why so large of a hole, thanks for clearing that up :) I fixed that on the board. I am looking at another manufacturer currently, Elecrow. Very reasonable for a hobbyist!

I tried to work out the area around the relay, but I had to violate a previous rule of not crossing under the relay. I think I understand why not to, inductance when the coil triggers. I have enclosed the most recent layout, let me know if you see a way of not crossing under from the emitter of the darlington to the relay coil.
Thanks!

8d_zps9a5125bf.png
 

chopnhack

Apr 28, 2014
1,576
Joined
Apr 28, 2014
Messages
1,576
I redrew the schematic, with the trace from the emitter going down and around the X1 connector, to the outside of the relay, but it still crosses under. I think that this might be better in that its not directly between two pins of the relay, but that is just a gut response.. if it were to pass perpendicular to the coil, it would be an improvement, but without knowing the direction of the coil, its a crap shoot ;-)
 

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
Re your layout in post #64.

Change the track from the relay's common pin so it runs directly upwards (under the relay) to the connector. The two coil tracks can then come straight out the bottom.

The normally closed pin is not connected but can be connected to the common pin to ease the layout. I would also rotate C8 90 degrees and move Q1 to the left.

Both of the tracks from the connector to the relay can and should be fatter.

Edit: There's no problem with having tracks running underneath the relay. You need to worry about clearance distances and track widths for high-current paths.
 

chopnhack

Apr 28, 2014
1,576
Joined
Apr 28, 2014
Messages
1,576
Re your layout in post #64.

Change the track from the relay's common pin so it runs directly upwards (under the relay) to the connector. The two coil tracks can then come straight out the bottom.

The normally closed pin is not connected but can be connected to the common pin to ease the layout. I would also rotate C8 90 degrees and move Q1 to the left.

Both of the tracks from the connector to the relay can and should be fatter.

Edit: There's no problem with having tracks running underneath the relay. You need to worry about clearance distances and track widths for high-current paths.

Awesome observation, thank you!

Moving the cap and res closer to the left allowed me to center the connector giving more room to create a larger plane. It's also stitched together pretty well I believe. I will download the other companies DRU and run it through the program to see if the clearances check out.

Are the pads for the relay adequate now?

8g_zpscde4c353.png
 

chopnhack

Apr 28, 2014
1,576
Joined
Apr 28, 2014
Messages
1,576
I was able to squeeze in another 2 connectors! I didn't think it would be possible :) Couple of questions: What prevents arcing between the pads of P3 and P2? or for that matter the small space between the soic pins? Also, if I wanted to upgrade the board in the future for 220v use on the switched side - Would the R6/C8 values have to change?
8h_zps753d4039.png
 
Last edited:

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
What prevents arcing between the pads of P3 and P2? or for that matter the small space between the soic pins?
Arcing won't happen because there's no significant voltage between those points. Lots of current will flow through the Allegro chip but the voltage across it will only be millivolts. The clue to this is the fact that pins 1,2 and pins 3,4 are connected together internally by a section of metal. Current is forced to flow through this metal, which produces a magnetic field which is detected by the other part of the chip, but the voltage that appears across it is tiny.

On the other hand, the relay contact is different. When the relay is open, the whole 110VAC voltage for the controlled motor appears across the contacts, so, you need to maintain good clearances between the two tracks.
Also, if I wanted to upgrade the board in the future for 220v use on the switched side - Would the R6/C8 values have to change?
No, no change needed there. They're only approximate anyway.
 

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
What type of relay are you planning to use there? All of the relay types I recommended on the schematic are laid out differently from that outline...
 

chopnhack

Apr 28, 2014
1,576
Joined
Apr 28, 2014
Messages
1,576
Arcing won't happen because there's no significant voltage between those points. Lots of current will flow through the Allegro chip but the voltage across it will only be millivolts. The clue to this is the fact that pins 1,2 and pins 3,4 are connected together internally by a section of metal. Current is forced to flow through this metal, which produces a magnetic field which is detected by the other part of the chip, but the voltage that appears across it is tiny.

On the other hand, the relay contact is different. When the relay is open, the whole 110VAC voltage for the controlled motor appears across the contacts, so, you need to maintain good clearances between the two tracks.

No, no change needed there. They're only approximate anyway.
Excellent and clearly explained, thank you!
 

chopnhack

Apr 28, 2014
1,576
Joined
Apr 28, 2014
Messages
1,576
What type of relay are you planning to use there? All of the relay types I recommended on the schematic are laid out differently from that outline...
I used one listed from the schematic. Omron brand

I added one more molex 2 pin header at 110v entrance onto the board so I can wire in a rocker switch. I changed my mind on the implementation of the board and wanted to be able to shut the circuit down when not in use.

My current shop outlets are in a 4" square metal box, wall mounted with 110 receptacles beside 220v recepts. I am thinking of mounting another 4" square box beside the existing, mating them together with a chase nipple, passing my circuits into this box and onto the board and new receptacles. Doing this will save on having to make extension cords for the circuit box itself. I lose portability, but it wont be necessary if I do it this way. The duplex receptacles would be split (or half-hot as we call them here) such that the individual outlet of the duplex receptacle is isolated from the other. The top could be the "sensed" outlets and the bottom outlets could be the switched side. The only issue I see is the potential to have both a 110v and a 220v draw at the same time from both "sensed" outlets being run at the same time. I am the only operator in the shop, but I would like to explore a way around this. I had thought of a manual switch, but wasn't sure if there wasn't a cleaner way to do this. What do you think on this matter?

The spacing between the narrowest spots of the relay pads is 100 thou. Do you think this is adequate? I did have the board checked for manufacturability and it passed :)
 

chopnhack

Apr 28, 2014
1,576
Joined
Apr 28, 2014
Messages
1,576
I used one listed from the schematic. Omron brand

On double checking - I had substituted another package size because I couldn't find a suitable model in the Eagle library! I'm sorry, I forgot that detail. Most of the designing and redoing of the layout is done late at night due to our time zone differences and I didn't keep revision notes... I see now why people do!

There are only minor differences that I can see. G5LE has a higher max turn on of 18VDC, better insulation class of F vs. G2RL's class B, and a quicker response time.

Is it a suitable replacement?
 

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
I added one more molex 2 pin header at 110v entrance onto the board so I can wire in a rocker switch. I changed my mind on the implementation of the board and wanted to be able to shut the circuit down when not in use.
OK.
My current shop outlets are in a 4" square metal box, wall mounted with 110 receptacles beside 220v recepts. I am thinking of mounting another 4" square box beside the existing, mating them together with a chase nipple, passing my circuits into this box and onto the board and new receptacles.
I'm with you so far...
Doing this will save on having to make extension cords for the circuit box itself. I lose portability, but it wont be necessary if I do it this way.
So each wall-mounted box, with power receptacles for your equipment, will have one of these circuits mounted permanently inside it? I had already assumed that.
The duplex receptacles would be split (or half-hot as we call them here) such that the individual outlet of the duplex receptacle is isolated from the other. The top could be the "sensed" outlets and the bottom outlets could be the switched side. The only issue I see is the potential to have both a 110v and a 220v draw at the same time from both "sensed" outlets being run at the same time.
OK, you've lost me here!
Are you planning to put two of these boards in each box, so each box will have two sensed outlets and two switched outlets and they work independently? Or would the sensed outlets be connected together, and ditto for the switched outlets? If the latter, then when power is being drawn through either (or both) of the sensed outlets, both switched outlets would power up. Can you dumb it down for me?
I am the only operator in the shop, but I would like to explore a way around this. I had thought of a manual switch, but wasn't sure if there wasn't a cleaner way to do this. What do you think on this matter?
I think I don't understand yet.
The spacing between the narrowest spots of the relay pads is 100 thou. Do you think this is adequate? I did have the board checked for manufacturability and it passed :)
Yes, adequate.
On double checking - I had substituted another package size because I couldn't find a suitable model in the Eagle library! I'm sorry, I forgot that detail. Most of the designing and redoing of the layout is done late at night due to our time zone differences and I didn't keep revision notes... I see now why people do!
All the relay types I listed on the schematic are rectangular, with the coil pins at one end and the contacts at the other. Actually, the ALE1Px24 and the G2RL have quite closely spaced contact pins, but the others - ALZxxx24, and the two TE Connectivity / Schrack models, are good. I'm sure you can create new outlines for Eagle if you take a bit of time to learn how.
There are only minor differences that I can see. G5LE has a higher max turn on of 18VDC, better insulation class of F vs. G2RL's class B, and a quicker response time. Is it a suitable replacement?
Yes. Make sure you get the high-capacity version with the 16A contact rating.
 

chopnhack

Apr 28, 2014
1,576
Joined
Apr 28, 2014
Messages
1,576
OK. I'm with you so far... So each wall-mounted box, with power receptacles for your equipment, will have one of these circuits mounted permanently inside it? I had already assumed that.
Yes sir!

OK, you've lost me here!
Are you planning to put two of these boards in each box, so each box will have two sensed outlets and two switched outlets and they work independently? Or would the sensed outlets be connected together, and ditto for the switched outlets? If the latter, then when power is being drawn through either (or both) of the sensed outlets, both switched outlets would power up. Can you dumb it down for me? I think I don't understand yet.
I'm sorry, I didn't give enough information. Let me elaborate further:
Because of space constraints I am only going to be able to fit one board in that box and have enough room for wiring and receptacles. Yes, I would like each box to have one 110 and 220 sensed outlet and one 110 or 220 switched outlet (the switched device will always (at least in the current thinking) be a singular entity so only one switched outlet needed - I can change voltages easily if I change machine types in the future).

I was thinking that I would be able to wire in series from the sensed outlets one leg of both the 220v and 110v. I would have to make sure the leg of 220 used was the same side of the panel as the 110 leg - our 220v is called split phase, the 220 is really two legs of 110 - each leg from a different tap off of the power pole. What gave me pause here was that I might have an accident where I might energize two sensed devices (one 110 and one 220) simultaneously exceeding the Allegro's capacity. This is where I thought I might need to switch the incoming currents.
With the wiring landing under the same terminals, if I use the same leg of 110 as the one hot lead of 220 shouldn't I still have 110v potential to ground on the 110v line and 220v on the other or will I end up with 220v on the 110v line? I see the 220v side becoming 220v when the circuit is energized and both 110v legs connect through the device giving 220v pot. to ground. I am concerned for the potential of 220v coming through the 110v receptacle.

Here is a diagram to better illustrate:

diagram_zps14723344.png




All the relay types I listed on the schematic are rectangular, with the coil pins at one end and the contacts at the other. Actually, the ALE1Px24 and the G2RL have quite closely spaced contact pins, but the others - ALZxxx24, and the two TE Connectivity / Schrack models, are good. I'm sure you can create new outlines for Eagle if you take a bit of time to learn how. Yes. Make sure you get the high-capacity version with the 16A contact rating.

I did take a stab at device creation in Eagle and was able to make two devices - the soic profile that fits the Allegro chip correctly (body size and pin pitch) and the Phoenix terminal, but man it was a bear! I created so many bugs it took a week to figure out what I did wrong, LOL. Layers and grid rearrangement is what did me in! Layer information is critical :)

Are the relays you mention that much better to use? The specs are nearly identical, but the G5 model (16A rated) is ~50% less expensive. Is it worth redoing the layout for the more expensive unit?
 
Last edited by a moderator:

chopnhack

Apr 28, 2014
1,576
Joined
Apr 28, 2014
Messages
1,576
Looking with fresh eyes, I would have to say that the diagram shows the bottom leg of the 220 circuit will cross over to the 110 circuit. The only way I see of making this work would be to either some how switch the incoming sources (110 and 220 separately) or forgo that and use two boards. I am not sure if I have room for two boards or for that matter a switch that could handle that kind of current.

You mentioned having the sensed outlets connected together in your question to me for clarification - do you see a way of connecting the two different voltage level sensed outlets?
 

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
I have one more update for the current version of the design.

Updated schematic:
268425.005.GIF

A layout suggestion:
ep268425 motor switch with run-on kris's layout.png

Paler tracks are on the underside. I think I went a bit overboard on the vias!

I'll respond to your other questions soon.
 

chopnhack

Apr 28, 2014
1,576
Joined
Apr 28, 2014
Messages
1,576
I have one more update for the current version of the design..
I thought you said your PCB skills were rusty!!! Wow, you got me beat and in one take, well done! I love how you were able to resolve many of the connections into common planes - I tried to work that out, but was getting tied up in the rat's nest too often. I like how you cheated some space, orienting the fusible resistors vertically. Nice move as those are pretty large resistors. :) One more addition, I was going to pull out the LED via a 2 pin connector so I can remotely mount the LED on the face plate of the outlet.

What connectors where you using in your layout for CN2 and 3? They look a bit narrow in perspective. My guess at the size of the overall board is about 10cm by 6.5cm?
Never too many vias when you don't have to hand drill them ;-)

You lost me on the positioning of the decoupling caps: I thought C4&5 were decoupling the Allegro chip, while C6&7 were decoupling the PIC

Are we still using the PIC12F675 or going back to F1571?
 
Last edited:

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
Sorry for the really slow reply!

So are you saying that your 110VAC and your 220VAC supplies have one side in common? So you plan to put the current sensing device in series with that common wire?

From your drawing it looks like you have neutral/ground, and two 110VAC phase busses, and there's 110VAC between each buss and neutral/ground, and 220VAC between the two phase busses, ignoring neutral/ground.

If that's the case, then I think your idea will work, but I can't comment on the safety or the legality of it. I'd suggest you ask a registered electrician with experience of industrial installations. I would be concerned that by commoning the wires at the board, you are forcing a requirement for connections at the electrical panel. Normally, an electrician would be free to move loads around. But with them commoned like that, if he changed the wires round at the electrical panel, he could short out a phase.

As for the choice of relay, it's up to you. Personally I would use one with the coil at one end and the contacts on the other, simply because it's more direct. But it's not a big deal.

I guess the best solution would be to have two independent current detecting circuits on the board. That would require two Allegro chips. The signal from the second Allegro chip could feed into pin 2 of the micro, and R5 could move to pin 6 or pin 7, so the only extra components would be the connector(s), one Allegro chip and two capacitors.

The connectors on my layout are Phoenix Combicon types. I gave links in post #55.

The board is exactly 4 inches horizontally, and 2 inches vertically, between the mounting holes. My PCB CAD package does both metric and imperial, but it's best to use one or the other, and all of the other components were imperial, so I used imperial spacing for the mounting holes as well.

C4 is the decoupler for U2.
C5 is a filter capacitor for the signal inside U2.
C6 is the decoupler for U3.
C7 is a filter capacitor for the mains frequency signal that feeds into U3.

Either the PIC12F675 or the PIC12F1571 can be used, with a slight change in the firmware.
 

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
Oops - I just realised... two Allegro chips means a lot more load current, so C1 would need to increase to at least 2.2 µF.
 
Top