Prototyping Stages

This guide covers the journey from initial concept to production-ready hardware, including prototyping techniques, enclosure design, and testing strategies.

The Prototyping Journey

Stage 1: Concept         Stage 2: Breadboard      Stage 3: Protoboard
   Idea                    Dev board               Soldered
   Research                Jumper wires            Semi-permanent
   Requirements            Quick changes           Test fit enclosure

        │                       │                       │
        ▼                       ▼                       ▼

Stage 4: PCB Rev 1       Stage 5: PCB Rev 2+     Stage 6: Production
   First custom PCB         Refined design          Final design
   Find major issues        Minor fixes             Certified
   Test all functions       Test edge cases         Manufactured

Stage 1: Concept and Planning

Requirements Gathering

Before touching hardware, define your product:

Product Requirements Document Template
======================================

Product Name: _______________________
Target User: _______________________
Problem Solved: _______________________

FUNCTIONAL REQUIREMENTS
-----------------------
□ Core function 1: _______________________
□ Core function 2: _______________________
□ Core function 3: _______________________

TECHNICAL REQUIREMENTS
-----------------------
□ Power source: Battery / USB / Mains
□ Battery life target: _______ hours/days
□ Connectivity: WiFi / BLE / Both / None
□ User interface: Buttons / Display / App / Voice
□ Sensors needed: _______________________
□ Size constraints: _______________________
□ Operating environment: Indoor / Outdoor / Both
□ Temperature range: _______°C to _______°C

BUSINESS REQUIREMENTS
---------------------
□ Target cost (BOM): $_______
□ Target retail price: $_______
□ Initial production quantity: _______
□ Certifications needed: FCC / CE / UL / Other
□ Target market: US / EU / Global

Component Research

Key Questions:

  1. What sensors/actuators do you need?
  2. What's the power budget?
  3. What certifications are required?
  4. What's the target BOM cost?

Research Sources:

  • Datasheet archives (Digi-Key, Mouser)
  • Hackaday.io for similar projects
  • GitHub for example code
  • YouTube for teardowns

Stage 2: Breadboard Prototyping

Setting Up Your Breadboard

Breadboard Layout Example:
┌─────────────────────────────────────────────────────────────┐
│  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +    │ ← Power rail (+)
│  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -    │ ← Ground rail (-)
├─────────────────────────────────────────────────────────────┤
│  a  a  a  a  a │ │ a  a  a  a  a  a  a  a  a  a  a  a  a    │
│  b  b  b  b  b │ │ b  b  b  b  b  b  b  b  b  b  b  b  b    │
│  c  c  c  c  c │ │ c  c  c  c  c  c  c  c  c  c  c  c  c    │
│  d  d  d  d  d │ │ d  d  d  d  d  d  d  d  d  d  d  d  d    │
│  e  e  e  e  e │ │ e  e  e  e  e  e  e  e  e  e  e  e  e    │
│                │ │                                          │ ← Center gap
│  f  f  f  f  f │ │ f  f  f  f  f  f  f  f  f  f  f  f  f    │
│  g  g  g  g  g │ │ g  g  g  g  g  g  g  g  g  g  g  g  g    │
│  h  h  h  h  h │ │ h  h  h  h  h  h  h  h  h  h  h  h  h    │
│  i  i  i  i  i │ │ i  i  i  i  i  i  i  i  i  i  i  i  i    │
│  j  j  j  j  j │ │ j  j  j  j  j  j  j  j  j  j  j  j  j    │
├─────────────────────────────────────────────────────────────┤
│  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +    │
│  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -    │
└─────────────────────────────────────────────────────────────┘

Breadboard Best Practices

DO:
✓ Use color-coded wires (red=power, black=ground)
✓ Keep wires short and organized
✓ Add decoupling caps near ICs
✓ Document your connections
✓ Take photos at each stage

DON'T:
✗ Use long messy wires
✗ Forget pull-up/pull-down resistors
✗ Connect 5V to 3.3V pins
✗ Exceed breadboard current limits (~1A per rail)

Example: Sensor Node Breadboard

// Breadboard prototype: Environmental sensor
// Components: ESP32 DevKit, BME280, OLED, LiPo battery

