Archive 2026

Photovoltaic array supplying an AC 230V water storage heater through direct boost conversion : Ltspice model with P&O MPPT.

Download of Ltspice model at the end of the present article

Disclaimer

This article presents a a digital model of a water heater powered by solar panels. It is intended for analysis, teaching and optimization. Any practical model design and build based on this model can involve damage to property and life, from electrical high voltage hazard, fire hazard, water damage, steam release, and other non-specified hazards. Such designs and their installation should be done by qualified engineers and technicians, in a controlled environment. We are not responsible for any damage, loss, or injury arising directly or indirectly from any implementation based on the content of this article.

Incentive

Domestic water storage heaters, with their nominal power in the 1kW to 2kW range, are a good target for a dump load of any renewable power source. We will investigate the most efficient conversion, bypassing the need for an UPS, while preserving the MPPT power gains, and allowing seamless connection through a chopped DC power output (duty cycle 0.9, f=400Hz) as a means to ensure safe operation of the bimetallic strip thermostat protection in terms of current interruption. We will also investigate the potential benefits of photovoltaic direct conversion compared to solar thermosiphons and other solar heaters, which are the standard way of harnessing solar power to heat water in many countries.

Comparing thermosiphons and photovoltaic direct conversion

Photovoltaic ArrayThermosiphon
Material cost / kWlowmoderate
Surface area / kWhighlow
Installation complexity & speed & costlowmoderate
Mechanical load / surface arealowhigh
Maintenancelow (cleaning dust)moderate (limescale formation)
Durability10-20 years10-20 years
Wind effect on efficiencyabsentslight decrease
Low Ambient temperature effect on efficiency increased efficiencydecreased efficiency

Considering identical material and installation costs, a photovoltaic setup may provide higher power, but two to four times the used surface area, and the dispersed mechanical load is at the expense of higher wind loading.

higher mechanical load for a given surface may also be a concern, since a collection tank is usually installed on the roof premises.

Limescale formation, and corrosion in steel based tanks require periodic maintenance and downtime, to a larger extent than for photovoltaic arrays.

As for meteorological conditions, high irradiance / high altitude climates (such as desert plateaus)
could be particularily suitable for photovoltaic water heating, since thermal losses (radiative and convective) would be higher on a solar water exchanger and outside collection tank, due to the lower overall ambient temperature (particularily at night for the tank) in such environments.
Photovoltaic designs are privileged here, since their power output is favorable at lower cell temperatures, and the source of power does not need to be in close proximity to the water tank, as it is for thermosiphons. This does not apply to pump powered systems, at the expense of complexity.

Anatomy of a storage electric water heater

Entry levels heaters, electrically speaking, are simple devices that rely only on a thermostat relay to set the water temperature and a resistive heating element, usually steatite encased nichrome or nichrome coiled wire in MgO and cladded in a stainless steel tube.
A sacrificial magnesium anode is usually present to reduce heating element galvanic corrosion on the heating element assembly in the case of nichrome/steel assemblies.

Any fancier water heater with digital electronics (ex : wifi connection and reporting) cannot be guaranteed to work properly on a DC PWM source, it may start, but its supervisory functions may not work properly on a DC source, particularly if it monitors the voltage input or power, and may prove a hazard. We do not advise to use these as a basis for any project derived from this article.

Adaptation of an AC water storage heater to DC power

