diff --git a/README.md b/README.md index 06121d4..f690a78 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,193 @@ -SmartEVSE v2 +SmartEVSE ========= -Version 2 uses a PIC 18F26K22 microcontroller, Graphic 128x64 LCD. -for compiling, MPLAB X IDE is used together with the XC8 compiler. +Smart Electric Vehicle Charge Controller -set XC8 linker memory model settings to: double 32 bit, float 32 bit - extended instruction set is not used on XC8 - -- SmartEVSE2.X folder contains the sourcecode for the PIC microcontroller -- eagle folder holds the pcb layouts (eagle 6.6) -- manual folder has the latest manual. +![Image of SmartEVSE](/pictures/SmartEVSEv2.jpg) + +# What is it? + +It's a open source EVSE (Electric Vehicle Supply Equipment). It supports 1-3 phase charging, fixed charging cable or charging socket. Locking actuator support (3 different types). And it can directly drive a mains contactor for supplying power to the EV. It features a display from which all module parameters can be configured.
+Up to 8 modules can be connected together to charge up to eight EV's from one mains connection without overloading it.
+The mains connection can be monitored by the (optional) sensorbox or a modbus kWh meter. This allows smart charging. +Communication between the SmartEVSE(s) / Sensorbox or kWh meters is done over RS485(modbus). + +The project consists of two parts: +- Smart EVSE controller +- Sensorbox + +# Features + +- Fits into a standard DIN rail enclosure. +- Measures the current consumption of other appliances, and automatically lowers or increases the charging current to the EV. (sensorbox required) +- The load balancing feature let's you connect up to 8 SmartEVSE's to one mains supply. +- Switched 230VAC output, for contactor/relay. +- Powered RS485 communication bus for sensorbox / Modbus kWh Meters. +- Can be used with fixed cable, or socket and charging cable. +- Automatically selects current capacity of the connected cable (13/16/32A) +- Locking actuator support, locks the charging cable in the socket, automatically unlocks on a power failure. +- RFID reader support, restrict the use of the charging station to max 20 RFID cards. +- An optional modbus kWh meter will measure power and charged energy, and display this on the LCD. +- Built-in temperature sensor. +- All module parameters can be configured using the display and buttons. +- Setup can also be done through serial CLI. +- Firmware upgradable through serial bootloader. + +New V2.20 features are: +- Added EVMETER and EVADR option to the menu. Use a modbus kWh meter to measure the charged energy. +- Added charged energy to the LCD (Smart/Solar mode) +- Uses condensed characters on the LCD, so the 'i' will not use the same space as the 'w' +- Increased the nr of nodes to 7. +- Added RFID reader option. Learn up to 20 RFID cards. + +# The Sensorbox + +The Sensorbox should be placed where the Mains connection enters the building. Usually just after the kWh meter, this way it will be able to measure the total current per phase and send this information to the SmartEVSE. + +In order to measure the current, Current transformers are used. Clip them around the L1,L2 and L3 wires, and plug the other end into the sensorbox. + +![Image of Sensorbox](/pictures/sensorbox.jpg) + +# Configuring the SmartEVSE + +The SmartEVSE has a display, which shows the charging status, and if smart mode is used, also the measured current per phase. +It is possible to configure all settings using the built-in menu. + +Three buttons below the display are used for navigating the menu. + +Hold the center button for 2 seconds to enter the menu. +You can now use the left and right buttons to go to the different menu options. + +Pressing the center button, selects the option, and allows you change the value (for example change the charging current) + +![Image of Menu](/pictures/SmartEVSEv2_mode_smart.jpg) + +# Building the EVSE + +In order to build a complete EVSE (charging station) +you will need: + +- SmartEVSE. +- 4 pole NO Contactor rated for the max charging current. (for example Hager ESC440 or ISKRA IKA432-40) +- Fixed charging cable or socket with locking solenoid. +- Enclosure with DIN rail. +- Terminal blocks (Wago TOPJOB S) + +The EVSE needs to be protected with a circuit breaker and residual-current circuit breaker, usually located near or in the distribution board. + +# Purchase the SmartEVSE + +You can buy a complete assembled SmartEVSEv2 [here](http://www.stegen.com/en/ev-products/66-smart-evse-controller.html)
+Information on how to compile and setup the controller can be found on the [smartevse.nl](http://www.smartevse.nl) website. + +**The assembled SmartEVSE v2 modules come pre-programmed with the latest firmware (v2.20), and are fully tested!** + +# Predefined electric meters + +- Sensorbox (1) +- PHOENIX CONTACT EEM-350-D-MCB (2) +- Finder 7E.78.8.400.0212 (3) +- Eastron SDM630 (4) +- ABB B23 212-100 (5) +- Custom (6) + +# Modbus + +Baudrate is 9600bps 8N1 (8bit, no parity bit, one stop bit). +All registers are 16 bit unsigned integers. +Address depends on the Load Balancing configuration: + +Load Balancing | Modbus Address +--- | --- +Disabled | 0x00 +Master | 0x01 +Node 1 | 0x02 +Node 2 | 0x03 +... | ... + +Broadcast to all SmartEVSE with address 0x09. + +## Register for internal SmartEVSE communication + +### Register 0x000*: Broadcast Chargecurrent or Error + +Register | Access | Description | Unit | Values +--- | --- | --- | --- | --- +0x01 | W | Broadcast ChargeCurrent | 0.1 A | Charge Current (0 A = no current available) +0x02 | W | Broadcast Error | Bit | 1:LESS_6A / 2:NO_COMM / 4:TEMP_HIGH / 8:NO_CURRENT / 16:RCD / 32:NO_SUN + +Register 0x01 is written to every 2 seconds by the Master, and holds the Charge Current per Node EVSE. A total of 4 words (8 bytes) are written, One word per EVSE(0-3).
+Register 0x02 is written to only if an error occurred.
+Use function code 0x10 (Preset Multiple Registers), and broadcast address 0x09 to use this feature.
+ +### Register 0x008*: Ack State change + +Register | Access | Description | Unit | Values +--- | --- | --- | --- | --- +0x0082 | W | Ack State A->B | 0.1 A | Charge Current (0 A = no current available) +0x0083 | W | Ack State B->C | 0.1 A | Charge Current (0 A = no current available) + +Register 0x82 and 0x83 are written by the Master to tell the Node that it recognised a state change request.
+If ok, the value of the register contains the initial chargecurrent (usually 6.0 A)
+Use function code 0x06 (Preset Single Register) to write to these registers.
+ +## Register for external devices + +### Register 0x00A*: Current state + +Register | Access | Description | Unit | Values +--- | --- | --- | --- | --- +0x00A0 | R/W | State | | A-D (EVSE State), E-H (A-D Waiting for Balance Master) +0x00A1 | R/W | Error | Bit | 1:LESS_6A / 2:NO_COMM / 4:TEMP_HIGH / 8:Unused / 16:RCD / 32:NO_SUN +0x00A2 | R | Maximum charging current | A | +0x00A3 | R | Minimum charging current | A | +0x00A4 | R | Number of used phases (Not implemented) | | 0:Undetected / 1 - 3 +0x00A5 | R | Real charging current (Not implemented) | 0.1 A | +0x00A6 | R/W | Charging current | 0.1 A | 6 - 80 +0x00A7 | R/W | Access bit | | 0:No Access / 1:Access +0x00A8 | R/W | EVSE mode (without saving) | | 0:Normal / 1:Smart / 2:Solar + +### Register 0x00C*: Individual configuration + +Register | Access | Description | Unit | Values +--- | --- | --- | --- | --- +0x00C0 | R/W | Configuration | | 0:Socket / 1:Fixed Cable +0x00C1 | R/W | Load Balance (Also address of the device ) | | 0:Disabled / 1:Master / 2-4:Node +0x00C2 | R/W | MIN Charge Current the EV will accept | A | 6 - 16 +0x00C3 | R/W | MAX Charge Current for this EVSE | A | 6 - 80 +0x00C4 | R/W | Cable lock | | 0:Disable / 1:Solenoid / 2:Motor +0x00C5 | R/W | Surplus energy start Current | A | 1 - 16 +0x00C6 | R/W | Stop solar charging at 6A after this time | min | 0:Disable / 1 - 60 +0x00C7 | R/W | External Switch on pin SW | | 0:Disabled / 1:Access Push-Button / 2:Access Switch / 3:Smart-Solar Push-Button / 4:Smart-Solar Switch +0x00C8 | R/W | Residual Current Monitor on pin RCM | | 0:Disabled / 1:Enabled +0x00C9 | R/W | Allow grid power when solar charging | A | 0 - 6 +0x00CA | R/W | Use RFID reader | | 0:Disabled / 1:Enabled +0x00CB | R/W | Type of EV electric meter | | * +0x00CC | R/W | Address of EV electric meter | | 10 - 247 + +### Register 0x00E*: System configuration (same on all Load Balancing SmartEVSE) + +Register | Access | Description | Unit | Values +--- | --- | --- | --- | --- +0x00E0 | R/W | EVSE Circuit max Current | A | 10 - 160 +0x00E1 | R/W | EVSE mode | | 0:Normal / 1:Smart / 2:Solar +0x00E2 | R/W | Max Mains Current | A | 10 - 200 +0x00E3 | R/W | CT calibration value | 0.01 | Multiplier +0x00E4 | R/W | Type of Mains electric meter | | * +0x00E5 | R/W | Address of Mains electric meter | | 10 - 247 +0x00E6 | R/W | What does Mains electric meter measure | | 0:Mains (Home+EVSE+PV) / 1:Home+EVSE +0x00E7 | R/W | Type of PV electric meter | | * +0x00E8 | R/W | Address of PV electric meter | | 10 - 247 +0x00E9 | R/W | Byte order of custom electric meter | | 0:LBF & LWF / 1:LBF & HWF / 2:HBF & LWF / 3:HBF & HWF +0x00EA | R/W | Register for Current (A) of custom electric meter | | 0 - 65530 +0x00EB | R/W | Divisor for Current (A) of custom electric meter | 10x | 0 - 7 +0x00EC | R/W | Register for Voltage (V) of custom electric meter | | 0 - 65530 +0x00ED | R/W | Divisor for Voltage (V) of custom electric meter | 10x | 0 - 7 +0x00EE | R/W | Register for Power (W) of custom electric meter | | 0 - 65534 +0x00EF | R/W | Divisor for Power (W) of custom electric meter | 10x | 0 - 7 / +0x00F0 | R/W | Register for Energy (kWh) of custom electric meter | | 0 - 65534 +0x00F1 | R/W | Divisor for Energy (kWh) of custom electric meter | 10x | 0 - 7 +0x00F2 | R/W | Grid type to which the Sensorbox is connected | | 0:4Wire / 1:3Wire +0x00F3 | R/W | Data type of custom electric meter | | 0:Integer / 1:Double + + * Number in brackets in section "Predefined electric meters" diff --git a/SmartEVSE2.X/EVSE.c b/SmartEVSE2.X/EVSE.c index d011cdc..720421d 100644 --- a/SmartEVSE2.X/EVSE.c +++ b/SmartEVSE2.X/EVSE.c @@ -636,20 +636,20 @@ void BlinkLed(void) { if (LedUpdate) { if (Error & (RCD_TRIPPED | CT_NOCOMM) ) { LedCount += 20; // Very rapid flashing, RCD tripped or no Serial Communication. - if (LedCount > 128) LedPwm = 255; // LED 50% of time on, full brightness + if (LedCount > 128) LedPwm = ERROR_LED_BRIGHTNESS; // LED 50% of time on, full brightness else LedPwm = 0; } else { // Waiting for Solar power or enough current to start charging LedCount += 2; // Slow blinking. - if (LedCount > 230) LedPwm = 255; // LED 10% of time on, full brightness + if (LedCount > 230) LedPwm = WAITING_LED_BRIGHTNESS; // LED 10% of time on, full brightness else LedPwm = 0; } LedUpdate = 0; } } else if (Access_bit == 0) LedPwm = 0; // No Access, LED off - else if (State == STATE_A) LedPwm = 40; // STATE A, LED on (dimmed) + else if (State == STATE_A) LedPwm = STATE_A_LED_BRIGHTNESS; // STATE A, LED on (dimmed) else if (State == STATE_B) { - LedPwm = 255; // STATE B, LED on (full brightness) + LedPwm = STATE_B_LED_BRIGHTNESS; // STATE B, LED on (full brightness) LedCount = 128; // When switching to STATE C, start at full brightness } else if (State == STATE_C && LedUpdate) // STATE C, LED fades in/out { diff --git a/SmartEVSE2.X/EVSE.h b/SmartEVSE2.X/EVSE.h index ae19126..04f5483 100644 --- a/SmartEVSE2.X/EVSE.h +++ b/SmartEVSE2.X/EVSE.h @@ -132,6 +132,11 @@ #define Test_IO 64 #define BL_FLASH 128 +#define STATE_A_LED_BRIGHTNESS 40 +#define STATE_B_LED_BRIGHTNESS 255 +#define ERROR_LED_BRIGHTNESS 255 +#define WAITING_LED_BRIGHTNESS 255 + #define SOLENOID_LOCK {LATAbits.LATA4 = 1;LATAbits.LATA5 = 0;} #define SOLENOID_UNLOCK {LATAbits.LATA4 = 0;LATAbits.LATA5 = 1;} #define SOLENOID_OFF {LATAbits.LATA4 = 1;LATAbits.LATA5 = 1;} // both outputs 12V diff --git a/SmartEVSE2.X/nbproject/Makefile-default.mk b/SmartEVSE2.X/nbproject/Makefile-default.mk deleted file mode 100644 index 232ff07..0000000 --- a/SmartEVSE2.X/nbproject/Makefile-default.mk +++ /dev/null @@ -1,242 +0,0 @@ -# -# Generated Makefile - do not edit! -# -# Edit the Makefile in the project folder instead (../Makefile). Each target -# has a -pre and a -post target defined where you can add customized code. -# -# This makefile implements configuration specific macros and targets. - - -# Include project Makefile -ifeq "${IGNORE_LOCAL}" "TRUE" -# do not include local makefile. User is passing all local related variables already -else -include Makefile -# Include makefile containing local settings -ifeq "$(wildcard nbproject/Makefile-local-default.mk)" "nbproject/Makefile-local-default.mk" -include nbproject/Makefile-local-default.mk -endif -endif - -# Environment -MKDIR=gnumkdir -p -RM=rm -f -MV=mv -CP=cp - -# Macros -CND_CONF=default -ifeq ($(TYPE_IMAGE), DEBUG_RUN) -IMAGE_TYPE=debug -OUTPUT_SUFFIX=elf -DEBUGGABLE_SUFFIX=elf -FINAL_IMAGE=dist/${CND_CONF}/${IMAGE_TYPE}/SmartEVSE2.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX} -else -IMAGE_TYPE=production -OUTPUT_SUFFIX=hex -DEBUGGABLE_SUFFIX=elf -FINAL_IMAGE=dist/${CND_CONF}/${IMAGE_TYPE}/SmartEVSE2.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX} -endif - -ifeq ($(COMPARE_BUILD), true) -COMPARISON_BUILD=-mafrlcsj -else -COMPARISON_BUILD= -endif - -ifdef SUB_IMAGE_ADDRESS - -else -SUB_IMAGE_ADDRESS_COMMAND= -endif - -# Object Directory -OBJECTDIR=build/${CND_CONF}/${IMAGE_TYPE} - -# Distribution Directory -DISTDIR=dist/${CND_CONF}/${IMAGE_TYPE} - -# Source Files Quoted if spaced -SOURCEFILES_QUOTED_IF_SPACED=EVSE.c GLCD.c bootloader.c utils.c modbus.c OneWire.c - -# Object Files Quoted if spaced -OBJECTFILES_QUOTED_IF_SPACED=${OBJECTDIR}/EVSE.p1 ${OBJECTDIR}/GLCD.p1 ${OBJECTDIR}/bootloader.p1 ${OBJECTDIR}/utils.p1 ${OBJECTDIR}/modbus.p1 ${OBJECTDIR}/OneWire.p1 -POSSIBLE_DEPFILES=${OBJECTDIR}/EVSE.p1.d ${OBJECTDIR}/GLCD.p1.d ${OBJECTDIR}/bootloader.p1.d ${OBJECTDIR}/utils.p1.d ${OBJECTDIR}/modbus.p1.d ${OBJECTDIR}/OneWire.p1.d - -# Object Files -OBJECTFILES=${OBJECTDIR}/EVSE.p1 ${OBJECTDIR}/GLCD.p1 ${OBJECTDIR}/bootloader.p1 ${OBJECTDIR}/utils.p1 ${OBJECTDIR}/modbus.p1 ${OBJECTDIR}/OneWire.p1 - -# Source Files -SOURCEFILES=EVSE.c GLCD.c bootloader.c utils.c modbus.c OneWire.c - - - -CFLAGS= -ASFLAGS= -LDLIBSOPTIONS= - -############# Tool locations ########################################## -# If you copy a project from one host to another, the path where the # -# compiler is installed may be different. # -# If you open this project with MPLAB X in the new host, this # -# makefile will be regenerated and the paths will be corrected. # -####################################################################### -# fixDeps replaces a bunch of sed/cat/printf statements that slow down the build -FIXDEPS=fixDeps - -.build-conf: ${BUILD_SUBPROJECTS} -ifneq ($(INFORMATION_MESSAGE), ) - @echo $(INFORMATION_MESSAGE) -endif - ${MAKE} -f nbproject/Makefile-default.mk dist/${CND_CONF}/${IMAGE_TYPE}/SmartEVSE2.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX} - -MP_PROCESSOR_OPTION=18F26K22 -# ------------------------------------------------------------------------------------ -# Rules for buildStep: compile -ifeq ($(TYPE_IMAGE), DEBUG_RUN) -${OBJECTDIR}/EVSE.p1: EVSE.c nbproject/Makefile-${CND_CONF}.mk - @${MKDIR} "${OBJECTDIR}" - @${RM} ${OBJECTDIR}/EVSE.p1.d - @${RM} ${OBJECTDIR}/EVSE.p1 - ${MP_CC} $(MP_EXTRA_CC_PRE) -mcpu=$(MP_PROCESSOR_OPTION) -c -D__DEBUG=1 -fno-short-double -fno-short-float -memi=wordwrite -mrom=0-FCFB -O3 -maddrqual=ignore -xassembler-with-cpp -mwarn=-3 -Wa,-a -DXPRJ_default=$(CND_CONF) -msummary=-psect,-class,+mem,-hex,-file -ginhx032 -Wl,--data-init -mno-keep-startup -mno-download -mdefault-config-bits -mc90lib $(COMPARISON_BUILD) -std=c90 -gdwarf-3 -mstack=compiled:auto:auto:auto -o ${OBJECTDIR}/EVSE.p1 EVSE.c - @-${MV} ${OBJECTDIR}/EVSE.d ${OBJECTDIR}/EVSE.p1.d - @${FIXDEPS} ${OBJECTDIR}/EVSE.p1.d $(SILENT) -rsi ${MP_CC_DIR}../ - -${OBJECTDIR}/GLCD.p1: GLCD.c nbproject/Makefile-${CND_CONF}.mk - @${MKDIR} "${OBJECTDIR}" - @${RM} ${OBJECTDIR}/GLCD.p1.d - @${RM} ${OBJECTDIR}/GLCD.p1 - ${MP_CC} $(MP_EXTRA_CC_PRE) -mcpu=$(MP_PROCESSOR_OPTION) -c -D__DEBUG=1 -fno-short-double -fno-short-float -memi=wordwrite -mrom=0-FCFB -O3 -maddrqual=ignore -xassembler-with-cpp -mwarn=-3 -Wa,-a -DXPRJ_default=$(CND_CONF) -msummary=-psect,-class,+mem,-hex,-file -ginhx032 -Wl,--data-init -mno-keep-startup -mno-download -mdefault-config-bits -mc90lib $(COMPARISON_BUILD) -std=c90 -gdwarf-3 -mstack=compiled:auto:auto:auto -o ${OBJECTDIR}/GLCD.p1 GLCD.c - @-${MV} ${OBJECTDIR}/GLCD.d ${OBJECTDIR}/GLCD.p1.d - @${FIXDEPS} ${OBJECTDIR}/GLCD.p1.d $(SILENT) -rsi ${MP_CC_DIR}../ - -${OBJECTDIR}/bootloader.p1: bootloader.c nbproject/Makefile-${CND_CONF}.mk - @${MKDIR} "${OBJECTDIR}" - @${RM} ${OBJECTDIR}/bootloader.p1.d - @${RM} ${OBJECTDIR}/bootloader.p1 - ${MP_CC} $(MP_EXTRA_CC_PRE) -mcpu=$(MP_PROCESSOR_OPTION) -c -D__DEBUG=1 -fno-short-double -fno-short-float -memi=wordwrite -mrom=0-FCFB -O3 -maddrqual=ignore -xassembler-with-cpp -mwarn=-3 -Wa,-a -DXPRJ_default=$(CND_CONF) -msummary=-psect,-class,+mem,-hex,-file -ginhx032 -Wl,--data-init -mno-keep-startup -mno-download -mdefault-config-bits -mc90lib $(COMPARISON_BUILD) -std=c90 -gdwarf-3 -mstack=compiled:auto:auto:auto -o ${OBJECTDIR}/bootloader.p1 bootloader.c - @-${MV} ${OBJECTDIR}/bootloader.d ${OBJECTDIR}/bootloader.p1.d - @${FIXDEPS} ${OBJECTDIR}/bootloader.p1.d $(SILENT) -rsi ${MP_CC_DIR}../ - -${OBJECTDIR}/utils.p1: utils.c nbproject/Makefile-${CND_CONF}.mk - @${MKDIR} "${OBJECTDIR}" - @${RM} ${OBJECTDIR}/utils.p1.d - @${RM} ${OBJECTDIR}/utils.p1 - ${MP_CC} $(MP_EXTRA_CC_PRE) -mcpu=$(MP_PROCESSOR_OPTION) -c -D__DEBUG=1 -fno-short-double -fno-short-float -memi=wordwrite -mrom=0-FCFB -O3 -maddrqual=ignore -xassembler-with-cpp -mwarn=-3 -Wa,-a -DXPRJ_default=$(CND_CONF) -msummary=-psect,-class,+mem,-hex,-file -ginhx032 -Wl,--data-init -mno-keep-startup -mno-download -mdefault-config-bits -mc90lib $(COMPARISON_BUILD) -std=c90 -gdwarf-3 -mstack=compiled:auto:auto:auto -o ${OBJECTDIR}/utils.p1 utils.c - @-${MV} ${OBJECTDIR}/utils.d ${OBJECTDIR}/utils.p1.d - @${FIXDEPS} ${OBJECTDIR}/utils.p1.d $(SILENT) -rsi ${MP_CC_DIR}../ - -${OBJECTDIR}/modbus.p1: modbus.c nbproject/Makefile-${CND_CONF}.mk - @${MKDIR} "${OBJECTDIR}" - @${RM} ${OBJECTDIR}/modbus.p1.d - @${RM} ${OBJECTDIR}/modbus.p1 - ${MP_CC} $(MP_EXTRA_CC_PRE) -mcpu=$(MP_PROCESSOR_OPTION) -c -D__DEBUG=1 -fno-short-double -fno-short-float -memi=wordwrite -mrom=0-FCFB -O3 -maddrqual=ignore -xassembler-with-cpp -mwarn=-3 -Wa,-a -DXPRJ_default=$(CND_CONF) -msummary=-psect,-class,+mem,-hex,-file -ginhx032 -Wl,--data-init -mno-keep-startup -mno-download -mdefault-config-bits -mc90lib $(COMPARISON_BUILD) -std=c90 -gdwarf-3 -mstack=compiled:auto:auto:auto -o ${OBJECTDIR}/modbus.p1 modbus.c - @-${MV} ${OBJECTDIR}/modbus.d ${OBJECTDIR}/modbus.p1.d - @${FIXDEPS} ${OBJECTDIR}/modbus.p1.d $(SILENT) -rsi ${MP_CC_DIR}../ - -${OBJECTDIR}/OneWire.p1: OneWire.c nbproject/Makefile-${CND_CONF}.mk - @${MKDIR} "${OBJECTDIR}" - @${RM} ${OBJECTDIR}/OneWire.p1.d - @${RM} ${OBJECTDIR}/OneWire.p1 - ${MP_CC} $(MP_EXTRA_CC_PRE) -mcpu=$(MP_PROCESSOR_OPTION) -c -D__DEBUG=1 -fno-short-double -fno-short-float -memi=wordwrite -mrom=0-FCFB -O3 -maddrqual=ignore -xassembler-with-cpp -mwarn=-3 -Wa,-a -DXPRJ_default=$(CND_CONF) -msummary=-psect,-class,+mem,-hex,-file -ginhx032 -Wl,--data-init -mno-keep-startup -mno-download -mdefault-config-bits -mc90lib $(COMPARISON_BUILD) -std=c90 -gdwarf-3 -mstack=compiled:auto:auto:auto -o ${OBJECTDIR}/OneWire.p1 OneWire.c - @-${MV} ${OBJECTDIR}/OneWire.d ${OBJECTDIR}/OneWire.p1.d - @${FIXDEPS} ${OBJECTDIR}/OneWire.p1.d $(SILENT) -rsi ${MP_CC_DIR}../ - -else -${OBJECTDIR}/EVSE.p1: EVSE.c nbproject/Makefile-${CND_CONF}.mk - @${MKDIR} "${OBJECTDIR}" - @${RM} ${OBJECTDIR}/EVSE.p1.d - @${RM} ${OBJECTDIR}/EVSE.p1 - ${MP_CC} $(MP_EXTRA_CC_PRE) -mcpu=$(MP_PROCESSOR_OPTION) -c -fno-short-double -fno-short-float -memi=wordwrite -mrom=0-FCFB -O3 -maddrqual=ignore -xassembler-with-cpp -mwarn=-3 -Wa,-a -DXPRJ_default=$(CND_CONF) -msummary=-psect,-class,+mem,-hex,-file -ginhx032 -Wl,--data-init -mno-keep-startup -mno-download -mdefault-config-bits -mc90lib $(COMPARISON_BUILD) -std=c90 -gdwarf-3 -mstack=compiled:auto:auto:auto -o ${OBJECTDIR}/EVSE.p1 EVSE.c - @-${MV} ${OBJECTDIR}/EVSE.d ${OBJECTDIR}/EVSE.p1.d - @${FIXDEPS} ${OBJECTDIR}/EVSE.p1.d $(SILENT) -rsi ${MP_CC_DIR}../ - -${OBJECTDIR}/GLCD.p1: GLCD.c nbproject/Makefile-${CND_CONF}.mk - @${MKDIR} "${OBJECTDIR}" - @${RM} ${OBJECTDIR}/GLCD.p1.d - @${RM} ${OBJECTDIR}/GLCD.p1 - ${MP_CC} $(MP_EXTRA_CC_PRE) -mcpu=$(MP_PROCESSOR_OPTION) -c -fno-short-double -fno-short-float -memi=wordwrite -mrom=0-FCFB -O3 -maddrqual=ignore -xassembler-with-cpp -mwarn=-3 -Wa,-a -DXPRJ_default=$(CND_CONF) -msummary=-psect,-class,+mem,-hex,-file -ginhx032 -Wl,--data-init -mno-keep-startup -mno-download -mdefault-config-bits -mc90lib $(COMPARISON_BUILD) -std=c90 -gdwarf-3 -mstack=compiled:auto:auto:auto -o ${OBJECTDIR}/GLCD.p1 GLCD.c - @-${MV} ${OBJECTDIR}/GLCD.d ${OBJECTDIR}/GLCD.p1.d - @${FIXDEPS} ${OBJECTDIR}/GLCD.p1.d $(SILENT) -rsi ${MP_CC_DIR}../ - -${OBJECTDIR}/bootloader.p1: bootloader.c nbproject/Makefile-${CND_CONF}.mk - @${MKDIR} "${OBJECTDIR}" - @${RM} ${OBJECTDIR}/bootloader.p1.d - @${RM} ${OBJECTDIR}/bootloader.p1 - ${MP_CC} $(MP_EXTRA_CC_PRE) -mcpu=$(MP_PROCESSOR_OPTION) -c -fno-short-double -fno-short-float -memi=wordwrite -mrom=0-FCFB -O3 -maddrqual=ignore -xassembler-with-cpp -mwarn=-3 -Wa,-a -DXPRJ_default=$(CND_CONF) -msummary=-psect,-class,+mem,-hex,-file -ginhx032 -Wl,--data-init -mno-keep-startup -mno-download -mdefault-config-bits -mc90lib $(COMPARISON_BUILD) -std=c90 -gdwarf-3 -mstack=compiled:auto:auto:auto -o ${OBJECTDIR}/bootloader.p1 bootloader.c - @-${MV} ${OBJECTDIR}/bootloader.d ${OBJECTDIR}/bootloader.p1.d - @${FIXDEPS} ${OBJECTDIR}/bootloader.p1.d $(SILENT) -rsi ${MP_CC_DIR}../ - -${OBJECTDIR}/utils.p1: utils.c nbproject/Makefile-${CND_CONF}.mk - @${MKDIR} "${OBJECTDIR}" - @${RM} ${OBJECTDIR}/utils.p1.d - @${RM} ${OBJECTDIR}/utils.p1 - ${MP_CC} $(MP_EXTRA_CC_PRE) -mcpu=$(MP_PROCESSOR_OPTION) -c -fno-short-double -fno-short-float -memi=wordwrite -mrom=0-FCFB -O3 -maddrqual=ignore -xassembler-with-cpp -mwarn=-3 -Wa,-a -DXPRJ_default=$(CND_CONF) -msummary=-psect,-class,+mem,-hex,-file -ginhx032 -Wl,--data-init -mno-keep-startup -mno-download -mdefault-config-bits -mc90lib $(COMPARISON_BUILD) -std=c90 -gdwarf-3 -mstack=compiled:auto:auto:auto -o ${OBJECTDIR}/utils.p1 utils.c - @-${MV} ${OBJECTDIR}/utils.d ${OBJECTDIR}/utils.p1.d - @${FIXDEPS} ${OBJECTDIR}/utils.p1.d $(SILENT) -rsi ${MP_CC_DIR}../ - -${OBJECTDIR}/modbus.p1: modbus.c nbproject/Makefile-${CND_CONF}.mk - @${MKDIR} "${OBJECTDIR}" - @${RM} ${OBJECTDIR}/modbus.p1.d - @${RM} ${OBJECTDIR}/modbus.p1 - ${MP_CC} $(MP_EXTRA_CC_PRE) -mcpu=$(MP_PROCESSOR_OPTION) -c -fno-short-double -fno-short-float -memi=wordwrite -mrom=0-FCFB -O3 -maddrqual=ignore -xassembler-with-cpp -mwarn=-3 -Wa,-a -DXPRJ_default=$(CND_CONF) -msummary=-psect,-class,+mem,-hex,-file -ginhx032 -Wl,--data-init -mno-keep-startup -mno-download -mdefault-config-bits -mc90lib $(COMPARISON_BUILD) -std=c90 -gdwarf-3 -mstack=compiled:auto:auto:auto -o ${OBJECTDIR}/modbus.p1 modbus.c - @-${MV} ${OBJECTDIR}/modbus.d ${OBJECTDIR}/modbus.p1.d - @${FIXDEPS} ${OBJECTDIR}/modbus.p1.d $(SILENT) -rsi ${MP_CC_DIR}../ - -${OBJECTDIR}/OneWire.p1: OneWire.c nbproject/Makefile-${CND_CONF}.mk - @${MKDIR} "${OBJECTDIR}" - @${RM} ${OBJECTDIR}/OneWire.p1.d - @${RM} ${OBJECTDIR}/OneWire.p1 - ${MP_CC} $(MP_EXTRA_CC_PRE) -mcpu=$(MP_PROCESSOR_OPTION) -c -fno-short-double -fno-short-float -memi=wordwrite -mrom=0-FCFB -O3 -maddrqual=ignore -xassembler-with-cpp -mwarn=-3 -Wa,-a -DXPRJ_default=$(CND_CONF) -msummary=-psect,-class,+mem,-hex,-file -ginhx032 -Wl,--data-init -mno-keep-startup -mno-download -mdefault-config-bits -mc90lib $(COMPARISON_BUILD) -std=c90 -gdwarf-3 -mstack=compiled:auto:auto:auto -o ${OBJECTDIR}/OneWire.p1 OneWire.c - @-${MV} ${OBJECTDIR}/OneWire.d ${OBJECTDIR}/OneWire.p1.d - @${FIXDEPS} ${OBJECTDIR}/OneWire.p1.d $(SILENT) -rsi ${MP_CC_DIR}../ - -endif - -# ------------------------------------------------------------------------------------ -# Rules for buildStep: assemble -ifeq ($(TYPE_IMAGE), DEBUG_RUN) -else -endif - -# ------------------------------------------------------------------------------------ -# Rules for buildStep: assembleWithPreprocess -ifeq ($(TYPE_IMAGE), DEBUG_RUN) -else -endif - -# ------------------------------------------------------------------------------------ -# Rules for buildStep: link -ifeq ($(TYPE_IMAGE), DEBUG_RUN) -dist/${CND_CONF}/${IMAGE_TYPE}/SmartEVSE2.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}: ${OBJECTFILES} nbproject/Makefile-${CND_CONF}.mk - @${MKDIR} dist/${CND_CONF}/${IMAGE_TYPE} - ${MP_CC} $(MP_EXTRA_LD_PRE) -mcpu=$(MP_PROCESSOR_OPTION) -Wl,-Map=dist/${CND_CONF}/${IMAGE_TYPE}/SmartEVSE2.X.${IMAGE_TYPE}.map -D__DEBUG=1 -DXPRJ_default=$(CND_CONF) -Wl,--defsym=__MPLAB_BUILD=1 -fno-short-double -fno-short-float -memi=wordwrite -mrom=0-FCFB -O3 -maddrqual=ignore -xassembler-with-cpp -mwarn=-3 -Wa,-a -msummary=-psect,-class,+mem,-hex,-file -ginhx032 -Wl,--data-init -mno-keep-startup -mno-download -mdefault-config-bits -mc90lib -std=c90 -gdwarf-3 -mstack=compiled:auto:auto:auto $(COMPARISON_BUILD) -Wl,--memorysummary,dist/${CND_CONF}/${IMAGE_TYPE}/memoryfile.xml -o dist/${CND_CONF}/${IMAGE_TYPE}/SmartEVSE2.X.${IMAGE_TYPE}.${DEBUGGABLE_SUFFIX} ${OBJECTFILES_QUOTED_IF_SPACED} - @${RM} dist/${CND_CONF}/${IMAGE_TYPE}/SmartEVSE2.X.${IMAGE_TYPE}.hex - -else -dist/${CND_CONF}/${IMAGE_TYPE}/SmartEVSE2.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}: ${OBJECTFILES} nbproject/Makefile-${CND_CONF}.mk - @${MKDIR} dist/${CND_CONF}/${IMAGE_TYPE} - ${MP_CC} $(MP_EXTRA_LD_PRE) -mcpu=$(MP_PROCESSOR_OPTION) -Wl,-Map=dist/${CND_CONF}/${IMAGE_TYPE}/SmartEVSE2.X.${IMAGE_TYPE}.map -DXPRJ_default=$(CND_CONF) -Wl,--defsym=__MPLAB_BUILD=1 -fno-short-double -fno-short-float -memi=wordwrite -mrom=0-FCFB -O3 -maddrqual=ignore -xassembler-with-cpp -mwarn=-3 -Wa,-a -msummary=-psect,-class,+mem,-hex,-file -ginhx032 -Wl,--data-init -mno-keep-startup -mno-download -mdefault-config-bits -mc90lib -std=c90 -gdwarf-3 -mstack=compiled:auto:auto:auto $(COMPARISON_BUILD) -Wl,--memorysummary,dist/${CND_CONF}/${IMAGE_TYPE}/memoryfile.xml -o dist/${CND_CONF}/${IMAGE_TYPE}/SmartEVSE2.X.${IMAGE_TYPE}.${DEBUGGABLE_SUFFIX} ${OBJECTFILES_QUOTED_IF_SPACED} - -endif - - -# Subprojects -.build-subprojects: - - -# Subprojects -.clean-subprojects: - -# Clean Targets -.clean-conf: ${CLEAN_SUBPROJECTS} - ${RM} -r build/default - ${RM} -r dist/default - -# Enable dependency checking -.dep.inc: .depcheck-impl - -DEPFILES=$(shell mplabwildcard ${POSSIBLE_DEPFILES}) -ifneq (${DEPFILES},) -include ${DEPFILES} -endif diff --git a/SmartEVSE2.X/nbproject/Makefile-genesis.properties b/SmartEVSE2.X/nbproject/Makefile-genesis.properties deleted file mode 100644 index 4a6da1c..0000000 --- a/SmartEVSE2.X/nbproject/Makefile-genesis.properties +++ /dev/null @@ -1,10 +0,0 @@ -# -#Sat Feb 06 17:29:24 CET 2021 -default.Pack.dfplocation=C\:\\Program Files (x86)\\Microchip\\MPLABX\\v5.25\\packs\\Microchip\\PIC18F-K_DFP\\1.1.58 -default.languagetoolchain.dir=C\:\\Program Files (x86)\\Microchip\\xc8\\v2.10\\bin -configurations-xml=920d08b32c8da0e9fa737ab2dc8d7d93 -com-microchip-mplab-nbide-embedded-makeproject-MakeProject.md5=6e453b0cf7f7da72a932cfdb2f655401 -default.languagetoolchain.version=2.10 -host.platform=windows -conf.ids=default -default.com-microchip-mplab-nbide-toolchainXC8-XC8LanguageToolchain.md5=23d12c447ed4f9462f01e2202bc2f36a diff --git a/SmartEVSE2.X/nbproject/Makefile-impl.mk b/SmartEVSE2.X/nbproject/Makefile-impl.mk deleted file mode 100644 index 1ba6d3e..0000000 --- a/SmartEVSE2.X/nbproject/Makefile-impl.mk +++ /dev/null @@ -1,69 +0,0 @@ -# -# Generated Makefile - do not edit! -# -# Edit the Makefile in the project folder instead (../Makefile). Each target -# has a pre- and a post- target defined where you can add customization code. -# -# This makefile implements macros and targets common to all configurations. -# -# NOCDDL - - -# Building and Cleaning subprojects are done by default, but can be controlled with the SUB -# macro. If SUB=no, subprojects will not be built or cleaned. The following macro -# statements set BUILD_SUB-CONF and CLEAN_SUB-CONF to .build-reqprojects-conf -# and .clean-reqprojects-conf unless SUB has the value 'no' -SUB_no=NO -SUBPROJECTS=${SUB_${SUB}} -BUILD_SUBPROJECTS_=.build-subprojects -BUILD_SUBPROJECTS_NO= -BUILD_SUBPROJECTS=${BUILD_SUBPROJECTS_${SUBPROJECTS}} -CLEAN_SUBPROJECTS_=.clean-subprojects -CLEAN_SUBPROJECTS_NO= -CLEAN_SUBPROJECTS=${CLEAN_SUBPROJECTS_${SUBPROJECTS}} - - -# Project Name -PROJECTNAME=SmartEVSE2.X - -# Active Configuration -DEFAULTCONF=default -CONF=${DEFAULTCONF} - -# All Configurations -ALLCONFS=default - - -# build -.build-impl: .build-pre - ${MAKE} -f nbproject/Makefile-${CONF}.mk SUBPROJECTS=${SUBPROJECTS} .build-conf - - -# clean -.clean-impl: .clean-pre - ${MAKE} -f nbproject/Makefile-${CONF}.mk SUBPROJECTS=${SUBPROJECTS} .clean-conf - -# clobber -.clobber-impl: .clobber-pre .depcheck-impl - ${MAKE} SUBPROJECTS=${SUBPROJECTS} CONF=default clean - - - -# all -.all-impl: .all-pre .depcheck-impl - ${MAKE} SUBPROJECTS=${SUBPROJECTS} CONF=default build - - - -# dependency checking support -.depcheck-impl: -# @echo "# This code depends on make tool being used" >.dep.inc -# @if [ -n "${MAKE_VERSION}" ]; then \ -# echo "DEPFILES=\$$(wildcard \$$(addsuffix .d, \$${OBJECTFILES}))" >>.dep.inc; \ -# echo "ifneq (\$${DEPFILES},)" >>.dep.inc; \ -# echo "include \$${DEPFILES}" >>.dep.inc; \ -# echo "endif" >>.dep.inc; \ -# else \ -# echo ".KEEP_STATE:" >>.dep.inc; \ -# echo ".KEEP_STATE_FILE:.make.state.\$${CONF}" >>.dep.inc; \ -# fi diff --git a/SmartEVSE2.X/nbproject/Makefile-local-default.mk b/SmartEVSE2.X/nbproject/Makefile-local-default.mk deleted file mode 100644 index 96fef95..0000000 --- a/SmartEVSE2.X/nbproject/Makefile-local-default.mk +++ /dev/null @@ -1,37 +0,0 @@ -# -# Generated Makefile - do not edit! -# -# -# This file contains information about the location of compilers and other tools. -# If you commmit this file into your revision control server, you will be able to -# to checkout the project and build it from the command line with make. However, -# if more than one person works on the same project, then this file might show -# conflicts since different users are bound to have compilers in different places. -# In that case you might choose to not commit this file and let MPLAB X recreate this file -# for each user. The disadvantage of not commiting this file is that you must run MPLAB X at -# least once so the file gets created and the project can be built. Finally, you can also -# avoid using this file at all if you are only building from the command line with make. -# You can invoke make with the values of the macros: -# $ makeMP_CC="/opt/microchip/mplabc30/v3.30c/bin/pic30-gcc" ... -# -SHELL=cmd.exe -PATH_TO_IDE_BIN=C:/Program Files (x86)/Microchip/MPLABX/v5.25/mplab_platform/platform/../mplab_ide/modules/../../bin/ -# Adding MPLAB X bin directory to path. -PATH:=C:/Program Files (x86)/Microchip/MPLABX/v5.25/mplab_platform/platform/../mplab_ide/modules/../../bin/:$(PATH) -# Path to java used to run MPLAB X when this makefile was created -MP_JAVA_PATH="C:\Program Files (x86)\Microchip\MPLABX\v5.25\sys\java\jre1.8.0_181/bin/" -OS_CURRENT="$(shell uname -s)" -MP_CC="C:\Program Files (x86)\Microchip\xc8\v2.10\bin\xc8-cc.exe" -# MP_CPPC is not defined -# MP_BC is not defined -MP_AS="C:\Program Files (x86)\Microchip\xc8\v2.10\bin\xc8-cc.exe" -MP_LD="C:\Program Files (x86)\Microchip\xc8\v2.10\bin\xc8-cc.exe" -MP_AR="C:\Program Files (x86)\Microchip\xc8\v2.10\bin\xc8-ar.exe" -DEP_GEN=${MP_JAVA_PATH}java -jar "C:/Program Files (x86)/Microchip/MPLABX/v5.25/mplab_platform/platform/../mplab_ide/modules/../../bin/extractobjectdependencies.jar" -MP_CC_DIR="C:\Program Files (x86)\Microchip\xc8\v2.10\bin" -# MP_CPPC_DIR is not defined -# MP_BC_DIR is not defined -MP_AS_DIR="C:\Program Files (x86)\Microchip\xc8\v2.10\bin" -MP_LD_DIR="C:\Program Files (x86)\Microchip\xc8\v2.10\bin" -MP_AR_DIR="C:\Program Files (x86)\Microchip\xc8\v2.10\bin" -# MP_BC_DIR is not defined diff --git a/SmartEVSE2.X/nbproject/Makefile-variables.mk b/SmartEVSE2.X/nbproject/Makefile-variables.mk deleted file mode 100644 index 31281dc..0000000 --- a/SmartEVSE2.X/nbproject/Makefile-variables.mk +++ /dev/null @@ -1,13 +0,0 @@ -# -# Generated - do not edit! -# -# NOCDDL -# -CND_BASEDIR=`pwd` -# default configuration -CND_ARTIFACT_DIR_default=dist/default/production -CND_ARTIFACT_NAME_default=SmartEVSE2.X.production.hex -CND_ARTIFACT_PATH_default=dist/default/production/SmartEVSE2.X.production.hex -CND_PACKAGE_DIR_default=${CND_DISTDIR}/default/package -CND_PACKAGE_NAME_default=smartevse2.x.tar -CND_PACKAGE_PATH_default=${CND_DISTDIR}/default/package/smartevse2.x.tar diff --git a/SmartEVSE2.X/nbproject/Package-default.bash b/SmartEVSE2.X/nbproject/Package-default.bash deleted file mode 100644 index ae78f03..0000000 --- a/SmartEVSE2.X/nbproject/Package-default.bash +++ /dev/null @@ -1,73 +0,0 @@ -#!/bin/bash -x - -# -# Generated - do not edit! -# - -# Macros -TOP=`pwd` -CND_CONF=default -CND_DISTDIR=dist -TMPDIR=build/${CND_CONF}/${IMAGE_TYPE}/tmp-packaging -TMPDIRNAME=tmp-packaging -OUTPUT_PATH=dist/${CND_CONF}/${IMAGE_TYPE}/SmartEVSE2.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX} -OUTPUT_BASENAME=SmartEVSE2.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX} -PACKAGE_TOP_DIR=smartevse2.x/ - -# Functions -function checkReturnCode -{ - rc=$? - if [ $rc != 0 ] - then - exit $rc - fi -} -function makeDirectory -# $1 directory path -# $2 permission (optional) -{ - mkdir -p "$1" - checkReturnCode - if [ "$2" != "" ] - then - chmod $2 "$1" - checkReturnCode - fi -} -function copyFileToTmpDir -# $1 from-file path -# $2 to-file path -# $3 permission -{ - cp "$1" "$2" - checkReturnCode - if [ "$3" != "" ] - then - chmod $3 "$2" - checkReturnCode - fi -} - -# Setup -cd "${TOP}" -mkdir -p ${CND_DISTDIR}/${CND_CONF}/package -rm -rf ${TMPDIR} -mkdir -p ${TMPDIR} - -# Copy files and create directories and links -cd "${TOP}" -makeDirectory ${TMPDIR}/smartevse2.x/bin -copyFileToTmpDir "${OUTPUT_PATH}" "${TMPDIR}/${PACKAGE_TOP_DIR}bin/${OUTPUT_BASENAME}" 0755 - - -# Generate tar file -cd "${TOP}" -rm -f ${CND_DISTDIR}/${CND_CONF}/package/smartevse2.x.tar -cd ${TMPDIR} -tar -vcf ../../../../${CND_DISTDIR}/${CND_CONF}/package/smartevse2.x.tar * -checkReturnCode - -# Cleanup -cd "${TOP}" -rm -rf ${TMPDIR} diff --git a/manual/SmartEVSEv2.2_install_v2.16.pdf b/manual/SmartEVSEv2.2_install_v2.16.pdf deleted file mode 100644 index ff11245..0000000 Binary files a/manual/SmartEVSEv2.2_install_v2.16.pdf and /dev/null differ diff --git a/manual/SmartEVSEv2.2_install_v2.20.pdf b/manual/SmartEVSEv2.2_install_v2.20.pdf new file mode 100644 index 0000000..1bcfa7e Binary files /dev/null and b/manual/SmartEVSEv2.2_install_v2.20.pdf differ diff --git a/manual/SmartEVSEv2_manual_1.07.pdf b/manual/SmartEVSEv2_manual_1.07.pdf deleted file mode 100644 index 57ebb45..0000000 Binary files a/manual/SmartEVSEv2_manual_1.07.pdf and /dev/null differ diff --git a/pictures/SmartEVSEv2.jpg b/pictures/SmartEVSEv2.jpg new file mode 100644 index 0000000..31330c6 Binary files /dev/null and b/pictures/SmartEVSEv2.jpg differ diff --git a/pictures/SmartEVSEv2_mode_smart.jpg b/pictures/SmartEVSEv2_mode_smart.jpg new file mode 100644 index 0000000..3710409 Binary files /dev/null and b/pictures/SmartEVSEv2_mode_smart.jpg differ diff --git a/pictures/sensorbox.jpg b/pictures/sensorbox.jpg new file mode 100644 index 0000000..ee471e3 Binary files /dev/null and b/pictures/sensorbox.jpg differ