• No se han encontrado resultados

Área de Influencia de las Actividades (directa)

In document ESTUDIO DE IMPACTO AMBIENTAL EX POST (página 110-113)

Título VII: Régimen del Buen Vivir

4.7. Generación y evaluación de desechos líquidos, desechos sólidos y emisiones energéticas

5.1.1. Área de Influencia de las Actividades (directa)

Status฀ var฀ PortB.Bit1 Load฀ var฀ PortB.Bit2 Input฀B1

Input฀B2

; Main

High฀RB0฀ ;turn฀on฀the฀IPS511฀and฀apply฀power฀to฀load

Pause฀2฀฀ ;Delay฀to฀ensure฀IPS511฀is฀fully฀on

;now฀check฀the฀status฀when฀the฀IPS511฀should฀be฀on

If฀(Status=1)฀AND฀(Load=1)฀Then฀GoSub฀NormalOn

If฀(Status=0)฀AND฀(Load=0)Then฀GoSub฀Overload฀

Low฀RB0฀฀ ;turn฀the฀IPS511฀off

Pause฀2฀฀ ;now฀check฀the฀status฀when฀off

If฀(Status=0)฀AND฀(Load=0)฀Then฀GoSub฀NormalOff

If฀(Status=1)฀AND฀(Load=1)฀Then฀GoSub฀OpenLoad

NormalOn฀;Subroutine฀if฀all฀is฀OK฀at฀the฀load฀when฀on

;---฀ Code฀to฀be฀executed฀if฀result฀is฀OK Return

NormalOff฀;Subroutine฀if฀all฀is฀OK฀at฀load฀when฀off

;---฀ Code฀to฀be฀executed฀if฀result฀is฀OK Return

OpenLoad฀;Subroutine฀to฀be฀executed฀if฀load฀is฀open

;---฀ Code฀to฀be฀executed฀if฀the฀load฀is฀open Return

OverLoad฀;Subroutine฀to฀be฀executed฀if฀excessive฀current

;---฀ or฀over฀temperature

Code฀to฀be฀executed฀for฀over฀current฀condition

Or฀over฀temperature฀condition.฀Determine฀the฀difference

Between฀the฀two฀by฀checking฀for฀cycling฀or฀steady฀state

Low฀on฀Load

If฀Load฀is฀cycling—problem฀is฀over฀temperature Return

Separating฀certain฀faults,฀such฀as฀over฀temperature฀and฀over฀current฀may฀require฀repeated฀polling฀of฀the฀sta-tus฀and฀output฀pins฀to฀determine฀whether฀the฀fault฀periodically฀clears฀itself฀(as฀the฀device฀cools฀down฀and฀the฀

thermal฀trip฀resets)฀or฀remains฀static.฀Additionally,฀if฀the฀onset฀of฀current฀limiting฀must฀be฀detected฀it฀may฀be฀

necessary฀to฀alter฀R3,฀R4฀and฀R5฀to฀cause฀abnormally฀low,฀but฀not฀zero,฀voltage฀across฀the฀load฀to฀read฀as฀a฀

low฀on฀RB2.฀

Isolated฀Switching

Although฀we฀will฀discuss฀a฀variety฀of฀devices฀under฀the฀isolated฀switching฀category,฀of฀course฀these฀may฀

also฀be฀used฀for฀low฀side฀or฀high฀side฀switching.฀

Relay฀Switching

Relays฀pre-date฀electronics,฀as฀they฀were฀developed฀to฀extend฀the฀range฀of฀manual฀Morse฀telegraph฀systems฀in฀

the฀mid฀1800s.฀Nonetheless,฀we฀should฀not฀quickly฀discard฀the฀relay฀solution฀to฀switching.฀Relays฀are฀available฀

in฀a฀rich฀variety฀of฀contact฀configurations,฀contact฀material,฀power฀rating,฀voltage฀rating฀and฀coil฀rating.

Good฀things฀about฀relays

•฀ Resistant฀to฀damage฀from฀overloads฀and฀polarity฀

reversal

•฀ Excellent฀isolation฀between฀switched฀load฀and฀

controlling฀circuitry

•฀ Wide฀range฀of฀ratings

•฀ Can฀switch฀AC,฀DC,฀video,฀RF,฀low฀level฀audio,฀etc.฀

by฀proper฀selection฀of฀device.

Not฀so฀good฀things฀about฀relays

•฀ Limited฀life,฀although฀many฀relays฀are฀rated฀for฀

tens฀of฀millions฀of฀operations

•฀ Noise

•฀ Speed฀of฀operation฀and฀release,฀usually฀in฀the฀

millisecond฀range.

•฀ Size฀may฀be฀an฀issue

•฀ Contact฀bounce

•฀ Requires฀power฀to฀hold฀relay฀operated,฀unless฀it฀is฀

