Searching \ for 'The relay circuit PART TWO on field problems' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: techref.massmind.org/techref/io/motors.htm?key=relay
Search entire site for: 'The relay circuit PART TWO on field problems'.

Truncated match.
PICList Thread
'The relay circuit PART TWO on field problems'
1999\01\11@045911 by Jaume Aragay Badia

picon face
Well, I've finally built the board and tested it, and everything was fine
UNTIL I got to real world:

One of the relays (the one intended to trigger the welding torch) brings in
these pretty 45 Vac into the circuit that stop everything. Taking away this
signal brings the circuit back to normal operation. What's the problem? This
45Vac are NOT in the PIC's path, they are in the relay contacts. Any
suggestion?

This is the circuit:

>

                                     O +V (unregulated) being 12VDC
                                     |
                                     |
                                 ----*
                                 |   |
                                 |   C              +-------------------o
                     1N4007     ---  C              |
                                 A   C relay coil     /
                                 |   C               /  N.O. switch
45Vac from the torch
                                 |   C              /   in the relay
                                 |   |              |
                                  ---*              +-------------------o
                                     |
               470      470        |/
PIC  o----*- /\/\/\-*-/\/\/\-*-----|   BC337
          |         |        |     |\
         +++       ---      ---     V
     22K | |       --- 10n   A      |
         +++        |        |      |
          |         |        |      |
         ---       ---      ---    ---


                             ^
                             |
                          1N4148


----------------------
 Jaume Aragay Badia
  spam_OUTaragayTakeThisOuTspamemail.com
----------------------

1999\01\11@062428 by Tjaart van der Walt

flavicon
face
Jaume Aragay Badia wrote:
>
> Well, I've finally built the board and tested it, and everything was fine
> UNTIL I got to real world:
>
> One of the relays (the one intended to trigger the welding torch) brings in
> these pretty 45 Vac into the circuit that stop everything. Taking away this
> signal brings the circuit back to normal operation. What's the problem? This
> 45Vac are NOT in the PIC's path, they are in the relay contacts. Any
> suggestion?

I don't think the problem lies in the relay switching circuit,
but rather in the supply for the PIC. The 45Vac obviously
creates a lot of noise in the supply rail to the PIC.

Here are a few approaches in no particular order ;
1) Put a snubber circuit on the relay contacts
2) Ensure that there is only one ground entry for the system.
  A ground loop can do this sort of thing.
3) Make sure that both Vdd's and both Vss's are connected
  to +5V and Ground.
4) Make sure there is a 100nF cap *right next* to the PIC's
  power pins.
5) Make sure your Xtal lines are short, and the 22pF decoupling
  caps are connected to a solid ground.
6) Put a large cap before the regulator, as well as a 22uF after.
7) Regulators are not always good at stopping negative spikes,
  so you could put a diode before it to short these spikes to
  ground.

If you still get the problem, you can try a low pass filter in
front of the regulator :

22R 1/2W                 ------
--\/\/\/\---*-----*------| 7805 |---*------*---Vdd
           |     |470uF  ------    |22uF  |100nF
          ---   ---        |      ---    ---
    1N400? A    ---        |      ---    ---
           |     |         |       |      |
------------*-----*---------*-------*------*---Vss

Keep us posted...

--
Friendly Regards          /"\
                         \ /
Tjaart van der Walt        X  ASCII RIBBON CAMPAIGN
.....tjaartKILLspamspam@spam@wasp.co.za  / \ AGAINST HTML MAIL
|--------------------------------------------------|
|                WASP International                |
|R&D Engineer : GSM peripheral services development|
|--------------------------------------------------|
| Mobile : tjaartspamKILLspamsms.wasp.co.za  (160 text chars) |
|     http://www.wasp.co.za/~tjaart/index.html     |
|Voice: +27-(0)11-622-8686  Fax: +27-(0)11-622-8973|
|          WGS-84 : 26¡10.52'S 28¡06.19'E          |
|--------------------------------------------------|

1999\01\11@062605 by Quentin

flavicon
face
Put spark suppressors over the relay contacts. Either an RC circuit
and/or a spiketrap (forgot the name now: Varistor?) over the AC supply.

Oh, and welcome to the real world (and its problems).

