How do you design a PCB for an IoT product?

Whether to use a module or a discrete radio, and the over-the-air test that accepts or rejects the choice, are covered in Hardware Product Development Process Explained. This article starts after the choice. It is about return current, the antenna keep-out as copper and as metal parts, the region a sensor needs, and the sleep current that resistors consume without appearing in the firmware. Every microamp and every milliamp-hour below is hypothetical teaching maths. None of it is a BrahmWorks measurement, a cell datasheet, or a life you can claim for a product.

[vc_single_image image=”7748″ img_size=”large” alignment=”center” onclick=”link_image” css=”” el_class=”article-figure”]

Three EV charger design options

Regions and the path the return actually takes

Divide the board into regions you can point to on the plot: the radio and its antenna, the digital logic, the analogue sensing, and the power conversion. The lines are not decoration and they are not a substitute for placement. They record where you have promised the currents will stay.

Divide the board into regions you can point to on the plot: the radio and its antenna, the digital logic, the analogue sensing, and the power conversion.

At the frequencies a radio uses, return current follows the path of least impedance. That path stays under the trace that carried the current out. It does not follow the tidy DC route you might sketch around a slot. Cut a slot in the ground under the trace and the return has to walk around the slot. The loop grows. The radio is noisier. A sensor trace nearby sees the difference as a signal. Splitting the ground "to keep digital noise out of the analogue side" does this on purpose, often without anyone drawing the detour. A continuous reference under the radio, with the noisy loop placed so it never crosses the quiet circuit, is usually the design you can check. A split you cannot redraw from memory is a split you should not release.

The current spike when the radio transmits is a placement problem, not only a line in a power budget. The charge comes first from the capacitance closest to the radio, and then from the cell through its connector and its traces. If that loop runs the length of the board, past a high-impedance sensor, the reading moves every time the radio talks. Put the bulk capacitance at the radio's supply pins. Keep the cell connection short. Do not route the pulse across the analogue region because that side of the board looked empty. Whether the finished product then meets a link requirement is a different test, on the real cell, in the real enclosure. That pass or fail is not defined in this article, and a clean layout does not let you skip it.

The keep-out is a volume, drawn in the board file

The antenna, whether it is a chip part, a trace on the board or the antenna inside a module, needs a volume clear of copper, of screws, of the cell and of a display. That volume has to be a rule in the CAD. A note in a readme will not stop a ground pour from flooding unused space, and unused space is exactly where a pour thinks it is being helpful. A metal screw in a boss at the edge of the board can sit in the keep-out when every copper layer is correct. The enclosure and the board are one review. Signing them in separate files is how the screw appears later as "a mechanical change" that ruins the link.

A matching network copied from a vendor's drawing is a starting hypothesis, not a result. The vendor's values were for their stackup: their dielectric, their thickness, their distance to a ground. Your stack is a different circuit even if the schematic symbols match. Leave the footprints so the match can be adjusted, fit the published values as the first attempt, and do not call the copy finished because a development kit joined a network on a bench. The kit was not this board.

Place the crystal or other reference next to the pins it serves, with the load the vendor assumed for a short connection. Keep it off a board edge that flexes when the product is dropped, potted or screwed down. A crystal routed across the board, beside a connector that gets mated every day, becomes a frequency error. It will be investigated as a firmware fault because the firmware is what the log can see.

The sensor has to be measured while the radio is awake

A capacitive electrode, a high-impedance node or a small thermocouple does not belong under the radio, under a switching inductor, or on the far side of a ground slot. Keep the trace short. Guard it if the impedance requires that. Do not run a digital line beside it for the length of the board because the routing was convenient. During bring-up, take the reading while the radio is transmitting, not only in the quiet second afterwards. A measurement taken in radio silence will pass a board that lies as soon as it joins a network, which is the only moment the product is doing its job.

Identity and programming are layout, not a factory favour to be added on a later spin. A sealed product that can be programmed only through a header you have to fit and desolder has no honest production path. Pads a fixture can reach before the seal, and a place to store a unique identity, belong on the layout you intend to build. Adding them after the enclosure is tooled means the fixture and the seal argue, and the seal usually wins until a batch cannot be told apart in the field.

Worked example: a soil-moisture puck that only lied while transmitting

The teaching product is a puck that reads moisture from electrodes at the edge of the board and sends the reading through a module at the opposite edge. A coin cell sits between them. On the first layout the electrode traces ran under the module. The ground on the layer above was broken by a row of vias. With the radio held off, the reading sat still. With the radio transmitting, the reading stepped by enough to matter for the soil the product claimed to describe.

Averaging the step in firmware would hide it. The soil would look calmer than it is, and the log would look trustworthy. The fault is the layout. The electrode is a high-impedance input sharing its volume with a transmit current whose return was not the path anyone drew. The redesign puts the electrodes and their reference in a region the transmit loop does not cross, puts a continuous return back under the radio, and repeats the reading during a transmit rather than after one. Only the second reading is evidence. The first was evidence about a different operating mode, the mode in which the product is not a connected product.

The enclosure can undo that redesign. Potting compound over the electrodes changes the measurement. A screw boss in the antenna keep-out changes the link. Neither effect appears on a bare board photographed on a bench. Review the section through potting, electrodes, cell and antenna before you treat a quiet lab reading as a property of the puck.

Teaching maths: one divider spends the sleep budget

