Digital display for QRP labs 20W dummy load – part 1 laid out a initial study into the feasibility of an approach to the project.
A prototype has been built based on an Ardunio Nano (ATmega328P 5V 16MHz). The ‘328P is loaded with a custom build of Optiboot 8 supporting reading and writing EEPROM.
Above, another prototype using a 0.96″ 128×64 OLED display, an end to end test of a BAT46 prototype for function testing using an Arduino Nano and OLED display. This prototype is well within 5% accurate based solely on the LTSPICE model, assuming no error in the voltage divider, tracking well from 1W to 20W. When calibrated for the voltage divider and ADC Vref error, power displayed was within 2% of a proven power meter at several spots from 0.8W to 25W, on a spot check it is within 10% (0.4dB) at 1mW.
A variation with a 50dB range bar graph, 0.4dB/px follows.
The residual voltage on the ADC pin was measured with zero RF input, and it was less than 0.5mV, but note that the spec is up to 1µA of leakage from the ADC pin, and that flowing into the 1kΩ input circuit would raise 1mV of input offset due to leakage.
The module on the right is unused, it is a power supply module, but not used in the above demonstration as the Nano is powered from a PowerBank via the USB cable.
As indicated in earlier discussion, the plan is to write firmware that does not contain instance specific calibration data, that will be stored in EEPROM, so the firmware becomes ‘standard’ across multiple instances, possibly with different detector diode types.
Above is a view of the binary EEPROM file for the BAT46 implementation. The eeprom structure is expanded in the lower half of the screenshot where a structure definition is used to interpret the binary contents.
In this cases, a second order fit is used so order is specified as 2 and coefficients a, b and c are supplied as IEEE 754 floats, and they come from the curve fit discussed in the previous article.
I have used float rather than double as the GCC compiler on ATmega328P uses float (ie 32bit floating point) whether you specify double or float.
The hex editor above (HHD) allows direct entry of a decimal value for a float, it understands the endianness and creates the binary image of the float.
There are lots of decimal to IEEE 754 float converters on the net, above is an example converting the a value from the curve fit, and it produces the little endian hex string that reconciles with that in the EEPROM image above.
Accuracy over a wide range
This project is a QRP power meter with digital display, and the detector and digital display are designed to work from 25W down to 1mW. Note that as earlier discussed, the safe continuous power rating of the QRP Labs 20W Dummy Load is less than 5W, but it would withstand higher power for a short period… all at the user’s risk.
Factors that play into that range are:
- selection of the BAT46 diode;
- circuit configuration (detector connected to the full RF voltage impressed on the load and the equivalent source impedance that presents to the detector);
- simulation to determine a candidate curve fit provided data from 0.001-25W (ie up to 50Vp to the detector); and
- 10 bit ADC resolution in the prototype MCU.
Next step is to design and make an enclosure for the display unit.
A work in progress..