Study · 12 layers ·
Hardware, from prototype to product
Building a physical device is a stack of skills that sit on top of each other. At the bottom is plain electricity. Above it come quick experiments on ready-made boards, then the choice of a chip for the real product, the sensors that let it feel the world, the code that runs on it, the custom circuit board, its power, its radio, the box around it, the steps a factory goes through, and finally the tests and certificates a country demands before you may sell it. This page walks up that stack one layer at a time, in plain words, so a founder, an engineer or a client can see where each decision lives and why it matters.
Electricity basics
Voltage, current, resistance, power and ground: the words every other layer uses.
Think of electricity as water in pipes. Voltage, measured in volts (V), is the push, like water pressure. Current, measured in amperes or amps (A), is how much charge actually flows each second, like how much water moves through the pipe. Resistance, measured in ohms (Ω), is how hard the path makes it to flow, like a narrow pipe.
Ohm's law ties the three together: voltage equals current times resistance, written V = I × R. If you know two, you can work out the third. For example, to let only 10 milliamps (0.01 A) through an LED that uses about 2 V from a 5 V supply, the resistor must drop the other 3 V, so it needs 3 ÷ 0.01 = 300 ohms. That small sum is how you stop parts from burning out.
Power, measured in watts (W), is the work being done each second, and it equals voltage times current (P = V × I). Power matters twice: it tells you how fast a battery will empty, and it tells you how much heat a part must get rid of. A part asked to handle more power than it is rated for gets hot and fails.
Ground is the shared reference point that every voltage in a circuit is measured from, usually marked 0 V. It is also the return path current takes back to its source. Many confusing faults come from parts that do not share a common ground, so the signal one sends means nothing to the other.
- V = I × R (Ohm's law) and P = V × I (power).
- Current always needs a complete loop back to its source.
- Every voltage is measured against something, usually ground.
- Heat is wasted power; plan for it.
/ Quick read
- WikiOhm's lawThe rule linking voltage, current and resistance, with history and examples.en.wikipedia.org
- WikiVoltageWhat voltage is and how it is measured.en.wikipedia.org
- WikiGround (electricity)The different meanings of ground and why they matter.en.wikipedia.org
- WikiElectric powerHow power relates to voltage and current.en.wikipedia.org
/ Deep read
- CourseVoltage, Current, Resistance, and Ohm's Law (SparkFun)A beginner tutorial with the water analogy and a worked LED example.learn.sparkfun.com
- BookThe Art of Electronics, 3rd edition (Horowitz and Hill)The classic practical electronics book, for when you want the full picture.artofelectronics.net
Proving an idea fast
Dev boards and breadboards let you test an idea in days, without designing anything custom.
Before you design your own circuit, you prove the idea works using ready-made pieces. A development board, or dev board, is a small circuit board that already has a chip, a USB port and power parts on it, with its pins brought out so you can plug things in. Arduino boards, Espressif ESP32 boards and the Raspberry Pi Pico are common examples.
A breadboard is a plastic block full of holes with metal strips hidden underneath. Pushing a wire or a part into two holes on the same strip connects them, so you can build and change a circuit without soldering. It is fast and forgiving, but the connections are loose, so it is for testing, not for anything you ship.
It helps to know the two kinds of board. A microcontroller board, such as an Arduino or an ESP32, runs one program directly on the chip, starts in a moment and uses little power. A single-board computer, such as a Raspberry Pi 4 or 5, runs a full operating system like Linux. It can do far more, such as video or a web server, but it uses more power and takes time to start.
The goal at this stage is to answer one question: does the core idea work at all? Ugly is fine. Many ideas end here, cheaply, which is the point.
- Arduino: easiest start, large community, many example sketches.
- ESP32: adds Wi-Fi and Bluetooth for very little cost.
- Raspberry Pi (computer models): when you need Linux, a camera or a screen.
- Watch logic levels: many boards use 3.3 V signals, older Arduinos use 5 V.
/ Tools and names to know
/ Quick read
/ Deep read
- CourseHow to Use a Breadboard (SparkFun)Step-by-step guide with photos of what is connected to what.learn.sparkfun.com
- OfficialGetting started with Arduino (official docs)The official walkthrough of boards, the editor and your first program.docs.arduino.cc
- OfficialRaspberry Pi DocumentationOfficial guides for every Raspberry Pi computer and microcontroller board.raspberrypi.com
Choosing the chip
Picking a microcontroller and radio module for a real product: ESP32, STM32, Nordic nRF, Quectel.
A microcontroller is a tiny computer on one chip: a processor, memory and pins that can read sensors and switch things on and off. For a real product you choose it on a few plain questions. Does it need wireless, and which kind? How long must it run on a battery? How much does it cost at the volume you will build? Will it still be made in five years? Is the software support good?
Espressif's ESP32 family is popular when you need Wi-Fi and Bluetooth at low cost. STMicroelectronics' STM32 family is a very wide range of Arm-based microcontrollers, from tiny low-power parts to fast ones, and is a common choice when you do not need a radio built in or want many options. Nordic Semiconductor, a company from Norway, makes the nRF52 series for Bluetooth Low Energy (very low power short-range radio) and the nRF91 series for cellular IoT, meaning low-power mobile network links called LTE-M and NB-IoT, with satellite positioning built in.
When a device must talk over the mobile network or know where it is, many teams add a separate module from a company such as Quectel, which makes cellular and GNSS modules. GNSS is the general name for satellite positioning systems such as GPS. A module is a small ready-built board with the chip, its support parts and often an antenna connection, soldered onto your board as one piece.
For a first product, using a module rather than a bare chip is often wise. The module maker has already done the hard radio design and, usually, already holds radio certificates for it. You trade a little cost per unit for months saved and less risk.
- Choose on: radio needs, power budget, cost at volume, supply life, software tools.
- Bluetooth LE for phones and wearables; Wi-Fi for home and office; cellular for anywhere.
- A module costs more per unit than a bare chip but saves radio design and certification work.
- Check the maker's long-term supply promise before you commit.
/ Tools and names to know
/ Quick read
- WikiMicrocontrollerWhat a microcontroller is and what is inside one.en.wikipedia.org
- WikiESP32The ESP32 family and its variants.en.wikipedia.org
- WikiSTM32The STM32 families and their Arm cores.en.wikipedia.org
- WikiNordic SemiconductorThe Norwegian chip company and its product lines.en.wikipedia.org
- WikiLTE-MThe low-power cellular standard many IoT devices use.en.wikipedia.org
Sensors, actuators and how they talk
The parts that sense and move, and the wires and rules (I2C, SPI, UART, analog) they use to talk to the chip.
A sensor turns something in the world into an electrical signal: temperature, motion, distance, current or gas. An actuator does the reverse and turns a signal into action: a motor, a relay, a buzzer, a light. Most products are just sensors, a chip deciding something, and actuators.
Some common sensors: a temperature sensor reads heat; an IMU (inertial measurement unit) combines an accelerometer and a gyroscope to sense movement and tilt; distance sensors use sound echoes or light timing; current sensors measure how much power something uses; gas sensors detect things like carbon dioxide or smoke, though many need heating, warm-up time and calibration to be trustworthy.
Sensors talk to the chip in a few standard ways. Analog sensors give a voltage that rises and falls, and the chip's analog-to-digital converter (ADC) turns it into a number. I2C uses two shared wires and gives each device an address, so many sensors can share them. SPI uses more wires but is faster, good for screens and memory. UART is a simple two-wire serial link, one wire to send and one to receive, used by many GPS and cellular modules.
The datasheet of each sensor tells you which of these it uses, what voltage it needs and how accurate it really is. Accuracy on the box and accuracy in your product, inside a warm case, are often not the same.
- Analog: a changing voltage, read by an ADC.
- I2C: two wires, many devices, each with an address; slower.
- SPI: four or more wires, faster, one select line per device.
- UART: transmit and receive lines at an agreed speed (baud rate).
/ Quick read
- WikiSensorKinds of sensors and how they are classified.en.wikipedia.org
- WikiI2CThe two-wire bus used by most small sensors.en.wikipedia.org
- WikiSerial Peripheral InterfaceHow SPI works and where it is used.en.wikipedia.org
- WikiUniversal asynchronous receiver-transmitterThe simple serial link behind many modules.en.wikipedia.org
- WikiInertial measurement unitWhat an IMU measures and its limits.en.wikipedia.org
Buying parts and reading datasheets
Where parts come from, how to read their specifications, and how to avoid a part that disappears.
Electronic parts are bought from distributors. DigiKey, Mouser and Arrow are large distributors with detailed catalogues and filters; LCSC is a large distributor based in China that is linked to JLCPCB's assembly service. Their search filters let you narrow thousands of parts by value, size, voltage and stock.
Every part has a datasheet, the maker's official document. Read it in this order: the first page summary, the absolute maximum ratings (limits that will damage the part), the recommended operating conditions (where it works properly), the electrical characteristics, the pin diagram, the package drawing and the example circuit. The example circuit is often the fastest route to a working design.
Parts have a lifecycle. A maker may mark a part active, not recommended for new designs, or obsolete. Never design in a part that is already on its way out. Where you can, pick parts that have a second source, meaning another maker sells a drop-in equivalent, so one shortage cannot stop your factory.
Your list of every part, with maker part numbers and quantities, is called the bill of materials (BOM). It drives cost, buying and assembly, so keep it exact from the start.
- Read absolute maximum ratings first; never design near them.
- Check stock and lifecycle status before choosing a part.
- Prefer common packages and values with second sources.
- Keep one exact bill of materials for the whole project.
/ Tools and names to know
/ Quick read
- WikiDatasheetWhat a datasheet contains and why.en.wikipedia.org
- WikiBill of materialsWhat a BOM is and how it is used.en.wikipedia.org
- WikiObsolescenceWhy products and parts stop being made.en.wikipedia.org
- WikiDigiKeyBackground on one of the big distributors.en.wikipedia.org
- WikiMouser ElectronicsBackground on Mouser.en.wikipedia.org
- WikiArrow ElectronicsBackground on Arrow, a large distributor.en.wikipedia.org
Firmware
The code that lives on the chip: languages, frameworks, real-time systems and updates over the air.
Firmware is the program stored inside the device that runs it. It is usually written in C or C++, because they are fast, small and can touch the hardware directly. The Arduino framework hides much of the detail and is great for prototypes. For products, teams usually move to the maker's own toolkit: ESP-IDF for ESP32, STM32Cube for STM32, or the nRF Connect SDK for Nordic chips.
A real-time operating system (RTOS) lets one small chip juggle several jobs, such as reading a sensor, talking on the radio and updating a screen, each in its own task, and makes sure urgent jobs run on time. FreeRTOS is a widely used small RTOS, and ESP-IDF is built on it. Zephyr is an open-source RTOS run under the Linux Foundation that supports many chips, and Nordic's SDK is built on Zephyr.
Over-the-air (OTA) updates let you send new firmware to devices already in customers' hands. A safe design keeps two copies of the program: it writes the new one into the spare slot, checks it, switches over, and rolls back if the new one fails to start. Updates should be signed so only you can send them.
Plan for OTA from day one. A device that cannot be updated cannot be fixed once it leaves the factory.
- C and C++ are the normal languages for microcontroller firmware.
- Use the chip maker's SDK for production work.
- An RTOS runs several tasks on one chip on time.
- OTA needs two program slots, a check, a rollback and signing.
/ Tools and names to know
/ Quick read
/ Deep read
- OfficialOver The Air Updates (ESP-IDF Programming Guide)How ESP32 OTA works: partitions, validation and rollback.docs.espressif.com
- OfficialDevice Firmware Upgrade (Zephyr docs)Zephyr's approach to safe firmware upgrades.docs.zephyrproject.org
- ArticleInterrupt (Memfault blog)Long, practical articles by embedded engineers on firmware in real products.interrupt.memfault.com
Designing the circuit board
From schematic to layout to Gerber files, and getting boards made and assembled.
A printed circuit board (PCB) is the flat board that holds and connects all the parts with thin copper tracks instead of loose wires. You design it in two steps. First the schematic: a drawing of which pin connects to which, using symbols. Then the layout: placing the real parts on a board shape and drawing the copper tracks between them.
Each part needs a footprint, the exact pattern of copper pads it will be soldered to. A wrong footprint is one of the most common and costly mistakes, so check each one against the package drawing in the datasheet. Boards have layers of copper: simple boards use two, and many products use four so a whole inner layer can be a solid ground, which makes signals cleaner and radio problems rarer.
Before you order, run the design rule check (DRC). It compares your layout against the factory's limits, such as the narrowest track and the smallest gap it can make, and flags anything that breaks them. Then you export Gerber files, the standard set of drawings a factory uses to make each layer, plus a drill file, a BOM and a placement file for assembly.
Services such as JLCPCB and PCBWay make boards from those files and can also solder the parts on for you, which is called PCB assembly (PCBA). Tools range from free KiCad and browser-based EasyEDA to professional Altium Designer.
- Schematic first (what connects), layout second (where it goes).
- Check every footprint against the datasheet drawing.
- Four layers with a solid ground layer solve many problems.
- Always run DRC with your factory's rules before ordering.
- Send: Gerbers, drill file, BOM, placement file.
/ Tools and names to know
/ Quick read
- WikiPrinted circuit boardHow PCBs are built, layered and made.en.wikipedia.org
- WikiGerber formatThe file format factories use to make boards.en.wikipedia.org
- WikiDesign rule checkingWhat DRC checks and why.en.wikipedia.org
- WikiSurface-mount technologyHow small parts are placed and soldered by machine.en.wikipedia.org
/ Deep read
- OfficialGetting Started in KiCad (official docs)Walks through a full project from schematic to Gerbers.docs.kicad.org
- OfficialPCB Manufacturing and Assembly Capabilities (JLCPCB)A real factory's limits, the numbers your DRC rules should follow.jlcpcb.com
- OfficialOfficial Gerber Format Website (Ucamco)The Gerber specification from the company that maintains it.ucamco.com
Power and batteries
Getting steady, safe power to every part, and making a battery last.
Every part needs a steady voltage, often 3.3 V for modern chips. A voltage regulator takes a rougher input, such as a battery or USB, and turns it into that steady level. A linear regulator, including the low-dropout (LDO) type, is simple and quiet but turns the extra voltage into heat. A switching regulator is more efficient and better for batteries, but it is harder to design and can create electrical noise.
Lithium-ion and lithium-polymer cells are common in small devices because they hold a lot of energy for their weight. They must never be overcharged, over-discharged or shorted, so they need a proper charger chip and a protection circuit. Lithium batteries also have special shipping rules, which affects how you send products.
Battery life comes from simple sums: the battery's capacity divided by the device's average current. Most battery devices spend almost all their time asleep, drawing tiny current, and wake briefly to do their work. So the sleep current and how often the radio switches on usually matter more than how fast the chip is.
- LDO: simple and quiet, wastes extra voltage as heat.
- Switching regulator: efficient, needs careful layout.
- Lithium cells need a charger and protection; never skip them.
- Measure real sleep current with a meter, not the datasheet number.
/ Quick read
- WikiVoltage regulatorLinear and switching regulators explained.en.wikipedia.org
- WikiLow-dropout regulatorWhat makes an LDO different.en.wikipedia.org
- WikiLithium-ion batteryHow lithium cells work and their safety risks.en.wikipedia.org
- WikiBattery management systemHow batteries are protected and monitored.en.wikipedia.org
Radio basics
Antennas, matching, and why a pre-certified module saves so much time.
Any wireless device sends and receives radio waves through an antenna. An antenna is sized for its frequency; for 2.4 GHz Wi-Fi and Bluetooth it can be a short track on the board, a tiny chip, or a separate part on a cable. Nearby metal, batteries, ground copper and even the user's hand all change how well it works.
Between the chip and the antenna sits a matching network, a few small parts that tune the path so the most energy reaches the antenna instead of bouncing back. Getting this right needs special test equipment and experience, which is why radio design is a specialty of its own.
This is the big reason to use a pre-certified module. The module maker has already designed the radio and antenna path and passed the radio tests. If you follow their layout rules, such as keeping copper away from the antenna area, you avoid most of the risk. You still test the finished product, but you start far ahead.
Electromagnetic compatibility (EMC) is the related idea that your device must not leak too much electrical noise and must keep working when other devices are noisy. Clean grounding, short fast signals and good layout help with both radio and EMC.
- Follow the module maker's antenna keep-out area exactly.
- Test the antenna inside the final enclosure, not on the bench.
- A pre-certified module removes most radio design risk.
- EMC: do not emit too much noise, and survive the noise of others.
/ Quick read
Enclosures and mechanical design
The box around the electronics: CAD, 3D printing, injection moulding and water and dust ratings.
The enclosure protects the electronics, holds buttons, screens and connectors in the right place, and is what customers actually touch. It is designed in CAD (computer-aided design) software such as Autodesk Fusion, FreeCAD or Onshape, ideally together with the PCB so holes, screws and connectors line up.
3D printing is perfect for early enclosures: cheap per piece, ready in hours, easy to change. For larger volumes, most plastic cases are made by injection moulding, where melted plastic is forced into a steel mould. The mould is expensive and slow to make, but each part after that is cheap and fast. Moulded parts need design rules of their own, such as even wall thickness and slight angles so the part slides out of the mould.
If the device goes outdoors or near water, it needs an IP rating, an international code for protection against dust and water. The first digit is for solids, the second for liquids; IP67, for example, means dust-tight and able to survive brief immersion. You claim a rating only after testing to the standard.
- Design the PCB and enclosure together.
- 3D print for prototypes; injection mould for volume.
- Moulds are a large upfront cost and are hard to change later.
- IP code: first digit solids, second digit water.
/ Tools and names to know
/ Quick read
- WikiComputer-aided designWhat CAD is and how it is used.en.wikipedia.org
- WikiAutodesk FusionBackground on Fusion, a common CAD tool for product design.en.wikipedia.org
- Wiki3D printingThe main 3D printing methods.en.wikipedia.org
- WikiInjection mouldingHow moulded plastic parts are made.en.wikipedia.org
- WikiIP codeWhat each digit of an IP rating means.en.wikipedia.org
The stages of a product
Proof of concept, EVT, DVT, PVT and mass production, explained simply.
Hardware moves through named stages, and each one answers a different question. The proof of concept asks: can this work at all? It is the breadboard and dev board stage.
EVT, engineering validation test, asks: does our own design work? You build a small batch of real custom boards, often still with 3D printed cases, and test every function. DVT, design validation test, asks: does the full product, in its real enclosure, meet its goals and pass reliability and certification tests? Units are built with production-intent parts and tooling.
PVT, production validation test, asks: can the factory build it well, at speed, with real processes and checks? The units from PVT are often the first ones sold. After that comes mass production, where the job becomes keeping quality steady and the supply of parts flowing.
Each stage costs more to change things than the one before. A wire moved at EVT is cheap; a change to a steel mould after DVT is not. That is why teams try hard to find problems early.
- Proof of concept: does the idea work?
- EVT: does our design work?
- DVT: does the finished product meet its goals and pass tests?
- PVT: can the factory build it well, at volume?
- Mass production: keep quality and supply steady.
/ Quick read
- WikiEngineering validation testShort overview of EVT, DVT and PVT.en.wikipedia.org
- WikiPrototypeKinds of prototypes and what each proves.en.wikipedia.org
- WikiDesign for manufacturabilityDesigning so the factory can build it easily.en.wikipedia.org
- WikiDesign for testingBuilding test access into the product.en.wikipedia.org
Compliance and certification
The tests and marks a country requires before you may sell: FCC, CE and RED, UKCA, BIS and WPC, RoHS, REACH and safety.
Before you sell an electronic product, you must show it meets the rules of each country. The rules cover three main things: it does not cause harmful radio interference, it is safe to use, and it does not contain banned substances. Testing usually happens at accredited labs, often inside shielded rooms lined with foam spikes that absorb radio waves.
In the United States, the FCC (Federal Communications Commission) sets the rules. Devices that deliberately send radio signals need certification and an FCC ID; many other electronic devices can use a simpler supplier's declaration of conformity. In the European Union, radio products fall under the Radio Equipment Directive (RED), and other electronics under the Low Voltage and EMC directives; the maker checks conformity, keeps a technical file, signs a declaration and applies the CE mark. Great Britain has its own UKCA mark, though for many product types it currently also accepts CE marking.
In India, many electronic and IT products must be tested in a recognised lab and registered with the Bureau of Indian Standards (BIS) under its Compulsory Registration Scheme before sale. Wireless devices also need Equipment Type Approval (ETA) from the Department of Telecommunications' WPC (Wireless Planning and Coordination) wing; for many licence-exempt devices this is now done by self-declaration on the government's Saral Sanchar portal. Telecom equipment may have further requirements from TEC.
Two chemical rules apply widely in Europe: RoHS limits hazardous substances such as lead and mercury in electronics, and REACH controls chemicals in products. Using a module that is already radio certified does not make your whole product certified, but it usually means far less radio testing and a faster, cheaper path. Always plan certification early, because a failed test late in DVT can mean a board redesign.
- US: FCC certification for radio devices; FCC ID on the label.
- EU: RED, LVD and EMC directives, technical file, declaration, CE mark.
- UK: UKCA, with CE still accepted for many products.
- India: BIS registration for listed electronics; WPC ETA for wireless.
- RoHS and REACH: control of hazardous substances and chemicals.
- Certified modules cut radio testing but do not certify the whole product.
/ Tools and names to know
/ Deep read
- Official47 CFR Part 2 Subpart J: Equipment Authorization Procedures (eCFR)The official US rule text for FCC certification and declarations of conformity.ecfr.gov
- OfficialRadio Equipment Directive (European Commission)The Commission's page on RED, with guidance and standards.single-market-economy.ec.europa.eu
- OfficialPlacing UKCA or CE marked products on the market in Great Britain (GOV.UK)Official UK guidance on which marks are accepted and when.gov.uk
- OfficialEquipment Type Approval (Department of Telecommunications, India)The official WPC ETA service page for wireless equipment in India.eservices.dot.gov.in
- OfficialProducts under compulsory certification (Bureau of Indian Standards)BIS lists of products that need certification or registration in India.bis.gov.in
- OfficialRoHS Directive (European Commission)The official page on restricted substances in electronics.environment.ec.europa.eu
Paths through it
What each kind of reader needs, step by step.