Quentin

1999\01\11@070413 by Jaume Aragay Badia

picon face
Quentin wrote:

> Put spark suppressors over the relay contacts. Either an RC circuit
> and/or a spiketrap (forgot the name now: Varistor?) over the AC supply.

The 45Vac go through the normally open contact of the relay and the common
contact using them as a switch for an other machine (the welding gun
switch). The AC is not in the coil side.


> Oh, and welcome to the real world (and its problems).

Thanks, this is my second real-world circuit, so I expected this kind of
out-of-the-lab problems :)

Jaume.

----------------------
 Jaume Aragay Badia
  .....aragayKILLspamspam.....email.com
----------------------

1999\01\11@070415 by Jaume Aragay Badia

picon face
Tjaart van der Walt wrote:

> I don't think the problem lies in the relay switching circuit,
> but rather in the supply for the PIC. The 45Vac obviously
> creates a lot of noise in the supply rail to the PIC.

       But the 45 Vac are not in the coil, so aren't they supposed to be
*isolated* from the coil lines which are the ones related to the unregulated
voltage lines also *isolated* from the pic using the 1N4007 diodes?

       These 45 Vac are NOT connected to the board, they just come in a wire to
the *switch* in the relay to leave to the other machine through the other
wire... Can this disturb the PIC suply?

> Here are a few approaches in no particular order ;

> 2) Ensure that there is only one ground entry for the system.
>    A ground loop can do this sort of thing.

Checked: only ONE gnd for the whole thing after the diode bridge:



220 VAC  XFRMR      BRIDGE      1N4007 200 ufd  7805
>------TTTTTTT------BBBBBBB-----*->|-*---------RRRRRRR------O+5
      T     T      B     B     |    |         R     R
      T     T      B     B     |    | +       R     R
>------TTTTTTT------BBBBBBB---  |   ---        RRRRRRR
                            |  |   ---           |
                            |  |    |            |        REGULATED
        Ground Common ----> *--C----*------------*---------oGND
                            |  |    Isolation
                            |  |    Diode
                            |  |    1N4007  1000 ufd     UNregulated
                            |  ----->|------*--------------O+12
                            |               | +
                            |              ---
                            |              ---
                            |               |             UNregulated
                            ----------------*--------------oGND


> 3) Make sure that both Vdd's and both Vss's are connected
>    to +5V and Ground.

The circuit works properly when the other machine is not attached.

> 4) Make sure there is a 100nF cap *right next* to the PIC's
>    power pins.

This cap sits on top of the PIC by pin 1 and 18.

> 5) Make sure your Xtal lines are short, and the 22pF decoupling
>    caps are connected to a solid ground.

They are by the pic with a nice ground and short lines.

---

{Quote hidden}

---


Thanks for your fast answer.

Jaume.

----------------------
 Jaume Aragay Badia
  EraseMEaragayspam_OUTspamTakeThisOuTemail.com
----------------------

1999\01\11@073044 by Tjaart van der Walt

flavicon
face
Jaume Aragay Badia wrote:
>
> Tjaart van der Walt wrote:
>
> > I don't think the problem lies in the relay switching circuit,
> > but rather in the supply for the PIC. The 45Vac obviously
> > creates a lot of noise in the supply rail to the PIC.
>
>         But the 45 Vac are not in the coil, so aren't they supposed to be
> *isolated* from the coil lines which are the ones related to the unregulated
> voltage lines also *isolated* from the pic using the 1N4007 diodes?
>
>         These 45 Vac are NOT connected to the board, they just come in a wire to
> the *switch* in the relay to leave to the other machine through the other
> wire... Can this disturb the PIC suply?

Hook a scope onto the supply, and check if it looks noisy
when the 45V supply is present. That's the only way to
answer this question.
>
> Thanks for your fast answer.
>
> Jaume.

You're welcome.

--
Friendly Regards          /"\
                         \ /
Tjaart van der Walt        X  ASCII RIBBON CAMPAIGN
tjaartspamspam_OUTwasp.co.za  / \ AGAINST HTML MAIL
|--------------------------------------------------|
|                WASP International                |
|R&D Engineer : GSM peripheral services development|
|--------------------------------------------------|
| Mobile : @spam@tjaartKILLspamspamsms.wasp.co.za  (160 text chars) |
|     http://www.wasp.co.za/~tjaart/index.html     |
|Voice: +27-(0)11-622-8686  Fax: +27-(0)11-622-8973|
|          WGS-84 : 26¡10.52'S 28¡06.19'E          |
|--------------------------------------------------|

