Jekyll2023-05-27T11:04:24+02:00https://cedric-jung.eu/feed.xmlCédric JUNG{"en"=>"Cédric JUNG website.", "fr"=>"Site de Cédric JUNG."}Cédric JUNGManaging Solar Panel Power2022-11-27T23:45:40+01:002022-11-27T23:45:40+01:00https://cedric-jung.eu/solar-panel/2022/11/27/managing-solar-panel-power<h2 id="introduction">Introduction</h2>
<p>In this article, I will explain in layman’s terms how I ended up creating my own solar router, a system that consumes electricity based on the power produced by solar panels.</p>
<p>Following the start of the energy crisis in 2022, my father and I wondered if solar panel technology was mature enough and if we could install our own solar panels without having to go through an installer. That’s what we did, and it allowed us to save 10,000€. The only problem with this compared to a professional installation was that we didn’t have the required certifications to sell our excess production. We therefore have to use our production to the maximum in order to have a faster return on investment.</p>
<h2 id="display-system">Display system</h2>
<p>At first, I designed a display system for the total power consumed, consumed on the network, and produced.</p>
<p>This way, we could know if it was the right time of day to turn on the washing machine (the idea being to always consume as much as possible of what is produced by the solar panels).</p>
<p><img src="/assets/images/solar-panel-power/graph_example.png" alt="Graph example" /></p>
<p>In the graph below we can see a typical production of a cloudy autumn day, with the oven being turned on at 11am to cook Sunday’s chicken.</p>
<p>I also created a simplified version to quickly access the instantaneous production.</p>
<p><img src="/assets/images/solar-panel-power/home.png" alt="Home screen capture" /></p>
<p>All of this is based on using a <a href="https://www.shelly.cloud/products/shelly-em-smart-home-automation-device/">ShellyEM</a> module, a kind of combined ammeter and voltmeter, which allows me to obtain the powers that I work with.</p>
<p>Technically, the server that creates this graphical interface is composed of a <a href="https://nodejs.org/fr/">Node.js</a> kernel that stores its information, especially in an <a href="https://www.influxdata.com/">InfluxDB</a> database. The source code of the server can be found on <a href="https://github.com/cedced19/solar-panel-watch">Github</a>.</p>
<h2 id="energy-storage-system-for-excess-energy-produced">Energy storage system for excess energy produced</h2>
<p>Later, we realized that this approach of only looking at the display was not sufficient to match the production curve: as a result, we were giving energy away to the grid for free. This is a major disadvantage in terms of the return on investment of our installation. But it goes beyond that, because in the long run, if systems like this are not put in place, there could be congestion on the network. It is important to know that historically, the network was designed in one direction: from the power plant to the consumer. However, today, if everyone installs their own solar installation, it is possible that on some summer days, there may be too much current at the local level that could not be distributed to other consumption nodes such as industries, for example.</p>
<p>Even though research is being done in this field in France and Europe, there seems to be very little political will to think long-term and plan solar panel installations, which are being installed freely and therefore haphazardly. The idea of a “smart grid” therefore seems very far off in France.</p>
<p>This is how, to return to our subject, the idea of intelligently consuming excess energy produced came about.</p>
<p>There are three ways to consume a lot of electricity at the scale of a house:</p>
<ul>
<li>turn on appliances that consume a lot of energy such as ovens, washing machines…</li>
<li>store energy in the form of a battery to use later</li>
<li>store energy in the form of hot water:</li>
<li>everyone has a water heater and it must be turned on once a day to have hot water at the desired time</li>
<li>others, like us, also have a heat pump with a hot water tank for underfloor heating</li>
</ul>
<p>The first choice is much too complex to set up and assumes that the system knows that we need to turn on a washing machine. The second requires the purchase of a new, expensive system that requires some maintenance (replacing batteries) and precautions, especially regarding fire risks.</p>
<p>We therefore decided to focus on the third option: heating water.</p>
<p>So on my visualization system, I had to set up a system to activate the electric resistance of our heat pump water tanks.
I therefore have two devices containing different resistances:</p>
<ul>
<li>R1 consuming 500W (underfloor heating)</li>
<li>R2 consuming 1800W (hot water)</li>
</ul>
<p>With these two values, we can have a very simple approach to the excess power P:</p>
<ul>
<li>activate resistance R1 with a relay when 500W < P < 1800W</li>
<li>activate resistance R2 with a relay when 1800W < P < 2300W</li>
<li>activate resistance R1 and R2 with a relay when P > 2300W</li>
</ul>
<p>This is the first solution I implemented having already all the components:</p>
<ul>
<li>NodeMCU</li>
<li>Relay</li>
<li>5V power supply</li>
</ul>
<p><img src="/assets/images/solar-panel-power/basic.png" alt="Basic system" /></p>
<p>Here are two examples of days with a basic activation of the R1 resistor:
<img src="/assets/images/solar-panel-power/activation_example.png" alt="Example 1" />
<img src="/assets/images/solar-panel-power/activation_example_2.png" alt="Example 2" /></p>
<h2 id="towards-a-finer-power-control-system">Towards a finer power control system</h2>
<p>This system of basic rules has the advantage of being simple to set up. However it has many disadvantages:</p>
<ul>
<li>for P<500W we lose all the excess power produced, which is a pity since the majority of our excess power in winter is less than 500W.</li>
<li>the system, once programmed, is rather frozen</li>
<li>in summer we don’t heat the house and therefore we don’t turn on the R1 resistor</li>
</ul>
<p>So the idea came to use a system using a triac electrical module to vary the power consumption.
I was inspired by the solution of <a href="https://ptiwatt.kyna.eu/post/2018/07/23/Fabriquer-un-power-router">Philippe de Craene</a> which uses the <a href="https://fr.aliexpress.com/item/1005001965951718.html?spm=a2g0o.store_pc_groupList.8148356.23.5135230frdD40y">Dimmer module for 16/24A 600V High Load, 1 Channel, 3.3V/5V logic</a>. I used the same composting unit as shown on the following diagram.</p>
<p><img src="/assets/images/solar-panel-power/advanced.png" alt="Advanced system" /></p>
<p>Example of variation of the power supplied to a lamp:</p>
<iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/yIDccZcvLCg" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen=""></iframe>
<p>Unfortunately, we cannot control the power of our heat pumps and other water heaters in this way, since they are not resistive devices. We are therefore content to use electrical resistances with a lower efficiency. However, it should be remembered that our goal is to consume the excess electrical energy, from an economic point of view for us, we have no economic problem to do this.</p>
<p>The details of this system for adjusting the power of a device are available on <a href="https://github.com/cedced19/solar-panel-watch">Github</a>. For a more physical point of view of the thing I wrote a <a href="/assets/pdf/solar-panel-power/triac_usage.pdf">note</a> along with a <a href="/assets/pdf/solar-panel-power/alpha_calc.pdf">spreadsheet</a>.</p>
<h2 id="summary">Summary</h2>
<p>Finally, the power distribution system can be summarized with this diagram:
<img src="/assets/images/solar-panel-power/diagramme_solar_panel_en.png" alt="Distribution of additional power" /></p>
<p>Simplified overall vision:
<img src="/assets/images/solar-panel-power/global.png" alt="Simplified overall vision" /></p>
<h2 id="added-on-0106">Added on 01/06</h2>
<p>After some adjustments, I was finally able to implement my vision of a system activating multiple resistors during the Christmas holidays.</p>
<p><img src="/assets/images/solar-panel-power/activation_advanced_example.png" alt="Advanced control example" /></p>
<p>From 10:45 to 11:45 and from 12:15 to 13:00, we see that the total consumption takes on the production dynamics of the solar panels using the activation of the R1 and R2 resistors.</p>
<p>There are several peaks in re-injection, which are the result of a delay since the decisions have a delay of 4 seconds. This value of a few seconds is linked to my desire to create a distributed system (I do not want there to be too many requests). There are two solutions to this: to decrease this value by setting it to 2 seconds, for example, or to develop a more complex control system (using a PID system or other resulting from more fine modeling).</p>
<h2 id="recommandation">Recommandation</h2>
<p>I recommend this video by <a href="https://f1atb.fr/index.php/f1atb-ham-radio/">André BUHART</a>, who explains in more detail how such a system can work. It just so happens that he shared his project at the same time as me.</p>
<iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/87h3AHCK4a8" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen=""></iframe>Cédric JUNGIntroductionMy year in review 20202020-12-31T07:45:40+01:002020-12-31T07:45:40+01:00https://cedric-jung.eu/review/2020/12/31/review-2020<p>The first months of the year were quite peaceful. In fact, I prepared the competitive exams for the Grandes Ecoles d’Ingénieurs which finally took place because of the epidemic at the end of June.
I remember making a lot of progress in Maths and Physics in March-April at my home in Phalsbourg.</p>
<p>I will almost forget that I took part in the municipal election of my town Phalsbourg. Even if my list came second out of five, I still have good memories of it. This experience gave me a better understanding of how politics works. I’ve been using it ever since.</p>
<p>From May to August, as usual, I went back to the paths, by bike alone or accompanied, as well as on foot with beautiful anecdotes, discoveries and encounters.</p>
<p>I must also not forget the success of our application to deconfinement because of some articles in the DNA (<em>Dernières Nouvelles d’Alsace</em>) and the desire of nature because of the confinement.</p>
<p>The most exotic this year was the discovery of Luxembourg or a 3 hours horse ride at the end of August.</p>
<p>In July, I did two interviews during which I met Jacky from the “Club Vosgiens de Dabo”: <a href="https://www.youtube.com/watch?v=aJLlbs4fux0">France 3</a>, <a href="https://www.youtube.com/watch?v=aPa-TcsNXr0">Mirabelle TV</a><br />
I also gave a hand to the “Club Vosgiens de Dabo” in August.</p>
<p>On August 15th, I got the results of my exams, I was admitted to the Ecole Centrale de Lille. On this occasion, I want to thank those who supported me during these two years of preparation which presented a lot of work and investment.</p>
<p>On August 7th, I guided a hike with young children aged 10-12 years with animators from the “Réseau Animation Jeunesse du Pays de Saverne”. It was really nice and gives hope.</p>
<p>In September, I joined the Ecole Centrale de Lille. I saw beautiful things there, I met beautiful people during the two months I was there before being isolated again to my home in Phalsbourg. Among them are my godmother (in engineering schools an inter-promotion mentoring system is often set up by the students) and her friends.</p>
<p>In October, after a visit at <a href="https://www.estfm.fr/podcasts/l-association-decouverto-sur-est-fm-1189">Est FM</a> with Découverto, I met Théo from Pfalzweyer who showed us the old firing range, which is very little known.</p>
<p>In November, I developed the <a href="https://apps.apple.com/app/id1538334399">Découverto iOS application</a> in a week. An Apple bug simply prevented me from releasing it quickly.</p>
<p>The last days of the year were again rich in encounters, new adventures are offered to me.</p>
<p>I wish you a happy new year 2021. I hope that I am not prevented from working again.</p>
<p><img src="/assets/images/2020.jpg" alt="Geisfels" /></p>Cédric JUNGThe first months of the year were quite peaceful. In fact, I prepared the competitive exams for the Grandes Ecoles d’Ingénieurs which finally took place because of the epidemic at the end of June. I remember making a lot of progress in Maths and Physics in March-April at my home in Phalsbourg.New To ESP82662019-07-31T12:45:40+02:002019-07-31T12:45:40+02:00https://cedric-jung.eu/arduino/nodemcu/esp8266/2019/07/31/new-to-esp8266<p><em>This article is an extract of my conversations with a physicist friend who is a novice with the ESP8266 cards. Some parts are therefore not fully detailed in view of our common knowledge, and his ability to find information. I had just told him about the ESP8266 he didn’t know.</em></p>
<p>The ESP8266 is an arduino chip that offers wifi (when there is a problem, it is easier to just search for “esp8266” on google, instead of your chip name: you get more results).</p>
<p>This chip integrates on different cards to make it more convenient to connect.</p>
<p>The simplest and most convenient are the nodemcu cards <a href="https://amzn.to/2MmnVJW">https://amzn.to/2MmnVJW</a> (on AliExpress it’s cheaper).</p>
<p><img src="/assets/images/nodemcu.jpg" alt="Nodecmu" /></p>
<p>It is necessary to be careful: when programming on Arduino pin 1 corresponds to GPIO1 while here the numbers change: when a cable is connected to D1 then in the code it is necessary to program 5 (see diagram above).</p>
<p>It is also necessary to be careful to supply it with 3.3V or USB power. What I use for that: <a href="https://amzn.to/2K0Pqar">https://amzn.to/2K0Pqar</a> (on AliExpress it’s cheaper).</p>
<p>It is necessary to install a plugin (done in 5 min) on the Arduino editor to compile to the nodemcu or other object.</p>
<p>Useful links:</p>
<ul>
<li><a href="https://randomnerdtutorials.com/esp8266-web-server/">https://randomnerdtutorials.com/esp8266-web-server/</a></li>
<li><a href="https://www.teachmemicro.com/simple-nodemcu-web-server/">https://www.teachmemicro.com/simple-nodemcu-web-server/</a></li>
</ul>
<p>You can see my evolution (first I started using the ESP-01 and then the nodemcu) <a href="https://github.com/cedced19/garage-doors-opener">here</a>
I’ve had conversations with people I’ve copied at this link, maybe it can help. There are also my schematics.
This is the system to open the garage door. It may be interesting to start by seeing what I did in this project, for the nodemcu look at this file: <a href="https://github.com/cedced19/garage-doors-opener/blob/master/nodemcu/nodemcu.ino">nodemcu.ino</a>.
You will need to be familiar with the notion of server/client if you want to communicate from a web browser with your nodemcu.</p>
<p>I respond in JSON format because it is for a software that I created myself after: but we can directly create a web page on the ESP8266 as explained <a href="https://randomnerdtutorials.com/esp8266-web-server-with-arduino-ide/">here</a>.</p>
<p><em>We can find other tutorials, there I naively searched, I don’t know your level, things can be omitted in these tutorials, I won’t see it because I know by heart how these machines work.</em></p>
<p>I have a big project, “Sensorio”, using ESP8266 available here: <a href="https://github.com/cedced19?utf8=%E2%9C%93&tab=repositories&q=sensorio&type=&language=">Sensorio</a>
I recommend <a href="https://www.youtube.com/watch?v=qVMauy5hPhI">this video</a> which shows the power of this system, I can <em>in fine</em> display values of my sensors on a device in the living room, without even knowing themselves.
I have done very little documentation on it, it is a very big project but it allows me to save time in the end and to have access through the same site to the quantity of water available for my toilets, or to the outside temperature, or even soon to the electricity consumption of my heat pump, and this anywhere in the world.
It is a server hosted on a Raspberry that will receive and process all the data from the different ESP8266 sensors I have. Each sensor is accompanied by a diagram and the code to make it.</p>
<p>My creations are often explained in video <a href="https://www.youtube.com/channel/UCJHhpW6Za9xWlHZO0i8layw/videos">here</a>.</p>
<p>If you have a lot of time and are experienced enough:
I recommend the ESP8266-01 if you only have one pin to use it is smaller than one inch (however, no USB plug available, you must use an arduino to program it with the RX TX plugs)<br />
Useful links ESP8266-01:</p>
<ul>
<li><a href="https://hackaday.com/2014/12/08/compiling-your-own-programs-for-the-esp8266/">https://hackaday.com/2014/12/08/compiling-your-own-programs-for-the-esp8266/</a></li>
<li><a href="https://www.instructables.com/id/Definitive-Guide-to-Setting-Up-Your-New-ESP01-Modu/">https://www.instructables.com/id/Definitive-Guide-to-Setting-Up-Your-New-ESP01-Modu/</a></li>
</ul>Cédric JUNGThis article is an extract of my conversations with a physicist friend who is a novice with the ESP8266 cards. Some parts are therefore not fully detailed in view of our common knowledge, and his ability to find information. I had just told him about the ESP8266 he didn’t know.My first talk2018-07-03T23:55:40+02:002018-07-03T23:55:40+02:00https://cedric-jung.eu/talk/js/react/native/2018/07/03/my-first-talk<p>Today, I did my first talk to an audience other than a classroom during a presentation. It was not easy, not because I was stressed, but because I did it in English, which is not my native language. Moreover the KarlsruheJS conference takes place as its name suggests in Karlsruhe, Germany, so I mixed some English and German words. I even said “two thousand and <em>elf</em>”.</p>
<p>I recommand you to go to the KarlsruheJS conferences. These people are adorable.</p>
<p>This talk was about <em>react-native</em>, and the slide are <a href="https://cedced19.github.io/talk-react-native">there</a>.</p>
<iframe width="560" height="315" src="https://www.youtube.com/embed/G3paBMXgkUo" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen=""></iframe>Cédric JUNGToday, I did my first talk to an audience other than a classroom during a presentation. It was not easy, not because I was stressed, but because I did it in English, which is not my native language. Moreover the KarlsruheJS conference takes place as its name suggests in Karlsruhe, Germany, so I mixed some English and German words. I even said “two thousand and elf”.Bestiaire Héraldique2018-04-29T10:06:40+02:002018-04-29T10:06:40+02:00https://cedric-jung.eu/decouverto/bestiaire/culture/2018/04/29/bestiaire-heraldique<p>For two months I have been working with the Découverto organization to create an audioguide system and since yesterday the application <a href="https://play.google.com/store/apps/details?id=com.bestiaireheraldique">Bestiaire Héraldique</a> is finally available on Google Play.</p>
<p>After reading a newspaper article about me, Découverto contacted me and we met in a bar and I started to develop the application while they were providing me the data I needed: GPS plot, audio explanations and other illustrations.</p>
<p>We are already developing the next application together.</p>Cédric JUNGFor two months I have been working with the Découverto organization to create an audioguide system and since yesterday the application Bestiaire Héraldique is finally available on Google Play.How does “Découvrir Phalsbourg” work ?2017-11-26T11:00:00+01:002017-11-26T11:00:00+01:00https://cedric-jung.eu/phalsbourg/code/2017/11/26/decouvrir-phalsbourg<p>In June, I created the application <a href="https://cedced19.github.io/decouvrir-phalsbourg/">Découvrir Phalsbourg</a>, it allows as its name indicates to discover the History of the city of Phalsbourg simply thanks to your mobile phone. This involves having information and photographs so that the visitor can see the beauty of the city and its past and present importance.</p>
<p>That’s why, I programmed the application to read a specific file. This file, of which we can see an extract below, contains the information as well as the names of the photographs. Thus, I only need to modify this file to add a place or a photograph.</p>
<p>It also specifies the GPS coordinates in <code class="language-plaintext highlighter-rouge">x</code> and <code class="language-plaintext highlighter-rouge">y</code>.</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>[
...,
{
"name":"Porte d’Allemagne",
"text": "Elle date de 1680, elle permet l’accès de la forteresse de Phalsbourg par l’Est. Sur le fronton, on distingue l’écu du roi Louis XIV avec une fleur de lis. Une plaque en marbre blanc témoigne du passage de Goethe à Phalsbourg le 23 juin 1770. On peut encore distinguer une partie du fossé qui à l’époque était large de 33m et profond de 10.",
"x":7.260498,
"y":48.766534,
"image": {
"uri":"porte_de_allemagne",
"height":341.5,
"width":512
},
"more": [
{
"text": "La plaque indique « En souvenir de la visite de Goethe à Phalsbourg 25 Juin 1770 »",
"image": {
"uri":"goethe",
"height":250,
"width":375
}
}
]
},
...
]
</code></pre></div></div>
<p>I proceeded in the same way for the sources.</p>
<p>In October, I added a button “Learn more”: when you press this button, it displays what is contained in the <code class="language-plaintext highlighter-rouge">more</code>.
This allows to have several photographs for the same place.</p>
<p>Now, I continue to add information, Phalsbourg is full of surprises.</p>Cédric JUNGIn June, I created the application Découvrir Phalsbourg, it allows as its name indicates to discover the History of the city of Phalsbourg simply thanks to your mobile phone. This involves having information and photographs so that the visitor can see the beauty of the city and its past and present importance.The decline of Vosges conifers2017-07-13T08:00:00+02:002017-07-13T08:00:00+02:00https://cedric-jung.eu/vosges/2017/07/13/vosges-conifers<p>During the last year of secondary school in France, students must complete a <strong>T</strong>ravail <strong>P</strong>ersonnel <strong>E</strong>ncadré (TPE) in groups of 2 to 4 people. You have to choose a topic and find a problematic.</p>
<p>With two friends, I had to work on the following problematic that you can find in French above on the cover page of our file: <em>“Is the decline of the Vosges conifers still mainly linked to acid rain?”</em></p>
<p><img src="/assets/images/vosges-conifers-01.jpg" alt="Cover page" width="60%" /></p>
<p>We were rewarded with a score of 18/20 for this baccalaureate exam. <br />
<a href="/assets/pdf/vosges-conifers-doc.pdf">Download file</a></p>Cédric JUNGDuring the last year of secondary school in France, students must complete a Travail Personnel Encadré (TPE) in groups of 2 to 4 people. You have to choose a topic and find a problematic.New website!2017-07-12T09:09:40+02:002017-07-12T09:09:40+02:00https://cedric-jung.eu/jekyll/update/2017/07/12/new-website<p>Today, I’ve decided to create a new personal website starting from zero.</p>
<p>Actually, the old one became quite useless and wasn’t translated.
Now I’m able to blog, share other passions meanwhile I present myself throught this website.</p>Cédric JUNGToday, I’ve decided to create a new personal website starting from zero.