Adapting such a setup to DC operation comes with a set of constraints and issues that need to be addressed :

  1. Ensuring that the thermostat relay, usually a bimetallic strip type, operates reliably on DC. The matter is complicated as these parts are usually intended to work on AC with their nominal DC parameters derated to a fraction of the AC operating voltage, when even present on the datasheet. This comes from the fact that the bimetallic strip takes advantages of the AC voltage (and current) zero crossing to safely interrupt the circuit when open.
  2. Ensuring that the conversion is efficient : The solar panel to water heating element power transfer must be optimized by matching impedance to the best extent. an MPPT algorithm is used to further extract maximum power from the solar panels.
  3. Provide RMS output voltage safeguards so as not to push DC voltage well above 230V DC, as well as not under 90V DC. ( so as the neon lamp indicator operates, as the striking voltage is usually around 90V. This under-voltage restriction however comes at a cost in terms of power extraction.
  4. Provide no load detection and stop switching setting the MOSFET driver to low in that condition, as any power converter would do. hiccup mode is not required.

The first constraint is usually addressed by chopping the DC output power so as to provide 0 volt off duty cycles.

The second constraint requires a DC/DC converter, and our design is focused on solar panel array constraints with a total OCV less than 230V DC, thus requiring a boost type converter.
MPPT will be simulated using a photovoltaic cell model derived from a commercial product and a control algorithm operating on the converter duty cycle.


The output of the converter will be decoupled with a 47uF electrolytic 400V capacitor mainly to recude EMI, that could be amplified due to the heating element parasitic inductance, and then add fixed low frequency duty cycle chopping (using a low side switching mosfet, interrupting the circuit) to provide 0V off duty to interrupt current, allowing the bimetallic strip thermostat relay to operate safely.

The third constraint is enforced by the comparing output voltage to a setpoint (typically 230V divided by the final output chopper duty cycle square root) which switches algorithm operation to voltage feedback mode (as would a standard converter)

Simulation.

Photovoltaic model

We will use Fesz (2022) photovoltaic cell ltspice model based on real dataheet data to simulate the solar panel array, Our model array is based on the SEP300W panel model.

I invite you to watch his videos for an introduction on solar panel dynamics and MPPT, as well as for Ltspice cell modelling.

the links for the SEP300W and other models are available in the video description.
Modeling Photovoltaic Cells – Theory 1/2

Modeling Photovoltaic Cells – LTspice model part 2/2

Photovoltaic array model, using SEP300W panels and variable irradiance

The model accommodates various serial/parallel arrangements, provided the voltage at MPP for typical illumination parameters do not exceed 230V * sqrt(duty_chop), typically 242V, or the converter will switch to voltage control mode, and will eventually stop switching, as it will not perform its intended function of boost conversion, and the load voltage will assume solar voltage (corrected by the chopper duty square root). Unless the chopper manages that situation, the DC RMS voltage may exceed the heater nominal RMS Voltage of 230V, as well as selected components voltage tolerances (set to a conservative 600V for MOSFETs and 400V for capacitors. This limitation restricts the number of panels in parallel.

As for series arrangement, the total I_mpp current may exceed the inductor, diode, and MOSFET, and capacitor ripple current specifications. This limitation restricts the number of panels in parallel.

Thus, we select a total solar panel number to obtain power immediately above heater rated power compensated for converter efficiency, we get n = int(heater_power/converter_eff)/solar_panel_mpp) + 1

We may get an odd number of panels, thus preventing a conventional arrangement, in that case, we add one more panel.

For a 1400W heater and 312W mpp SEP300W, we get a net number of 6 solar panels.

Giving rise to the following arrangements :

1P6S,2P3S,3P2S,6P1S.

The 1P6S arrangement would drive the output voltage, even at mpp, very close to the voltage control setpoint, thus rendering settling around mpp perturbed by handover to voltage control mode at full illumination. On the other hand, 6P1S woul exceed MOSFET specifications, and give rise to high inductor and MOSFET currents, and force the converter to operate mostly at high duty cycles

Thus only 2P3S and 3P2S arrangements are suitable for simulation, and allow testing the performance of both voltage control mode (typically reached at high irradiance when solar panel power output is higher than the load) and MPP at lower irradiance.

Irradiance modelling

V1 (v_illu) models the total irradiance in W/m². Using a PULSE or PWL file, we can model crude cloud transients. A typical cloud transient could settle in around 3 to 6 seconds (from nominal illumination to obscured illumination or vice versa), assuming an homogeneous cloud mass passes in front of the sun disk.

Converter modelling

For sake of simulation speed performance, we will use a simple, non synchronous boost converter topology. Monolithic converter ICs simulate slower, down to a factor of 10, and put emphasis on output voltage stability, and management of dynamic loads.

The digital control philosophy or this article also doesn’t fit well to the use of a monolithic IC.

While important, IC features, plus UVLO, ramp compensation, soft start, usually make simulation slow and are detrimental in the coarse tuning steps of the MPPT algorithm. Most of them will be eventually implemented in our model, but with coarser behavioral functions, that can simulate faster and nevertheless transpose correctly to a digital control model.

Simulation speed-up

reltol was set to 0.005 instead of 0.001 and abstol was to 1e-6 instead of 1e-12, These tweaks marginally impact simulation confidence, while boosting simulation speed by a factor of up to x4~5

The model simulates at around 3ms/s on a AMD Ryzen 3 PRO 3300U

Summary of the converter design constraints :

  • Boost converter design
  • Input OCV from 90 to 140V
  • Output voltage restricted to 90V DC (chopped) RMS to 230V DC (chopped) RMS
  • MPPT, as long as the output DC chopped RMS voltage is within above nominal parameters
  • Low frequency (400Hz) chopping so as to provide safe operation for the bimetallic strip
  • Adequate output bus capacitor filtering to reduce EMI to normative levels. ripple constraints are thus largely relaxed,
  • No load detection
  • Over-voltage detection and switch to voltage control mode
  • Critical over-voltage detection even in the absence of switching and converter isolation at the solar panel level.
  • MOV TVS protection at the solar input and solar output to protect the converter from fast voltage transients (direct or indirect lightning strikes, etc)
  • Microcontroller driven : the MCU will drive a gate driver that will control the switching node MOSFET, as well as the chopper MOSFET.
  • Power range : rated for 1400W power, corresponding to common power ranges for 50 L water heaters.
  • Maximum duty cycle : 0.8

In that power range a standard, non synchronous, single phase boost converter would not be the most adequate design in terms of efficiency. it is however the simplest in term of model and simulation speed.

A real design that would transpose easily from that simulation model would be a two phase synchronous boost converter. A design using a diode based boost converter with single phase switching as presented here would need to be a scaled down. (keeping average diode current under 4A)

The algorithm is simple and designed with digitization in mind, so it will use behavioral sources, and whenever possible, basic Ltspice digital blocks (such as flip flops an gates to maintain the state)

Since voltage stability is not an issue besides filtering HF switching, and a lower/upper bound control,
a fast control loop typically found on converters that input the output voltage from a divider to a feedback pin and then to an error amplifier with a compensation network will not be present, except in the form of analog LP filtering at some input and output stages. If the variable duty PWM switching generation is to be performed fully digitally, some digital filter DSP logic should be implemented on the duty control signal.

A fully digital control loop requires some other protections, so as to maintain a fail-safe output voltage in case of a digital control failure, and quick reaction to over-voltage situations.

MPPT algorithm

Power is measured (either at the solar panel output, or at the converter output) depending if one wishes to factor in the converter efficiency at various duty cycle levels, and this may have an effect on the overall algorithm parameters tuning. Our design measures power at the output.

The fact that the load is constant, mostly resistive with very low inductance facilitates the design, as the sudden output power changes from steady state would mostly come from illumination transients.

  • The Ltspice algorithm inputs are power output, as a product of voltage and current ( which is then lp filtered) and output voltage separately, as well as output current.
  • The algorithm output is the commanded duty cycle.

Thus A practical digital control design would see a few adaptations from this Ltspice model, and use at least two DAC channels, one for current output and one for voltage, and derive power from these two inputs. More DAC channels could be used if the same input quantity needs to be LP filtered through analog means, using different filter parameters, and if one wishes to lower DSP burden.
A digital pin may be used to monitor the input of a schmitt trigger device with hysteresis to monitor overvoltage conditions and stop switching immediately through an interrupt, the same logic would be use to monitor load disconnection.

Power measurement

The power signal is generated by the behavioral source B1, and filtered by a lowpass
RC filter with a cutoff frequency of 16.07 Hz

The finite difference is calculated by delaying the filtered power signal by mppt_period, and then subtracting the delayed power signal, from the non delayed power signal, and dividing by the mppt_period parameter. Using finite differences rather than absolute differences allow us to display variations of power in W/s.
Using this approach gives us better control over the discrete time interval. As the use of inbuilt idt() is based on internal simulation time steps, it may generate high frequency spikes, that need subsequent heavy LP filtering, so we do not find it useful in our design.

Then, the delta_p signal is fed to a sample and hold block to output a sampled signal. it is not required in a Ltspice implementation, but matches more closely what a digital implementation would do and makes debugging and tuning the algorithm way easier through chart inspection.

The sampling rate, mppt_period in the sketch, will be used throughout the algorithm as the base period.
we chose a 40Hz mppt loop frequency, as it is a common speed used in literature and commercial products.

The sampled delta_p signal is represented by the voltage at the delta_p_sample node
This sampled signal is subsequently used to obtain the second finite difference in W/s²
represented by the voltage at the delta2_p_sample node

delta_p_sample and delta2_p_sample are then multiplied by their respective gain design parameters and summed, in the same fashion as a PID controller (the controller would be more aptly named here a derivative / second derivative controller, with respect to power output) proportionality to power here is impossible because the MPP, that would be the setpoint, is not presumed to be a known or even reachable quantity even in the presence of an illumination probe, though such a probe usually ease tracking.

The second finite derivative is mainly used as an attempt to ease the detection of the MPP.

Since we use a proportional/derivative control perturbation, and not fixed duty perturbation, the controller may stall its tracking since the duty to power loop is not linear, imparting too low duty cycle changes to give rise to meaningful power changes, for this case, we add a floor to the perturbation, namely, min_perturb.

Perturb and Observe cycling algorithm

Digital pacing and control lines then manage the perturb and observe period, as well a duty cycle perturbation direction.

The logical block around the A2 flip flop generate alternating perturb_on and observe cycles when the controlling perturb digital signal is high. The master signal perturb is logical high when the delta_p_sample is within parameter bounds (-10,10) to prevent the controller from working to compensate fast transients (very fast cloud transients, airplane transits, etc). an initialization delay, init_settle_delay has been added to allow the converter to reach steady state at startup.
When perturb is low, both observe and perturb_on lines are low, halting the algorithm operation, until power variation gets back into nominal bounds.

clocking is performed by a PWM source of period mppt_period

Perturb duty variation direction control

Toggle impulses shift the algorithm perturbation direction

The logic block built around A6 manages the direction of the duty cycle perturbation
if the product of V(observe) and the sign of V(delta_p_sample) is negative, a toggle pulse appears.
This pulse toggles the direction logic node, that will be used in subsequent algorithmic steps.

MPPT duty gain computation algorithm and duty perturbation integration

B9 computes the duty cycle perturbation amount using the derivative/second derivative of power controller gains, multiplied by V(gain_direction).
B10, outputing V(gain_direction), simply converts the logic signal V(direction) into a two state (1,-1) signal.

B12 finally integrates the duty cycle perturbation signal V(gain_input) into V(mppt_bias), that will form the basis of the control signal V(control). It also manages voltage control mode handover when the the control_mppt_on signal switches to low.

B7 multiplies this signal by an exponential function to obtain a soft start operation during switching initialization at controller startup.

B17 and V7 together generate the gate driving variable duty PWM signal, with a gate voltage above ground compatible with the selected MOSFET.

Overvoltage detection and management.

Tracking mppt may push the output voltage above the 230V DC nominal voltage for the water heater, This mostly happens when the total nominal power of the solar panel arrangement (the sum of individual solar panel nominal power) is greater than the water heater nominal power, in high irradiance conditions, and with high parallel arrangements, where the commanded duty is under 0.8 to reach 230V DC.

In an over-voltage situation, the controller must switch from MPPT to simple voltage feedback mode, managing duty cycle as not to exceed 230V DC output, reverting to MPPT mode when commanded duty is unable to maintain 230V DC. Hysteresis with Vt=242V Vh=10 is implemented using a schmitt trigger (A4).

B6 computes the gain input in voltage control mode.

It could be tempting to implement analog / voltage divider feedback as a means of failsafe voltage control mode for overvoltage and MCU failure conditions, but the handover back and from digital and analog control is tricker to implement.
So, a schmitt trigger solution that is linked to an interrupt seems way easier to implement and safe enough.

There is also another mode where high voltage in the output can arise, this time more prominent in high serial arrangements, when the commanded duty cycle is high. If the load resistance drops to 0, as it is the case when the heater thermostat trips, and switching does not stop immediately, the voltage spike at the inductor gets transferred to the output capacitor bank, and may rise its voltage well above 230V DC.

Overall, switching should be stopped as fast as possible in a load disconnect condition, using the MCU emergency PWM stop provisions, usually interrupt driven, the source of the interrupt should be a logic signal that is tied to the current sense shunt resistor voltage, using a schmitt trigger to switch logic states when the sense resistor voltage drops to very low values. (Corresponding to 1/100 rated current in our design).

The final over-voltage trivial condition arises for improper installations, in high serial arrangements when OCV is above 242V DC. switching may counter intuitively reduce input voltage and towards MPP, but the algorithm is tailored to manage these starting conditions in voltage control mode. We have to remember that this is a boost converter after all, and the input voltage range (from MPP voltage to OCV) should stay well below output voltage. In that condition, the converter should not only refuse to start switching, but also isolate itself, turning itself off once the MCU capacitors discharge beyond designed hold time. This protection is not modeled here.

A MOV may be implemented to prevent the capacitor voltage to rise above the rated electrolytic capacitor voltage, for highly abnormal conditions, or lightning strikes, for the latter, MOV protection should also be implemented as close as possible to the solar terminal inputs. High voltage, high capacitance electrolytic capacitors submitted to voltages over their ratings may burst with a considerable energy release. So this risk should be seriously taken into account.

Internal fuses are not modelled, but any practical design should implement them, and DC external fuses selected and installed according to code should be installed in any solar setup.

The output capacitor should be rated for 400V or more.

Also, a high value bleed off resistor should be implemented in parallel to the capacitor to discharge it, so any maintenance is performed safely. Such a capacitor also assist in mitigating transient over-voltages.

For this application, we will use a 1Meg bleed off resistor.

Final output chopping

A low side swtiching MOSFET is used to periodically disconnect the load at a moderate switching frequency, such as 400Hz and a duty cycle of 0.9, to provide 250us of 0A current in order for the thermostat bimetallic strip to open in a safe manner (quenching any arc in a timely manner) when it triggers.

As a disclaimer, this design step is particularly important. It cannot be guaranted that the thermostat will operate at 400Hz PWM DC with a duty cycle of 0.9 safely without a fire hazard risk. A careful analysis of bimetallic strip dynamics and arc quenching should be done, but it also cannot guarantee that the thermostat will behave safely, due to the lack of datasheet parameters concerning the strip geometry, and variability of designs that the firmware cannot account for.

Thus, any serious design would probably involve a retrofit kit to replace the thermostat relay with a thermometer probe fitting into the water heater thermowell and manage the water temperature through the firmware control algorithm. A safe relay can then be integrated into the solution, or make use of the chopper MOSFET to swtich the heater off. Provisions should be taken for probe dysfunction, as water overtemperature will give rise to pressure rises and trigger the water safety relief valve or damage the heater and may cause steam explosions.

load disconnect simulation

S1 switch simulates the thermostat relay bimetallic strip, in order to monitor proper converter
when the load is rejected.

Powering the MCU

Since this is a battery less design ( a small mAh Li-ion rechargeable cell could be implemented) and the input voltage may still be quite high for linear converters or even step down converter IC modules, and we do not need much more amperage at 12V than a 50 to 100mA, a cascode MOSFET arrangement could be sufficient to bring the voltage to a safe range for one 5V or 3.3V linear regulators, plus one regulator supplying a 12V rail for MOSFET swtiching. Suitable MLCC and electrolytic capacitor should be implemented for filtering and hold time. This is not modelled here.

Parameter space

Performance Charts

Slow rise – 3.5s illumination transient from 280W/m² to 560W/m², power_out minimum 274W, maximum 960W, 2P3S panel arrangement, SEP300W model.
Slow fall – 3.5s illumination transient from 560W/m² to 280W/m², power_out minimum 279W, maximum 960W, 2P3S panel arrangement, SEP300W model.
Steady state illumination at 280W/m², theoretical MPP 480W/m², tracked steady state output MPP 453 W/m²
Steady state illumination at 560W/m², theoretical MPP 1021W, tracked steady state output MPP 951W

MPP tracking is consistent with datasheet published MPP parameters (multiplied by the number of solar panels in the array), using interpolation to determine the MPP at 280W/m²and 560W/m² (respectively 77.79W and 170.16W per panel). During steady state periods, the output power is stable, with spurious, fast damped oscillations, with oscillation amplitude less than 5% output power. Convergence to MPP is obtained in a timescale of a second to a few seconds. The difference between theoretical MPP and measured RMS of power output mainly comes from converter losses. (converter efficiency ~0.9)

MPPT to Voltage control mode handover

MPPT to voltage control mode handover at t=2.2s to t=4.2s, as indicated by V(control_mppt_on) – red chart
RMS voltage during voltage control mode stays at 230V RMS

Conclusion

Parameters have been optimized empirically.
A rigorous mathematical analysis may be done in the future and would be followed by an update of this article.

There is considerable room for improvement, but the model has proven quite stable with moderate and damped oscillations with a time constant negligible in comparison to typical irradiance transients.

Note that the transients modeled are fast ones compared to typical cloud transients, and these transients
are described using simple ramp functions. A detailed analysis using real, stochastic data would take considerable simulation time.
At that point, its better to use a physical scaled down model and a controllable light source to optimize the final design.

As for a larger field of application, MPPT boost conversion would prove rather useful for a whole range of 230V rated ohmic dump loads, as the boost conversion allows better impedance matching, permitting the power source, whether photovoltaic or wind turbine, to operate in its MPP regime for the dump load.

A market suited converter would also provide classic buck conversion, to account for the thermostat trips when temperature has reached its setpoint, thus using either separate buck boost units, or buck/boost converter design switching its outputs between a battery and the dump load.

Whether the water heater is considered as the dump load, and the battery charging as the primary function or vice versa is a design choice, but could also be a device setup parameter.

Finally, the converter could also implement an ATS to seamlessly integrate the dump load into mains power, in low photovoltaic or wind power levels.

Ltspice model download

PMU-001 : USB Phasor measurement unit June 2026 project update and jitter analysis

We are currently evaluating NXP’s i.MXRT1062 CPU based MCUs as the core of our PMU-001 device.

This product is advantageous as it one of the most capable MCU in terms of raw processing power, while also featuring a FPU.

Additionally, the presence of an Ethernet module with IEEE1588 ptp functionality, gives access to an adjustable free running nanoseconds timer counter with 1 sec rollover. A robust hardware on the fly correction capability allows disciplining the counter using a pps GPS signal or an ethernet based LAN ptp clock.

Note that the additional processing power has the effect of reducing IRQ contention which may introduce jitter. Faster CPU also means availability of larger PLL scales. the cycle counter has a resolution of 1/600 Mhz, while the IEEE1588 counter timer has a resolution of 40ns

As for disciplined sampling periods, the periodic interrupt timer (PIT) period can be precisely controlled with a period correction resolution of either 1/24 Mhz or 1/150 Mhz, depending on the clock source, using the LDVAL register that affects the next period, not the current period, ensuring consistent sampling.

A simple integer accumulator and integer divider method allows distribution of corrections smaller than one period correction resolution, ensuring total correction over one second brings the IEEE1588 timestamping to a disciplined second, as well as the PIT correction that ensures a true sample rate of electrical data close to nominal.

Following is the jitter analysis at 27C temperature ambient, CPU at 56C, and a 60 second recording interval of USB sample and timestamp data. No frame drops observed. The jitter analysis was performed during nominal GNSS function (no holdover).

Nominal sampling rate is 50 ksps (20 us). 8 channels recorded, 7 samples per frame, frame rate : 140 us.

symlog/log scale

As for the MCU discipline protocol : Periodic IEEE1588 timestamp timer discipline is performed every 20us sampling period, PIT timer discipline (LDVAL nominal ticks + correction) is also performed every 20us. The method used for determining the correction factor is : proportional term representing the CPU cycles phase error (absolute, not fractional error) over each pps interval, summed with an infinite integral of the residual IEEE1588 counter phase error (absolute, not fractional), also over each pps interval. Filtering of the CPU cycles phase error outliers was done by filtering out measurements above 4 sigma. The sample population maintained for average,mean and standard deviation calculations are the last 64 CPU cycles phase errors recorded (so, an history of 64 seconds)

Allan Deviation chart

This is the Allan deviation calculation of the free-running CPU cycles counter, normalized to nanoseconds, and the IEEE1588 disciplined nanoseconds counter, over 41785 seconds, with a unit measurement interval tau of 1 second, while performing sampling of electrical parameters nominally at 50000 samples par second, 8 channels sampled, 7 samples * 8 channels per USB frame, and sending data over USB, but without a host listening.

We plan to perform the same measurements and Allan deviation charts without the payload calculation.
Results are deemed quite satisfactory, and follow expected noise characteristics and temperature drift effects. Average temperature 45.70C @CPU, with forced convection in front of the XTAL, with CPU downstream, Average ambient temperature 25C, measurement performed at night starting at 21:30 UTC. Environment temperature is not controlled.

I will provide an updated chart with temperature data soon.

Temperature compensation

We are also evaluating an additional high precision temperature probe positioned right under the XTAL to provide ppm correction during GPS holdover intervals, with an intended goal of < 1ppm deviation during GPS holdover intervals. Such a fixture, besides providing TCXO capability without the need of replacing the onboard XTAL, also improve robustness of GPS pps signal outlier filtering, by providing ppm deviation prediction based on temperature slew, provided the temperature measurement is itself low noise. This would help identify the very infrequent but possible GPS pps glitches.

Such level of discipline precision is adequate a field microPMU, which is our intended market segment,

Discarding the requirement for an external OCXO or TCXO driven MCU or sampling timer would drastically lower R&D production, and time to market delays.

At this point in time AD7606 interfacing has been done on the new MCU platform with satisfying results.

Thus, We are now moving our development efforts towards PCB design.

For more information about i.MX-RT1060 and i.MX-RT1062 based MCUs :

https://www.nxp.com/products/i.MX-RT1060

https://www.pjrc.com/store/teensy41.html

Rework and Refactoring of the Host based PMU logic

We are currently in the process of updating our host based code to improve overall performance and add a substantial margin of processing time taking into account all PMU P-class and M-class modes and reporting rates, So as to deliver a product that is adequate to a large segment of cost effective and available SoC platforms, and ensuring device form factor compliance for size restricted cabinets and challenging thermal environments. This should not alter significantly the mentioned December 2026 deadline for a commercially adequate product delivery.

Stay tuned !

Low quiescent current, high side, NMOS timer delay off switch circuit and Ltspice model

When it comes to switching timer modules, most designs are either based on the good old 555 timer, or some kind of 8 bit MCU that performs supervisory functions (like turning a relay off and keeping track of time), with the advantage for the later to allow for various timing and delay on/off programs. Most designs however, draw hundreds of microamperes up to several milliamperes while idling. Since one common use of these timers is to power a load for a given time in off grids setups where stored battery energy must be conserved, a low quiescent current solution would be a preferable design. Most designs are also relay based. Sturdy relays have an advantage of providing NC/NO modes natively, tolerate inductive kickback from loads such as motors, and are immune to spurious turn-ons.

Here we present a fully solid state timer delay off high side NMOS switch, thus with low Rds ON. The power to the load is turned on through a pulse (such as one supplied by a spring loaded pushbutton), latches, and turns off based on the timing constant of a RC network.

Giving the maximum rating of the CD40106 Schmitt trigger used here, the maximum switched voltage is around 18V. A higher voltage rated Schmitt trigger inverter would allow 24V operation, and using MOSFET rated above Vds of 30V would push operation voltages into 48V or more.

Download

Operation.

The transient connection of the switch S1 discharges the capacitor C3 through D3 to ground, bringing temporarily the schmitt trigger input to ground potential. output of the trigger goes to logic 0V, while the inverting input goes to logic high. A CD40106 schmitt trigger can be used to implement complementary outputs, by daisy chaining two stages as shown in the schematic (A1 and A3). The operational parameters of the CD40106 at 12V have been calculated from the datasheet and added to the model.

In the low voltage state, the first inverting output of the schmitt trigger A1 is in logic high, sinking current into Q3 base, which has the effect to lower gate potential of PMOS M2, turning it on, and supplying bootstrap capacitor voltage to M4, which turns it on and performs the intended high side switching function, While schmitt trigger A3 output voltage goes 0V, turning M3 firmly off and preventing fast discharge of C1.

When the RC network charges back above Vhigh threshold, M2 is turned off, which has the effect of stopping the supply of voltage from the bootstrap capacitor to M4, and bringing the gate of M4 to ground through the turn on of M3. This effectively turns off M4.

Giving the low gate charge and leak of modern NMOS, the bootstrap capacitor C1 can supply voltage to the gate of M4 over a time far longer than the time constant of the RC network made with U4 + R3 and C3.

Note that M2 does not handle large currents in that circuit. A smaller footprint PMOS could be used, rated for logic Vgs levels (such as -5V)

Note that the transition Vhigh and Vlow voltage of the CD40106 used are linear functions of supply voltage, Which means that a higher or lower Vcc operation as supplied from a battery should not change the minimum and maximum delays achieveable significantly.

Resistor R7 acts as a current limiting resistor for gate current but also during switching of M2 and M3, which could temporarily provide a low impedance path to ground. Note that CD40106 propagation delay using two stages in a daisy chain have the effect of introducing a small dead time between M2 and M3 switching, thus mitigating that unwanted effect.

Do you require bespoke functionality ? We can help !

We can offer assistance and task offloading in audio projects, power electronics and metrology projects, MCU firmware development assistance and consulting. Feel free to contact us by mail at

and provide us a general description of your project and how you think we can help, so we can discuss further.

Our current areas of expertise :

  • Ltspice modelling for analog and mixed signals, and general drafting of circuits.
  • NXP iMXRT1060 based MCUs firmwares and rapid prototyping as well as EDA sketching
  • Assistance in coding for Steinberg VST3 plugins.
  • USB host and device modes for aforementioned MCU
  • DAC / ADC interfacing.
  • Proof-reading and review of LLM generated documentation.
  • Prompt engineering for general purpose electronic projects.

Standard rates :

From 40 EUR/hour depending on area of expertise, project complexity, and timing constraints.

Simplified Ltspice model of an electric guitar : magnet, vibrating string and pickup with core saturation.

Following is a Ltspice model of a vibrating ferromagnetic guitar string with a AlNiCo magnet and a coil pickup.

Model Download :

Dependencies :

TL072 Op-Amp model or any other Audio grade suitable op-amp

Explanation :

It assumes a single pickup with a copper wire wound around a Nickel Steel alloy core. Saturation is modeled.

In a realistic model, the magnetic excitation of the coil is as follows :

  • A) Magnet generates (magnetostatic equation) magnetic field. (2)
  • B) Vibrating string is magnetized. Creates a time varying magnetic field according to motion equations (1) & (4)
  • C) Time varying magnetic field is picked up by the coil wrapped around the pickup pole cores.

