DLTPower is used to control Power Supplies, Multimeter and Relais for Test Automation. It is developed for an Arduino SW running on a Wemos Mini D1 HW or Wemos D1 HW and several shields. Different Multimeters and Power supplies are supported. It provides an interface to DLT for Logging and Test Automation.
For further information about DLT visit the DLT Viewer project:
https://github.com/GENIVI/dlt-viewer
The following Hardware is currently supported:
- Relais Board: Arduino Wemos Mini D1 + Relais Shields
- Relais Board: Arduino Wemos D1 + Arduino 4 Relais Shields HW-68
- Multimeter: HoldPeak HP-90EPC Amazon Germany AliExpress
- Interface: USB Serial
- Protocol: https://sigrok.org/wiki/Multimeter_ICs#Fortune_Semiconductor_FS9721_LP3
- USB Driver: https://www.holdpeak.de/download/
- Multimeter: OWON XDM1041
- Interface: USB Serial
- Protocol: https://github.com/TheHWcave/OWON-XDM1041/blob/main/SCPI/XDM1041-SCPI.pdf
- USB Driver: Same as Arduinow Wemos D1
- Power supply: Manson HCS-3302 or Voltcraft PPS-11810 or compatible Amazon Germany Manson Amazon Germany Voltcraft
- Interface: USB Serial
- Protocol: See user manual
The following parts are needed to setup a Relais board:
-
Arduino Wemos Mini D1
- Wemos D1 Mini Amazon Germany AliExpress
- 1-3 Wemos Relais Shields Amazon Germany AliExpress
- If more than one Relais Shields are used, the pin D1 must be removed and connected to D2 (second Relais) or D6 (third Relais).
- Triple Base or Dual Base Amazon Germany AliExpress Triple Base AliExpress Dual Base
- Optional: 1-Button Shield AliExpress
-
Arduino Wemos D1
- Wemos D1 Amazon Germany AliExpress
- Arduino 4 Relais Shield Amazon Germany AliExpress
The following Arduino SW is needed WemosD1MiniRelais3Button.ino
The Arduino SW is based on the Wemos Library v0.0.1:
Compile, upload and run the SW with the Arduino IDE.
Clone or copy the Wemos Library into the Arduino Libraries folder before compiling the sketch.
The following Arduino SW is needed WemosD1Relais4Shield.ino
The Arduino SW is based on the Wemos Library v0.0.1:
Compile, upload and run the SW with the Arduino IDE.
Clone or copy the Wemos Library into the Arduino Libraries folder before compiling the sketch.
The Arduino SW provides the following Features:
- Activate and deactivate up to four Relais
- Trigger the Relais for short time (500ms or custom value)
- If a button shield is connected, a short press triggers the Relais 1 connected to pin D1 (only Wemos D1 Mini)
- If a button shield is connected, a long press toggles the Relais 2 connected to pin D2 (only Wemos D1 Mini)
The Wemos D1 Mini and Wemos D1 is connected by a virtual serial device on USB. The serial port settings are 115.200 Baud with 8N1 and no handshake.
A USB driver is needed which can be found here:
https://www.wemos.cc/en/latest/ch340_driver.html
The Arduino SW understands the following commands:
- "R11\n", "R21\n", "R31\n", "R41\n" Activates Relais connected to pin D1, D2, D6 and D7 (Wemos D1 Mini) or D7, D6, D5, D4 (Wemos D1)
- "R10\n", "R20\n", "R30\n", "R40\n" Deactivates Relais connected to pin D1, D2, D6 and D7 (Wemos D1 Mini) or D7, D6, D5, D4 (Wemos D1)
- "R1T\n", "R2T\n", "R3T\n", "R4T\n" Trigger Relais connected to pin D1, D2, D6 and D7 (Wemos D1 Mini) or D7, D6, D5, D4 (Wemos D1) for 500ms
- "R1T\n", "R2T\n", "R3T\n", "R4T\n" Trigger Relais connected to pin D1, D2, D6 and D7 (Wemos D1 Mini) or D7, D6, D5, D4 (Wemos D1) for the defined time in ms
The Arduino board sends the status of Relais, when it was triggered with the button with the same command.
The Arduino board sends every second a watchdog signal "WD\n".
The commands are interpreted independent of the service id.
- <Relais name> on/off/trigger
- <Relais name> trigger <time in ms>
- <Power name> on/off
- VOLTAGE1 <value>
- VOLTAGE2 <value>
To build this SW the Qt Toolchain must be used.
-
DLTPower.exe [options] configuration
-
Options:
-
-?, -h, --help Help
-
-v, --version Version
-
-a Autostart Communication
-
Arguments:
-
configuration Configuration file
Contibutions are always welcome! Please provide a Pull Request on Github.
https://github.com/alexmucde/DLTPower
If you find this SW useful and you want to donate my work please select one of the following donations:
Paypal Donation:
Github Sponsors:
v0.1.5:
- Reduce Debug output
v0.1.4:
- Support Arduino boards setting DTR to true
- Cleanup current output
- Support OWON XDM1041 Multimeter
v0.1.3:
- UI to set voltage for power supplies
v0.1.2:
- Fix PS/MM setVoltage to match the 3-digit syntax
- Added feature to substract current
v0.1.1:
- Fix Relais Board 2 activating wrong Relais
- Update build script to Qt 5.15.2 and MSVC 2019
v0.1.0:
- Fixed set voltage problems
- Remove automatic port name detection
- Fix relais pins
- Configurable trigger time by injection
v0.0.9:
- configurable trigger time by injection
- user configurable trigger time in Arduino sketch
v0.0.8:
- added DLT injection for setting voltage
v0.0.7:
- support new Relais Board Wemos D1 + 4 Relais shield
- support up to 4 Relais per board
v0.0.6:
- added DLT Injection feature to control Relais and Power
v0.0.5:
- support also voltage in Multimeter
- Autodetect COM port change
- Reduce to support only 3 Relais per board
v0.0.4:
- Rename from DLTRelais to DLTPower
- Integrate DLTMultimeter
- Support of Power Supply
- Support two Relais Boards and two Multimeter/PowerSupplies
- Add active flag for each device
v0.0.3:
- Support up to 5 Relais
- Changed communication protocol with Arduino board
- Added Watchdog
- Fixed startup problem with Arduino Flash Mode
- Added command line options autoload and configuration file
Alexander Wenzel [email protected]
This code is licensed under GPLv3.