Sensor board schematic capture
Please Log In for full access to the web site.
Note that this link will take you to an external site (https://shimmer.mit.edu) to authenticate, and then you will be redirected back to this page.
Learning Objectives
One of our goals in this class is to give students the confidence to go beyond the breakout board, meaning that when designing a system, you can fully partake in the rich ecosystem of parts that are out there, and not limited to the <1% of parts that are available as fully formed boards on Adafruit, Sparkfun, etc. A second, related, goal is to teach students how to design, lay out, assemble, and test your own printed-circuit boards (PCBs). Making your own boards enables you to create custom systems that do exactly what you want, nothing more and nothing less. It's super powerful.
Let's get going.
In this exercise, you'll create a schematic for a custom sensor board in an electrical design tool called KiCad. If you want to be extra cool, note that it is pronounced "key-cad". It'll let us capture our design as a schematic, which we'll later turn into a printed circuit board (PCB) through a process called layout. Here, you'll do a little circuit design, and hunt for information in datasheets.
You'll need a working copy of KiCad 8+ for this lab. The instructions for getting it are here, along with the rest of the course software.
Why are we doing this?
We can get an SHT40 RH/T board from a vendor. We can get a light sensor board from a vendor. So why make our own? Four reasons:
-
When we make our own we have complete control over what's on the board. For example, many breakout boards will include a 3V3 regulator on the board. But if we don't want that, we can get rid of that -- fewer components, less cost, less power consumption.
-
We can go beyond the breakout. Breakout boards represent probably well less than 1% of the components that are out there. Now you can design your team project using almost any part that you can buy on Digikey. That allows for a better design.
-
Teaching. Many of the concepts involved in developing a PCB schematic and layout build on what you learned in 6.200 and related classes. It's a reinforcement exercise.
-
And, finally, being able to create your own PCBs, even simple ones, opens up new vistas. It's a great skill to have, for work or hobby.
The PCB timeline
If you take a look at the calendar you'll see we have a fairly elaborate calendar for the PCB design, which for each board will have 5 steps.
We'll have several things due not on pset due dates, and you'll need to keep track of all this.
Here's how it will go for the sensor board:
- This week we design and draw the schematic.
- Once this is due on Monday, we'll assign every student to peer review 3 other student schematic designs. Those peer reviews are due Thursday.
- Once you get receive your peer reviews, you update your schematic, and then do your layout, due the following Monday.
- Again, everyone will do 3 peer reviews of layouts, due that Thursday.
- Then everyone has a few days to revise their layout. The board files are due for fabrication the following Monday.
So several deadlines of less a few days. We'll work to remind you, but it's up to each student to stay on top of this.
Let's GIT started
We're going to use Git to upload, share, and peer review our PCBs. KiCad is actually pretty compatible with Git at least as far as it coming to archiving and version-controlling your designs (a schematic file is just thousands of lines of markup language...same case with a PCB)1
By now you've hopefully joined the 6-900-S25
organization on github.mit.edu
and set up Git on your laptop.
The process for working with Git and KiCad will be the same for each PCB project.
-
We will add you to our course github organization
6-900-S25
on github.mit.edu as long as you have a github.mit.edu account. If you don't have an account, we can't make a repo for you, so do that ASAP! -
We will make a repo for you within that organization.
-
Open a terminal. Navigate to the directory (using
cd
) where you would like to store your PCB project. For example, that might be a directory named6.900\psets
in your home directory.- Windows users using WSL: Use your
cdwin
command that you created when setting up Git to navigate to your Windows folders. Since KiCad only has access to your Windows folders, you'll want to clone there.
- Windows users using WSL: Use your
-
Clone your repo. In your terminal, run the following command:
git clone git@github.mit.edu:6-900-S25/sensorboard-None.git
The result should be a directory named sensorboard-None
.
If you have issues, reach out on Piazza. But if all works well, you're ready to start your design.
Circuit Schematics
The first step of designing a PCB is drawing a schematic, which depicts all of the components and how they are connected. This process is called schematic capture. Schematics are how electrical engineers represent circuits logically, and let us do circuit design without having to think about where exactly the physical components will live in real life. They look something like this:

KiCad has it's own set of tools that'll help us make sure that the circuit our schematic represents actually works. Schematics are also used by circuit simulators like LTSpice that toss in physical models of each component, and simulate the circuit over time. If you do it right, this helps verify that the circuit you eventually fabricate will perform as expected.
If you haven't used KiCad before or if you want a refresher, we recommend the following tutorials on schematic capture:
Specifications & Design
For our sensor boards, we've chosen to use the following two sensors:
Both of these parts communicate with a microcontroller via I2C. Both will operate and communicate using 3.3V voltage levels.
Thus, our sensor board will include connectors for power (3.3V and GND) and I2C communications (SDA and SCL lines).
What else do we need to specify?
In designing this subsystem, like many others in this class, we need to think through the interactions with other subsystems, as well as test and verification (and thus debugging!). For this first design, we'll basically tell you what you need to include and why. For the next design you're more on your own!
-
Connectors: how are we going to get the electrical signals from this board to the others? We'll need cables to do this - but there's an incredibly large selection of wires and connectors to build our cables from. Here we'll use Amphenol's Quickie connectors, with some ribbon cable in-between them. Why? These use something called "insulation displacement connectors" (IDC), which make for cables that are really straightforward to make. And because we don't have any crazy specs in terms of voltage, current, or frequency, this is a fine choice. The only issue is that the smallest they come in is 4 wires, but that's ok.
-
Debugging: we all hope our HW/SW works the first time - but it won't! So you need to make debugging easier. On the hardware side, that means:
- Making sure all important pins on the chips are "brought out" so they can be probed or soldered to.
- Including what are known as test points on key signal paths. Test points allow us to probe the circuit to verify it is working correctly. For this board, think about what signals would be useful to be able to test if the board does not work right away.
- Including status LEDs. It's annoying if you have to hook your system up to an oscilloscope or computer to know if it's on, or working. So we add status LEDs that help us know at-a-glance what's going on.
-
Testing & verification: related to debugging is testing. How do we know if our sensors work? We need to set up tests, same as the "unit tests" in software engineering. For this subsystem, that means testing across T, RH, light levels. Not easy! We'll return to this later.
Schematic Design on Paper
Before drawing the schematic in KiCad, we will first sketch things out on paper.
IC manufacturers will often provide reference or typical application designs in the datasheets. These show an example design that covers most of the use cases of their specific part - they do this to make your job as a designer easy, so you'll use their parts! For now, we're going to follow their lead, and use their reference designs for our two sensors. We'll find those in:
-
Check out Figure 1 on page 3 of the SHT40 datasheet. The diagram shows how the sensor should be connected for correct operation.
-
Check out Figure 8 on page 6 of the VEML7700 datasheet. Same as for the SHT40 datasheet, this has a typical application circuit.
We'll be putting all of these components on the same PCB - but the reference designs don't know that! It's your job to combine them all into a single circuit. Go ahead and sketch this out on paper - you'll need more than just the three ICs, you'll also need some resistors, capacitors, and connectors.
-
You'll want to share ground and power across the two ICs.
-
Each IC will need it's own decoupling/bypass capacitors. These are the 10 uF and/or 0.1 uF caps in the application diagrams.
-
The VEML7700 circuit shows a resistor R3 of value 10R (aka 10 ohms) for "very disturbed supply". Likely that means for a situation with a noisy or varying supply, and the R3 along with C1 form a nice low-pass filter to smooth things out. But we will have a nice supply, so no need for R3. But it doesn't hurt to have C1 so we'll keep it.
-
Conversely, we only need one set of I2C pull-up resistors for the entire board (entire system, really). What value to choose? 4.7k is a good middle-of-the-road value for I2C pullups.
-
Next, mark the signals that you think will need test points. A simple rule of thumb for us: put test points on each separate signal, aka 3.3V power, ground, SDL, SCA.
-
Next, we need to add in status LEDs. We recommend at least a status LED on the 3.3V power line. If you'd like to add others, feel free. Each LED will need a series resistor connected between the LED's anode and the signal being measured (in this case, 3.3V). This so-called current-limiting resistor (details here) needs to be of the right value so that the right amount of current goes through the LED: too much current and the LED will burn out, and it will consume too much power; too little current and the LED will not turn on or will be really dim. The amount of current depends on the LED. You have a choice of four colors, all from the same part family:
- Red: HSMS-C170
- Yellow: HSMY-C170
- Green: HSMG-C170
- Orange: HSMD-C170
The LEDs' datasheet provides the typical (forward) voltage needed to achieve the 20 mA they use as their standard brightness (see Table 5). That's actually much brighter than we need, and will burn alot of power. We'll instead want a resistor sized to give around 5 mA of current thru the LED. A bit dimmer, but not as wasteful in terms of power. You can assume the same forward voltage even at the lower current. Pick your color, and calculate your resistance given our 3.3V supply voltage.
We don't ask you to hand in the paper schematic, but you'll need it to keep yourself from getting confused as you're putting things into KiCad. We're teaching you both design intuition and a new tool here, and your paper schematic is the bridge between the two - it's your map and anchor. Put some care into it. Once it's complete, let's capture it in KiCad.
Schematic Capture
Fire up KiCad. You should see a window open up. From this main KiCad window, you can make a new project by clicking File
-> New Project
.
Navigate to the folder containing your repo, such as sensorboard-None
.
In the dialog box, type in a name for the File name
. sensorboard
is not a bad choice.
Very important. Unselect the Create a new folder for the project
checkbox, as shown below:

Hit return. KiCad will give you a warning about the selected folder not being empty. It's totally fine. Hit Yes
.
If you do this correctly, you'll have the following project directory:

Next, you'll want to put this KiCad-specific .gitignore lines in your repo's main directory. This will tell Git to not upload KiCad's auto-generated backup files and cache files.
Once you have made a new blank project, the main KiCad window will show 2 blank files in the project directory, a .kicad_pcb
file and a .kicad_sch
file.
Open the schematic file by clicking on the schematic editor icon.
Placing Components
The first step is placing all the components our circuit needs into the schematic.
Let's add our passive components (resistors, capacitors, LEDs) first. To add a part (or symbol) to our schematic, press the letter A
on your keyboard or click on the Add Symbol
icon on the right of the schematic editor window.

In the searchbox type in R_US
or R
(R_US
is the American resistor symbol while R
is European style symbol) and select the resistor. The symbol will be attached to your mouse cursor and can be placed anywhere on your schematic by just clicking.
If you want to rotate your resistor, select it and press R
on your keyboard.

To add more resistors, we can repeat the above steps, or select the previous resistor and copy-paste.
We should probably specify the value of the resistors. To do so, we right click the symbol and open the Properties
dialog. Change the text in the Value
field of the Symbol Properties
dialog box that pops up.
Once you have added and given a value to all of your resistors, add your capacitors and LEDs in the same way. (Make sure to specify each capacitance or color)
Other parts to insert:
- a 4-pin connector (Hint: search for
Conn_02x02_Odd_Even
) - a second 4-pin connector (Hint: search for
Conn_02x02_Odd_Even
) - Test points: search for "testpoint" and choose one with only 1 connection.
Add the ICs
SHT40
Once we have our passive components in place, let's add our Integrated Circuits (ICs). As you know, this design requires a SHT40 RH/T sensor. We can search for this in the standard KiCad library and add it to our design.

VEML7700-TT
The other IC we need is the VEML light sensor. When you search for it in KiCad, though, you'll find it doesn't exist. This IC is not available in KiCad's default part library. To obtain its symbol and footprint, we can download them from an online service. Although the exact procedure can vary depending on the part, it generally involves the following steps:
- Find the exact part on an online electronics component distributor, such as DigiKey or Mouser.
- Scroll down to the section where the EDA/CAD or ECAD model is listed.
- Create an account with the library service, if necessary, and download the KiCad-specific library files.
Once you get your hand on the library files, we need to put them into a project specific library folder.
- In your project's folder, create a new folder called
lib
in the same location as the.kicad_pcb
and.kicad_sch
files. - Inside the
lib
folder, create a new folder calledVEML7700-TT
. This is where the light sensors's files will go. - Within the
VEML7700-TT
folder, move the.kicad_sym
file and the folder.pretty
folder.
.kicad_mod
file with no pretty
director. If so, just create a pretty
directory and move the .kicad_mod
file inside it.
After all that, your directory structure should look something like this:

The last step is to tell KiCad to look in these folders for our part. Find and open the main KiCad project window:

On the top, open Preferences
then Manage Symbol Libraries...

- Click the
Project Specific Libraries
tab on top (NOT Global Libraries) - Click on the icon of the folder towards the bottom
- Navigate to the part's
.kicad_sym
file and select it. Close the dialog box.
If all goes well, you will have added the part's symbol to your project. To add the part's footprint, let's return to the main project window. Once again on the top open Preferences
but this time click Manage Footprint Libraries
. Repeat the same steps as above (Project Specific Libraries
). One difference is that for footprints, KiCad wants a folder that ends in .pretty
as opposed to the symbol's .kicad_sym
file. Since we spent time organizing the part's library folders, it should be in there.
Now we can finally search for the VEML7700-TT and add it to our schematic.
Making connections
At this point, your schematic should contain a bunch of randomly arranged, unconnected parts. Click the wire tool in the right-side toolbar of your editor, and wire the parts together. This connects them electrically.

You'll also want to arrange your parts so that you don't end up with a ratsnest once everything's connected. You can rotate your parts by hitting the R
key with the part selected, and you can mirror the part with the X
and Y
keys - which one you press determines the axis it's mirrored on.
As you start to draw more than a few wires, eventually your wires will cross and eventually your design will get messy. See the next section below about how to make the design neater via use of Nets. In particular, you may find it useful to Power and Ground ports in your design, which are again accessible from the right-side toolbar.
Nets / Net Labels
Thus far we haven't had a ton of connections between components, and there haven't been that many components to connect to. That goes away for larger designs, which will turn into a ratsnest of chaos if we only connect things with wires. We'll need some notation to help us keep our schematics tidy and legible. The electrical engineers of yore decided that the best way to do this was by putting a label next to the wire to label the signal - and when we want to use this signal elsewhere, we just put the same label next to that wire, making them electrically connected. This means that everything with the same name is electrically connected.
KiCad (along with most electrical design tools) implements this feature as something called a net, which is just that named wire. We assign wires to nets by throwing a net label on the wire, and any two wires that have the same net label attached to them will be electrically connected. For this to work, the names must match exactly, but we get to pick the names. And as long as we name our nets things that make sense, we can make our schematic make sense to whoever's reading it. Just like variables in code.
Here's an example:

If you notice, we're using net labels for signals like NRST
, USB_DM
, PA05
, and so on.
For the purposes of this class, we would like you to use Net Labels to clarify your schematics. This will make your schematics easier to design and review. An additional benefit to labeling your nets is that it makes the PCB layout stage less confusing. KiCad will present the net names to you during PCB layout. If a net has no label, KiCad will give the net a confusing name which you will have to decipher. Label yo Nets!
The one time we don't want you to label nets is if the pin connects directly to a power or ground net. In those cases you want to add a power port by clicking on the following (or hitting P
):

