Skip to content

Full Sensor Build Instructions

Disclaimer

For the DIY hardware you will, as the name suggest, have do it yourself. This includes sourcing parts, basic soldering, and 3D printing. You will be responsible for all troubleshooting.

It is your own responsibility to properly build and use the hardware. Material Foundry cannot be held responsible for any damage, either directly or indirectly caused by Material Foundry or any associated hardware, software or service. This includes damage caused by incorrect documentation, bugs in the software or firmware, or wrong advise.

If you are uncomfortable with this, consider buying the pre-build production hardware.

This page discusses the fabrication of the full DIY sensor. If you are not sure whether you want to build the full or basic sensor, please head over to the hardware overview.
Discussed on this page are the required tools, materials and parts you need, a sourcing guide for 3D prints and electrical components, and the complete build instructions.

Before You Get Started

Screenshot The full sensor build requires one of the following ESP32 boards:

  • TinyPico V1 or V2 (with micro-USB port, discontinued)
  • TinyPico V3 (with USB-C port)
  • TinyS3

For Material Plane, there is no noticable difference between these variants, so pick the one that you can source or the one that is cheapest. In these build instructions there will be variant-specific things you need to do (such as which pins to connect everything to). In these cases, there will be a table to give these differences. Please take note of which variant you have so you don't make any mistakes.

There are variants of these board with no on-board antenna, do not get one of those.

Requirements

Required Tools

  • Soldering iron + solder
  • Wire cutter
  • Wire stripper
  • Knife
  • Hot glue gun or superglue
  • (Optional, but recommended) Electrical tape or heat shrink
  • (Optional) M3 threading tool

Bill of Materials

  • 3D printed parts (see below)
  • A TinyPICO V1, V2 or V3, or a TinyS3
  • DFRobot SEN0158
  • 2x 5mm Red/Green or RGB common cathode LED
  • 2x 180 Ohm wired resistor (200 or 220 Ohm will also work fine)
  • 1x 12 KOhm wired resistor (TinyPICO only)
  • 1x 22 KOhm wired resistor (TinyPICO only)
  • 1x SPDT Slide Switch (approx 6x20mm)
  • 1x Li-Ion battery (max size: 34x53x11mm)
  • 9x M3x10mm countersunk bolts
  • 1x M5x22mm bolt
  • 1x M5 nut

Sourcing Parts

3D Prints

To build the sensor you will need one of each of the following parts (only the 'Sensor Main Body' is different), which you can download here:

Part TinyPICO V1/V2 TinyPICO V3 TinyS3
Sensor Main Body MainBody.stl MainBody_USBC.stl MainBody_USBC.stl
Sensor Lid Lid.stl Lid.stl Lid.stl
Controller Bracket ControllerBracket.stl ControllerBracket.stl ControllerBracket.stl
Sensor Bracket SensorBracket.stl SensorBracket.stl SensorBracket.stl
Microphone Mount MicstandMount.stl MicstandMount.stl MicstandMount.stl

All parts, except for the sensor main body can be printed flat on the 3D printer's bed. The sensor main body was designed to be printed on it's front (the side with the holes).

Recommended printer parameters:

Material PLA, PLA+, PETG or ABS
Nozzle 0.4 - 0.8mm
Layer Height 0.2mm
Supports None

If you do not own a 3D printer, and you do not know anyone who can print for you, you could consider one of the following print services:

Electronic Components

Please note that the links below are a suggestion only and there may be mistakes. It is your own responsibility to make sure the part is compatible.
If you find an incompatible part or a dead/incorrect link, please contact me.

