{"id":489,"date":"2021-10-27T16:00:00","date_gmt":"2021-10-27T16:00:00","guid":{"rendered":"https:\/\/www.dabbler.dk\/?p=489"},"modified":"2022-12-13T17:00:18","modified_gmt":"2022-12-13T17:00:18","slug":"echelon-nes-smart-meters-dabbling-the-hardware-v1-00","status":"publish","type":"post","link":"https:\/\/www.dabbler.dk\/index.php\/2021\/10\/27\/echelon-nes-smart-meters-dabbling-the-hardware-v1-00\/","title":{"rendered":"Echelon\/NES Smart Meters \u2013 dabbling the hardware v1.00"},"content":{"rendered":"\n<p>Unfortunately we are still awaiting the release of the MEP protocol from <a rel=\"noreferrer noopener\" href=\"https:\/\/www.networkedenergy.com\/en\" target=\"_blank\">NES (Networked Energy Services)<\/a> as mentioned in previous blog entries. This will release us from the Non-Disclosure Agreement (NDA) keeping all this a secret to you.<\/p>\n\n\n\n<p>&#8230;but while we wait, we could introduce you to our hardware prototype.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"423\" src=\"https:\/\/www.dabbler.dk\/wp-content\/uploads\/2021\/10\/Prototype_MEP_Front-1024x423.jpg\" alt=\"\" class=\"wp-image-493\" srcset=\"https:\/\/www.dabbler.dk\/wp-content\/uploads\/2021\/10\/Prototype_MEP_Front-1024x423.jpg 1024w, https:\/\/www.dabbler.dk\/wp-content\/uploads\/2021\/10\/Prototype_MEP_Front-300x124.jpg 300w, https:\/\/www.dabbler.dk\/wp-content\/uploads\/2021\/10\/Prototype_MEP_Front-768x317.jpg 768w, https:\/\/www.dabbler.dk\/wp-content\/uploads\/2021\/10\/Prototype_MEP_Front-1536x634.jpg 1536w, https:\/\/www.dabbler.dk\/wp-content\/uploads\/2021\/10\/Prototype_MEP_Front.jpg 1959w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><figcaption class=\"wp-element-caption\">MEP ESP32 version 1.00 &#8211; front<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"382\" src=\"https:\/\/www.dabbler.dk\/wp-content\/uploads\/2021\/10\/Prototype_MEP_Back-1024x382.jpg\" alt=\"\" class=\"wp-image-494\" srcset=\"https:\/\/www.dabbler.dk\/wp-content\/uploads\/2021\/10\/Prototype_MEP_Back-1024x382.jpg 1024w, https:\/\/www.dabbler.dk\/wp-content\/uploads\/2021\/10\/Prototype_MEP_Back-300x112.jpg 300w, https:\/\/www.dabbler.dk\/wp-content\/uploads\/2021\/10\/Prototype_MEP_Back-768x287.jpg 768w, https:\/\/www.dabbler.dk\/wp-content\/uploads\/2021\/10\/Prototype_MEP_Back-1536x573.jpg 1536w, https:\/\/www.dabbler.dk\/wp-content\/uploads\/2021\/10\/Prototype_MEP_Back.jpg 1835w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><figcaption class=\"wp-element-caption\">MEP ESP32 version 1.00 &#8211; back<\/figcaption><\/figure>\n\n\n\n<p>In our first few attempts we got the connector totally wrong.<\/p>\n\n\n\n<p>Apparently the footprint we used while doing our PCB design numbered the pins 2 columns in 3 rows, while NES numbered them with 3 columns in 2 rows:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"198\" height=\"132\" src=\"https:\/\/www.dabbler.dk\/wp-content\/uploads\/2021\/10\/image-3.png\" alt=\"\" class=\"wp-image-495\"\/><figcaption class=\"wp-element-caption\">Our pin numbering f**k up<\/figcaption><\/figure>\n\n\n\n<p>Naturally we messed that up! Luckily we actually did some sanity testing before just inserting this prototype into the meter, and we did discover the error and simply connected with some wires to quickly fix it. <\/p>\n\n\n\n<p>We wrote about the pin connections previously, but just to recap:<br>Pin 1: Ground<br>Pin 2: Enable. Set to +5VDC  or +12VDC to tell the meter the MEP interface is active<br>Pin 3: TXD (meter&#8217;s serial receive pin)<br>Pin 4: RXD (meter&#8217;s serial transmit pin)<br>Pin 5: Power. +24 or +26VDC (max 1W) from meter<br>Pin 6: Not used \/ no connection<\/p>\n\n\n\n<p>Note: It depends on the hardware model of the meter if pin 5 supplies 24 or 26VDC.<\/p>\n\n\n\n<p>Due to the wires, we could move on with the software&#8230; While awaiting a new prototype PCB from <a rel=\"noreferrer noopener\" href=\"https:\/\/jlcpcb.com\/\" target=\"_blank\">JLCPCB<\/a>&#8230; But let us explain a bit about the hardware prototype:<\/p>\n\n\n\n<hr class=\"wp-block-separator has-css-opacity\"\/>\n\n\n\n<p>The ideas behind this hardware are quite simple:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The ESP32 is a 3.3VDC device, it needs the voltage from the meter reduced in an efficient way as we need the 1W it can deliver (we use a Chinese buck converter to keep it simple). <br><\/li>\n\n\n\n<li>We need to be able to program the ESP32 in circuit (so we don&#8217;t need to program it before soldering it \/ de-solder it if something goes wrong). So the primary serial interface of the ESP32 is routed to the unpopulated 6 pin connector at the edge of the print.<br>To program the ESP32 we need to put it in programming mode. The resistors and capacitor next to it is for that&#8230;<br>Luckily the ESP32 also have a second serial interface we can use to communicate with the meter now we use the first one for debugging and in circuit programming.<br><\/li>\n\n\n\n<li>The meter is RS232, the ESP is 3.3VDC TTL &#8211; so how do you convert that? A Max3232 can do just that, it is 3.3VDC too (it got a Max232 brother that is 5VDC). It has a built in boost converter that boosts the 3.3VDC back up to the signals level of RS232.<br>The capacitors surrounding it is for this boost converter.<br><\/li>\n\n\n\n<li>The meter also requires a Enable pin to be set high. Luckily the Max3232 got a second receive\/transmit logic. We can just use the second transmit logic to make an Enable pin controlled by the ESP32. Only problem is that is should probably not go negative (like RS232 will), but we fix that with a diode. <\/li>\n<\/ul>\n\n\n\n<p>Not much to it &#8211; or is it really this simple?<\/p>\n\n\n\n<p>Stay tuned for an update on the next hardware version of ESP32 MEP\u2026. Coming to <a href=\"http:\/\/www.dabbler.dk\">www.dabbler.dk<\/a> real soon now&#8230;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Unfortunately we are still awaiting the release of the MEP protocol from NES (Networked Energy Services) as mentioned in previous blog entries. This will release us from the Non-Disclosure Agreement (NDA) keeping all this a secret to you. &#8230;but while we wait, we could introduce you to our hardware prototype. In our first few attempts &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.dabbler.dk\/index.php\/2021\/10\/27\/echelon-nes-smart-meters-dabbling-the-hardware-v1-00\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Echelon\/NES Smart Meters \u2013 dabbling the hardware v1.00&#8221;<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[39,40,6,5],"tags":[49,36,38,58,50],"class_list":["post-489","post","type-post","status-publish","format-standard","hentry","category-arduino","category-esp32","category-hardware","category-software","tag-electronics","tag-esp32","tag-espressif-systems","tag-multi-purpose-expansion-port-mep","tag-smart-meter"],"_links":{"self":[{"href":"https:\/\/www.dabbler.dk\/index.php\/wp-json\/wp\/v2\/posts\/489","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dabbler.dk\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dabbler.dk\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dabbler.dk\/index.php\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dabbler.dk\/index.php\/wp-json\/wp\/v2\/comments?post=489"}],"version-history":[{"count":6,"href":"https:\/\/www.dabbler.dk\/index.php\/wp-json\/wp\/v2\/posts\/489\/revisions"}],"predecessor-version":[{"id":648,"href":"https:\/\/www.dabbler.dk\/index.php\/wp-json\/wp\/v2\/posts\/489\/revisions\/648"}],"wp:attachment":[{"href":"https:\/\/www.dabbler.dk\/index.php\/wp-json\/wp\/v2\/media?parent=489"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dabbler.dk\/index.php\/wp-json\/wp\/v2\/categories?post=489"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dabbler.dk\/index.php\/wp-json\/wp\/v2\/tags?post=489"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}