#include <Wire.h>
#include <Adafruit_BME280.h>
#include <Adafruit_SSD1306.h>
#include <WiFi.h>

// Pin definitions (breadboard layout)
#define I2C_SDA 21
#define I2C_SCL 22
#define BATTERY_PIN 35
#define BUTTON_PIN 15

Adafruit_BME280 bme;
Adafruit_SSD1306 display(128, 64, &Wire);

void setup() {
    Serial.begin(115200);
    Wire.begin(I2C_SDA, I2C_SCL);

    // Initialize sensors
    if (!bme.begin(0x76)) {
        Serial.println("BME280 not found!");
    }

    if (!display.begin(SSD1306_SWITCHCAPVCC, 0x3C)) {
        Serial.println("OLED not found!");
    }

    // Test button
    pinMode(BUTTON_PIN, INPUT_PULLUP);

    Serial.println("Breadboard prototype ready!");
}

void loop() {
    float temp = bme.readTemperature();
    float humidity = bme.readHumidity();
    float battery = analogRead(BATTERY_PIN) * (3.3 / 4095.0) * 2;

    // Display on OLED
    display.clearDisplay();
    display.setTextSize(1);
    display.setTextColor(SSD1306_WHITE);
    display.setCursor(0, 0);
    display.printf("Temp: %.1f C\n", temp);
    display.printf("Humidity: %.1f%%\n", humidity);
    display.printf("Battery: %.2fV\n", battery);
    display.display();

    // Print to serial for debugging
    Serial.printf("T:%.1f H:%.1f B:%.2f\n", temp, humidity, battery);

    delay(1000);
}

Documentation Template

BREADBOARD PROTOTYPE DOCUMENTATION
==================================

Date: _____________
Version: _____________

CONNECTIONS:
-----------
ESP32 Pin    →    Component    →    Notes
GPIO 21      →    BME280 SDA   →    10kΩ pull-up
GPIO 22      →    BME280 SCL   →    10kΩ pull-up
GPIO 21      →    OLED SDA     →    Shared I2C bus
GPIO 22      →    OLED SCL     →    Shared I2C bus
GPIO 35      →    Battery div  →    100k/100k divider
GPIO 15      →    Button       →    Pull-up enabled

POWER:
------
Source: USB from dev board
Voltage: 3.3V (regulated on board)
Current measured: 45mA average, 180mA WiFi TX

ISSUES FOUND:
-------------
1. [Issue description]
   Fix: [How you fixed it]

2. [Issue description]
   Fix: [How you fixed it]

NEXT STEPS:
-----------
□ [Task 1]
□ [Task 2]
□ [Task 3]

Stage 3: Protoboard / Perfboard

Move from breadboard to soldered prototype for reliability.

Protoboard Types

Stripboard (Veroboard):
  - Copper strips in rows
  - Cut strips to isolate sections
  - Good for through-hole components

Perfboard:
  - Individual pads, no connections
  - Wire everything yourself
  - Maximum flexibility

Proto-screw-shield:
  - Attaches to dev board
  - Screw terminals for connections
  - Good for testing with real wiring

Soldering Tips for Prototypes

Equipment Needed:
- Soldering iron (adjustable temperature, 300-350°C)
- Fine tip (conical or chisel)
- Lead-free solder (0.8mm diameter)
- Flux (pen or paste)
- Brass tip cleaner
- Helping hands or PCB holder

Process:
1. Tin the tip
2. Heat pad and lead together
3. Apply solder to the joint (not the iron)
4. Remove solder, then iron
5. Inspect: shiny, cone-shaped joint

Common Problems:
- Cold joint: grainy, dull → reheat
- Bridge: solder between pads → use flux, drag tip
- Insufficient: not enough solder → add more

Test Points

Add test points for debugging:

// Define test points in your code
#define TP1_PIN 25  // Test point 1: I2C activity
#define TP2_PIN 26  // Test point 2: WiFi state

void debugPulse(int pin) {
    digitalWrite(pin, HIGH);
    delayMicroseconds(10);
    digitalWrite(pin, LOW);
}

// In your code
void i2cTransaction() {
    debugPulse(TP1_PIN);  // Oscilloscope trigger
    Wire.beginTransmission(address);
    // ...
}

