3

Few questions about a little Home-Automation project I am trying.

Below is the schematic which I found in an article, slightly modified to suit the parts I have in hand --

Original had,

Q1 = BC548
Relay = 12V coil voltage

Mine has,

Q1 = BC547B
Relay = 5v coil voltage

Q1) Is that an acceptable conversion ?

Note: The BC547B has Vcbo:50V, Vceo:45V, Vebo:6V, where-as the BC548 in original circuit has Vcbo:30V, Vceo:30V, Vebo:5V, rest of the parameters being pretty same as per datasheet (hFE:220-450).

The relay is the SPDT PCB-mount kind (rated for 10A @230VAC), also called "sugar cube".

my schematic

Q2) The load I am trying to drive is resistive (60W 220VAC incandescent lamp). What changes might I need if I would like to drive loads like --

  • Fluorescent lamp
  • Fan (220VAC, 60W)
  • 1HP Water pump (220VAC, 800W) -- One thought is to use higher current rated (e.g. 30A) relay. But, I think I need to worry about EM feedback which might cause arcing and destroy the EM relay.

Q3) Right now I am making this on a veroboard (el-cheapo phenolic kinds). While I understand that this may be sufficient for the lamp/fan control, I am wondering if I need something better for higher loads, s.a. the Water-pump control ? What is the minimum gauge wire to be used for this purpose ? What kind of connectors (terminal blocks) could be used ?

bdutta74
  • 3,524
  • 11
  • 46
  • 67

1 Answers1

5
  • DO NOT USE MAINS AC ON STRIP BOARD / VEROBOARD
    that your days may be long on the face of the land.

This is in fact doable with reasonable safety with proper care.
BUT learning what "proper" means in this context is something best arrived at by some years of general experience. Destruction of equipment and / or life is easily achieved by applying AC mains to stuff and to people and it should not be dealt with lightly, ever.

Wire the mains wiring to the relay contacts directly using appropriate connectors or hard soldering as appropriate.l If the relay is mounted on the veroboard, leave largish full holes in the veroboard around the contacts ad ALWAYS provide means of preventing user or other contact with live mains.

  • Note that I said above IF the relay is mounted on the veroboard,...".

    I do not and did not recommend it.

    That was just for people who like to ignore good advice and to live dangerously. Better not to do it till you have lived longer and prospered somewhat. As you know, wax on wings tends to melt when flying too close to sunwards and mains shocks can be as lethal.

    If you MUST do this
    (1) use high temperature wings when flying close to sun - TEFLON may help.
    (2) 8mm / 0.33 inch gaps all round MINIMUM between contact and anything else on board.
    A GAP is a hole with air in it !!!!
    Veroboard and similar = Phenolic board = PAPER plus a resin.
    Relying on paper board to not track, carbonise, absorb moisture or make deals with Murphy
    is placing your life at risk.
    Or somebody else's.

    Leaving an AIR gap is the equivalent to an 8mm creepage distance which is what most regulatory authorities prescribe in similar cases

    Leaving 8mm of Veroboard as an AC mains barrier is like tossing a coin 10 times and calling heads. You will probably get at least one head and would be surprised when you didn't. The difference is, with a coin you have a silly look on your face when you fail, whereas with AC mains you may end up with a silly look on your dead face.


(Q1) Your driver is good EXCEPT

  • The base drive resistor is far too low. ee below.

  • they have used a very non standard and confusing symbol for the output contacts. I assume this is a SPDT = sngle pole double throw (= single changeover ) contact with isolation between output circuit and 5V.

The transistor may or may not be OK depending on coil current - see below.
You do not specify the coil current, but say it is 200 mA.
Icollector = Icoil = 200 mA
Ibase >> to > Icollector/Beta = 200 mA / 200 = 1 mA

I base = (Vdrive - Vbe) / Rbase or
Rbase = (Vdrive - Vbe ) / Ibase.

For Vdrive = 5V,
Rbase = (5-0.7) / 0.001 = 4300 ohms.

A resistor that gives substantially more than 1 mA is desirable 9allows beta to be low etc). So R1 = 1k = 1000 ohms would be fine.

Even with say 3V drive.
Ib = (Vdrive - Vbe)/R1 = (3-0.7)/1000 = 2.3 mA.
With a Beta of 200 Icmax = beta x Ib = 200 x 2.3 = 460 mA.
If relay current < 200 mA then 1K is stioll good.
If relay current is higher the value of R1 MAY need adjusting - probably not.


(Q2) Your basic circuit is good for load power at any sensible level, subject to suitable coil drive power AND possibly some sort of snubbing of the contacts.

The relay or contactor has to have contacts rated for the load carried - which will be in the relevant datasheet.

