EJP switching controller (version 1.7)

DSC 7149 2

DSC 7148 2


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
* in return, the price per kWh is higher for 22 days per year, spread between November 1 and March 31
* specifications for EJP coding pdf3

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
- Slaving
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:
- Power
- Clock
- µ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 'Clock'
→ LED 'Activity µC'

* Port E for outputs

→ 'Clock'
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

The different files of this project can be downloaded here ( identify yourself before )

* Software developed with the EasyPIC7 and mikroC
development board from mikroElektronika linksee the article I wrote about this fabulous development board for PIC

The archive includes all the source files developed under mikroC .
The system runs smoothly below the 2K mark in the demo version.
Used RAM (bytes): 29 (8%) Free RAM (bytes): 323 (92%)
Used ROM (program words): 849 (10%) Free ROM (program words): 7343 (90%)

* 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 :

schematic diagram

PCB of the control board :

PCB Control

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 :

schematic diagram

Power board PCB :

PCB Power

The board is a double-sided printed circuit with a few vias.

For the boxing , we can turn to a TEKO P4 for example, which allows the integration of 100x160mm plate ...

Bibliography :

link Elektor July / August 2000 article: Mains power

Add comment
  • No comments found

Quelques liens vers les sites de mes amis...

Licence Creative Commons

L'ensemble de ce site hormis une notification spécifique est mis
à  disposition selon les termes de la Licence Creative Commons
Attribution - Pas d'Utilisation Commerciale - Partage dans les Mêmes Conditions
3.0 France.
Licence Creative Commons

Les Fabricants de Circuits Imprimés que j'utilise

Mes fournisseurs favoris

Vérifiez la disponibilité de votre nom de domaine :