Compound Elements

Several compound elements defined based on other basic elements.

Optocoupler

class schemdraw.elements.compound.Optocoupler(**kwargs)

An optocoupler/optoisolator element

Parameters:
  • box (bool) – Draw a box around the optocoupler
  • boxfill (string) – Color to fill the box
  • boxpad (float) – Padding between phototransistor and box
  • base (bool) – Add a base contact to the phototransistor
../_images/compound_1_0.svg

Relay

class schemdraw.elements.compound.Relay(**kwargs)

A relay with inductor and switch

Parameters:
  • unit (float) – Unit length of the inductor
  • cylcoid – Use cycloid style inductor
  • switch (bool) – Switch style; ‘spst’, ‘spdt’, ‘dpst’, or ‘dpdt’
  • swreverse (bool) – Reverse the switch direction
  • swflip (bool) – Flip the switch
  • core (bool) – Show inductor core bar
  • link (bool) – Show dotted line linking inductor and switch
  • box (bool) – Draw a box around the relay
  • boxfill (string) – Color to fill the box
  • boxpad (float) – Spacing between components and box
../_images/compound_2_0.svg