Stage 4: First Custom PCB

When to Move to PCB

Move from protoboard to PCB when:

  • Circuit is stable and tested
  • You need multiple units
  • Size/weight constraints matter
  • Professional appearance needed
  • Reliability is important

PCB Revision Checklist

Rev 1 PCB Checklist:
--------------------
Before ordering:
□ Schematic reviewed (by someone else if possible)
□ All component footprints verified
□ Design rules check (DRC) passes
□ Net connectivity verified
□ Test points included
□ Mounting holes added
□ Silkscreen clear and readable
□ Gerber files generated and reviewed

Include in Rev 1:
□ Extra GPIO broken out
□ Programming header
□ Debug UART header
□ Test points on key signals
□ Jumpers/0Ω resistors for options
□ LED indicators for power, status

Common First PCB Mistakes

FOOTPRINT ERRORS:
- Wrong package (0603 vs 0805)
- Reversed polarity markings
- Wrong pin spacing

SCHEMATIC ERRORS:
- Missing pull-ups/pull-downs
- Wrong voltage connections
- Missing decoupling caps

LAYOUT ERRORS:
- Antenna keep-out violated
- Ground plane gaps
- Traces too thin for current
- Thermal relief issues

MANUFACTURING ERRORS:
- Silkscreen over pads
- Missing solder mask
- Board outline not closed

Bring-Up Procedure

When your first PCB arrives:

INITIAL INSPECTION:
-------------------
□ Visual inspection under magnification
□ Check for solder bridges
□ Check for missing components
□ Verify polarity of ICs, caps, diodes

POWER-ON SEQUENCE:
------------------
1. DO NOT power from USB yet
2. Check for shorts between VCC and GND (should be >10Ω)
3. Apply power through current-limited supply (set 100mA limit)
4. Monitor current draw
5. Check voltage rails with multimeter
6. If current high or voltage wrong, STOP

FUNCTIONAL TESTING:
-------------------
□ Program the device
□ Test serial output
□ Test each peripheral individually
□ Test WiFi/Bluetooth
□ Measure power consumption
□ Test sleep modes

Stage 5: PCB Iterations

Tracking Changes

Use a revision log:

REVISION HISTORY
================

Rev 1.0 (Date: ______)
- Initial release

Rev 1.1 (Date: ______)
- Fixed: R5 value changed 10k→4.7k (reset timing)
- Fixed: C3 moved closer to U1
- Added: Test point TP5
- Changed: USB connector to USB-C

Rev 2.0 (Date: ______)
- Major: Switched to 4-layer board
- Added: Battery management IC
- Removed: External voltage divider (used internal ADC)

Design for Test (DFT)

Include in your design:
-----------------------
1. Test points for:
   - Power rails (3.3V, battery)
   - Reset line
   - Boot mode line
   - Key signals (I2C, SPI)

2. LED indicators for:
   - Power on
   - WiFi connected
   - Error state
   - User feedback

3. Debug access:
   - UART TX/RX header
   - JTAG header (if space permits)
   - Reset button
   - Boot button

4. Production test:
   - Bed-of-nails test points
   - Fiducials for automated testing

Enclosure Design

Enclosure Options

MethodCost/UnitLead TimeBest For
Off-the-shelf$2-20DaysStandard sizes
3D printed (FDM)$5-50HoursPrototypes
3D printed (SLA)$20-100DaysHigh detail
CNC machined$50-5001-2 weeksMetal, precision
Injection molded$0.50-56-12 weeksHigh volume

3D Printing for Prototypes

FDM Printing Settings:

Material:       PLA (easy), PETG (tougher), ABS (heat resistant)
Layer height:   0.2mm (normal), 0.12mm (detail)
Infill:         20-30% for prototypes
Walls:          2-3 perimeters
Supports:       Yes for overhangs >45°

Design Guidelines:

Wall thickness:     Minimum 1.5mm (2mm+ recommended)
Hole tolerance:     Design 0.2-0.3mm larger than needed
Snap fits:          0.5mm interference for PLA
Screw bosses:       OD = 2× screw diameter
Text size:          Minimum 8pt, embossed 0.5mm

Enclosure Design Checklist

