cedric gerber

Workshop · Embedded systems

The cheapest energy is the energy you don't use

I write software that talks to real silicon, on the bench, with a scope and a logic analyser next to the keyboard. What interests me most is doing the same job with less energy, at work and at home.

firmware

Displays that last years on one battery

At Roomz since 2017, I write the firmware for e-ink displays and presence sensors: multithreaded Zephyr on Nordic nRF53 and TI CC32xx, Wi-Fi and NFC. Power-profiling campaigns, with a source meter and a scope, hunt down every microamp so a device runs for years on its battery.

ZephyrnRF53CC32xx
home

A housing co-op that measures itself

Since 2022 I've lived in a Codha eco-district, where we get to take part in the decisions and the running of the building and of the association that manages it. There I started an "energy and heat" working group: what can we do to cut the building's consumption while making it more comfortable?

We surveyed the residents to lower the heating temperature in winter, and set up energy monitoring for hot water, heating and the solar panels.

since 2022hot water · heating · solar
building

Home-made building automation

To know where the energy goes, you first have to see it. I wrote a small set of apps that run on a Raspberry Pi in the building. They read the heat and water meters (NeoVac) and the electricity and solar meters (Climkit) of the three buildings, store them, and present them as dashboards. Alerts fire when something drifts: a solar roof that stops producing, a stalled solar-thermal pump, water use creeping up at night.

The heat flow follows the energy over a year: from the district's wood-fired boiler plant and the roof's solar-thermal collectors to the three buildings, then on to hot water, underfloor heating and air preheating. It also shows what's lost on the way: 11 % of the heat produced vanishes in the buried network before it reaches us.

Raspberry PiNeoVac · Climkitalerts
Flow diagram over a year: the wood-fired boiler plant (486,000 kWh) and the solar-thermal collectors (71,500 kWh) feed the three buildings, which split the heat between hot-water tanks, underfloor heating, air preheating and distribution losses; 53,700 kWh are lost in the buried network.
The heat flow over 2026: where the heat comes from, where it goes, and what's lost (dashboard in French).
solar

Forecasting the sun to share

The roof carries 128 kWp of solar panels. From quarter-hourly weather forecasts (the ICON-D2 model) and the consumption of similar days, the app forecasts production and surplus for the day and the week, with a confidence measured against past forecasts.

The "Sun now" page tells at a glance whether there is sunshine to share, and when: the right time to start a wash, or to charge the van, which reads this forecast and charges only on the surplus.

128 kWpICON-D2 forecastsurplus
cooling

Cooling the building at night, on its own

The "extracteur" drives the windows at the top of the three buildings' stairwells. In summer, when the night air is cooler, calm and dry, it opens them automatically: the stairwell acts as a chimney and draws out the stored heat. It closes them in the morning, or as soon as the wind picks up or rain comes, on the weather radar or in the forecast.

Temperature sensors report over MQTT, the motors are driven by Modbus-TCP relay boards, and every action is logged. Most of the work is in the safeguards: never leave a window open in a storm.

free coolingMQTT · Modbus-TCPweather radar
tooling

AI agents on the bench

Since late 2025 I've been finding out, step by step, what AI agents bring to embedded development. At first I used them mostly to edit code, with a lot of checking on my side.

Then came automated tests, written development guidelines, and handing the build and device programming to lighter sub-agents. We also built a knowledge base, so the agent has as much as possible of what used to live only in our heads. Development sped up sharply.

One example: connect the agent, the device under test and a Wireshark sniffer, describe a complex network problem, and let the agent work for hours before it hands back a report.

The latest step: a fleet-tracking tool that knows which device is up to date and helps analyse subtle problems on particular installations.

Three rules hold it together: document everything that can be documented, automate everything that can be automated, and link tools instead of copying information. And everything built for the agent is useful without it.

Knowledge baseproducts, errors, decisions
The problemdescribed in a few lines
Agentthe working session
Sub-agentsbuild · flash · tests
Device under teston the bench
Wireshark snifferthe network traffic
Reporta few hours later
A network debugging session. The agent reads the knowledge base, hands the noisy work (compiling, flashing, testing) to sub-agents that return a single line, watches the device and the network, then writes a report.

Background

  • 10/2017 – today

    Roomz, Fribourg. Firmware lead: architecture, code review, CI on TeamCity and Docker, Python tooling and a .NET production app.

  • 01/2017 – 08/2017

    SICPA, Prilly. C++ on embedded Linux, Xilinx Zynq (ARM + FPGA).

  • 01/2012 – 12/2016

    Liebherr Machines Bulle. Hardware, then software for the diesel engine ECU: CAN bus, closed-loop throttle valve control, dynamometer and on-vehicle testing.

  • 2010 – 2014

    HEIG-VD, Yverdon. Bachelor in computer science, embedded and communicating systems, in evening classes.

  • 2004 – 2008

    CERN, Geneva. Federal diploma in electronics (CFC), with the Prix du Conseil d'État.