a฀latching฀relay.

We’ll฀look฀at฀three฀relays:

Make/Model Coil฀Rating

Contact฀

Configuration Contact฀Rating Comments Standex฀JG102-12-1 12V฀/฀24mA SPST฀(1A) 48V/1A Very฀high฀speed฀reed฀relay

Omron฀G5V-2-H1 12V/12.5mA DPDT฀(2C) 125VAC/0.5A 30VDC/2A

Low฀signal฀relay฀with฀bifurcated฀

contacts;฀ultra฀sensitive

Omron฀G2RL-24 12V/33.3mA DPDT฀(2C) 250VAC/8A

30VDC/8A

General-purpose฀power฀relay

To฀test฀the฀contact฀closure฀and฀operate/release฀time,฀we’ll฀

use฀the฀circuit฀of฀Figure฀3-34.฀Figure฀3-34฀should฀be฀

familiar;฀a฀2N7000฀low฀side฀switch฀drives฀the฀relay฀coil.฀

As฀we฀earlier฀determined,฀the฀current฀and฀voltage฀required฀

to฀operate฀the฀relays฀under฀test฀is฀well฀within฀the฀limits฀

for฀a฀2N7000.฀To฀sense฀contact฀closure฀and฀bounce,฀we฀

use฀a฀5฀V฀source฀in฀series฀with฀a฀56฀ohm฀resistor฀to฀pass฀

approximately฀90฀mA฀through฀the฀contacts.฀In฀order฀to฀

make฀measurements,฀V2’s฀negative฀terminal฀is฀connected฀

to฀ground;฀but฀in฀order฀to฀emphasize฀the฀ability฀of฀relays฀

to฀switch฀isolated฀circuits,฀Figure฀3-34฀shows฀the฀load฀in฀

its฀most฀general฀“floating”฀form.

Since฀a฀relay฀coil฀is฀an฀inductive฀load,฀we฀must฀use฀a฀snubbing฀diode฀to฀avoid฀damaging฀the฀2N7000.฀To฀

illustrate฀the฀voltage฀spike฀even฀a฀small฀inductive฀load฀generates,฀compare฀Figures฀3-35฀and฀3-36.฀With-out฀a฀snubbing฀diode,฀the฀inductive฀spike฀exceeds฀76฀V,฀at฀which฀point฀the฀2N7000฀breaks฀down.฀Adding฀a฀

1N4001฀snubbing฀diode฀reduces฀the฀spike฀to฀12.7฀V—that฀is,฀0.7฀V฀above฀the฀12฀V฀relay฀supply฀voltage.

Finally,฀although฀the฀operating฀and฀release฀times฀for฀these฀relays฀is฀long฀compared฀with฀pure฀electronic฀

switches,฀for฀many฀applications฀a฀few฀milliseconds฀delay฀between฀PIC฀output฀and฀relay฀pull-in฀is฀of฀little฀

consequence.

Figure฀3-34:฀Relay฀test฀circuit.

Standex฀JG102-12-1

Reed฀relays฀are฀well฀known฀for฀high฀speed฀operation,฀

and฀the฀JG102-12-1฀(since฀replaced฀by฀model฀JG100-12-1)฀meets฀our฀expectations.฀Figures฀3-37,฀3-38฀and฀

3-39฀show฀operating฀times฀for฀this฀device.฀The฀JG102-12-1฀relay฀turns฀on฀in฀250฀µs,฀but฀an฀additional฀150฀µs฀

is฀necessary฀for฀contact฀bounce฀to฀cease.฀Turn฀off฀time฀

is฀also฀approximately฀250฀µs.฀Since฀the฀turn-on฀and฀

turn-off฀times฀are฀approximately฀equal,฀the฀overall฀

relay฀high฀time฀is฀very฀close฀to฀the฀PIC฀control฀pin฀high฀

time,฀although฀delayed฀by฀approximately฀400฀µs.฀(The฀

terms฀“operate฀time”฀or฀“pull-in฀time”฀and฀“release฀

time”฀are฀usually฀used฀when฀discussing฀relay฀speeds,฀

instead฀of฀turn-on฀and฀turn-off.฀However,฀to฀illustrate฀

the฀commonality฀with฀transistor฀switching,฀we’ll฀use฀

the฀turn-on฀and฀turn-off฀terminology฀as฀well.)

Figure฀3-36:฀JG102-12-1฀Relay฀with฀Snubber฀Ch1:฀

PIC฀Output;฀Ch2:฀2N7000฀Drain.

Figure฀3-35:฀JG102-12-1฀Relay฀Without฀Snubber฀

Ch1:฀PIC฀Output;฀Ch2:฀2N7000฀Drain.

Figure฀ 3-37:฀ JG102-12-1฀ Reed฀ relay฀ Ch1:฀ PIC฀