Supplier TinyPICO/TinyS3 DFRobot SEN0158 LEDs Resistors Switch Battery
Mouser (US) TinyPICO V3
TinyS3
link RG RG
RGB RGB
180R 180R
12K 12K
22K 22K
link
Digikey (US) TinyPICO V2
TinyS3
link RG RG
RGB RGB
180R 180R
12K 12K
22K 22K
link
link
link
link
RobotShop (US) link RGB
TinyTronics (NL) TinyPICO V3 link RGB
OpenCircuit (NL) link RGB 180R
12K
22K
Gotronic (FR) link RGB 180R
12K
22K
link
link
Botland (PL) link RGB assortment link
link
DFRobot (CN) link
LCSC (CN) link
Unexpected Maker (AU) TinyPICO V3
TinyS3
Pimoroni (UK) TinyPICO V3
TinyS3
RGB assortment link
Adafruit (US) TinyPICO V3
TinyS3

Pinout

While the pin numbers that are used for each variant are stated at each relevant step in the build instructions, you can use the table below as a quick reference.

TinyPICO V1/V2 TinyPICO V3 TinyS3
SDA 21 21 8
SCL 22 22 9
LED 1 Red 26 26 7
LED 1 Green 25 25 6
LED 2 Red 15 15 5
LED 2 Green 27 27 21
USB Active 32 32 None (internal)
Charge Detect None (internal) None (internal) 1

