Skip to content

Getting started instructions

Pepijn de Vos edited this page Jul 8, 2022 · 12 revisions

Installation

Windows

  1. Download windows-installer from the release page
  2. unzip it (right click, extract all)
  3. Run the installer
  4. Windows will show a dialog that it protected your PC, click "more info" and "run anyway" (pinky promise I'm not trying to hack your PC)
    image
  5. Keep mashing "next" as usual
    image
  6. Launch Mosaic from the start menu
    stertmenu
  7. Wait for the app to start, which will take a while, open a browser window, a terminal, and some firewall prompts. Allow the firewall access and do not close the terminal. (hopefully this will be improved in the future)
    image

Note: Closing the browser does not close the app. Currently the only way to close the app is from JupyterLab (http://localhost:8888/lab under File, Shut Down). If you closed the window and would like to reopen it, don't use the start icon, just navigate to http://localhost:8888/mosaic/

Mac/Linux

  1. Download the installer for your platform from the release page, and extract it.
  2. Open a terminal in the extracted folder and (using the relevant file name)
chmod +x Mosaic-0.5.6-Linux-x86_64.sh
./Mosaic-0.5.6-Linux-x86_64.sh

Then follow the instructions, and activate the newly installed environment. (this step depends on your shell, and if you chose to initialize conda) Then start the app using jupyter mosaic.

Anaconda

Install miniconda and run

conda create -n mosaic -c pepijndevos -c pyviz -c conda-forge couchdb pyttoresque jupyterlab-mosaic ngspicesimserver
conda activate mosaic
jupyter mosaic

Note: pyttoresque and jupyterlab-mosaic are also available from pypi, if you want to bring your own simserver and database.

Setup

  1. By default you are in the "schematics" workspace, which is synchronized to the cloud. You can change the name and leave the URL field empty for an offline, non-synchronized workspace. image
  2. Use the "+ Add interface" button to add a "npn" interface, and select it in the side bar
  3. Use the arrow on the "+ Add schematic" button to "+ Add SPICE model" and name it "BF199"
    image
  4. Set the reference template to Q{name} {ports} {properties} and the declaration template to .MODEL BF199 NPN(IS=4.031E-16 NF=0.9847 ISE=9.187E-17 NE=1.24 BF=122.5 IKF=0.065 VAF=135 NR=0.991 ISC=4.1E-13 NC=1.37 BR=5.036 IKR=0.04 VAR=8 RB=16 IRB=0.0004 RBM=8 RE=0.402 RC=5 XTB=0 EG=1.11 XTI=3 CJE=2.258E-12 VJE=0.444 MJE=0.136 TF=2.92E-10 XTF=8 VTF=8 ITF=0.14 PTF=20 CJC=9.333E-13 VJC=0.2488 MJC=0.1974 XCJC=0.86 TR=3.5E-08 CJS = 0 VJS=0.75 MJS=0.333 FC=0.9001)
  5. Use the "+ Add interface" button to add a interface for your project, and select it in the side bar
    image
  6. Use the "+ Add schematic" button to add one or more designs to your interface
    image
  7. Double-click a schematic to open it in the editor

Note: Mosaic allows collaborative editing by synchronizing the local CouchDB to that of someone else. The "schematics" database is set up to synchronize to a public cloud database. An adventurous user could experiment with the URL field of the library properties to sync up their database with that of their team mate. The local database settings can be accessed at http://localhost:5984/_utils/ (admin/admin) and needs to be configured with httpd bind 0.0.0.0 to be accessible from the outside.

Editing

image

You are now in the main editor where you can draw your design. Hovering the mouse over a tool will tell you what it does and what keyboard shortcut it has.

  • Left mouse button is used for placing elements and wires
  • Right mouse button cancels an action (as does escape)
  • Middle mouse button pans the view (or space bar + left mouse)
  • Scrolling zooms in an out
  • Elements can be selected from the left side bar (or with their shortcut, [R]esistor, [V]oltage source, etc.)
  • Wires can be placed with the pencil tool [W]
  • Selected elements can be [S]pun, [F]lipped, or [del]eted with the buttons at the top or their respective shortcuts.
  • cut/copy/paste and undo/redo works as usual

Do not forget to add a [G]round node to your design

To add a BF199 BJT, press B or long-press the transistor icon, and select the NPN transistor. After placing it in your schematic, click on it to select the model in the right sidebar.

image
image

Simulation

  1. Click the "Open simulator" icon in the top right to start the simulation UI. (the other button opens JupyterLab, for the adventurous)
    image
  2. Another set of terminal windows and firewall messages will pop up. Allow as before.
    image
  3. Select the type of simulation you want to run, and press "simulate"
    image
  4. Use the probe tool in the schematic editor to select nets to plot, or select them directly in the simulator.