Name | Modified | Size | Downloads / Week |
---|---|---|---|
README.md | 2023-03-22 | 7.6 kB | |
MFJ-993B-Web-Remote.ino | 2023-03-20 | 25.9 kB | |
MFJ-993b-Web-Remote.fzz | 2021-07-17 | 508.3 kB | |
MFJ-993b-Web-Remote.jpg | 2021-07-17 | 195.7 kB | |
Totals: 4 Items | 737.5 kB | 0 |
MFJ-993b-Web-Remote
This project details basic code to web control a MFJ-993b (any of the MFJ-99x line) Auto Tuner fom an Arduino Mega 2560 with an Arduino ethernet library compatible shield.
Requirements
- Latest Arduino IDE (see: https://www.arduino.cc/en/software for latest) with fully updated libraries.
- Arduino Mega 2560 or equivalent (Not Arduino Uno as it lacks inputs and memory)
- Arduino Ethernet Shield (i.e. https://store.arduino.cc/products/arduino-ethernet-shield-2)
- Relay Board: 8 relays 5V TTL (i.e. https://www.jaycar.com.au/arduino-compatible-8-channel-relay-board/p/XC4418)
- Web Browser. Note that Chrome-engine-based browsers (i.e. Chrome, Opera, Edge) are recommended.
Setup
- Obtain the .ino file for this project: https://sourceforge.net/projects/mfj-993b-web-remote/files/MFJ-993B-Web-Remote.ino /
Set The IP Address
For Static IP addresses:
...
// Ethernet and IP settings
// #define _DHCP // Define for DHCP IP - Comment for Static IP
// Note that these still need to be left defined if _DHCP is enabled for initialisation
#define IPADD { 192, 168, 1, 177 } // IP Address
#define GWADD { 192, 168, 1, 255 } // Gateway
#define SUBADD { 255, 255, 255, 0 }; // Subnet
#define MACADD { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED }; // Specified MAC Address
#define WEBSERVERPORT 80
...
For DHCP :
...
// Ethernet and IP settings
#define _DHCP // Define for DHCP IP - Comment for Static IP
// Note that these still need to be left defined if _DHCP is enabled for initialisation
#define IPADD { 192, 168, 1, 177 } // IP Address
#define GWADD { 192, 168, 1, 255 } // Gateway
#define SUBADD { 255, 255, 255, 0 }; // Subnet
#define MACADD { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED }; // Specified MAC Address
#define WEBSERVERPORT 80
...
Compile and Upload
- Compile and upload to your Mega 2560.
Negative Logic Used
Be aware that this application uses NEGATIVE LOGIC to mimic that of what is necessary for the MFJ-993RC to work !
i.e. Relay 8 - Is ENERGISED when the button is OFF
This provides added proctection for your radio should this application fail in any way (i.e. the tuner's power is on if power fails).
Operation
For this sketch and hardware configuration to operate:
- Tuner ANT button must be IN (i.e. Ant 2 Selected)
- Tuner AUTO button must be IN (i.e. Manual Selected)
The default setting is for IP address 192.168.1.177/24 at MAC: 0xDE:AD:BE:EF:FE:ED . This can be changed if required (see example above).
Connecting to Tuner
Relay # | Arduino IO | Function |
---|---|---|
1 | 3 | Antenna 1/2 |
2 | 5 | C Up |
3 | 6 | C Down |
4 | 7 | L Up |
5 | 8 | L Down |
6 | 9 | Auto On/Off |
7 | 14 | Tune Short/Long |
8 | 15 | Power On/Off |
Refer to the MFJ-993b Schematic and MFJ-993RC Manual on how to connect relays to the MFJ-993B.
Notes
Using Ethernet-Only Modules.
You can potentially utilise Ethernet only modules that interface to the Arduino SPI port.
An example module can be found at https://core-electronics.com.au/enc28j60-ethernet-lan-network-module.htm at the time of writing this document.
Using such modules may free data lines (i.e. 11, 12, 13) on the Mega 2560 itself as the shields use some of these control lines for the SD card reader. See https://learn.adafruit.com/arduino-ethernet-sd-card/reading-sd-card-information . Also see https://docs.arduino.cc/retired/shields/arduino-ethernet-shield-without-poe-module . Experiment at your own risk !!!
PoE-capable modules have not been tested.
Generated script not loading.
There are reports (that authors cannot replicate) that the generated HTML/CSS script will not load in web browser. If this happens then try removing all the following lines from the Arduino sketch:
client.println("");
Also try a power recycle/reset of your switch.
Additional power may be required.
You may need additional power above that which the Arduino can supply for the 5V relay board.
If you experience issues with the relay board not working or the Arduino appearing to hang:
- Remove say the negative lead from the Mega 2560 to the 5V relay board (temporarily)
- Reset/start/power-cycle the hardware
- Wait say 60 seconds (i.e. the Network to stabilise etc.)
- Check to see if you can access the web interface. If you cannot then wait say a further 5 minutes. Re-load the sketch if this fails.
- If you can bring up the Web interface: reconnect power to the relay board. Test.
All should hopefully work.
Note that some use the "power relay" (relay 8) to switch the relay board on to overcome some of these issues.
Dumb Switches
Sometimes it is just Unmanaged "Dumb" Switches that cause issues i.e. DLink DGS-1005a .
Resetting/power cycling the device to reset MAC tables often solves issues.
Using Arduino due and other Arduino-IDE-Compatible Processors
This sketch has been tested with an Arduino Due (i..e ARM Cortex-M3). Be aware that such processors are tolerant to 3.3V and not 5V.
You MAY DAMAGE THE EXPENSIVE PROCESSOR if your relay board requires voltage levels at 5V.
Read the notes at https://docs.arduino.cc/hardware/due and also research the specifications of your relay board (i.e. trigger voltages) before using non Mega 2560 devices.
References
- Claudio Vella after https://www.instructables.com/Ethernet-Switching-with-Arduino/
- MFJ - MFJ-993b Manual at https://cdn.shopify.com/s/files/1/0289/7782/3843/files/MFJ-993B.pdf
- MFJ - MFJ-993b Schematic at https://cdn.shopify.com/s/files/1/0289/7782/3843/files/MFJ-991B_993B_994B_Rev_2_Schematic.pdf
- MFJ - MFJ-993RC Manual at https://cdn.shopify.com/s/files/1/0289/7782/3843/files/MFJ-993RC.pdf
- Mega 2560 at https://docs.arduino.cc/hardware/mega-2560
- Ethernet Shield documentation at https://docs.arduino.cc/hardware/ethernet-shield-rev2
Disclaimer
All rights and credits here go to the Amateur Radio focussed contributors.
This is not of merchantable quality; licenses of many tools preclude commercial use and insist on code released open-source. There is no warranty nor claims possible - nor will be accepted - against any contributor.
Use of this resource is at your own risk.