1999\01\11@085522 by paulb

flavicon
face
Jaume Aragay Badia wrote:

> Well, I've finally built the board and tested it, and everything was
> fine UNTIL I got to real world:

> One of the relays (the one intended to trigger the welding torch)
> brings in these pretty 45 Vac into the circuit that stop everything.
> Taking away this signal brings the circuit back to normal operation.
> What's the problem? This 45Vac are NOT in the PIC's path, they are in
> the relay contacts.  Any suggestion?

 Well, my two concerns would be making sure the intruding wires from
the device being switched were kept absolutely *together* to prevent
any inductive effects as well as physically separate from all the (PIC)
control circuitry; and the quality of the relay.  Miniature relays have
very close tolerances and I would suspect either capacitive transfer of
switching impulse *in the relay* or possibly low-grade breakdown
(through the air path).

 Better relays, or so I believe, provide a frame ground for the
armature assembly which should be connected to the relay supply ground.
This might be one justification for referencing the coil to ground
rather than the unregulated supply.  Certainly, the "unregulated" supply
should have a filter capacitor close to the relay.

 In general, I think the physical construction, even of the prototype,
should be small, with the sequence of locations in the assembly:
 Control cable | Relay | Power Supply | Regulator | PIC
This also indicates a succession of ground connections, and lead dress
too should be close to this arrangement.
--
 Cheers,
       Paul B.

1999\01\11@085529 by Quentin

flavicon
face
Jaume Aragay Badia wrote:

> The 45Vac go through the normally open contact of the relay and the common
> contact using them as a switch for an other machine (the welding gun
> switch). The AC is not in the coil side.

I hear what you say and you are right. But:
Spikes are a funny thing (and a pain). When I talk spikes it is the
interference that is generated when the relay contacts open up (or
sometimes close). A split second just as the contact open, you will get
a small arcing between the two contacts. The electrons will jump the gap
between the contacts. This alone will generate an interference on the DC
supply, no matter how isolated you make the DC supply. Do as Tjaart
suggested in the other posts, both checking the supply with a'scope and
put the caps and diode in the DC supply. Then also put the filters on
the AC side to avoid any more spikes (or reduce the arcing between the
contacts).

Another test: Put a FM radio next to the relay and switch the relay with
load. Sometimes the interference is enough that you will hear it on the
radio.

Quentin

1999\01\11@102658 by Reginald Neale

flavicon
face
>
>> Put spark suppressors over the relay contacts. Either an RC circuit
>> and/or a spiketrap (forgot the name now: Varistor?) over the AC supply.
>
>The 45Vac go through the normally open contact of the relay and the common
>contact using them as a switch for an other machine (the welding gun
>switch). The AC is not in the coil side.
>
>
 EMI can be radiated from the load circuit to the nearby PIC. Anything to
 do with welding probably generates lots of EMI. This might be a good
 application for ferrite chokes. Loop each side of your relay contact
 conductors through separate toroids, as many times as there is room for.

 Reg Neale

1999\01\11@163330 by Jaume Aragay Badia

picon face
Do you think MOSFETs or FETs would be a better solution to get noise
inmunity?

Jaume.


----------------------
 Jaume Aragay Badia
  KILLspamaragayKILLspamspamemail.com
----------------------

1999\01\11@163951 by Tony Nixon

flavicon
picon face
Jaume Aragay Badia wrote:
>
> Well, I've finally built the board and tested it, and everything was fine

Another obscure thing with PICs is that they do not like EMI near them.
If the arcing in the relay is high and it is near the PIC that may be
enough to upset it. You won't see any spikes with a scope either.

--
Best regards

Tony

Multimedia 16F84 Beginners PIC Tools.
** NEW PicNPro Programmer and Port Interface **

http://www.picnpoke.com
Email RemoveMEpicnpokeTakeThisOuTspamcdi.com.au

1999\01\11@164158 by paulb

