Aim of the assembly : do not allow the starting of washing machines and dishwashers when one is in period 'EJP'
( 22 days per year, spread from the beginning of November to the end of March )
Nothing prevents to extend this to heaters, or other kitchen oven ...
|The EJP tariff : prices throughout the year
* the EJP (Peak Days Erase) tariff allows you to benefit for 343 days per year from a tariff close to that of Off-peak Hours of the Peak Hours / Off-Hours tariff
EDF note : This tariff is no longer available for subscription.
What the software does :
1) Detection of the 'EJP'
info This info supplied by EDF is subdivided into two inputs:
- Advance notice
This allows switching the system to 'EJP' mode as well as counting the number of elapsed EJP days.
2) Detection of the clock output, which allows the programmed starting of the machines
( output inhibited by the 'EJP' info )
3) Automatic decrementation of the counter on the rising edge of the 'EJP' input
( the counter therefore indicates in this case the number of days remaining ... )
4) Three pushbuttons allow:
- to reposition the counter to 22 days
- to manually decrease the counter
- force the 'Clock' output even in the event of an EJP peak day
5) Display of the different states on LEDs:
- µC activity
6) Display of the number of EJP days remaining on 7-segment displays
7 ) Memorization of the number of days at each EJP passage, reading of the number in memory after each power cut
8) During EJP mode, the current number of days is stored so that it can then be read again after a power cut ( different from the paragraph 7 because the countdown is by switching to the high status of input 'enslavement' ' and then décrémenterait the counter when returning the sector ... )
9) Clearing of the forcing of the 'Clock' output when returning to the "Off-peak hours" tariff
The assembly is subdivided into two plates :
- Control and display board ( management is carried out using a PIC16F877A )
Ports used: A, C, D and E
* Port A for multiplexing the 7-segment displays and the 3 push buttons
|→ multiplexing of the 3 7-segment displays
→ 'Force Clock'
pushbutton → 'Decrease counter'
pushbutton → 'Reset counter' pushbutton
* Port D for data from 7-segment displays
|RD0..RD7||→ 8-bit data|
* Port C for inputs, I2C protocol ( 24C08 series EEPROM memory ) as well as for LEDs
|→ input 'Clock'
→ input 'Advance'
→ input 'Servo-control'
→ LED 'EJP'
→ LED 'Clock'
→ LED 'Activity µC'
* Port E for outputs
output → 'Advance notice'
output → 'Slaving' output
LED display to indicate:
* the state of the 'Clock' and 'EJP' outputs
* the activity of the PIC16F877A microcontroller( approximately every 4 seconds ... ) by a brief flash of the LED
7-segment displays for counting and viewing the remaining 'EJP' days
This board also delivers the power supplies ( + 12V and + 5V )
- Power board ( allows total galvanic isolation of the assembly from the 220V mains )
Detection of 'Clock', 'Pre-warning' and 'Slave' inputs Control
of switching relays of devices to be slaved
* Software developed with the EasyPIC7 and mikroC
* Synoptic diagram of the PLC
* List of components of this board
[ Edit of October 30, 2015: ]
I have since worked on the subject again, and have developed a new fully functional control board, this time using a Ready for PIC boardanimated by a PIC18F4520.
It is not only equipped with 3 7-segment displays, but also has a 2x16 character LCD display. The RTC clock is integrated into it and it also has an EEPROM type 24C08.
I still have to design and design the power card which will integrate, in addition to the commands of the auxiliary relays, the interfaces isolated thanks to opto-couplers.
The power supply will call on a specific compact module, the model ECE05US12 from XPPOWEROWER.
This "switching" design block delivers a DC12V / 5W voltage directly from the 230V AC mains, with an excellent efficiency of 82%.
→ Read my second article about it
Schematic diagram of the control board :
PCB of the control board :
The board is a double-sided printed circuit with 3 straps and many vias.
Regarding the power board, the detection mode of the 3 signal sources that are 'Clock', 'Advance notice' and 'Slaving' is a first solution, there are many others. Indeed, when subscribing to the EJP tariff, EDF installed its 2 switching relays on the electrical panel, while leaving the contact outputs free (NO).
So everyone is free, depending on how he uses these outputs, to design or modify the interface with the control board. The diagram that I propose to you below is a solution in order to fully understand the operating principle of my PLC.
For the power supply and in order to save energy, I used a switching unit ( TRACO TMLM 04225 ) ready to solder on the printed circuit. It delivers the two voltages + 12V and + 5V ( for an overall power of 3.6 watt ) necessary for the proper functioning of the assembly.
You will undoubtedly have noticed that I have also drawn a power supply part (+ 5V) on the control board, it will not be useful in this case, since it is supplied by the power board via the junction connectors.
Schematic diagram of the power board :
Power board PCB :
The board is a double-sided printed circuit with a few vias.