Because of the limitations of integration in Ltspice (time integral support, but not space integrals), the model of B) has been simplified – As if the magnet was vibrating like a string at a distance of the pickup, but taking into account geometry. A better model would be possible using “C++ black boxes” as it is possible now with QSpice, as the DLL engine is Turing complete which allows to render space integrals easily. The model of B) excited by A) is doable in QSpice and is explained in the paper (4). So B) has been simplified to a simple coupling parameter int the form of a factor “chi_wire” (or wire magnetic susceptibility).

Note that the code for such a model of B) has been explored as such, but not validated. It may be added here in a future release.

Finally the core Mechanical model is simplified and according to (1) :

It assumes a string displacement along the Z axis only, and bridge reaction is not modeled.

Bias magnetic field is modelled and as a notable contribution if the pickup core saturation is modelled.

Note that the coil is assumed to be wrapped around a single pole (as just one string is modeled), number of turns has been decreased to take into account the tighter magnetic coupling.

Pickup flux is the sum of self inductance times current + induced flux from time varying magnetic field. Since the preamp is very high impedance the current is negligible and only the EMF from the magnetic field has sensible contribution.

Finally a preamp has been added. (5)

References :

(1) Solving the Sound of a Guitar String
Jason Pelc
December 10, 2007
(Submitted as coursework for Physics 210, Stanford University, Fall 2007)

