Skip to content

Tutorial: Create a circuit

NOTE: Before starting this tutorial, you should have installed and set up JITX.

You can follow along with this tutorial in the video above. Below is a transcript to make the code and text easier to read.

Project Overview

In this tutorial series, we'll design an industrial sensing and control board with:

  • 24V power input
  • Gigabit ethernet networking
  • Microcontroller chain
  • Configurable sensors and actuators

This architecture serves as a foundation for various applications, from motor drivers to distributed sensor networks.

Prerequisites

Before starting, ensure you have:

  • Visual Studio Code installed
  • A JITX account (create one at jitx.com)
  • Stable internet connection for initial setup

Installation Steps

  1. VSCode Setup

    • Install Visual Studio Code if not already present
    • JITX supports Windows, Mac, and Linux platforms
  2. JITX Extension

    • Open VSCode
    • Navigate to Extensions (Ctrl+Shift+X)
    • Search for "JITX"
    • Install the JITX extension
    • Sign in using your JITX credentials
  3. Create New Project

    • Click the JITX icon in VSCode
    • Click "Browse" to select a parent directory
    • Name your project (e.g., "ethernet_io")
    • Click "Create Project"
    • Open the newly created folder in VSCode

Project Structure

Your new project contains several important files:

1. helpers.stanza

  • Contains utility functions
  • Defines resistor and capacitor sourcing options
  • Sets up Bill of Materials (BOM) formatting and CAD export
  • Other helper functions

2. main.stanza

  • Main design file
  • Defines board shape
  • Contains circuit modules
  • Manages design setup

3. slm.toml

  • Manages external library dependencies
  • Used for adding additional JITX libraries

4. Project File (stanza.proj)

  • Links local project files
  • Manages project structure

Running Your First Design

  1. Open the Design

    • Navigate to main.stanza
    • Review the initial example code
  2. Run the Design

    • Click the run button at the top of VSCode, or
    • Use Ctrl+Enter
  3. Generated Output JITX automatically creates:

    • Schematic
    • Bill of Materials
    • Board layout
    • Design files for board and schematic are in designs/design-info folder
  4. Export to CAD

    • In the terminal, type: export-design()
    • A KiCad project will be created in designs/kicad (default setting from helpers)
    • All data remains local on your computer

Making Changes

You can modify your design by: 1. Editing component values 2. Adding new components 3. Running the design again (Ctrl+Enter) 4. Checking the updated schematic and BOM

The design updates automatically, with JITX handling component selection from your preferred suppliers.

File Organization

ethernet_io/
├── designs/
│   ├── design-info/
│   └── kicad/
├── helpers.stanza
├── main.stanza
├── slm.toml
└── stanza.proj

Tips for Success

  • Keep the design files open while following along with the video
  • Experiment with small changes to understand how JITX responds
  • Use the generated outputs to verify your changes
  • Remember that all processing happens locally on your machine
  • Save frequently and use version control if possible

Common Issues and Solutions

  • If the design doesn't update, check that you've saved your changes
  • Ensure you're signed in to your JITX account
  • Verify that the JITX extension is properly installed
  • Check the terminal for any error messages