MightyWatt revison 2: Now 50% mightier!

I've been using my MightyWatt electronic load for the last few months and I got some ideas to make it better. I am introducing the MightyWatt, revision 2. This time, you can buy it as a kit (fear not, most parts are assembled) on Tindie.

Complete schematic of the revision 2.

Four-wire connection
MightyWatt has now four input terminals. You can switch between remote (4-wire) and local (2-wire) voltage measurement. The signals are routed by a relay. This gives you the opportunity to exclude the resistance of cables from your measurement.
I have also redesigned the dual-range voltmeter from single-ended to differential.

Better DAC
I have replaced the cheap Microchip's DAC in favour of a higher-end DAC from Analog Devices with internal 2 ppm/°C voltage reference (AD5691RBRMZ). It is more expensive but the accuracy will be improved. The original DAC (MCP4726) is not a bad part, though. It only has somewhat larger inlinearity which cannot be eliminated by simple linear calibration. Feel free to use the MCP4726 if you don't need the improved accuracy.

Better gate driver
I have added additional compensation to the MOSFET gate driver so the current ripple is much reduced.

Because the temperature is monitored in software, I never experienced an overheat. I have decided to drop the red LED that was supposed to indicate overheat.

Input protection
There were occassional problems when transient voltages were present on the USB line. Some PC power supplies have problems filtering transients in the grid (e.g. motor switching) and it resulted in disconnection of the load. I have added a 5V transient voltage suppressor at the power-entry point.

New software and firmware
Because the load can do 4-wire measurement now, I also updated the software (C#) and the firmware (Arduino sketch). This means that revision 2 software is not backwards compatible with the first version. You can find all the relevant source files on my Google Drive (original revision 2). All the resources for the latest version can be found here: http://kaktuscircuits.blogspot.cz/2015/03/mightywatt-resource-page.html.
  • Eagle board and schematic
  • Bill of materials
  • Arduino sketch for firmware
  • Arduino sketch for calibration
  • Excel file to calculate calibration values
  • Windows software for MightyWatt control, as a C# Visual Studio project


Reverse polarity and overvoltage protection

Circuits that are connected to outside world should be reasonably protected. Who knows when somebody just plugs in a different power adaptor (of course with twice the voltage and polarity in reverse). So how to account for this?

Protection circuits
Reverse polarity
You can use a diode in series and zener diode (or better – a transient voltage suppressor) in parallel in combination with a fuse. But you can do it better. First, the diode in series can be replaced by P-channel MOSFET (Q1). Drain connected to input and source to output. Gate is connected to ground. The transistor appears to be reversed and it is. But on purpose. Suppose the voltage is reversed. Then, gate is on V+ so the transistor is closed. Its intrinsic diode is reverse biased so no current flows. 
During normal operation, the current flows through its intrinsic diode but the gate, being grounded, has also lower voltage than the source so the transistor conducts in active mode. It is fully open and its resistance is the Rds(on) value. Which can be very low. In this way, the diode drop is eliminated and energy loss on transistor is negligible.
If you need to protect against voltages that are larger than the gate-source breakdown voltage (Vgs), then a voltage-limiting zener diode (D1) and a current-limiting resistor (R1) have to be added to the gate.

It is possible to automatically disconnect a circuit when the input voltage exceeds a predefined level. This is different from parallel transient voltage suppressor and fuse. Blow fuses have the obvious problem of being a one-time devices. PTC resettable fuses tend to be slow and they can conduct significant amount of current even in tripped state (to stay tripped, the fuse needs to maintain itself hot). You can use electronic fuses for overcurrent conditons though.
With just two P-MOSFETs and a few components, it is possible to automatically limit the input voltage. The principle is this: A zener diode (D2) is chosen with value slightly lower than the maximum allowed voltage on the output. Then, when the voltage is higher than the zener voltage, D2 starts conducting and voltage drops across resistor R2. This lowers the voltage on the gate of Q2, which will open, raising the voltage drop across R4. The gate of Q3 sees higher voltage and Q3 thus closes, disconnecting the protected circuit from excess voltage. All without tripping any fuses or causing excessive current flow. Neat! Because you can get P-MOSFET with very low Rds(on), the losses can be minimal.
Resistor R3 and two zeners, D3 and D4, are there for gate protection just like D1 and R1.