Even though it looks like a ground symbol, it will also allow you to put in power symbols. In the dialog box, you can search for "+3V3" or GND" or lots of other options. Once you've added a power symbol, that will also label those nodes as power or ground nets (so you don't need to add explicit net labels).
To add a net label, click the Add Label
tool on the right hand side of the schematic editor (or press L
on your keyboard).

You will be prompted to give the net a name. Give the net a name and then click okay. Your label should look like this:

You can place your net label on an existing net to assign the name to that net. You can also just place the label on your schematic and attach a wire to in as if it were a one-terminal component. Here is an example of the different ways net lables can be used:

Make it pro
Schematics are an electrically accurate, logical representation of the circuit you're going to build. There are two audiences for the schematic -- the layout editor, and other humans. The layout editor doesn't care what the schematic looks like, but other humans sure do. Because you're going to need to get your schematic reviewed by other students, and just like code, you want it to be easy to review.
So, here are some good tips for the schematic, beyond getting it functionally correct:
-
Give yourself enough space so that components and their text don't overlap. You can rotate the components, move their associated designator and label, etc. to make things easy to read.
-
Align related components vertically and horizontally.
-
Rename the 'labels" to make more sense. Instead of connector "J1" with name "02x02_Odd_Even", doesn't something like "I2C" or "Power" make alot more sense?
Assigning footprints
To reduce the physical size of our boards, we'll be using surface mount (SMD) components when possible. SMD components are mounted directly to the face of the board rather than requiring a through-hole. Surface mount parts come in a range of standard packages and sizes. For our resistors, capacitors, and LEDs we're going to standardize things by always using 0805 parts. 0805 refers to the dimensions of the package, in this case 0.08" by 0.05" (or, 2 mm by 1.2 mm, for those in societies without a manned lunar program). This choice is a bit arbitrary, but 0805 parts are common, small enough to create compact boards, and large enough to put together by hand.
To assign footprints to our parts, click on the Assign Footprints...
/ Run footprint assignment tool
button on the topside toolbar.