http://large.stanford.edu/courses/2007/ph210/pelc2/

(2) Magnetic Field of a Cylindrical Bar Magnet – Wolfram Demonstrations Project

https://demonstrations.wolfram.com/MagneticFieldOfACylindricalBarMagnet

(3) Analytical Functions of Magnetization Curves
for High Magnetic Permeability Materials

Mehran Mirzaei1 , and Pavel Ripka1
Faculty of Electrical Engineering, Czech Technical University, 16627 Prague, Czech Republic

https://ieeexplore.ieee.org/document/8356239

(4) Exact expression for the magnetic field of a finite cylinder with arbitrary
uniform magnetization
Alessio Caciagli 1, Roel J. Baars 1, Albert P. Philipse, Bonny W.M. Kuipers ⇑

(5) ELECTRIC GUITAR PREAMPLIFIER by EFI Bureau

https://www.electronicsforu.com/electronics-projects/electric-guitar-preamplifier

USB 2.0 (High-Speed) bulk endpoints on Arduino Due MCU and libusb interfacing on Linux.

A substantial advantage of the Arduino Due MCU is the native USB High Speed interface allowing up to 480 Mbps transfers. Another option are the costlier Teensy boards that are really mature and provide a solid framework for USB bulk endpoints data interfaces not limited to ttyACM Serial over USB interfaces. However, it is absolutely possible to integrate a vendor (custom) bulk pair of endpoints (IN and OUT) on Arduino Due, it’s just that there is not much documentation besides examples such as the MIDI USB library and articles about it.

