{"id":97,"date":"2014-10-28T14:16:50","date_gmt":"2014-10-28T14:16:50","guid":{"rendered":"http:\/\/www.fartmagnet.co.uk\/warmcat\/?p=97"},"modified":"2019-06-08T19:09:35","modified_gmt":"2019-06-08T19:09:35","slug":"alphanumeric-display-dlr2416","status":"publish","type":"post","link":"http:\/\/warmcat.uk\/?p=97","title":{"rendered":"Alphanumeric Display DLR2416"},"content":{"rendered":"<p>At work, one of our HPU pump control cards died, the control card looks like this and hosts an interesting four-digit alphanumeric display:<\/p>\n<p><a href=\"http:\/\/www.fartmagnet.co.uk\/warmcat\/wp-content\/uploads\/2014\/10\/WarmCatDisplay1.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-87 size-medium\" src=\"http:\/\/www.fartmagnet.co.uk\/warmcat\/wp-content\/uploads\/2014\/10\/WarmCatDisplay1-300x225.jpg\" alt=\"Rexroth control card\" width=\"300\" height=\"225\" srcset=\"http:\/\/warmcat.uk\/wp-content\/uploads\/2014\/10\/WarmCatDisplay1-300x225.jpg 300w, http:\/\/warmcat.uk\/wp-content\/uploads\/2014\/10\/WarmCatDisplay1-350x262.jpg 350w, http:\/\/warmcat.uk\/wp-content\/uploads\/2014\/10\/WarmCatDisplay1.jpg 1024w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>So, out comes the Arduino and breadboard, and downloaded the datasheet for the display (readily available if you google &#8220;DLR2416 datasheet&#8221;).<\/p>\n<p>This display has 7 data pins to receive ASCII code as per the table below, with two address pins to select the &#8216;segment&#8217;.<\/p>\n<p><a href=\"http:\/\/www.fartmagnet.co.uk\/warmcat\/wp-content\/uploads\/2014\/10\/ASCII-table.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-85\" src=\"http:\/\/www.fartmagnet.co.uk\/warmcat\/wp-content\/uploads\/2014\/10\/ASCII-table-300x242.jpg\" alt=\"DLR2416 ASCII table\" width=\"300\" height=\"242\" srcset=\"http:\/\/warmcat.uk\/wp-content\/uploads\/2014\/10\/ASCII-table-300x242.jpg 300w, http:\/\/warmcat.uk\/wp-content\/uploads\/2014\/10\/ASCII-table-350x283.jpg 350w, http:\/\/warmcat.uk\/wp-content\/uploads\/2014\/10\/ASCII-table.jpg 1024w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>After a bit trial and error, and thanks to&nbsp;<a title=\"this website\" href=\"http:\/\/arduous.orcinus.me\/2011\/07\/interfacing-a-siemens-dl2416t\" target=\"_blank\" rel=\"noopener noreferrer\">this website<\/a> by a guy who&nbsp;successfully interfaced with a similar display, I managed to get some characters displayed. I used a 74HC595 shift register to push out the data to the DLR2416, plenty of example code on the Arduino site for help with that.<\/p>\n<p><a href=\"http:\/\/www.fartmagnet.co.uk\/warmcat\/wp-content\/uploads\/2014\/10\/WarmCatDisplay2.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-89 size-medium\" src=\"http:\/\/www.fartmagnet.co.uk\/warmcat\/wp-content\/uploads\/2014\/10\/WarmCatDisplay2-300x225.jpg\" alt=\"DLR2416 on breadboard\" width=\"300\" height=\"225\" srcset=\"http:\/\/warmcat.uk\/wp-content\/uploads\/2014\/10\/WarmCatDisplay2-300x225.jpg 300w, http:\/\/warmcat.uk\/wp-content\/uploads\/2014\/10\/WarmCatDisplay2-350x262.jpg 350w, http:\/\/warmcat.uk\/wp-content\/uploads\/2014\/10\/WarmCatDisplay2.jpg 1024w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a>&nbsp;<a href=\"http:\/\/www.fartmagnet.co.uk\/warmcat\/wp-content\/uploads\/2014\/10\/WarmCatDisplay3.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-91 size-medium\" src=\"http:\/\/www.fartmagnet.co.uk\/warmcat\/wp-content\/uploads\/2014\/10\/WarmCatDisplay3-300x225.jpg\" alt=\"DLR2416 Schematic\" width=\"300\" height=\"225\" srcset=\"http:\/\/warmcat.uk\/wp-content\/uploads\/2014\/10\/WarmCatDisplay3-300x225.jpg 300w, http:\/\/warmcat.uk\/wp-content\/uploads\/2014\/10\/WarmCatDisplay3-350x262.jpg 350w, http:\/\/warmcat.uk\/wp-content\/uploads\/2014\/10\/WarmCatDisplay3.jpg 1024w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>The above schematic doesn&#8217;t show the 1microfarad decoupling capacitor from data to ground, which was required to prevent the display sometimes showing erroneous characters.<\/p>\n<p>I played about a bit more, added a temperature sensor and had it display the current temperature, and managed to have the display scroll text.<\/p>\n<p>Soldered to a protoshield, with space for an additional display if I can find one:<\/p>\n<p><a href=\"http:\/\/www.fartmagnet.co.uk\/warmcat\/wp-content\/uploads\/2014\/10\/WarmCatDisplay4.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-93\" src=\"http:\/\/www.fartmagnet.co.uk\/warmcat\/wp-content\/uploads\/2014\/10\/WarmCatDisplay4-300x225.jpg\" alt=\"Arduino prototyping shield\" width=\"300\" height=\"225\" srcset=\"http:\/\/warmcat.uk\/wp-content\/uploads\/2014\/10\/WarmCatDisplay4-300x225.jpg 300w, http:\/\/warmcat.uk\/wp-content\/uploads\/2014\/10\/WarmCatDisplay4-350x262.jpg 350w, http:\/\/warmcat.uk\/wp-content\/uploads\/2014\/10\/WarmCatDisplay4.jpg 1024w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a>&nbsp;<a href=\"http:\/\/www.fartmagnet.co.uk\/warmcat\/wp-content\/uploads\/2014\/10\/WarmCatDisplay5.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-95\" src=\"http:\/\/www.fartmagnet.co.uk\/warmcat\/wp-content\/uploads\/2014\/10\/WarmCatDisplay5-300x225.jpg\" alt=\"Shield plugged into Arduino\" width=\"300\" height=\"225\" srcset=\"http:\/\/warmcat.uk\/wp-content\/uploads\/2014\/10\/WarmCatDisplay5-300x225.jpg 300w, http:\/\/warmcat.uk\/wp-content\/uploads\/2014\/10\/WarmCatDisplay5-350x262.jpg 350w, http:\/\/warmcat.uk\/wp-content\/uploads\/2014\/10\/WarmCatDisplay5.jpg 1024w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>See below for code. Need to get my hands on an additional display to play with!<\/p>\n<p>&#8211; Wayne<\/p>\n<p>2019: I obtained another display and used this project in my first Eagle Cad design. See below code for images. I have a few of these unpopulated PCBs available if anyone wants one, just send me a mail.<\/p>\n<p>[pastacode lang=&#8221;c&#8221; message=&#8221;DLR2416 Display on Arduino&#8221; highlight=&#8221;&#8221; provider=&#8221;manual&#8221;]\n<\/p><pre><code>\/\/ DLR2416 Display Driver for Arduino UNO\n\/\/ Code for using a 74HC595 Shift Register to\n\/\/ drive Siemens DLR2416 intelligentdisplay \n\nint latchPin = 8;  \/\/Pin connected to ST_CP of 74HC595\nint clockPin = 12; \/\/Pin connected to SH_CP of 74HC595\nint dataPin = 11;  \/\/Pin connected to DS of 74HC595\n\nint digitSel0Pin = 5; \/\/ Pin connected to \"A0 digital select\" on display\nint digitSel1Pin = 6; \/\/ Pin connected to \"A1 digital select\" on display \nint displayWritePin = 7;  \/\/ Pin connected to \"WR Write\" on display\nint displaySelectPin = 3; \/\/ Pin connected to CS1 on display 0\n                          \/\/ (we only have one display atm)\n\nint tempSensPin = 0; \/\/ AI for temp sensor\n\n\/\/ Functions\nvoid displayChar(char, int);\nvoid displayWord(String);\nvoid scrollWord(String);\n\nvoid setup() {\n  pinMode(latchPin, OUTPUT);\n  pinMode(clockPin, OUTPUT);\n  pinMode(dataPin, OUTPUT);\n  pinMode(digitSel0Pin, OUTPUT);\n  pinMode(digitSel1Pin, OUTPUT);\n  pinMode(displayWritePin, OUTPUT); \n  pinMode(displaySelectPin, OUTPUT);\n  Serial.begin(9600);\n}\n\nvoid loop() {\n  \n  \/\/Select display 0 as we have no other display yet\n  digitalWrite(displaySelectPin, LOW);\n  \n  scrollWord(\"   www.WarmCat.uk    \");\n  delay(500);\n  \n  \/\/ **** Temp Sensor bit ****\n  int tempReading = analogRead(tempSensPin);\n  float voltage = tempReading*5.0;\n  voltage \/= 1024.0;\n  float tempC = (voltage - 0.5)*100;\n  \/\/ converting from 10 mv per degree with 500 mV offset to degrees\n  \/\/ ((voltage - 500mV) times 100)\n  \n  int tempCint = tempC+0.5; \/\/ round to nearest whole number; convert to int\n  \/\/ and then output to serial for test purposes\n  Serial.print(tempCint); Serial.println(\" degrees C\"); \n  \n  \/\/put int into a string\n  char tempChar[4];\n  sprintf(tempChar, \"%d .\",tempCint);\n  \n  displayWord(tempChar); \/\/ display temp\n  displayChar(0x1B,2);   \/\/display degrees symbol \n  \n  \/\/ display whirly thing for fun\n  for (int spin=0; spin&lt;10; spin++)\n  {\n    displayChar(0x5C,3); delay(50); \n    displayChar(0x7C,3); delay(50); \n    displayChar(0x2F,3); delay(50); \n    displayChar(0x2D,3); delay(50);\n  }\n}\n\nvoid displayChar(char myChar, int myPos)\n{\n  switch (myPos)\n  {\n    case 3:\n    digitalWrite(digitSel0Pin, LOW);\n    digitalWrite(digitSel1Pin, LOW);\n    break;\n    case 2:\n    digitalWrite(digitSel0Pin, HIGH);\n    digitalWrite(digitSel1Pin, LOW);\n    break;    \n    case 1:\n    digitalWrite(digitSel0Pin, LOW);\n    digitalWrite(digitSel1Pin, HIGH);\n    break;\n    case 0:\n    digitalWrite(digitSel0Pin, HIGH);\n    digitalWrite(digitSel1Pin, HIGH);\n    break;\n  }\n  \/\/ set shift register\n  digitalWrite(latchPin, LOW);\n  shiftOut(dataPin, clockPin, MSBFIRST, myChar);\n  digitalWrite(displayWritePin, LOW); delay(2);\n  digitalWrite(latchPin, HIGH);\n  digitalWrite(displayWritePin, HIGH);\n}\n\nvoid displayWord(String myString)\n{\n  for (int x = 0; x &lt; 4; x++) {\n    displayChar(myString.charAt(x),x);\n  }\n}\n\nvoid scrollWord(String myString)\n{\n  int stringLength = myString.length(); \/\/ length of string?\n  for (int x = 0; x&lt;(stringLength -3); x++)\n  {\n    displayChar(myString.charAt(x),0); \n    displayChar(myString.charAt(x+1),1);\n    displayChar(myString.charAt(x+2),2);\n    displayChar(myString.charAt(x+3),3);\n    delay(150);\n  }\n}\n<\/code><\/pre>\n<p>[\/pastacode]<\/p>\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"768\" src=\"http:\/\/warmcat.uk\/wp-content\/uploads\/2019\/06\/img_2334-e1560020776113-1024x768.jpg\" alt=\"\" class=\"wp-image-357\" srcset=\"http:\/\/warmcat.uk\/wp-content\/uploads\/2019\/06\/img_2334-e1560020776113-1024x768.jpg 1024w, http:\/\/warmcat.uk\/wp-content\/uploads\/2019\/06\/img_2334-e1560020776113-300x225.jpg 300w, http:\/\/warmcat.uk\/wp-content\/uploads\/2019\/06\/img_2334-e1560020776113-768x576.jpg 768w, http:\/\/warmcat.uk\/wp-content\/uploads\/2019\/06\/img_2334-e1560020776113-350x263.jpg 350w, http:\/\/warmcat.uk\/wp-content\/uploads\/2019\/06\/img_2334-e1560020776113.jpg 1440w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption>Old protoboard, new board, and pcb from rexroth valve.<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"768\" src=\"http:\/\/warmcat.uk\/wp-content\/uploads\/2019\/06\/img_2362-1024x768.jpg\" alt=\"Dual Display\" class=\"wp-image-356\"\/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p class=\"excerpt\">At work, one of our HPU pump control cards died, the control card looks like this and hosts an interesting four-digit alphanumeric display: So, out comes the Arduino and breadboard,&hellip; <span class=\"more-link\">more<\/span><\/p>\n","protected":false},"author":3,"featured_media":103,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[39],"tags":[55,51,41,49,59,43,53,47,57,45],"class_list":["post-97","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-electronics","tag-74hc595","tag-alphanumeric","tag-arduino","tag-display","tag-dlr2416","tag-electronics-2","tag-intelligentdisplay","tag-led","tag-shift-register","tag-siemens"],"_links":{"self":[{"href":"http:\/\/warmcat.uk\/index.php?rest_route=\/wp\/v2\/posts\/97","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/warmcat.uk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/warmcat.uk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/warmcat.uk\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"http:\/\/warmcat.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=97"}],"version-history":[{"count":12,"href":"http:\/\/warmcat.uk\/index.php?rest_route=\/wp\/v2\/posts\/97\/revisions"}],"predecessor-version":[{"id":105,"href":"http:\/\/warmcat.uk\/index.php?rest_route=\/wp\/v2\/posts\/97\/revisions\/105"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/warmcat.uk\/index.php?rest_route=\/wp\/v2\/media\/103"}],"wp:attachment":[{"href":"http:\/\/warmcat.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=97"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/warmcat.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=97"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/warmcat.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=97"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}