Pt. 3: Firmware Enhancements
Pt. 3: Firmware Enhancements
Introduction
As described in the first two blog posts, the v2 update started with practical hardware refinements and later grew into analogue performance improvements as well. With the change to the AVR64DB48 microcontroller, the firmware also had to be adapted accordingly.
Initially, the existing functionality was brought over to the new hardware platform. With the v2 units launched successfully, a more in-depth restructuring of the codebase was tackled.
Firmware version 2.26 brings these changes together. The core operation of the PDVS 2 Mini remains unchanged, with several areas improved or extended:
Summary of Improvements
-
Advanced Features: Optional software-based functions:
-
Temperature Coefficient Compensation (TCC): Compensates for voltage drift caused by the temperature coefficient and temperature differences using the internal temperature sensor.
- Negative output: Optional extension of the output voltage range down to -10.00 mV.
-
Temperature Coefficient Compensation (TCC): Compensates for voltage drift caused by the temperature coefficient and temperature differences using the internal temperature sensor.
- SCPI-style serial commands: Completely reworked and extended serial command interface, following standard SCPI syntax.
-
Reduced logic rail current draw: Significant reduction of the 3.3 V rail current through firmware restructuring, resulting in over 15% lower battery current draw in normal operation and extended runtime.
Advanced Features
These new firmware functions are not enabled by default. Access to them via the calibration menu has to be activated via the serial interface and can also be disabled again at any time.
These functions are intended for users who want to experiment further, characterize their own units more deeply, or use the PDVS 2 Mini in more specialized setups. They are implemented entirely in software and are compatible with all v2 units already sold.

Note: The temperature coefficient used for compensation and the additional –10 mV calibration point are not part of the regular calibration report and have to be determined or verified by the user.
The advanced features are available for users who want to make use of them, and should be considered optional extensions rather than part of the normal factory-calibrated feature set. While thorough testing has been done, minor bugs or edge cases may still be found over time.
Temperature Coefficient Compensation (TCC)
The first new optional feature is temperature coefficient compensation, TCC for short.
With TCC enabled, the unit calculates the expected output voltage error caused by the temperature coefficient of the unit, the currently selected output voltage, and the temperature difference between the calibration temperature and the current internal temperature using the integrated temperature sensor.
The correction is based on the average step size between two adjacent calibration points. For example, between the 9 V and 10 V calibration points, the firmware calculates the effective voltage change per DAC count and applies the calculated correction accordingly.
To avoid unnecessary small fluctuations, a 0.2 K deadband is implemented. With TCC enabled, a correction is applied in one of three cases:
- the set voltage is changed
- TCC is enabled
- the internal temperature has changed by more than 0.2 K since the last correction
Note: In a voltage source such as the PDVS 2 Mini, the final output is still limited by the physical DAC resolution. This means that corrections can only be applied in 10 µV increments. In comparison, an ADC outputs a digital number, so mathematical correction can be applied much more freely.
As a result, the correction appears as small discrete steps. At 10 V, however, one 10 µV step corresponds to only 1 ppm.
The graph below shows a temperature sweep from 20 °C to 50 °C and back to 20 °C with TCC enabled. During the sweep, the firmware applies corrections in both directions as the internal temperature changes. In this example, the unit stays within 2 ppm of the 10 V output voltage over the full temperature cycle. The temperature coefficient of the DUT was set to -0.12 ppm/K.

Extended Low-End Negative Output
All wrytech-built units from v1.6 onwards already increased the upper output range from 10.00000 V to 10.22222 V. Firmware version 2.26 adds a similar extension at the lower end as an optional advanced function.
With this feature enabled, the PDVS 2 Mini can source negative voltages down to –10.00 mV with 10 µV resolution. This effectively makes use of the full available range of the 20-bit DAC.
One possible use case is checking ADC linearity around the zero crossing without having to change or invert the wiring.
The –10 mV point has its own calibration value and is fully compatible with TCC. As this point is not included in the standard calibration procedure, units are shipped with a typical average value stored. Users who want to rely on this feature for measurements should determine and write their own calibration value via the calibration menu.
SCPI-Style Serial Commands
The serial command interface has been completely rewritten and now follows SCPI-style syntax. The previous command set is no longer supported, but all existing functionality has been retained and extended. The new structure is more consistent, easier to expand, and better suited for automated setups.
Standard commands such as *IDN? are now supported, alongside commands for querying and setting relevant system parameters. These include, among others:
- set voltage output
- calibration and configuration values
- internal temperature information
- runtime since power-on
- advanced feature status and settings
The full command list is included in the manual.
Supported baud rates range from 4800 to 230400 and are fully compatible with the IUSL.
To reduce current draw during normal standalone operation, the serial interface is now disabled by default. It can be enabled when needed and halted again remotely via command. This keeps the unit as efficient as possible during typical battery-powered use, while still allowing full remote-control functionality when required.
Current Draw Optimization
The final part of the firmware work focused on reducing the current draw of the logic rail. The logic rail powers the microcontroller and surrounding digital circuitry and is generated directly from the battery voltage via an LDO.
Because of this, any reduction in logic rail current translates directly into reduced battery current and therefore longer runtime.
The largest improvement is seen in normal operation with the unit sourcing voltage and the serial interface disabled. In this state, the logic rail current was reduced from around 9.4 mA to 1.1 mA, corresponding to a reduction of more than 85%.
This was achieved entirely in software, with no hardware changes required. The firmware structure was reworked to rely more on event-driven operation instead of continuously running tasks in the background.
Other operating modes, such as settings and calibration screens, and active serial communication, still draw more current; even there, current draw is significantly reduced compared to previous firmware versions:
| Operating State | Firmware v2.26 | Firmware v2.1 | Improvement |
|---|---|---|---|
| Normal operation, Serial connection off | 1.08 mA | 9.42 mA | 88.5% reduction |
| Normal operation, Serial connection active | 4.69 mA | 9.42 mA | 50.2% reduction |
| Calibration Menu | 2.55 mA | 9.42 mA | 72.9% reduction |
| Settings Menu | 1.41 mA | 9.42 mA | 85.0% reduction |
Measurements of logic rail current draws on identical PDVS 2 Mini v2 with firmware versions 2.1 and 2.26:
The reduction on the logic rail also translates directly into lower total battery current. Measured on the same unit in normal operation, warmed up, with the serial interface disabled and at 15.5 V battery voltage, total battery current decreased from 51.96 mA with firmware v2.1 to 42.88 mA with firmware v2.26.
This corresponds to a reduction of just over 9 mA, or 17.5% lower total battery current draw in this operating state. Since the output stage itself is unchanged, this improvement comes purely from the firmware changes and directly increases battery runtime during normal use.
Summary
Firmware version 2.26 is a substantial update, even though the basic operation of the PDVS 2 Mini remains unchanged.
As with the hardware and analogue changes described in the first two posts, the goal was not to change the core concept of the PDVS 2 Mini. The firmware work instead refines the existing platform, makes better use of the existing hardware, improves runtime, and adds flexibility while keeping normal operation familiar and straightforward.
The SCPI-style command structure and temperature coefficient compensation were developed with valuable input and feedback from users. Thank you to everyone who has supported the project, tested features, shared ideas, or reported issues. Feedback like this is always helpful, so please feel free to reach out with suggestions, questions, or observations.