A method of transmitting energy and a data signal via a transformer, the method comprising: modulating an input voltage (v p) of the transformer, such that a binary primary side signal (s 1,p) is encoded into rising edges and falling edges of the input voltage (v p); transforming the input voltage (v p) into an output voltage (v s) by the transformer; detecting the rising edges and the falling edges in the output voltage (v s) for generating a secondary side signal (si,s); wherein the input voltage (v p) is modulated, such that it is a signal sequence, which is composed of a positive voltage level (p), a neutral voltage level and a negative voltage level (n); wherein a first value of the primary side signal (s 1,p) is encoded with a rising edge from the negative voltage level (n) to the positive voltage level (p) and a second value of the primary side signal (s 1,p) is encoded with a falling edge from the positive voltage level (p) to the negative voltage level (n); wherein, when the primary side signal (s 1,p) stays on the first value, rising edges from the negative voltage level (n) to the positive voltage level (p) are separated by a neutral signal sequence, and when the primary side signal stays on the second value, falling edges from the positive voltage level (p) to the negative voltage level (n) are separated by a neutral signal sequence; wherein a rising edge from the negative voltage level (n) to the positive voltage level (p) together with a following neutral signal sequence is regularly repeated when the primary side signal (s 1,p) stays on the first value, and a falling edge from the positive voltage level (p) to the negative voltage level (n) together with a following neutral signal sequence is regularly repeated when the primary side signal (s 1,p) stays on the second value; wherein a neutral signal sequence comprises at least one transition between the negative voltage level (n) and the neutral voltage level and at least one separate transition between the neutral voltage level and the positive voltage level (p); wherein the number of positive voltage levels (p) and negative voltage levels (n) between two consecutive rising edges from the negative voltage level (n) to the positive voltage level (p) is even and the number of positive voltage levels (p) and negative voltage levels (n) between two consecutive falling edges from the positive voltage level (p) to the negative voltage level (n) is even. modulating an input voltage (v p) of the transformer, such that a binary primary side signal (s 1,p) is encoded into rising edges and falling edges of the input voltage (v p); transforming the input voltage (v p) into an output voltage (v s) by the transformer; detecting the rising edges and the falling edges in the output voltage (v s) for generating a secondary side signal (si,s); wherein the input voltage (v p) is modulated, such that it is a signal sequence, which is composed of a positive voltage level (p), a neutral voltage level and a negative voltage level (n); wherein a first value of the primary side signal (s 1,p) is encoded with a rising edge from the negative voltage level (n) to the positive voltage level (p) and a second value of the primary side signal (s 1,p) is encoded with a falling edge from the positive voltage level (p) to the negative voltage level (n); wherein, when the primary side signal (s 1,p) stays on the first value, rising edges from the negative voltage level (n) to the positive voltage level (p) are separated by a neutral signal sequence, and when the primary side signal stays on the second value, falling edges from the positive voltage level (p) to the negative voltage level (n) are separated by a neutral signal sequence; wherein a rising edge from the negative voltage level (n) to the positive voltage level (p) together with a following neutral signal sequence is regularly repeated when the primary side signal (s 1,p) stays on the first value, and a falling edge from the positive voltage level (p) to the negative voltage level (n) together with a following neutral signal sequence is regularly repeated when the primary side signal (s 1,p) stays on the second value; wherein a neutral signal sequence comprises at least one transition between the negative voltage level (n) and the neutral voltage level and at least one separate transition between the neutral voltage level and the positive voltage level (p); wherein the number of positive voltage levels (p) and negative voltage levels (n) between two consecutive rising edges from the negative voltage level (n) to the positive voltage level (p) is even and the number of positive voltage levels (p) and negative voltage levels (n) between two consecutive falling edges from the positive voltage level (p) to the negative voltage level (n) is even.