The list on the left contains all of the currently accessible footprint libraries. The list on the right shows each footprint within the selected library. The list in the middle are all of the parts present in your design.
To assign the 0805 footprint to the resistor, lets do the following:
- Find the
Resistor_SMD
library on the left. - Find the
R_0805
footprint on the right. There will be two. (one has larger connection pads that are easier to solder by hand; choose this one :-) ) - Once it's been selected, copy it into your clipboard using your OS-specific clipboard keyboard shortcuts.
- Select one of the resistors present in your design (middle list) and paste the footprint on your part. Rinse and repeat for the other resistors in your design. (Protip: select multiple resistors (click on the first, hold shift and click on the last) in your design and paste them all at once)
Great. Now assign the capacitors and LEDs with their respective 0805 footprints.
To assign the correct footprint to our pin headers, look for the Vertical
footprint of the right dimension in the Connector_PinHeader_2.54mm
library. Be careful to select the thru-hole footprint with the correct number of pins. They should all have a 100mil (2.54mm) pin-to-pin distance.
Your SHT4x should already have its footprint assigned. So you'll juts need to assign the VEML and SHT footprints.
The last footprint to assign is our test points. For ease of connecting to the test points, we suggest you assign the TestPoint:TestPoint_THTPad_2.0x2.0mm_Drill1.0mm
footprint.
After you have assigned the footprints, Apply, Save Schematic, & Continue
and press OK
.
Final Schematic Requirements
Before moving on, your schematic should meet the following requirements. Your schematic should have:
- Two four-pin connectors
- One with 3V3 and GND connections
- One with SDA, SCL, and GND connections
- A LED (in an 0805 package) indicating when the board is connected to power.
- Test points on SDL, SCL, 3.3V, and ground nets for debugging. The test points can be placed anywhere on those nets.
- Appropriately named nets for SDA, SCL, GND, and 3.3V.
- The SHT40 should be wired to 3.3V, GND, SDA, and SCL according to its component datasheet.
- The VEML7700-TT should also be wired to 3.3V, GND, SDA, and SCL according to its component datasheet.
- Very likely 3 resistors and 3 capacitors.
ERC
Every time you make a schematic you'll want to run the Electrical Rule Check (ERC), which is a set of automated checks it does to make sure your design looks okay. You can run from (Inspect
/ Electrical Rules Checker
/ Run ERC
). An ERC button is also in the top toolbar.
You'll probably get some errors about some of the pins on your connector not being connected. The best way to fix that is to add explicit "No Connect" labels to those pins. Use Add No Connect Flag
(or press Q
) and put them on all the pins you don't want to have any connections. Run your check again.
You will also get errors that say "Input power pin not driven by any Output Power pins". These you can safely Ignore by right-clicking and selecting "Exclude this violation".
Send it on up
Now let's push
all these files up to the github.mit.edu repo. It's actually good practice to go thru these steps after you make any major change to your design, not just when you are ready to do your final submission. By pushing changes along the way, you ensure you don't lose any work.
We're going to be using a stripped down set of git
commands here, but if you want to learn a bit more about what's going on, I like the tutorial on the 6.102 website, and there are many others online.
First, you need to stage the new and/or changed files.
git add .
This will add all the files in the folder (and subfolders) to this repository. Next do a commit so this initial add is all included. Something like:
git commit -m 'initial add of files for design'
Always add a useful comment in your commit
statement. Don't be that person who writes changed stuff
.
git push origin main
If all works well, your files should now be up on github.mit.edu. You can check on this by looking at the repo on your browser.
You can keep updating your project and pushing changes to the repo. We'll use the latest timestamp to assess lateness, so make sure your final push is before the due date!
What's next
Right after the schematic is due, we'll assign 3 people to review your schematic. We'll also assign you to review 3 student's schematics.