flavicon
face
Jaume Aragay Badia wrote:

> Do you think MOSFETs or FETs would be a better solution to get noise
> inmunity?

 No, it's not the transistor that is getting affected.  It's the PIC,
and it's already usign MOSFETs!
--
 Cheers,
       Paul B.

1999\01\11@172356 by dave vanhorn

flavicon
face
At 10:26 PM 1/11/99 +0100, you wrote:
>Do you think MOSFETs or FETs would be a better solution to get noise
>inmunity?
>
>Jaume.


Huh???

For one, FETS refers to mosfets, igfets, jfets, hexfets, ........

Mosfets are perfectly good relay drivers in general. I can't tell wether
you want them to be immune from noise, or you think that they create
noise??  There is an impulse when you turn off the relay coil, but you can
handle that in hardware, either with a snubber, or by turning the FET off
slowly. It's the attempt to instantaneously stop the current through an
inductor that gets you into trouble there.

1999\01\12@082259 by Tjaart van der Walt

flavicon
face
Jaume Aragay Badia wrote:
>
> Do you think MOSFETs or FETs would be a better solution to get noise
> inmunity?

I assume you mean MOSFETS and JFETS.

Neither. FETS use a voltage to switch, so it would
actually be less noise resistant than a good old
BJ transistor that uses current.

It seems like you need some extra decoupling on your
PCB. Connect 4 or 5 100nF caps between VDD and Vss all
over the PCB.

You could also do with some common mode choking on the
contact lines. Wind a choke toroid with the 45V lines.
Start at the same point. Wind the wires in the same
direction through the hole, but one to the left and
the other to the right. Put on as many windings as
you can.

--
Friendly Regards          /"\
                         \ /
Tjaart van der Walt        X  ASCII RIBBON CAMPAIGN
spamBeGonetjaartspamBeGonespamwasp.co.za  / \ AGAINST HTML MAIL
|--------------------------------------------------|
|                WASP International                |
|R&D Engineer : GSM peripheral services development|
|--------------------------------------------------|
| Mobile : TakeThisOuTtjaartEraseMEspamspam_OUTsms.wasp.co.za  (160 text chars) |
|     http://www.wasp.co.za/~tjaart/index.html     |
|Voice: +27-(0)11-622-8686  Fax: +27-(0)11-622-8973|
|          WGS-84 : 26¡10.52'S 28¡06.19'E          |
|--------------------------------------------------|

1999\01\12@082307 by ruben

flavicon
face
Hello Jaume.

How is Your MCLR input connected. I had some similar problems with a relay,
however this was because of the relay coil, not the relay load. Anyway, if
Your MCLR isn't directly tied to VDD it might help to put a small ceramic
cap, 6.8nF, across MCLR and GND.

In another project I used a dallas reset circuit and when the device was tested
for ESD and there was a spark due to the discharge, the processor (16C57) closes
t
to the spark was reset (there are two procesors in the device). A 6.8nF cap
helped here too.

Another thing to try is to use a solid state relay with zero crossing detector
instead of a mechanical relay.

{Quote hidden}

================================
Ruben Jvnsson
rubenEraseMEspam.....2.sbbs.se
================================

1999\01\12@082310 by Jaume Aragay Badia

picon face
> Another obscure thing with PICs is that they do not like EMI near them.
> If the arcing in the relay is high and it is near the PIC that may be
> enough to upset it. You won't see any spikes with a scope either.

Tony,
       It has a groung path and two other relays between them, it's 10 cm away
fom
the PIC, is it still *close*?

Jaume.

----------------------
 Jaume Aragay Badia
  EraseMEaragayspamemail.com
----------------------

1999\01\12@082313 by Jaume Aragay Badia

picon face
> Mosfets are perfectly good relay drivers in general. I can't tell wether
> you want them to be immune from noise, or you think that they create
> noise??  There is an impulse when you turn off the relay coil, but you can
> handle that in hardware, either with a snubber, or by turning the FET off
> slowly. It's the attempt to instantaneously stop the current through an
> inductor that gets you into trouble there.

Dave, I ask about using the FET INSTEAD of the relay, not to drive it.