A "snubber" is a circuit designed to absorb transient AC energy which may othewise cause contact arcing when the contacts open. It usually consists of a series C and R such that the C limits the current to a low value in the R under normal conditions but when high voltage and/or high frequency transients occur the R current and dissipation increase and absorb the transient energy.

There have been various other stack exchange questions re snubbers eg
here & here & here & here
and there is lots of on-web resources eg
Wikipedia
Good intro
Good. Slightly more complex

Good - with online calculator

enter image description here

Non dissipative version (from above link)

enter image description here

and manufacturer of relays etc will often specify what is needed for their product with a given load.


[Q3} Wire size. Terminal block size.

Too general for easy answer.
Many wire tables are available re current/gauge.
"As thick as you can sensibly handle with no great effort" is usually enough.
Occasionally you need thick enough to be hard or annoying, but that is usually at low voltage, not at mains voltages.


Transistor selection:

The BC547b is rated at only 100 mA Ic. Datasheet here
This may be OK BUT a much better transistor is available which is often as cheap and sometimes cheaper.
This is the BC337 (NPN). BC327 (PNP). Also availabl in SOT23 SMD as BC817/BC807. I use these as my standard "jellybean" transistors. They will meet almost any need that you'd sensibly use them for, and in most cases a better transistor is not available without paying a lot more.

These are available in several beta ranges. I always buy the highest beta bin range = BC337-40 which has beta in the range 250 - 600 with mean of 400.
BC337-40 etc 800 mA*, 50V.
(* rated current varies with supplier 600 - 800 mA typical). 800 mA in datasheet cited).

Digikey has them at $US0.14 / 100 here Keep watch a you will sometimes ee them for far less - maybe under 5 cents in 100's.

BC337 datasheet


Creepage / Mains clearance

Phenolic PCB has its specialist uses but really really should be avoided for most purposes. The savings in cost are not vast compared to eg FR4 fibreglass. Phenolics main advantages are cost (minor gain) and "punchability". It is amenable to having holes or slots etc cut by punching tather than drilling or routing. In general use it is a nasty PCB material. It break and shatters. It risks breakdown. It is not fire or moisture proof. Caveat emptor!

Excellent creepage & clearance page here

Excellent TI power supply safety design paper here - Image from this shown below.

enter image description here

Excellent creepage & celarance page here.

Note they say:

  • When designing a switch-mode power supply for use in information technology (IT) equipment, a typical rule of thumb is to allow an 8-mm creepage distance between primary and secondary circuits, and a 4-mm distance between primary and ground. If these dimensions are allowed for during the design stage, there is a high probability (95%) that no failure will occur with respect to creepage or clearance when the final product is submitted for test.

All the above are liable to lead you to conclude that my advice was too conservative and that you can use lower limits with Vero board. It wasn't. You can't with any safety.

