Gle Electronics

Embed Size (px)

Citation preview

  • 8/3/2019 Gle Electronics

    1/24

    Electronic Circuit Diagrams in GLE

    A. S. Budden ([email protected])

    1 Introduction

    This document is intended to provide some basic documentation for the use ofelectronics.gle for drawing circuit diagrams. It is currently a bit basic, butwill hopefully be added to at a later date.

    2 Functions

    The following is a list of all the functions available, along with their options.The meanings of the various options will (hopefully) become self-explanatorywith the examples that follow in the next section.

    @connection

    @resistor_h rlabel$

    @resistor_v rlabel$

    @potentiometer_hb rlabel$

    @potentiometer_vr rlabel$

    @vresistor_h rlabel$

    @vresistor_v rlabel$

    @npn_bjt bjtlabel$

    @pnp_bjt bjtlabel$

    @n_mosfet mlabel$

    @p_mosfet mlabel$

    @igbt igbtlabel$

    @inductor_h core ilabel$

    @inductor_v core ilabel$

    @xformer core type

    @xformer_dblsecondary type location

    @p_capacitor polarity

    1

  • 8/3/2019 Gle Electronics

    2/24

    @p_capacitor_hl clabel$

    @p_capacitor_hr clabel$@p_capacitor_vt clabel$

    @p_capacitor_vb clabel$

    @capacitor_h clabel$

    @capacitor_v clabel$

    @vcapacitor_h clabel$

    @vcapacitor_v clabel$

    @diode_hr dlabel$

    @diode_hl dlabel$

    @diode_vd dlabel$

    @diode_vu dlabel$

    @bridge_rectifier blabel$

    @opamp supply ulabel$

    @ground@supply_h type

    @supply_v type

    @cell_h elabel$

    @cell_v elabel$

    @and

    @nand

    @or

    @nor

    @xor

    @xnor

    @not

    @buffer

    3 Symbols

    This section gives a list of the various symbols that can be produced with theprovided functions. The symbol s refers to the start point for drawing and erefers to the end point.

    s,eamove 1 1

    @connection

    s

    R1

    e amove 1 2@resistor_h "R_1"

    2

  • 8/3/2019 Gle Electronics

    3/24

    s

    R1

    e

    amove 2 5

    @resistor_v "R_1"

    s

    R1

    e amove 1 3@potentiometer_hb "R_1"

    s

    R1

    e

    amove 2 5

    @potentiometer_vr "R_1"

    s

    R1

    e amove 1 2@vresistor_h "R_1"

    s

    R1

    e

    amove 2 5

    @vresistor_v "R_1"

    3

  • 8/3/2019 Gle Electronics

    4/24

    s,e Q1amove 1 2

    @npn_bjt "Q_1"

    s,e Q1amove 1 2

    @pnp_bjt "Q_1"

    s,e Q1amove 1 2

    @n_mosfet "Q_1"

    s,e Q1amove 1 2

    @p_mosfet "Q_1"

    s,e Q1amove 1 2

    @igbt "Q_1"

    s

    L1

    e

    amove 1 2

    @inductor_h 1 "L_1"

    4

  • 8/3/2019 Gle Electronics

    5/24

    s

    L1

    e

    amove 2 5

    @inductor_v 1 "L_1"

    sL1

    e amove 1 2@inductor_h 0 "L_1"

    s

    L1

    e

    amove 2 5

    @inductor_v 0 "L_1"

    s,e20 30

    amove 1 5

    @xformer 1 0 "20" "30"

    s,e20 30

    amove 1 5

    @xformer 1 1 "20" "30"

    5

  • 8/3/2019 Gle Electronics

    6/24

    s,e

    20 30

    amove 1 5

    @xformer 1 2 "20" "30"

    s,e20 30

    amove 1 5@xformer 0 0 "20" "30"

    s,e20 30

    amove 1 5

    @xformer 0 1 "20" "30"

    s,e20 30

    amove 1 5

    @xformer 0 2 "20" "30"

    6

  • 8/3/2019 Gle Electronics

    7/24

    s,e

    amove 1 8

    @xformer_dblsecondary 0 0

    s,e

    amove 1 8

    @xformer_dblsecondary 1 0

    7

  • 8/3/2019 Gle Electronics

    8/24

    s,e

    amove 1 8

    @xformer_dblsecondary 2 0

    s,eamove 1 5

    @xformer_dblsecondary 0 1

    8

  • 8/3/2019 Gle Electronics

    9/24

    s,eamove 1 5

    @xformer_dblsecondary 1 1

    s,eamove 1 5

    @xformer_dblsecondary 2 1

    9

  • 8/3/2019 Gle Electronics

    10/24

    s,e

    amove 1 11

    @xformer_dblsecondary 0 2

    s,e

    amove 1 11

    @xformer_dblsecondary 1 2

    10

  • 8/3/2019 Gle Electronics

    11/24

    s,e

    amove 1 11

    @xformer_dblsecondary 2 2

    s

    C1

    e amove 1 2@p_capacitor_hl "C_1"

    s

    C1

    e amove 1 2@p_capacitor_hr "C_1"

    s

    C1

    e

    amove 2 5

    @p_capacitor_vt "C_1"

    11

  • 8/3/2019 Gle Electronics

    12/24

    s

    C1

    e

    amove 2 5

    @p_capacitor_vb "C_1"

    s

    C1

    e amove 1 2@capacitor_h "C_1"

    s

    C1

    e

    amove 2 5

    @capacitor_v "C_1"

    s

    C1

    e amove 1 2@vcapacitor_h "C_1"

    s

    C1

    e

    amove 2 5

    @vcapacitor_v "C_1"

    12

  • 8/3/2019 Gle Electronics

    13/24

    s

    D1

    e amove 1 2@diode_hr "D_1"

    s

    D1

    e amove 1 2@diode_hl "D_1"

    s

    D1

    e

    amove 2 5

    @diode_vd "D_1"

    s

    D1

    e

    amove 2 5

    @diode_vu "D_1"

    s,e B1amove 1 4

    @bridge_rectifier "B_1"

    13

  • 8/3/2019 Gle Electronics

    14/24

    s,e

    U1amove 1 4

    @opamp 1 "U_1"

    s,e

    U1 amove 1 4@opamp 0 "U_1"

    s,eamove 1 2

    @ground

    s e amove 1 2@supply_h 0

    s

    e

    amove 2 5

    @supply_v 0

    s e amove 1 2@supply_h 1

    14

  • 8/3/2019 Gle Electronics

    15/24

    s

    e

    amove 2 5

    @supply_v 1

    s e amove 1 2@supply_h 2

    s

    e

    amove 2 5

    @supply_v 2

    s e amove 1 2@cell_h "E_1"

    s

    e

    amove 2 5

    @cell_v "E_1"

    15

  • 8/3/2019 Gle Electronics

    16/24

    s,eamove 1 4

    @and

    s,eamove 1 4@nand

    s,eamove 1 4

    @or

    s,eamove 1 4

    @nor

    s,eamove 1 4

    @xor

    16

  • 8/3/2019 Gle Electronics

    17/24

    s,eamove 1 4

    @xnor

    s e amove 1 3@not

    s e amove 1 3@buffer

    4 Examples

    This section gives a few examples of real circuits that have been drawn withthis package.

    R1

    Q1

    R2 Q2

    Q3

    C1R3

    R4

    R5 R6

    C3

    C2

    U1

    C4

    17

  • 8/3/2019 Gle Electronics

    18/24

    ! Example c i r c u i t w it h e l e c t r o n i c s . g l es i z e 20 7 .5

    i n c lu d e e l e c t r o n i c s . g l e

    b eg in s c a le 0 . 5 0 . 5

    t e r m r a d = 0 . 2 5a mo ve 1 3rmove t e r mr a d 0c i r c l e t er mr adr mo ve t e r mr a d 0

    r l i n e 35 0r mo ve t e r mr a d 0c i r c l e t er mr ada mo ve 1 6

    rmove

    t e r mr a d 0c i r c l e t er mr adr mo ve t e r mr a d 0r l i n e 1 0@ r e s is t o r h R 1 @ n pn b j t Q 1 rmove 2 1r l i n e 0 2@c onne c tionr mo ve 0 4r l i n e 0 1@c onne c tionr mo ve 0 5@c onne c tionr l i n e 0 1@ r e s i st o r v R 2

    r l i n e 2 0@c onne c tionr l i n e 0 2@ n pn b j t Q 2 rmove 0 2r l i n e 0 2@ p np b j t Q 3 rmove 2 1r l i n e 0 2@c onne c tionr mo ve 0 4r l i n e 0 2r mo ve 0 2r l i n e 0 2@c onne c tionrmove 0 5

    @c onne c tion@ c a pa c i to r h C 1r mo ve 0 5@c onne c tionr l i n e 0 1@ r e s i st o r v R 3 @c onne c tionr l i n e 1 0@c onne c tionr e s i s t o r v R 4 r l i n e 0 1@c onne c tionr mo ve 0 5

    18

  • 8/3/2019 Gle Electronics

    19/24

    @ r e s is t o r h R 5 @c onne c tion

    g s a v e@ r e s is t o r h R 6 @c onne c tionr l i n e 1 0rmove 1 0@ c a pa c i to r v C 3 r l i n e 0 1@c onne c tiong r e s t o r er l i n e 0 3@ c a pa c i to r h C 2@c onne c tionr l i n e 0 1r l i n e 1 0g s a v e

    @opamp 1 U 1rmove 1 1r l i n e 0 1r l i n e 6 0r l i n e 0 3@c onne c tion@ c a pa c i to r h C 4r l i n e 1 0r mo ve t e r mr a d 0c i r c l e t er mr adrmove t e r mr a d 0g r e s t o r er mo ve 2 1r l i n e 0 2@c onne c tionrmove 0 6

    r l i n e 0

    4@c onne c tionrmove 7 0@c onne c tion@ground

    amove 1 13rmove t e r mr a d 0c i r c l e t er mr adr mo ve t e r mr a d 0r l i n e 35 0r mo ve t e r mr a d 0c i r c l e t er mr adrmove t e r mr a d 0

    en d s c a l e

    19

  • 8/3/2019 Gle Electronics

    20/24

    ! T hr eep ha se i n v e r t e rs i z e 13 1 0

    i n c lu d e e l e c t r o n i c s . g l e

    b eg in s c a le 0 . 5 0 . 5

    ! Draw the DC Linkamove 1 19r l i n e 24 0

    ! Draw Groundamove 1 11r l i n e 2 0@c onne c tion@groundr l i n e 22 0

    ! T r a n si s t o r s

    f or i = 0 t o 1 6 s t ep 8f or j = 0 t o 4 s t ep 4

    amove 2 13rmov e i j@ i g bt r mo ve 2 1r l i ne 0 1rmove 0 3r l i ne 0 1r mo ve 2 4@ d i od e v u

    n ex t jn ex t i

    20

  • 8/3/2019 Gle Electronics

    21/24

    ! C o nn e ct i o n p o i n t samove 4 11

    f or i = 0 t o 1 6 s t ep 8f or j = 0 t o 8 s t ep 4

    amove 4 11rmov e i j@c onne c tionr mo ve 2 0@c onne c tion

    n ex t jn ex t i

    ! M ac hi ne w i n d i n g samove 12 15r l i n e 4 0r l i n e 0 6@ i nd u ct o r v 0

    @c onne c tions t a r x = x po s ( )s t a r y = y po s ( )b e gi n r o t a t e 30

    @ i nd uc t or h 0 en d r o t a t ermove 4 c os ( torad (3 0) ) 4 s i n ( t o r a d ( 3 0 ) )e n d y = y p o s ( )a l i n e 24 e nd ya l i n e 24 15r l i n e 4 0amove s t a r x s t a r yb e gi n r o t a t e 2 10

    @ i nd uc t or h 0 en d r o t a t ermove 4 c os ( torad (3 0)) 4 s i n ( t o r a d ( 3 0 ) )

    a l i n e 8 en d ya l i n e 8 15r l i n e 4 0

    en d s c a l e

    RESET

    SETQ

    !Q

    ! Exa mple o f l o g i c g a te u se : SR F l i pFlop

    s i z e 19 1 4

    21

  • 8/3/2019 Gle Electronics

    22/24

    i n c lu d e e l e c t r o n i c s . g l e

    ! R ad iu s o f en d t e r m i n a l st e r m r a d = 0 . 2 5

    ! R es et i n pu ta mo ve 4 2rmove t e r mr a d 0c i r c l e t er mr adrmove 2 t e r mr a d 0s e t j u s t RCte xt RESETrmove 3 t e r mr a d 0r l i n e 2 0

    ! S et i np utamove 4 12

    rmove

    t e r mr a d 0c i r c l e t er mr adrmove 2 t e r mr a d 0s e t j u s t RCte x t SETrmove 3

    t e r mr a d 0r l i n e 2 0

    ! Top NAND Gate@nandrmove 0 2r l i n e 0 2rmove 0 2r l i n e 0 2! Bottom NAND Gate@nand

    ! I n t e rc o n n ec t i o nsrmove 6 1r l i n e 1 0@c onne c tionr l i n e 0 2r l i n e 7 3rmove 0 2r l i n e 7 3r l i n e 0 2@c onne c tionr l i n e 1 0r mo ve 1 0

    ! Top Outputr l i n e 2 0

    r mo ve t e r mr a d 0c i r c l e t er mr adrmove 2 t e r mr a d 0s e t j u s t LCt e x t Q

    ! Bottom Outputrmove 0 8t e xt ! Qrmove 2 t e r mr a d 0c i r c l e t er mr adrmove t e r mr a d 0r l i n e 2 0

    22

  • 8/3/2019 Gle Electronics

    23/24

    C1

    Q1

    D1

    D2

    Q2

    LOAD

    ! An HB ridge

    ! S et t he page s i z es i z e 21 1 0

    ! I mp or t t h e e l e c t r o n i c s m odu lei n c lu d e e l e c t r o n i c s . g l e

    ! Draw a g r i d i f t h e l i n e b el ow i s uncommented! @ d ra wg r id x s c a l e

    ! Top l e f t o f d ia gr ama mo ve 2 9g s a v e

    ! B at te ry l e gr l i n e 0 2@ c e ll v E 1 r l i n e 0 2

    ! G ro un d p l a n er l i n e 17 0

    ! Return t o t o p l e f tg r e s t o r e

    ! Power t o c ap l e gr l i n e 4 0@c onne c tionr l i n e 0 2@ p c a p a c i t or v t C 1

    r l i n e 0

    2@c onne c tion

    ! Back t o power r a i lr mo ve 0 8

    ! Power t o F i r s t L egr l i n e 5 0@c onne c tionr l i n e 0 1rmove 2 1@ n m o s fe t Q 1 rmove 2 1r l i n e 0 1

    23

  • 8/3/2019 Gle Electronics

    24/24

    @c onne c tion@ d i od e v u D 1

    @c onne c tion

    ! Back t o P ower r a i lr mo ve 0 8

    ! Power t o s ec o nd l e gr l i n e 8 0@ d i od e v u D 2 @c onne c tionr l i n e 0 1rmove 2 1@ n m o s fe t Q 2 rmove 2 1r l i n e 0 1

    ! Back t o r i g h t hand s i d e o f l oa dr mo ve 0 4

    ! C o nn ec t io n s t o l o a dr l i n e 2 0rmove 4 0r l i n e 2 0rmove 2 1

    ! L oa db o x 4 2r mo ve 2 1s e t j u s t CCte xt LOAD

    24