output;฀Ch2:฀relay฀contact.

Figure฀3-38:฀JG102-12-1฀Reed฀relay฀turn-on฀delay฀

and฀contact฀bounce฀Ch1:฀PIC฀output;฀Ch2:฀relay฀

contact.

Figure฀3-39:฀JG102-12-1฀Reed฀relay฀turn-off฀delay฀

Ch1:฀PIC฀output;฀Ch2:฀relay฀contact.

Reed฀relays฀are฀commonly฀used฀in฀telecommunications฀equipment฀to฀switch฀voice,฀data฀and฀high฀frequency฀

signals฀and฀are฀not฀often฀employed฀for฀switching฀power฀circuits.

Omron฀G5V-2-H1

The฀G5V-2-H1฀is฀a฀member฀of฀Omron’s฀telecommunica-tions฀family,฀optimized฀for฀low฀level฀signals฀and฀is฀used฀for฀

purposes฀similar฀to฀those฀of฀reed฀relays฀as฀well฀as฀for฀low฀

level฀power฀switching.฀The฀G2V฀is฀of฀conventional฀relay฀

construction,฀but฀with฀bifurcated฀cross-point฀gold฀plated฀

silver฀contacts.฀Even฀though฀the฀contacts฀are฀of฀precious฀

metal,฀Omron฀quotes฀a฀minimum฀contact฀load฀of฀10฀µA฀and฀

10฀mV฀DC.฀At฀lower฀levels,฀oxides฀and฀contaminants฀may฀

prevent฀reliable฀operation.

Although฀constructed฀with฀bifurcated฀cross-point฀contacts,฀

contact฀bounce฀is฀still฀apparent฀with฀the฀G5V-2-H1,฀as฀

reflected฀in฀Figure฀3-40.฀Operate฀and฀release฀times฀are฀ap-proximately฀4฀ms.

Omron฀G2RL-24

The฀G2RL-24฀is฀a฀power฀relay,฀suitable฀for฀switching฀AC฀

and฀DC฀up฀to฀8฀amperes.฀As฀might฀be฀expected,฀relays฀

designed฀to฀switch฀higher฀currents฀are฀more฀substantially฀

constructed฀and฀hence฀take฀more฀time฀to฀operate฀and฀re-lease.฀Figure฀3-41฀shows฀the฀G2RL-24฀requires฀nearly฀฀

8฀mS฀to฀operate฀and฀dampen฀contact฀bounce.฀Release฀time฀

is฀shorter,฀only฀4฀ms.฀Since฀release฀is฀shorter฀than฀operate,฀

the฀original฀10฀ms฀PIC฀output฀only฀results฀in฀6฀ms฀of฀useful฀

relay฀closure.฀

4N25฀Optical฀Isolated฀NPN฀Switch

Optical฀couplers฀or฀“optoisolators”฀consist฀of฀an฀LED฀

packaged฀with฀a฀photo-diode฀or฀a฀phototransistor.฀When฀

illuminated,฀light฀from฀the฀LED฀saturates฀the฀receptor฀and฀

it฀conducts.฀There฀is฀no฀electrical฀connection฀between฀the฀LED฀input฀and฀photo฀device฀output,฀so฀the฀two฀

circuit฀halves฀are฀independent฀and฀may฀be฀at฀a฀potential฀difference฀of฀hundreds฀or฀even฀thousands฀of฀volts.฀

Optoisolators฀are฀available฀in฀a฀wide฀range฀of฀operating฀speeds฀and฀configurations.฀We’ll฀

first฀look฀at฀a฀low฀power฀optoisolator,฀the฀venerable฀4N25฀device,฀followed฀by฀a฀modern฀

high฀power฀optically฀coupled฀MOSFET,฀the฀PS710A-1A-1.฀

Figure฀3-42฀shows฀how฀simple฀it฀is฀to฀connect฀an฀

optoisolator฀to฀a฀PIC.฀R1฀is฀selected฀to฀achieve฀the฀

desired฀LED฀on-current฀using฀the฀methodology฀

developed฀earlier฀in฀this฀chapter.฀The฀220฀ohm฀resis-tor฀is฀intended฀to฀provide฀approximately฀10฀mA฀LED฀

on-current.฀The฀4N25’s฀output฀transistor฀is฀configured฀

as฀a฀low฀side฀switch฀in฀the฀example.฀

Figure฀3-40:฀G5V-2-H1฀relay฀Ch1:฀PIC฀output;฀Ch2:฀

relay฀contact.

Figure฀3-41:฀G2RL-24฀relay฀Ch1:฀PIC฀output;฀Ch2:฀

relay฀contact.

Figure฀3-42:฀4N25฀Optoisolator฀connection.

With฀a฀maximum฀current฀rating฀of฀only฀150฀mA,฀