In this article, we leveraged the power of LLMs advices and validated them through testing to add support for an additional pair of endpoints, such that the native SerialUSB object could still be used (for telemetry, communication control or debugging)

Incentive.

Using a custom pair of endpoints has several advantages over SerialUSB.

  • They can be tweaked on the MCU so as to be adapted to the maximum required transfer rate, such as number of BANKs used (up to 3) and NBTRANS.
  • On the host side, since the endpoints are not claimed by the OS Serial over USB driver, transfers are more straightforward and do not suffer from the long chain of complex buffers used by the driver and the ttyACM stack. Interfacing can be done in user space using libusb.
  • No tty re-configuring issues, (such as special character handling, line discipline, throttling, etc) Note that tty were historically made for terminals and text, not binary data transfers)

On the downside, detection of host ready or not conditions can be different or tricker than ttyACM, as the linestate logic (DTR emulation) is not present on a custom bulk interface. The idea is thus to keep the Serial USB link for telemetry, control, and debugging, and initiate data transfer once the proper Serial USB transmission. Note that on linux detecting a DTR down condition on SerialUSB does not seem to work as well as on MS Windows from a MCU use case perspective, This all situation needs unfortunately to resort to watchdogs to re-establish a broken connection when the host is electrically connected. but not listening.

Also ttyACM or the tty stack seem to behave on linux so as to limit to 64 bytes max the data fetched fro; each read() call on the port. Since USB 2.0 max packet size is 512 byte, libusb allows more efficient call economy, although the mechanism is largely different, since IO read calls are not used, but library specific “transfer submits”.

