¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

Re: Serial control/monitoring of meters?


 

Many thanks to David (N7DDC) for this great little ATU and to Dave (WA1RCT) for porting the code to the MPLAB IDE.

To work around the issue of using UART type interfaces, I have used a homebrew software based SPI interface connected to a D1 Mini (ESP8266) module. The D1 Mini modules are relatively inexpensive, around ?5 in the UK and are great for general home automation projects, although they have a limited number of IO pins.



The D1 Mini (ESP8266) module allows remote control and monitoring of the ATU via WIFI using MQTT messages.
The PIC operates as a SPI Master (SoftSPI) operating at low speed (5 kbit/s).
The D1 Mini operates as a SPI Slave (SoftSPI).
A fixed 16-byte frame, repeating in the main program loop of the PIC (approximately every 500ms) allows the following.
Read L, C and Csw settings.
Write L, C and Csw settings.
Read Forward Power and SWR.
Read selected EEPROM location (0 to 255).
Write selected EEPROM location (0 to 255).
A single byte message is also sent as required to indicate Tune Start, Tune Exit and Reset states.
An N-Channel MOSFET level shifter module (4 channel) is used for the 5V to 3V3 interface.
An MCP23008 IO expander allows reuse of the Tune/Rest, Auto and Bypass buttons.

A screenshot on the controller on an Android device and PC is shown attached.



Probably all a bit OTT, but it was interesting to come up with a control interface for the ATU.

73, Dave




?
?

Join [email protected] to automatically receive all group messages.