The question is:
WHAT can I use to work like a switch for a signal that is not suposed to be
carring big current, but that can work properly without disturbing the rest
of the circuit (specially the PIC) if noise appears between the terminals;
for example: yesterday I tried the circuit with a machine that was suposed
to *close a path* for a relay in that machine, and SURPRISE!! I found a
*nice* 45Vac signal coming out of those terminals that were suposed NOT to
be there.

I'm looking for a SWITCH SUBSTITUTE that can carry this NOISES WITHOUT
disturbing the rest of the circuit.

Thanks for your answer. :)


Jaume.

----------------------
 Jaume Aragay Badia
  RemoveMEaragayEraseMEspamEraseMEemail.com
----------------------

1999\01\12@090049 by Tjaart van der Walt

flavicon
face
Jaume Aragay Badia wrote:
>
> > Mosfets are perfectly good relay drivers in general. I can't tell wether
> > you want them to be immune from noise, or you think that they create
> > noise??  There is an impulse when you turn off the relay coil, but you can
> > handle that in hardware, either with a snubber, or by turning the FET off
> > slowly. It's the attempt to instantaneously stop the current through an
> > inductor that gets you into trouble there.
>
> Dave, I ask about using the FET INSTEAD of the relay, not to drive it.

Other PIClisters as well as myself have suggested a loads
of solutions to problems we don't know exist.
1) Have you looked at the 5V rail on a scope?
  Is it smooth, or noisy?
2) Have you looked at MCLR on a scope?
  Is it solid 5V, or is it also noisy?
3) Have you looked at OSCO on a scope?
  Is it running smoothly?
  Are you using the correct XTAL fuse setting?

Answer these questions, and we can solve your problem pronto.

--
Friendly Regards          /"\
                         \ /
Tjaart van der Walt        X  ASCII RIBBON CAMPAIGN
RemoveMEtjaartspam_OUTspamKILLspamwasp.co.za  / \ AGAINST HTML MAIL
|--------------------------------------------------|
|                WASP International                |
|R&D Engineer : GSM peripheral services development|
|--------------------------------------------------|
| Mobile : RemoveMEtjaartTakeThisOuTspamspamsms.wasp.co.za  (160 text chars) |
|     http://www.wasp.co.za/~tjaart/index.html     |
|Voice: +27-(0)11-622-8686  Fax: +27-(0)11-622-8973|
|          WGS-84 : 26¡10.52'S 28¡06.19'E          |
|--------------------------------------------------|

1999\01\12@100527 by dave vanhorn

flavicon
face
>Dave, I ask about using the FET INSTEAD of the relay, not to drive it.

I got it now :)

>The question is:
>WHAT can I use to work like a switch for a signal that is not suposed to be
>carring big current, but that can work properly without disturbing the rest
>of the circuit (specially the PIC) if noise appears between the terminals;
>for example: yesterday I tried the circuit with a machine that was suposed
>to *close a path* for a relay in that machine, and SURPRISE!! I found a
>*nice* 45Vac signal coming out of those terminals that were suposed NOT to
>be there.

That's nasty. The problem isn't the noise itself. The problem is that the
gate has to be higher than the source (or lower than the drain for a
p-channel device) always. If your max noise can't be determined, then I
think you are stuck with a relay.  If you can set a limit, then you will
need a fet with a max gate voltage that exceeds the max "noise" by a lot,
at least double, plus a bias supply to put the gate at that high voltage.
Otherwise, when the noise voltage sets within Vth of the gate, the fet will
turn off.

>I'm looking for a SWITCH SUBSTITUTE that can carry this NOISES WITHOUT
>disturbing the rest of the circuit.

If you're switching AC power, then a solid state relay would be the answer
(or at least AN answer). They aren't good for small signals, but they can
handle seveeral hundred watts, and they have those biasing problems already
worked out. They can be turned on directly with a PIC.

1999\01\12@104043 by Anders Friberg

flavicon
face
Jaume Aragay Badia wrote:

<snip>

> *nice* 45Vac signal coming out of those terminals that were suposed NOT to
> be there.
>

Just curious: At which points in your circuit did you connect your measuring
equipment? What kind of equipment (scope? grounded?).

Regards,
Anders Friberg

{Quote hidden}

More... (looser matching)
- Last day of these posts
- In 1999 , 2000 only
- Today
- New search...