the฀4N25฀is฀not฀intended฀to฀switch฀large฀cur-rents฀so฀it฀will฀often฀be฀used฀as฀the฀first฀stage฀in฀

a฀multistage฀switching฀arrangement,฀such฀as฀that฀

shown฀in฀Figure฀3-43.฀In฀this฀design,฀the฀4N25฀

operates฀as฀an฀emitter฀follower.฀When฀the฀LED฀

is฀illuminated฀via฀RB0฀going฀high,฀current฀flows฀

through฀the฀4N25’s฀output฀transistor฀and฀R3,฀tak-ing฀the฀gate฀of฀Q1฀into฀conduction.฀Current฀then฀

flows฀through฀the฀load฀and฀Q1.฀When฀the฀LED฀is฀

dark,฀the฀4N25’s฀output฀transistor฀is฀cut฀off฀and฀Q1’s฀VGS฀is฀close฀to฀zero฀and฀Q1฀is฀cut฀off.฀Of฀course,฀any฀of฀

the฀more฀modern฀IPS฀products฀may฀be฀substituted฀for฀the฀IRF510.฀

Low฀power฀optoisolators฀are฀also฀often฀used฀to฀isolate฀data฀or฀signal฀circuits฀from฀the฀PIC,฀and฀an฀optical฀

coupled฀RS-232฀circuit฀permits฀isolating฀a฀PIC฀from฀the฀associated฀computer฀or฀controlled฀devices.฀

PS710A-1A฀AC/DC฀Optically฀Isolated฀MOSFET

NEC’s฀PS710A-1A฀is฀a฀high฀power฀MOSFET฀optoisolator.฀Unlike฀the฀4N25,฀the฀PS710A฀is฀a฀power฀device,฀

capable฀of฀switching฀loads฀up฀to฀1.8฀A฀at฀60฀V,฀and฀its฀series฀MOSFET฀design฀will฀switch฀both฀AC฀and฀DC.฀

Each฀MOSFET฀has฀an฀RDS(ON)฀of฀0.1฀ohm฀and,฀for฀DC฀switching,฀may฀be฀paralleled฀handle฀3.6A.

The฀PS701A-1A฀is฀connected฀as฀illustrated฀in฀Figure฀3-44฀

for฀AC฀or฀DC฀switching.฀Other฀configurations฀are฀possible฀

for฀DC฀switching฀and฀you฀should฀consult฀the฀data฀sheet฀for฀

additional฀information.

Figure฀3-45฀shows฀the฀results฀for฀the฀circuit฀of฀Figure฀3-44,฀

switching฀1฀A฀at฀5฀V.฀Figure฀3-45฀confirms฀the฀data฀sheet’s฀฀

1฀ms฀typical฀turn-on฀time฀and฀50฀µs฀typical฀turn-off฀time.฀

In฀switching฀high฀currents฀in฀microsecond฀times,฀undesired฀transients฀and฀oscillations฀are฀often฀seen,฀partic-ularly฀when฀using฀a฀plug-in฀board฀and฀lab฀power฀supplies฀with฀long฀leads.฀When฀the฀design฀is฀transferred฀to฀

a฀printed฀circuit฀board฀with฀wide฀power฀traces฀and฀integrated฀power฀distribution฀filtering฀the฀problem฀is฀often฀

solved.฀In฀some฀cases฀additional฀filtering฀and฀bypassing฀will฀be฀necessary.฀Figure฀3-46฀shows฀an฀expanded฀

Figure฀3-43:฀4N25฀with฀IRF510.

Figure฀3-44:฀AC/DC฀isolated฀switching฀with฀NEC’s฀

PS710A-1A.

Figure฀ 3-45:฀ Switching฀ with฀ a฀ PS107A-1A฀ Ch1:฀

PIC฀output;฀Ch2:฀load.

Figure฀3-46:฀Undesired฀oscillation฀in฀plug฀board฀

layout฀of฀PS107A-1A฀Ch1:฀PIC฀output;฀Ch2:฀load.

view฀of฀the฀PS710A-1A’s฀turn-off฀interval฀illustrates฀the฀type฀of฀extraneous฀transients฀sometimes฀seen฀in฀a฀

plug฀board฀layout.฀Don’t฀be฀surprised฀to฀see฀similar฀unwanted฀oscillations฀in฀some฀of฀your฀layouts.฀Even฀in฀a฀

breadboard฀layout,฀you฀can฀usually฀stop฀or฀at฀least฀reduce฀these฀extraneous฀signals฀by฀better฀attention฀to฀lead฀

dress฀and฀grounding฀jumper฀locations,฀combined฀with฀additional฀power฀lead฀bypass฀capacitors฀

In document ESTUDIO DE IMPACTO AMBIENTAL EX POST (página 110-113)