Russell McMahon
  • 147,325
  • 18
  • 210
  • 386
  • 1
    Firstly, a big thanks to you @Russell for such a comprehensive answer. Got a few counter questions to help understand this further. PS> If not already clear, my further questions would clarify that I am an electronics novice. – bdutta74 Jan 22 '12 at 19:14
  • Re. your advise against mounting relays on veroboard, and then the suggestion "...leave largish full holes in the veroboard around the contacts...", wondering what kind of "largish full holes" should I make ? And what purpose do they serve ? Maybe if you have a graphic to show, it'd make it clear. – bdutta74 Jan 23 '12 at 05:19
  • @icarus74 - Note that I said **IF** the relay is mounted on the veroboard,...". I do not and did not recommend it. That was just for people who like to ignore good advice and to live dangerously. Better not to do it till you have lived longer and prospered somewhat. As you know, wax on wings tends to melt when flying too close to sunwards and mains shocks can be as lethal. If you MUST do this (1) use high temperature wings (2) 8mm / 0.33 inch gaps all round **MINIMUM**. This is the equivalent to an 8mm creepage distance which is what most regulatory authorities prescribe in similar cases – Russell McMahon Jan 23 '12 at 07:09
  • @icarus74 - It's probably worth noting that if your relay is rated to switch inductive loads (e.g. a motor, etc..), you can skip the snubber. You can also skip the snubber if your load is non-inductive (such as a light-bulb). It's probably far easier to just buy power-rated relays then build a snubber. – Connor Wolf Jan 23 '12 at 08:22
  • (To clarify, I am talking about the snubber on the *load*. You will always need at least the back-emf diode on the relay (this is the diode connected across the relay coil)) – Connor Wolf Jan 23 '12 at 08:24
  • @RussellMcMahon, thanks for stressing on safety factors. That is indeed what I wanted to know. Are there any such concerns if I take a DIY PCB route, on phenolic copper-clads, while honouring the min. trace width, and clearance between traces / connectors / leads etc. ? Should it be some kind of a cut-out (s.a. physical gaps) in the PCB that separates the AC / DC nets ? I've seen such recommendation, but can't seem to visualize how it is to be achieved. – bdutta74 Jan 23 '12 at 12:16
  • Thanks @FakeName. Reading around, I'd got the impression that snubber circuits are desirable, even if the relay is sufficiently rated, however I am not familiar with "power-rated relay" i.e. if they are superior to say what I have in hand, in form of [this relay](http://www.108relays.ca/dl/rwh_relay_datasheet.pdf) – bdutta74 Jan 23 '12 at 12:20
  • 1
    @icarus74 - some relays explicitly specify in their datasheets that they can handle inductive loads. It's worth noting that even if you have a relay that is specified to handle inductive loads, a snubber *will* improve it's cycle life. However, it's also additional trouble to construct. A snubber is generally a good idea for inductive loads. however, it's not *essential*. – Connor Wolf Jan 23 '12 at 12:24
  • 1
    @icarus74 - Phenolic PCB has its specialist uses but really really should be avoided for most purposes. The savings in cost are not vast compared to eg FR4 fibreglass. Phenolics main advantages are cost (minor gain) and "punchability". It is amenable to having holes or slots etc cut by punching rather than drilling or routing. – Russell McMahon Jan 23 '12 at 13:07
  • Thanks @FakeName. Probably because I have been looking at the lower-end (price wise) of the EM relays, I might not have come accross the ones whose datasheet states that they are good for inductive loads as well. In fact, most of the relay datasheets I've seen so far are 1 or 2 page long, and not very rich in information. If you are aware of any specific part, or make/series that might fit the bill would appreciate if you could point to it. – bdutta74 Jan 23 '12 at 13:16
  • @RussellMcMahon, sincere gratitude. That's a mighty information packed link and graphic. I see what you mean (and the other articles meant) now. The phenolic / protoboard approach was only for prototyping, and once I got everything working, I was anyway planning to go for professionally done PCBs on FR4, probably with solder-mask, silk-screen and all. I was looking for a relatively safe (i.e. engineer handled) way to prototype. – bdutta74 Jan 23 '12 at 13:24
  • @icarus74 - [here](http://www.ia.omron.com/data_pdf/data_sheet/g2r-_-s_ds_csm42.pdf) is a nice part from Omron that demonstrates what I am talking about. Of interest is the fact that the power ratings for an inductive load are smaller then a non-inductive load (7.5A vs 10A). – Connor Wolf Jan 23 '12 at 13:31
  • @icarus74 - Another thing to keep in mind is that large relays often *require* a minimum current to function reliably. Basically, the relay contacts are kept clean by the spark that is produced when the connection breaks. If you try to use a big, high-current relay for switching low-voltage, low-current (say, 10 mA) loads, it can become intermittent after a while (generally thousands of cycles). If you are in a situation where you are using a relay to switch a *small* load, you should use a appropriately sized device. – Connor Wolf Jan 23 '12 at 13:35
  • On a related note, my current water pump is 0.75kW/1HP single-phase self-primed one, rated 5A @ 220V. Without a snubber, would a pcb-mount sugar-cube, rated for upto 12A @ 220V [like this](http://www.108relays.ca/dl/rwh_relay_datasheet.pdf) be acceptable -- for prototyping, or it'd be unsafe ? Note that I'd like to ernergise this NO relay for upto 30mins at a time. Reading the datasheet, I get the impression that this relay is supposed to be operated in millisecond range !! (time-vs-coil power graph) Is that the right interpretation ? – bdutta74 Jan 23 '12 at 13:36
  • @icarus74 - If it's just for a prototype, I don't see why not. Generally, if you are switching an inductive load, if you de-rate the relay by ~33-50% you're probably safe. As long as the situation can handle the relay not correctly turning off, you can push it closer to the ratings. Again, **don't do this in production, or anywhere the relay operating as desired is a necessity**. Testing is another matter. – Connor Wolf Jan 23 '12 at 13:42
  • @icarus74 - Incidentally, the millisecond numbers in the datasheet are the *actuation times*. Basically, it means that if you apply power to the coil, the relay will have begun to conduct within 10 ms. When you stop power to the coil, it should be open-circuit within 5 ms. – Connor Wolf Jan 23 '12 at 13:44
  • Thanks @FakeName, for the Omron part ad the clarifications. – bdutta74 Jan 23 '12 at 17:04
  • @icarus74 - Critical times are contact break and to a lesser extent contact make. When actuated there are usually no problemsif current is not vastly over rated value. – Russell McMahon Jan 24 '12 at 03:28