Assumptions for the arithmetic, not a measured board and not a cell you could order from these sentences:

  • Capacity used in the sum: 220 mAh.
  • Intended sleep floor: 15 µA.
  • Bursts of transmit current, self-discharge and temperature are ignored. This is only the floor. A real life is shorter once they are put back.

The 15 µA is split, still as an assumption, like this:

  • Microcontroller asleep: 6 µA.
  • Radio asleep: 3 µA.
  • Sensor: 2 µA.
  • A divider across a 3 V rail, using 1 MΩ: 3 ÷ 1,000,000 = 0.000003 A, which is 3 µA.
  • A margin of 1 µA, so the parts are not already the whole budget.

The parts are 6 + 3 + 2 + 3 + 1 = 15 µA.

Time on the floor alone: 220 mAh ÷ 0.015 mA = 14,667 hours. Divide by 24 and the result is 611 days. Set against a teaching target of 365 days, the floor would pass. That sentence does not survive the first transmit burst. It is here to show the resistor, not to predict a year in the soil.

Replace the 1 MΩ part with 100 kΩ, copied from a development board where the current did not matter. The divider becomes 3 ÷ 100,000 = 0.00003 A, which is 30 µA. That is 27 µA above the 3 µA you had allowed. The new floor is 15 − 3 + 30 = 42 µA.

Time: 220 ÷ 0.042 = 5,238 hours, and 5,238 ÷ 24 = 218 days. The 365-day teaching target is missed. The antenna, the match and the firmware can all be in good order. The resistor has already spent the year.

Suppose, instead of changing the resistor, you change the cell so that 42 µA still lasts 365 days on the floor alone. The capacity required is 0.042 mA × 365 × 24. There are 8,760 hours in that year, and 0.042 × 8,760 = 368 mAh. Against the 220 mAh in the assumption, 368 ÷ 220 = 1.67 times the cell, for a single resistor, with bursts still excluded. A larger cell also asks the enclosure for a volume it may not have, which returns the problem to the mechanical section. The layout correction is the resistor value, or a way of observing the rail that does not divide it down through a low resistance all the time. Sleep current is a bill of materials and a placement problem. A low-power mode in the firmware does not cancel a divider that is always connected.

Every cell in the table is arithmetic on the assumptions above. None of it is a battery-life claim for a product, and none of it includes the transmit current that a connected device exists to spend.

Checklist for the layout review

  • Radio, digital, analogue and power regions are visible, and the return under the radio is continuous.
  • The antenna keep-out is a CAD rule, and it includes copper, screws, the cell and the display.
  • A copied match or a copied antenna is marked as unproven until it is checked on this stackup.
  • Transmit current does not loop across the sensor front end.
  • High-impedance traces are short, and they are measured with the radio transmitting.
  • Every divider, pull-up, LED and other always-on path is in the sleep budget, in microamps.
  • The reference clock sits at its pins, away from an edge that flexes.
  • A fixture can program the board, and a unique identity has a home, in the process you will actually run.
  • Potting, gaskets and bosses are on the same section as the antenna and the sensor.
  • The supply used in the test is the cell, or a source whose impedance you have stated, not only a stiff bench supply.

Related questions

Does a module mean the layout is done?

It can remove the discrete matching of the radio silicon, and it can narrow the radio evidence you have to produce, if you follow the module vendor's conditions on keep-out and stackup. It does not place your sensor, your cell, your screws or your ground slots. Those are your board. A module on a careless board can fail in the enclosure and pass on the vendor's kit, because the kit was laid out by someone who was thinking about the antenna. The kit is not the product you are going to seal.

Do you need four layers?

Not as a blanket rule. Four layers make it easier to keep a continuous ground under the radio and to keep that return away from a sensor. Two layers can be honest if the board is small and you can still see every detour the return has to make. The fault to refuse is a split return, not a layer count that sounded expensive in a quote. Choose the stack on which you can draw the return you meant. Do not copy a match from a four-layer reference onto a two-layer board and hope the values still mean what they meant.

Where does the antenna go?

Where the keep-out can survive the enclosure, the cell and, if a hand will hold the product, the hand. A board corner is often chosen because copper can stop on two edges. A corner under a metal plate, or against the cell, is only a corner in the outline. It is not a corner in the volume the antenna uses. Decide that volume with the mechanical model open. A board reviewed on its own will donate the antenna the last free copper, which is a routing convenience, not a radio decision.

Can one board serve two IoT products?

Only when both products can live with the same keep-out, the same supply layout and the same sensor region. A simple beacon with no electrode, and a soil puck with one, do not become the same layout because they share a module. One shared board will either make the beacon pay for a sensor it does not use or make the puck accept a reading the beacon's placement ruined. Two outlines, with a schematic block copied only where the copy is still true, is the smaller risk. Sameness of the module is not sameness of the product.

Window, cell and board in one section

BrahmEarth environmental hardware puts a sensing window, an enclosure and a radio in one object. The PCB review is a section through that object: the electrode or the air path, the antenna keep-out, the cell and the fasteners, together. A bring-up that never closes the housing has reviewed a bare board. It has not reviewed the product the user will place in a room or in soil. No yield, cost, time or test result is stated here.

Review the layout with the enclosure open beside it

Bring the board file, a section through the enclosure, and a sleep budget that lists every part still connected when the firmware believes the product is asleep. BrahmWorks can trace the return, the keep-out and the current those parts already spend, before a tool or a potting fixture makes the picture expensive to change.

Related articles

Share