Embedded or Hardware Engineer interview preparation
Use this guide to prepare for Embedded or Hardware Engineer interviews, with a focus on architecture layers, cmos inverter, mqtt retained messages. Explain your reasoning and connect it to experience you can substantiate.
These preparation themes come from the questions in this role’s bank. They help you organise your examples; individual employers may assess different things.
Architecture layers
CMOS inverter
MQTT retained messages
Scalable ingestion
Build vs buy
Degrees of freedom
A useful preparation sequence
Choose your experience level and the round you expect.
Answer one question in your own words before opening its guide.
Compare your reasoning, evidence and trade-offs; adapt the answer to your experience.
Practise the follow-up, then revisit one answer you want to improve.
Representative questions and answer guidance
Open any question to read its answer. The complete guidance is included on this page.
Technical · Fresher
1. What are the main layers of a typical IoT system architecture?
Answer guide
I describe four layers. The perception layer holds sensors and actuators that measure and act on the physical world. The network layer carries data, using Wi-Fi, BLE, Zigbee, LoRaWAN or cellular, often through a gateway. The platform or middleware layer ingests messages, manages device identity, stores data and applies rules. The application layer gives users dashboards, alerts and APIs. Security and device management cut across all layers. Some models add an edge layer between devices and cloud for local processing. The exact naming differs between vendors, but the flow from sensing to transport to processing to application stays the same.
What this question explores
Whether you can describe an end to end IoT data flow and place each component in the right layer.
Common mistakes
Listing layers by memory without explaining what each one actually does in a real deployment.
Forgetting security and device management, which apply to every layer rather than sitting in one.
2. How does a CMOS inverter work, and why does it draw almost no static current?
Answer guide
A CMOS inverter has a PMOS transistor connected between the supply and the output, and an NMOS transistor between the output and ground, with both gates tied to the input. When the input is low, the PMOS conducts and the NMOS is off, so the output is pulled to the supply. When the input is high, the NMOS conducts and the PMOS is off, so the output goes to ground. In either steady state one transistor is off, so there is no direct path from supply to ground and only small leakage flows. Power is mostly used when switching, charging and discharging the load capacitance.
What this question explores
Whether you understand complementary pull-up and pull-down action and can explain why CMOS power is mainly dynamic.
Common mistakes
Saying both transistors conduct at the same time in steady state.
Forgetting that leakage current and short circuit current during switching still exist.
3. How do MQTT retained messages work and when would you use them?
Answer guide
When a publisher sets the retain flag, the broker stores the last message for that topic and delivers it immediately to any client that subscribes later, instead of the subscriber waiting for the next publish. Only one retained message is kept per topic, and a new retained publish replaces it. Publishing a retained message with an empty payload clears it. I use retained messages for current state such as device status, configuration or the last known value of a slow changing sensor, so new dashboards show data at once. I avoid them for event streams, where a stale replayed event could be misread as new.
What this question explores
Whether you understand the retain flag's behaviour for late subscribers and can pick suitable and unsuitable uses.
Common mistakes
Using retained messages for events, so late subscribers replay an old alarm as if it just happened.
Not knowing how to clear a retained message, leaving stale data on the topic indefinitely.
4. How would you design the ingestion path for a million devices sending telemetry every minute?
Answer guide
That is roughly seventeen thousand messages per second on average, with peaks higher, so I design for bursts. Devices connect to a horizontally scaled broker cluster or a managed IoT service behind load balancing, using per device identity and topic policies. The broker forwards into a durable log or queue, which decouples spikes from consumers, and stream processors validate, enrich and write batches to a time series store and a cheaper archive. I keep payloads small, avoid per message database work, and add backpressure and dead letter handling. Reconnect storms need jittered backoff, and I load test with realistic device behaviour and monitor lag at every stage.
What this question explores
Whether you can size and structure a high throughput pipeline, covering decoupling, backpressure and reconnect storms.
Common mistakes
Writing each message synchronously to the database, so bursts overwhelm it and data is lost.
Load testing with steady traffic only, ignoring reconnect storms and synchronized device behaviour.
5. Our company is starting its first IoT product. How would you decide between building our own platform and buying a managed cloud service?
Answer guide
I compare total cost and risk over the product's life, not just launch cost. Managed services give faster time to market, built in scaling, device identity and security updates, with usage based pricing and some lock in. Building gives control and potentially lower unit cost at very large scale, but requires specialised staff for reliability, security and on call. For a first product, I usually buy the commodity layers, such as connectivity, device registry and ingestion, and invest in what differentiates us, such as analytics and user experience. I keep data formats and interfaces portable, review pricing at projected scale, and set a checkpoint to revisit the decision.
What this question explores
Whether you weigh speed, control, lock in, skills and cost at scale, and keep the decision reversible.
Common mistakes
Comparing only the launch price and ignoring operations staffing and cost at projected scale.
Building everything in house for control, though it is not what differentiates the product.
Practise a follow-up
What would trigger you to move off the managed service?
6. What do we mean by degrees of freedom of a robot arm, and why does it matter?
Answer guide
Degrees of freedom is the number of independent variables needed to describe the robot's configuration, which for a serial arm is usually the number of actuated joints. A free body in three dimensional space has six, three for position and three for orientation, so a six joint arm can in general reach any pose inside its workspace. Fewer joints limit which poses are reachable. More than six makes the arm redundant, which helps avoid obstacles and singularities but means inverse kinematics has infinitely many solutions. It matters because the count drives cost, complexity, controllability and the tasks the arm can perform.
What this question explores
Whether you understand degrees of freedom as a design property that links joint count to reachable poses, redundancy and cost.
Common mistakes
Candidates confuse degrees of freedom with the number of links or with payload capacity.
Candidates forget that six degrees of freedom is the minimum for arbitrary position and orientation in space.
Practise a follow-up
What does it mean for a manipulator to be redundant?
How does a SCARA arm's degrees of freedom suit its typical tasks?
7. What is the difference between a sensor and an actuator in an IoT device?
Answer guide
A sensor converts a physical quantity such as temperature, light, motion or humidity into an electrical signal that the microcontroller can read, either as an analog voltage or a digital value. An actuator does the opposite: it takes a command from the controller and produces a physical effect, for example a relay switching a pump, a motor turning a valve or an LED lighting up. Sensors are the inputs and actuators are the outputs of a control loop. A smart irrigation node reads soil moisture with a sensor and then drives a solenoid valve through an actuator when the soil is too dry.
What this question explores
Whether you understand input and output roles in an embedded control loop and can give a concrete example of each.
Common mistakes
Calling a relay or motor a sensor because it is connected to the board.
Ignoring that actuators often need a driver circuit or separate power instead of drawing current directly from a pin.
Practise a follow-up
How would you drive a high current load from a microcontroller pin?
8. How does an Arduino-class microcontroller board differ from a Raspberry Pi single-board computer?
Answer guide
A microcontroller board runs a single program directly on the chip with no operating system, has small memory, very low power draw and fast, predictable response to hardware events, which suits reading sensors and driving outputs. A Raspberry Pi board is a full computer, usually running Linux, with far more memory, storage, networking and the ability to run databases, containers or camera processing, but it uses more power and is less deterministic in timing. I pick a microcontroller for battery powered, simple, real time tasks and a Pi class board for a gateway or heavy local processing. Many designs use both together.
What this question explores
Whether you can choose the right class of hardware for a use case and explain the trade-off clearly.
Common mistakes
Saying the Pi is simply a faster Arduino, ignoring the operating system and real time differences.
Choosing a Linux computer for a coin cell sensor without considering power consumption.
Practise a follow-up
Where does an ESP32 sit between these two?
Why is timing more predictable without an operating system?
9. Why is the ESP32 so popular for IoT prototypes and products?
Answer guide
The ESP32 family combines a capable microcontroller with built in Wi-Fi and Bluetooth, so a single inexpensive chip can connect to a network without extra radio modules. It offers many GPIO pins, ADC, PWM and common buses like I2C, SPI and UART, plus low power sleep modes and hardware support for cryptography on many variants. It can be programmed with Arduino style libraries or the vendor framework, and it has a large community and library ecosystem. The trade-offs are that Wi-Fi uses noticeable power, and exact features such as cores, Bluetooth type and security hardware vary between chip variants, so I always check the datasheet.
What this question explores
Whether you know what makes a connected microcontroller practical and are aware that chip variants differ.
Common mistakes
Assuming every ESP32 variant has identical features such as cores, radios and security hardware.
Ignoring that continuous Wi-Fi operation drains a battery quickly.
Practise a follow-up
How would you keep an ESP32 on battery for months?
10. What is MQTT and how does its publish and subscribe model work?
Answer guide
MQTT is a lightweight messaging protocol that runs over TCP and is designed for constrained devices and unreliable networks. Clients never talk to each other directly. A client publishes a message to a named topic on a broker, and the broker forwards it to every client that has subscribed to a matching topic. This decouples senders from receivers in both time and identity, so a sensor does not need to know who consumes its data. Topics are hierarchical strings such as site/floor/room/temperature, and subscribers can use wildcards. The small header, persistent connections and quality of service levels make it efficient for devices.
What this question explores
Whether you can explain broker based decoupling and why MQTT suits constrained, intermittently connected devices.
Common mistakes
Describing MQTT as direct device to device messaging without mentioning the broker.
Confusing topics with queues and thinking each message is delivered to only one subscriber.
Practise a follow-up
What are topic wildcards and how do they work?
What happens to messages when a subscriber is offline?
11. What do the three MQTT quality of service levels mean?
Answer guide
QoS 0 is at most once: the message is sent once with no acknowledgement, so it can be lost, but it is the cheapest. QoS 1 is at least once: the receiver acknowledges, the sender retries until it gets the acknowledgement, so the message arrives but duplicates are possible and the application should tolerate them. QoS 2 is exactly once, using a four step handshake between sender and receiver, which gives the strongest guarantee but the most traffic and delay. QoS applies separately on each hop, from publisher to broker and from broker to subscriber, and the effective level is the lower of the two.
What this question explores
Whether you know the delivery guarantees of each level and understand that QoS is negotiated per hop.
Common mistakes
Believing QoS 1 never duplicates messages, so skipping idempotent handling on the receiver.
Thinking QoS gives end to end guarantee from publisher to final subscriber at one level.
12. Why is MQTT often preferred over plain HTTP for sending sensor data from devices?
Answer guide
MQTT keeps one long lived connection open, so a device avoids repeating TCP and TLS setup for every reading, which saves energy and bandwidth. Its message header is only a few bytes, whereas HTTP carries bulky headers on each request. The broker can push commands down to a device on the same connection, while with HTTP the device must poll. MQTT also gives quality of service, retained messages and last will, which help with flaky links. HTTP is still fine for occasional uploads, firmware downloads and simple REST integrations, and it passes easily through firewalls and proxies, so I choose based on the traffic pattern.
What this question explores
Whether you can compare protocols on overhead, connection model and server push, and avoid claiming one is always better.
Common mistakes
Claiming HTTP cannot be used for IoT at all instead of comparing the trade-offs.
Forgetting that MQTT allows the cloud to push commands without the device polling.
Practise a follow-up
How would a device receive a command over HTTP instead?
What is the cost of keeping a persistent connection?
Choose one answer containing an example or practical sequence. Explain what you would actually do, what you would check and when you would ask for help. Keep claims about your experience honest.
For technical or regulated work, check current documentation and applicable local requirements alongside this practice material.