In our case, the packet size is 96 byte. All writes to USB from the MCU sides will be 96 byte. Note that packet sizes and URB sizes, ZLP (zero length packets) and libusb “transfer” sizes concepts are important as understanding and managing them properly can save you a lot of headaches.

libusb also has a quite steep learning curve. However, through LLM assistance, we successfully made such an interface.

Note that for “real time” transfers or transfers with timing constraints (continuous flow) a separate FIFO (sched_fifo) thread is preferable on the host side. This will be shown in that example.

The MCU code.

Optimized for 1 to 4 MB/s transfers.

The latest Arduino Due (SAM) framework available in Arduino IDE and Platform IO provide helper objects (Pluggable USB), defines / macros to help in creating additional endpoints.

First we will need some defines that will setup USB endpoint types configuration bitmasks. Here comes the first versatile configuration as these elements are not exposed for the SerialUSB interface.

 #define EP_TYPE_BULK_IN_DATA           USB_ENDPOINT_TYPE_BULK | UOTGHS_DEVEPTCFG_EPSIZE_512_BYTE | USB_ENDPOINT_IN(0) | UOTGHS_DEVEPTCFG_EPBK_2_BANK  | UOTGHS_DEVEPTCFG_NBTRANS_1_TRANS | UOTGHS_DEVEPTCFG_ALLOC;
  #define EP_TYPE_BULK_OUT_DATA          USB_ENDPOINT_TYPE_BULK | UOTGHS_DEVEPTCFG_EPSIZE_512_BYTE | USB_ENDPOINT_OUT(0) | UOTGHS_DEVEPTCFG_EPBK_1_BANK  | UOTGHS_DEVEPTCFG_NBTRANS_1_TRANS | UOTGHS_DEVEPTCFG_ALLOC;

Note that we use max packet size of 512 byte, which is the maximum allowed by the USB 2.0 High speed standard. EPBK_n_BANK and NBTRANS_p_TRANS admit n and p values up to 3, at the expense of more MCU SRAM used, depending on the throughput required they can be increased and profiled for best performance.

It should be known that EPBK_n_BANK consumes a limited amount of memory available (max 4KB), In the above case, n = 1 consumes 512 bytes. Reaching the hard limit is easy, as the total number of endpoints provided by all interfaces has to be taken into account.

Note that the IN and OUT endpoints are from the reference point of the host (the computer in that case) so a IN endpoint is used to send data from the MCU to the computer.

Then we need to do some class inheritance magic to extend the PluggableUSB module base class and implement our custom calls that will be used for enumeration and communication setup as well as data transfers.

class DataBulk_: public PluggableUSBModule {
  public:
    DataBulk_();
  
    //uint32_t available();
    uint32_t write(void *buf, size_t len);
  
  protected:
    virtual bool setup(USBSetup &setup) override;
    virtual int getInterface(uint8_t *interfaceCount) override;
    virtual int getDescriptor(USBSetup &setup) override;
    virtual uint8_t getShortName(char *name) override;
  
  private:  
    uint32_t epType[2];
  };

bool DataBulk_::setup(USBSetup& setup)
{
	if (pluggedInterface != setup.wIndex) {
		return false;
	}

	uint8_t request = setup.bRequest;
	uint8_t requestType = setup.bmRequestType;
	
		if (requestType & REQUEST_RECIPIENT)
	{
		if (request == GET_INTERFACE) {
			// TODO: HID_GetReport();
      uint8_t alternate_setting = 0;
      USBD_SendControl(0,&alternate_setting,sizeof(alternate_setting));
			return true;
		}
		if (request == SET_INTERFACE) {
			// TODO: Send8(protocol);
			return true;
		}

	}

  return false;

}

