This is a wireless tuning console for OVMS v3 / Renault Twizy.
It supports loading profiles and changing the neutral/brake recuperation levels as well as the drive power level on the fly.
- Push the knob to activate or switch to the next page.
- Turn the knob to change the value.
- Rest the knob to apply the change (or push again to cancel).
V1.1 also displays the main battery SOC and the auxiliary 12V battery voltage level on wakeup for 3 seconds by default (see config to tune). Push the knob to skip, hold the knob to extend.
Did I mention it's just a frontend for an OVMS v3 module? So of course you'll need an OVMS v3.
The OVMS v3 firmware version should be 3.2.008-174
or higher.
And you'll need an unlocked Twizy if you want to use it to change the tuning. The console isn't limited to tuning, you could for example use it to change the charge current level and destination SOC as well.
- WEMOS/LOLIN D1 mini Pro v2 (ESP8266 + battery shield) ~9.35€
- WEMOS/LOLIN D1 OLED shield 64x48 ~8.57€
- Rotary Encoder KY-040 ~3.65€
- Knob ~4.22€
- LiPo battery 2mm JST, e.g. 400 mAh ~3.95€
- Female headers (2x8 pin, 1x5 pin) ~1.95€
- Flat cable 5 pin 10 cm ~1.00€
- Casing with transparent window/cover ~3.38€
- USB micro/mini adapter ~1.50€
Total: ~37,57€ + shipping. Links are just examples.
The D1 mini pro v2 includes a LiPo shield, you may also use a standard D1 + separate battery shield.
The USB adapter is meant to extend the D1 mini Pro USB port to the casing side, so you don't need to open the casing to charge the battery. There may be other/better solutions to this.
- Solder the 8 pin female headers to the D1 mini and the included male pin headers to the OLED shield.
- Connect the solder switch labeled
BAT-A0
on the D1 mini back side. - Connect the
RST
solder switch on the OLED module if it has one. - Solder the 5 pin flat cable to the back of the D1 mini as shown below, fix the cable using hot glue.
- Solder the female 5 pin header to the other end.
- Connect all components (double check polarity).
- Load the firmware & test the system.
- Calibrate the battery voltage.
- Mount into the casing.
Rotary encoder connection:
KY-040 | D1 mini |
---|---|
GND |
GND |
+ |
3V3 |
SW |
RST |
DT |
12 |
CLK |
13 |
Note: there are OLED clones on the market that don't connect the reset line (RST
). Clones
can be identified by not having the Wemos logo. They will normally work, but may freeze when pushing
the knob during a screen rendering. If that happens you'll need to unplug the battery to revive
the OLED. Workaround is to always wait until the display is stable before pushing the knob again.
If you haven't yet installed the ESP8266 support into your Arduino environment, do so first by following the guide: https://github.com/esp8266/Arduino
Add these libraries if not yet installed:
- Download the ZIP, extract, open
WifiConsole/WifiConsole.ino
from Arduino IDE. - Select the board "WEMOS (LOLIN) D1 mini Pro" as the build destination.
- Enter your configuration in the
WifiConsole_config.h
tab, build & flash. - Use the serial monitor to check the debug output.
- Calibrate your battery voltage reading.
The module side script plugin implements the command interface for the console:
- Open OVMS web UI: Tools → Editor.
- Paste the WifiConsole.js plugin into the editor.
- Save as
/store/scripts/lib/WifiConsole.js
(add the directories if needed). - Open
/store/scripts/ovmsmain.js
(create if needed). - Add a line
wificon = require("lib/WifiConsole");
& save. - Open Tools → Shell, issue
script reload
.
The WifiConsole reads the tuning profiles and quick access buttons from the OVMS module. Use the OVMS web UI (Twizy → Profile Editor & Twizy → Drivemode Config) to create tuning profiles and assign button labels. Maximum label length supported by the console is 3 characters (more will be cut off), and default maximum number of buttons is 10 (can be changed).
The WifiConsole firmware configuration is done in the WifiConsole_config.h
file.
See comments for explanations.
You normally only need to change the module data and the battery calibration. Customize the timeouts to your taste.
According to my tests, the 400 mAh battery will last for about 4 hours of continuous operation. With default sleep timeout of 60 seconds, a normal interaction time will be around 1.5-2 minutes, so the battery will last for about 120-160 activations.
From my normal daily use experience, this equals about two months. To extend this, simply use a larger battery (but check if it fits into the case).
WifiConsole has been created and is maintained by Michael Balzer (dexter@dexters-web.de / https://dexters-web.de/).
Donations to support my efforts and further development are very welcome.
Please send donations via Paypal to: dexter@dexters-web.de
Thanks! :-)
This is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this software; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110- 1301 USA
Have fun!