Exemple #1
0
import kidraw
from kidraw import schematic as sch
from kidraw import footprint as fp
from kidraw import ipc
from kidraw.schematic import library as slib
from kidraw.footprint import library as flib

l = kidraw.Library('example')

l.devices = [
    kidraw.Device(slib.vcc('+5V')),
    kidraw.Device(slib.vcc('+12V')),
    kidraw.Device(slib.gnd()),
    kidraw.Device(slib.power_flag()),
    kidraw.Device(schematic=slib.resistor(),
                  footprints=[
                      flib.chip(flib.imperial('0805')),
                      flib.chip(flib.imperial('1206')),
                  ]),
    kidraw.Device(schematic=slib.capacitor(),
                  footprints=[
                      flib.chip(flib.imperial('0603')),
                      flib.chip(flib.imperial('1206')),
                  ]),
    kidraw.Device(schematic=slib.capacitor(polarized=True),
                  footprints=[
                      flib.chip(flib.imperial('0805'), polarized=True),
                      flib.chip(flib.imperial('1206'), polarized=True),
                  ]),
    kidraw.Device(schematic=slib.inductor(),
Exemple #2
0
import kidraw
from kidraw import schematic as sch
from kidraw import footprint as fp
from kidraw import ipc
from kidraw.schematic import library as slib
from kidraw.footprint import library as flib

l = kidraw.Library('parts')
l.devices = [
    kidraw.Device(slib.vcc('+3.3V')),
    kidraw.Device(slib.vcc('+5V')),
    kidraw.Device(slib.vcc('Line')),
    kidraw.Device(slib.gnd('GND')),
    kidraw.Device(slib.gnd('LGND')),
    kidraw.Device(slib.power_flag()),
    kidraw.Device(slib.resistor(),
                  [flib.chip(flib.imperial('0603'))]),
    kidraw.Device(slib.capacitor(),
                  [flib.chip(flib.imperial('0603'))]),
    kidraw.Device(slib.led(),
                  [flib.chip(flib.imperial('0603'), polarized=True)]),
    kidraw.Device(slib.test_point(), [flib.test_point(1)]),
]

s = sch.Schematic('Si1869DH', description='Load Switch with Level Shift')
with sch.ICBuilder(s, 6) as ic:
    ic.side(sch.Pin.Left)
    ic.pin(4, name='Vin', type=sch.Pin.Passive)
    ic.pin(5, name='SW', type=sch.Pin.Input)
    ic.side(sch.Pin.Right)
    ic.pin([2, 3], name='Vout', type=sch.Pin.Passive)
Exemple #3
0
from kidraw import schematic as sch
from kidraw import footprint as fp
from kidraw import ipc
from kidraw.schematic import library as slib
from kidraw.footprint import library as flib

l = kidraw.Library('example')

l.devices = [
    kidraw.Device(slib.vcc('+5V')),
    kidraw.Device(slib.vcc('+12V')),
    kidraw.Device(slib.gnd()),
    kidraw.Device(slib.power_flag()),
    
    kidraw.Device(
        schematic=slib.resistor(),
        footprints=[
            flib.chip(flib.imperial('0805')),
            flib.chip(flib.imperial('1206')),
        ]),
    kidraw.Device(
        schematic=slib.capacitor(),
        footprints=[
            flib.chip(flib.imperial('0603')),
            flib.chip(flib.imperial('1206')),
        ]),
    kidraw.Device(
        schematic=slib.capacitor(polarized=True),
        footprints=[
            flib.chip(flib.imperial('0805'), polarized=True),
            flib.chip(flib.imperial('1206'), polarized=True),