int DataBulk_::getDescriptor(USBSetup& setup)
{
	// Check if this is a Class Descriptor request
	if (setup.bmRequestType != REQUEST_DEVICETOHOST_STANDARD_INTERFACE) { return 0; }
	if (setup.bRequest != GET_DESCRIPTOR) { return 0; }

  uint8_t desc[] =
  {
    //interface descriptor
    9, // bLength
    4, // bDescriptorType = INTERFACE
    pluggedInterface, // interfaceNumber
    0, // bAlternateSetting
    2, // bNumEndPoints
    USB_DEVICE_CLASS_VENDOR_SPECIFIC, // bInterfaceClass = VENDOR SPECIFIC
    0x00, // bSubClass
    0x00, // Protocol
    0, // interface

    //ENDPOINT OUT
    7, // bLength
    5, // bDescriptorType = ENDPOINT
    USB_ENDPOINT_OUT(pluggedEndpoint), // EP1 OUT
    USB_ENDPOINT_TYPE_BULK, // Bulk
    0x00, 0x02, // 512 bytes
    0,

    //ENDPOINT IN
    7, // bLength
    5, // bDescriptorType = ENDPOINT
    USB_ENDPOINT_IN(pluggedEndpoint), // EP1 IN
    USB_ENDPOINT_TYPE_BULK, // Bulk
    0x00, 0x02, // 512 bytes
    0
  };

  USBD_SendControl(0,desc,sizeof(desc));
  return sizeof(desc);

}


int DataBulk_::getInterface(uint8_t* interfaceCount)
{
  
  *interfaceCount += 1; // uses 1
	MSCDescriptor desc = {
    D_INTERFACE(pluggedInterface, 2, USB_DEVICE_CLASS_VENDOR_SPECIFIC, 0x00, 0x00),
		D_ENDPOINT(USB_ENDPOINT_OUT(pluggedEndpoint), USB_ENDPOINT_TYPE_BULK, 512, 0x01),
    D_ENDPOINT(USB_ENDPOINT_IN(pluggedEndpoint), USB_ENDPOINT_TYPE_BULK, 512, 0x01) 
	};
	return USBD_SendControl(0, &desc, sizeof(desc));

}


uint32_t DataBulk_::write(void * buf, size_t len)
{
  return USBD_Send(USB_ENDPOINT_IN(pluggedEndpoint),buf,len);
  //return UDD_Send(USB_ENDPOINT_IN(pluggedEndpoint) & 0xF ,buf, (uint32_t) len);

}

uint8_t DataBulk_::getShortName(char * name)
{
  name[0] = 'V';
  name[1] = 'N';
  name[2] = 'D';
  return 3;
}

  DataBulk_::DataBulk_(void) : PluggableUSBModule(2, 2, epType)
{
	epType[0] = EP_TYPE_BULK_OUT_DATA;	// BULK_ENDPOINT_OUT
	epType[1] = EP_TYPE_BULK_IN_DATA;	// BULK_ENDPOINT_IN
	
	PluggableUSB().plug(this);
}

Once our class properly inherits the Pluggable USB module base class, we can create the object

DataBulk_ USBData;

And use it to send data to the computer :

USBData.write(( void*) Data2,sizeof(Data2)); // uses our bulk endpoint, processed on the host by
// libusb 1.0
// sizeof(Data2) is 96 bytes.

SerialUSB.println("USB data sent") // uses the native USB port Serial over USB, processed on the host by the ttyACM driver

Testing enumeration on the host

To check for proper enumeration once the above code has been added to your sketch, compiled, and uploaded to the MCU is straightforward.

As root, run :

cat /sys/kernel/debug/usb/devices

And the bottom relevant lines (ep 04 and 84 of interface 2) should appear once the native USB port is plugged to the computer :

Libusb code

Now it is time to add libusb code to your C++ project, and add some #define and declarations

// BULK USB VENDOR MODE
#include <libusb.h>

//defines for bulk interface
#define URB_SIZE 96 // In our case URB_SIZE = Packet size = 96 bytes
#define N_URBS 32 // 16 to 32 URBS in flight seems ok for data rates in the low MB/s range
#define VID 0x2341 // vendor ID of our device
#define PID 0x003e // product ID of our device
#define USB_BULK_IFACE 0x2 // Bulk interface ID
#define EP_IN 0x84 // endpoint IN address
#define EP_OUT 0x4 // endpoint OUT address (not used)

struct  libusb_transfer *usbxfer[N_URBS];
uint8_t  *usbbuf[N_URBS];
std::atomic_bool readbulk_exit(false);
std::atomic_bool USB_transfer_active(true);
libusb_context *ctx;
libusb_device_handle *h;

Add a FIFO scheduled thread (bulk_read_thread) that will make the initial transfer submit as well as pump the event driven libusb.

pthread_t bulk_read_thread;
pthread_attr_t bulk_read_thread_attr;

pthread_attr_init(&bulk_read_thread_attr);

pthread_attr_setinheritsched(&bulk_read_thread_attr,PTHREAD_EXPLICIT_SCHED);
pthread_attr_setschedpolicy(&bulk_read_thread_attr,SCHED_FIFO);

sched_param param{};

param.sched_priority = 10;

pthread_attr_setschedparam(&bulk_read_thread_attr,&param);

thread_rc = pthread_create(&bulk_read_thread,&bulk_read_thread_attr, BulkReadThread,NULL);


if(thread_rc != 0)
{

    perror("Bulk reader thread creation error");
    DebugPrint(dbgstr("thread_rc"),thread_rc,0);            
    return -1;

}

the sched_priority attribute is very important. use the ps command to get SCHED_FIFO threads and their priorities, and set priority accordingly as to obtain a stable data flow and so as not make the system irresponsive or lag. Remember that SCHED_FIFO threads have precedence over most of other threads on a system (SCHED_OTHER)

The Thread function follows :

void * BulkReadThread(void * arg)
{
    mlockall(MCL_CURRENT | MCL_FUTURE);

    DebugPrint(dbgstr("Enter USB Bulk read thread"),0);
                
    if(USE_BULK)
    {
        for(int i = 0; i < N_URBS; i++)
        {
            libusb_submit_transfer(usbxfer[i]);
        }
    }


    while(!(readbulk_exit.load()))
    {
        //usleep(100);
        libusb_handle_events(ctx);
        //DebugPrint(dbgstr("PutSerialSamples ok"),0);  
        sched_yield();
    }

    sched_yield();
    return 0;
}

The readbulk_exit atomic boolean is used to signal the thread (externally) that it needs to stop USB event polling operations which will quench transfers, Which is used in a graceful program termination.

This thread does not populate directly the data buffer so it can be consumed. It only submits initial transfer requests and pumps events through libusb_handle_events(ctx) The setup of the population of the buffer is done by libusb_fill_bulk_transfer() once, where we supply a callback function, rx_usb_bulk(). See below.