Instructions

  1. ScreenshotClean the enclosure, and make sure all components fit. Especially the DFRobot SEN0158 and the TinyPICO/TinyS3 might be a tight fit (scroll down see the images for the proper placement and positioning). If necessary, cut away small parts of the enclosure with a sharp knife to make room for the components. You might have to drill out the LED holes with a 5mm drill, if they do not fit.
  2. Either use a M3 threading tool to create threads in all holes. Alternatively, grab an M3 bolt, and screw it into all the holes to form the thread. It should give some resistance (and the bolt will get hot, so you might have to let it cool down between holes), but it should be possible without too much problems, if not, predrill the holes with a 2.5mm drill.
  3. ScreenshotUsing a wire cutter, cut the length of the cable of the DFRobot SEN0158 to around 5 cm (keep the rest for later), and carefully remove the outer sleeve using a knife. If you choose to remove the LED form the DFRobot SEN0158 (see step 5), it might be easier to remove the outer sleeving after opening the DFRobot SEN0158.
  4. Strip a few millimeters off each of the 4 DFRobot SEN0158 wires, and pre-tin them (apply a bit of solder to them).
  5. (Optional) Remove the LED inside the DFRobot SEN0158. This will reduce the power consumption by around 20 mA, increasing battery life:
    1. Removing the label.
    2. Pry open the top using a knife (it is glued in place, so it might take some force).
    3. Removing the circuit board.
    4. Desoldering/cut the LED.
    5. Re-insert the circuit board into its enclosure (note the groove on the far side of the enclosure, into which the circuit board fits).
    6. Re-apply the label or wrap some tape around the end of the DFRobot SEN0158 to prevent the circuit board from falling out.
  6. (TinyS3 only) At the bottom of the board, solder a piece of wire between pin 1 and one of the pads labeled 'CUT TO DISABLE CHRG LED'. You can use a piece of the leads of the LEDs that you will cut in step 8.
    Screenshot
  7. ScreenshotSolder the 4 wires from the IR sensor to the TinyPICO/TinyS3:

    Wire Color Function TinyPICO pin TinyS3 pin
    Red Power 3V3 3V3
    Black Ground GND (next to RST) GND (next to RST)
    Yellow SDA 21 8
    Green SCL 22 9
  8. ScreenshotTake the 2 LEDs and 2 180 Ohm resistors. The next steps will have to be performed on both LEDs.

    1. Figure out what each lead of the LED does. Either use the datasheet, or test it by supplying a low voltage (max 5V @ 20mA) between the longest (ground) lead and the others, you could use a coin cell for this. For the RGB LED I used, starting from the shortest lead, it was:

      Lead Length Function
      Shortest Blue
      Medium Green
      Longest Ground
      Medium Red
    2. (RGB LEDs only) Cut the lead for the blue LED off as far as possible. The blue will not be used.

    3. Bend all leads to a 90 degree angle.
    4. Cut the longest (ground) lead to a length of approximately 5mm, do the same for one lead of the 180 Ohm resistors.
    5. Solder the 5mm lead of the resistor to the ground lead of the LEDs.
    6. Grab/cut 80mm red and green wires (from the remaining wire of the DFRobot SEN0158), strip a few millimeters of each side and pre-tin them.
    7. Cut the red lead of the LED to a length of approximately 5mm, and solder the red wire to it.
    8. Do the same for the green lead and wire.
    9. (Optionally, but recommended) Apply electrical tape or heat shrink around the lead close to the LED to electrically isolate the leads (to prevent shorts). Do this at least for the ground lead, and optionally for the others.
  9. ScreenshotSolder the wires from the LEDs to the TinyPICO/TinyS3 at the following pins:

    LED Wire TinyPICO pin TinyS3 pin
    1 Red 26 7
    1 Green 25 6
    2 Red 15 5
    2 Green 27 21
  10. Screenshot(TinyPICO only) Grab the 12 KOhm and 22 KOhm resistors.

    1. Cut the length of one lead of each resistor to a length of approximately 5mm.
    2. Solder the two 5mm leads together.
    3. Solder the other leg of the 22 KOhm resistor to GND (between 5V and BAT).
    4. Solder the other leg of the 12 KOhm resistor to 5V.
    5. Trim the length of the exposed leads.
    6. Cut a piece of wire to a length of approximately 4 cm (from the remaining wire of the DFRobot SEN0158), strip a few millimeters of each side and pre-tin them.
    7. Solder one side of the wire to the previously soldered connection between the 12 and 22 KOhm resistors, and solder the other side to pin 32.
  11. ScreenshotCut a piece of black wire to a length of 8 cm (from the remaining wire of the DFRobot SEN0158), strip and pre-tin each side and solder one side to GND.
    • TinyPICO: Solder it to the lead of the 22 KOhm resistor.
    • TinyS3: Solder it to the GND pin between 5V and VBAT.
  12. Solder the positive (red) wire of the battery to BAT/VBAT.
  13. Carefully glue the switch to the enclosure with hot glue (or superglue). Make sure you only glue the tabs or sides of the switch, so it can still slide freely afterwards.
  14. Push the two LEDs into the holes close to the switch. LED 1 should go into the left hole (see image for orientation and the table at point 9 to identify which LED is which) and LED 2 in the right hole. Apply some glue if the fit is loose.
  15. Solder the black wire connected to GND on the TinyPICO/TinyS3 and the two resistors that are connected to the LEDs to the center lug of the switch. Trim the excess leads of the resistors.
  16. If the ground (black) wire of the battery is shorter than 60mm, extend it using the remaining wire of the DFRobot SEN0158. Make sure you cover the solder connection with electrical tape or heat shrink.
  17. Solder the ground (black) wire of the battery to the left lug of the switch (see the image for orientation).
  18. Slide the DFRobot SEN0158 inside its cavity (from the inside) until it sticks out slightly at the front of the enclosure and loosely clamp it down with the 'SensorBracket'. It should still be able to rotate.
    Screenshot
  19. Place the TinyPICO/TinyS3 in it's recess in the enclosure and clamp it down with the 'ControllerBracket' (don't overtighten!). Screenshot
  20. Update the firmware and webserver onto the sensor.
  21. Connect the sensor to WiFi.
  22. Go to the 'Coordinates' section of the sensor settings
  23. Place the sensor down on a flat surface and move a base horizontally in front of it. Now rotate the DFRobot SEN0158 inside the sensor until the movement of the dot in the 'Coordinates' section also moves horizontal.
  24. Screw down the DFRobot SEN0158 properly so it cannot move anymore.
  25. Insert the battery and screw down the sensor lid and use the M5 bolt and nut to attach the 'MicstandMount' to it.

The sensor is now ready to be used.

Screenshot