□ PCB mounting points align
□ Clearance for components (tallest part + 1mm)
□ Opening for connectors (USB, buttons, LEDs)
□ Ventilation if needed
□ Battery compartment sized correctly
□ Wall mounting/stand options
□ Label/logo placement
□ Waterproofing considerations (IP rating)
□ FCC/CE label space
□ Serial number location

Example: Sensor Enclosure

Enclosure Requirements:
- PCB size: 50mm × 35mm
- Tallest component: 8mm (OLED)
- USB-C connector on edge
- Status LED visible
- Wall mount option
- Indoor use only

Design Dimensions:
- Internal: 52mm × 37mm × 15mm
- Wall thickness: 2mm
- External: 56mm × 41mm × 19mm
- Mounting tabs: M3 holes, 60mm spacing

Testing and Validation

Functional Testing

// Production test firmware
// Run before shipping each unit

#include <WiFi.h>

struct TestResult {
    bool powerRail;
    bool flash;
    bool wifi;
    bool i2c;
    bool gpio;
    float batteryVoltage;
};

TestResult results;

void runProductionTests() {
    Serial.println("=== PRODUCTION TEST ===");

    // Test 1: Power rail voltage
    float vcc = readVCC();
    results.powerRail = (vcc > 3.2 && vcc < 3.4);
    Serial.printf("Power: %.2fV [%s]\n", vcc,
                  results.powerRail ? "PASS" : "FAIL");

    // Test 2: Flash read/write
    results.flash = testFlash();
    Serial.printf("Flash: [%s]\n",
                  results.flash ? "PASS" : "FAIL");

    // Test 3: WiFi scan
    int networks = WiFi.scanNetworks();
    results.wifi = (networks > 0);
    Serial.printf("WiFi: %d networks [%s]\n", networks,
                  results.wifi ? "PASS" : "FAIL");

    // Test 4: I2C scan
    int i2cDevices = scanI2C();
    results.i2c = (i2cDevices == EXPECTED_I2C_DEVICES);
    Serial.printf("I2C: %d devices [%s]\n", i2cDevices,
                  results.i2c ? "PASS" : "FAIL");

    // Test 5: GPIO loopback
    results.gpio = testGPIOLoopback();
    Serial.printf("GPIO: [%s]\n",
                  results.gpio ? "PASS" : "FAIL");

    // Summary
    bool allPass = results.powerRail && results.flash &&
                   results.wifi && results.i2c && results.gpio;

    Serial.println("======================");
    Serial.printf("OVERALL: [%s]\n", allPass ? "PASS" : "FAIL");

    // Visual indication
    if (allPass) {
        blinkLED(3, 200);  // 3 short blinks = pass
    } else {
        blinkLED(10, 100); // 10 fast blinks = fail
    }
}

Environmental Testing

Temperature Testing:
-------------------
□ Cold start: -10°C (or your minimum spec)
□ Hot operation: +50°C (or your maximum spec)
□ Thermal cycling: 10 cycles, monitor for failures

Power Testing:
--------------
□ Minimum voltage operation
□ Maximum voltage operation
□ Brown-out recovery
□ Battery life measurement

Mechanical Testing:
-------------------
□ Drop test (1m onto concrete)
□ Vibration test (if mobile/vehicle use)
□ Button/switch cycle test (10,000+ presses)
□ Connector insertion test (1,000+ cycles)

EMC Pre-compliance:
-------------------
□ Near-field probe scan
□ Radiated emissions estimate
□ ESD susceptibility (air discharge, contact)

Transition to Production

Production Readiness Checklist

DESIGN FREEZE:
--------------
□ All features implemented
□ All known bugs fixed
□ Test coverage complete
□ Documentation complete

FILES READY:
------------
□ Final Gerber files
□ Bill of Materials (production format)
□ Pick-and-place file
□ Assembly drawings
□ Test procedure document
□ Firmware binary (production version)

SUPPLY CHAIN:
-------------
□ All components available
□ Long-lead items ordered
□ Alternative components identified
□ Supplier contacts documented

MANUFACTURING:
--------------
□ Contract manufacturer selected
□ NDA/contracts signed
□ First article inspection criteria defined
□ Quality requirements documented

Next: Certification & Manufacturing →