sched_yield() in that case is quite important as it guarantees some throttling and helps with system responsiveness. It relinquishes the CPU and other sched_fifo threads can be immediately processed, regardless of priority.

mlockall() is an optimization as it locks all pages in memory and prevents paging. It may have profound effects on allocation, and should probably happen when most of allocation is done or memory reserved using techniques appropriate, which are beyond the scope of this article. Use with caution.

Of course, now we also need to initialize the whole libusb stack to handle our device :



libusb_init(&ctx);
libusb_set_option(ctx,LIBUSB_OPTION_LOG_LEVEL,LIBUSB_LOG_LEVEL_WARNING);




h = libusb_open_device_with_vid_pid(ctx,VID,PID);
if (!h)
{
    DebugPrint(dbgstr("USB open device failed, is it plugged ?"),0);
    fflush(stdout);
    return 1;
}
DebugPrint(dbgstr("USB open device OK"),0);
    

if(libusb_kernel_driver_active(h,USB_BULK_IFACE) == 1)
{
    libusb_detach_kernel_driver(h,USB_BULK_IFACE);
    DebugPrint(dbgstr("kernel driver detach OK (should not happen, no driver should be attached)."),0);
}

if(libusb_claim_interface(h,USB_BULK_IFACE) < 0)
{
    DebugPrint(dbgstr("USB claim interface failed."),0);
    fflush(stdout);
    return 1;
}
DebugPrint(dbgstr("USB claim interface OK."),0);


for(uint8_t i = 0; i < N_URBS; i++)
{
    usbbuf[i] = (uint8_t *) aligned_alloc(64,URB_SIZE);
    usbxfer[i] = libusb_alloc_transfer(0);
    libusb_fill_bulk_transfer(
        usbxfer[i],
        h,
        EP_IN,
        usbbuf[i],
        URB_SIZE,
        rx_usb_bulk,
        NULL,
        0
    );
}

readbulk_exit.store(true);
        

And finally, the rx_usb_bulk() callback function :

static void rx_usb_bulk(struct libusb_transfer *t)
{
    if(t->status == LIBUSB_TRANSFER_COMPLETED)
    {
        if(t->actual_length > 0)
        {
            PutSamplesUSB(t->buffer,t->actual_length);
            //DebugPrint(dbgstr("Processing of USB transfer buffer,t->actual_length"),t->actual_length,0);
    
        }
        if (USB_transfer_active.load())
        {
            libusb_submit_transfer(t);
            //reschedule transfer immediately, unless signalled to stop.
        }
    }
}

PutSamplesUSB() is a user project function that handles incoming buffer data, to populate, let’s say a circular buffer from the t->buffer source.

USB_transfer_active is an atomic boolean variable that signals to stop submitting new transfers. It needs to be set to false first before setting readbulk_exit to true (that in turns make the the thread that processes libusb events to join). This happens usually in the graceful process exit / cleanup routines. See below.

Cleanup

Cleanup is required in traditional C++ fashion as well as libusb required calls. But first the dedicated thread that does the libusb event polling must be notified to join.

USB_transfer_active.store(false);
DebugPrint(dbgstr("setting USB_transfer_active to false (won't submit new transfers)"),0);

for(int i=0; i < N_URBS;i++)
{
    libusb_cancel_transfer(usbxfer[i]);
    DebugPrint(dbgstr("cancelling pending transfers, index="),i,0);

}
usleep(10000);
libusb_release_interface(h,USB_BULK_IFACE);
DebugPrint(dbgstr("interface released"),0);

libusb_close(h);
DebugPrint(dbgstr("USB device handle closed"),0);


readbulk_exit.store(true);

int s = pthread_join(bulk_read_thread,nullptr); // waiting for USB bulk read thread to join
if(s == 0)
{
    DebugPrint(dbgstr("USB bulk read thread joined"),s,0);
    libusb_exit(ctx);
    DebugPrint(dbgstr("libusb exit"),0);
}

Here we use the boolean state variables to communicate with the thread to halt USB communication before releasing libusb resources.

This concludes the article about adding USB 2.0 (High-Speed) bulk endpoints on Arduino Due MCU and libusb interfacing on Linux.

PMU-001 : USB Phasor measurement unit with frequency logging, four quadrant power analysis and harmonics analysis

This is a quick update on our flagship product development, PMU-001. Since October 2024, we put great effort in developing it. The PMU-001 USB device is intended for electricians that need a portable and reasonably affordable field device which provides the following features :

  • Robust GNSS based synchrophasor measurement, IEEE Std C37.118-2005 compliant with network bindings.
  • 6 channel analysis (3 voltage channels, 3 current channels, 2 auxiliary channels)
  • 4 quadrant power analysis
  • Positive, negative and zero sequence vector decomposition
  • logging and real-time (within standard delay requirement) equispaced sampling of frequency deviation from nominal mains
  • Harmonics analysis and THD display and logging
  • waveform logging
  • USB 2.0 high speed device, hardware sampling rate 48 ksps.
  • Lightweight NCURSES interface allowing use across low speed / character based tty
  • Integrated class 0.1 voltage measurement transformers with secondary DAC TVS protection / clamping on top of internal DAC protection.
  • 1000V AC transformer winding voltage tolerance.
  • Line to Line or Line to Neutral voltage measurements (120V up to 240V AC / 208V AC to 400V AC nominal voltage +15% tolerance)

It leverages the power of a personal computer for high level analysis, reducing hardware costs, the software payload is C++ based and works on Linux distributions. Microsoft Windows porting is planned in the future.

A fully functional hardware and software prototype is planned for Q3 2026.

Most of the work is now dedicated on GPS disciplining and TCXO clocking, as well as cross channel analysis for four quadrant measurement, and delay vs filtering efficiency real time tuning. IEEE Std C37.118-2005 compliance will require rigorous conformity testing and calibration. At that time, a crowdfunding effort with pre-order priority will be put into effect, allowing trade electricians to have priority access to the device in the beta phase.

Here are some video and screen capture teasers :

NCURSES display of frequency deviation, ROCOF, harmonic analysis, amplitude analysis, and synchrophasor data. Single phase to neutral display.
top chart : raw frequency deviation measurements at 100 Hz sampling rate; bottom chart LP filtered at 10 Hz cutoff frequency and PCHIP interpolated/equispaced frequency deviation measurements.
Network PMU connection to PMU-001 using GPA PMU Connection Tester tool, displaying a single voltage channel synchrophasor and frequency measurements.
Websocket synchrophasor and frequency deviation interface (alpha version)

We wish everyone a fruitful 2026 year. Stay tuned for updates !