{"id":1997,"date":"2016-09-28T22:22:02","date_gmt":"2016-09-28T21:22:02","guid":{"rendered":"http:\/\/blog.fh-kaernten.at\/ingmarsretro\/?p=1997"},"modified":"2021-01-28T15:16:34","modified_gmt":"2021-01-28T14:16:34","slug":"geigerzaehler-die-software","status":"publish","type":"post","link":"https:\/\/blog.fh-kaernten.at\/ingmarsretro\/2016\/09\/28\/geigerzaehler-die-software\/","title":{"rendered":"Geigerz\u00e4hler &#8211; die Software"},"content":{"rendered":"<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_1997\" class=\"pvc_stats all  \" data-element-id=\"1997\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/blog.fh-kaernten.at\/ingmarsretro\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n<p style=\"text-align: justify\"><a href=\"http:\/\/blog.fh-kaernten.at\/ingmarsretro\/files\/2016\/03\/DSC_2266-e1461509073578.jpg\"><img fetchpriority=\"high\" decoding=\"async\" class=\"alignleft wp-image-1516 size-medium\" src=\"http:\/\/blog.fh-kaernten.at\/ingmarsretro\/files\/2016\/03\/DSC_2266-e1611843384550-169x300.jpg\" alt=\"DSC_2266\" width=\"169\" height=\"300\" srcset=\"https:\/\/blog.fh-kaernten.at\/ingmarsretro\/files\/2016\/03\/DSC_2266-e1611843384550-169x300.jpg 169w, https:\/\/blog.fh-kaernten.at\/ingmarsretro\/files\/2016\/03\/DSC_2266-e1611843384550-768x1365.jpg 768w, https:\/\/blog.fh-kaernten.at\/ingmarsretro\/files\/2016\/03\/DSC_2266-e1611843384550-576x1024.jpg 576w, https:\/\/blog.fh-kaernten.at\/ingmarsretro\/files\/2016\/03\/DSC_2266-e1611843384550-864x1536.jpg 864w, https:\/\/blog.fh-kaernten.at\/ingmarsretro\/files\/2016\/03\/DSC_2266-e1611843384550-1152x2048.jpg 1152w\" sizes=\"(max-width: 169px) 100vw, 169px\" \/><\/a>Wie vor l\u00e4ngerer Zeit im Blog angek\u00fcndigt, soll der Geigerz\u00e4hler nun eine Software bekommen, die nicht nur die Pulse des Z\u00e4hlrohres z\u00e4hlt, sondern sie auch auf eine Einheit bezieht. Hierzu waren aber noch kleine \u00c4nderungen an der Hardware notwendig. (genauer gesagt habe ich andere Pins des Arduino verwendet &#8211; was bedeutet: Leiterbahnen durchtrennen und mit Schaltlitzen neu verlegen). Hier eine Liste der \u00c4nderungen:<\/p>\n<p>&nbsp;<\/p>\n<ul>\n<li>die Leitung von Pin4 Arduino zu Pin D7 vom LCD unterbrechen<\/li>\n<li>die Leitung von Pin5 Arduino zu Pin D6 vom LCD unterbrechen<\/li>\n<li>D7 vom LCD an Pin12 vom Arduino verbinden<\/li>\n<li>D6 vom LCD an Pin13 vom Arduino verbinden<\/li>\n<li>der Z\u00e4hlimpuls wird von TP3 auf Arduino Pin4 geschaltet<\/li>\n<li>die Verbindung TP3 zu Arduino Pin23 wird getrennt<\/li>\n<\/ul>\n<p>Daraus ergibt sich folgende I\/O Port\/Pin Belegung:<\/p>\n<p>LCD Display:<\/p>\n<p>RS &#8211; Ardunio PIN18 &#8211; Arduino&nbsp; I12<br \/>\nEN &#8211; Arduino PIN17 &#8211; Arduino&nbsp; I11<br \/>\nD4 &#8211; Arduino PIN11 &#8211; Arduino&nbsp; I5<br \/>\nD5 &#8211; Arduino PIN6&nbsp; &#8211; Arduino&nbsp; I4<br \/>\nD6 &#8211; Arduino PIN13 &#8211; Arduino I7<br \/>\nD7 &#8211; Arduino PIN12 &#8211; Arduino&nbsp; I6<\/p>\n<p>Weitere Pins:<\/p>\n<p>COUNT &#8211; Arduino PIN4 &#8211; Arduino I2<br \/>\nBUZZ &#8211; Arduino PIN14 &#8211; Arduino I9<br \/>\nSTATUS &#8211; Arduino PIN3 &#8211; Arduino I1<br \/>\nSET &#8211; Arduino PIN2 &#8211; Arduino I1<\/p>\n<p>Hier der Arduino Code:<\/p>\n<pre>\/*Geiger Vx.1 ge\u00e4ndertes pinning\r\n* Pinzuordnungen allgemein f\u00fcr LCD\r\n* RS to IO12 (pin18)\r\n* EN to IO11 (pin17)\r\n* D4 to IO5&amp;nbsp; (pin11)\r\n* D5 to IO4&amp;nbsp; (pin6)\r\n* D6 to IO7&amp;nbsp; (pin13)\r\n* D7 to IO6&amp;nbsp; (pin12)\r\n* R\/W to ground\r\n* VSS to ground\r\n* Pinzuordnungen f\u00fcr Counter\r\n* count to IO2 (ic pin4) = INT0\r\n* buzzer to IO9 (ic pin15)\r\n*\/\r\n\r\n\/\/ include libraries\r\n#include &lt;LiquidCrystal.h&gt;\r\n\r\n\/\/ interfacepins initialisieren\r\nLiquidCrystal lcd(12,11,5,4,7,6);\r\n\r\n\/\/ Dosiskobersionsfaktor - CPM to uSV\/h\r\n#define dconv 0.007  \/\/(ca Umrechnung aus Diagramm Datenblatt des ZP1400 Z\u00e4hlrohrs)\r\n\r\n\/\/ Konstanten Hardware I\/Os\r\nconst int buzzerpin = 9;\r\nconst int geiger_input = 2;\r\nconst int keystat = 0;\r\nconst int keyset = 1;\r\n\r\n\/\/ Variablen\r\nlong count = 0;\r\nlong countPerMinute = 0;\r\nlong timePrevious = 0;\r\nlong timePreviousMeassure = 0;\r\nlong time = 0;\r\nlong countPrevious = 0;\r\nfloat radiationValue = 0.0;\r\n\r\nvoid setup(){\r\npinMode(geiger_input, INPUT);\r\nSerial.begin(19200);\r\n\r\n\/\/setup LCD und Begruessungsanzeige\r\nlcd.begin(8, 2);\r\nlcd.clear();\r\nlcd.setCursor(0, 0);\r\nlcd.print(\" Geiger \");\r\nlcd.setCursor(0,1);\r\nlcd.print(\"Counter \");\r\ndelay(1000);\r\n\r\nlcd.clear();\r\nlcd.setCursor(0, 0);\r\nlcd.print(\"V0.0 beta\");\r\ndelay(1000);\r\n\r\nlcd.clear();\r\nlcd.setCursor(0,1);\r\nlcd.print(\"ibiretro\");\r\ndelay(500);\r\nfor (int i=0;i&lt;8;i++){\r\ndelay(200);\r\ntone(buzzerpin,i*100,100);\r\nlcd.scrollDisplayLeft();\r\n}\r\n\r\ndelay(500);\r\n\r\nlcd.clear();\r\nlcd.setCursor(0, 0);\r\nlcd.print(\"CPM=\");\r\nlcd.setCursor(4,0);\r\nlcd.print(6*count);\r\nlcd.setCursor(0,1);\r\nlcd.print(radiationValue);\r\n\r\nattachInterrupt(0,countPulse,RISING);\r\n\r\n}\r\n\r\nvoid loop(){\r\nif (millis()-timePreviousMeassure &gt; 10000){\r\ncountPerMinute = 6*count;\r\nradiationValue = countPerMinute*dkonv;\r\ntimePreviousMeassure = millis();\r\n\r\nlcd.clear();\r\nlcd.setCursor(0, 0);\r\nlcd.print(\"CPM=\");\r\nlcd.setCursor(4,0);\r\nlcd.print(countPerMinute);\r\nlcd.setCursor(0,1);\r\nlcd.print(radiationValue,4);\r\nlcd.setCursor(6,1);\r\nlcd.print(\" uSv\/h\");\r\n\/* zum debuggen \r\nSerial.print(\"cpm=\");Serial.print(countPerMinute,DEC);\r\nSerial.print(\"uSph=\");Serial.println(radiationValue,4);\r\n*\/\r\ncount = 0;\r\n\r\n}\r\n\r\n}\r\n\r\nvoid countPulse(){\r\ndetachInterrupt(0);\r\ncount++;\r\ntone(buzzerpin,1000,10);\r\nwhile(digitalRead(2)==1){\r\n}\r\nattachInterrupt(0,countPulse,RISING);\r\n}\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_1997\" class=\"pvc_stats all  \" data-element-id=\"1997\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/blog.fh-kaernten.at\/ingmarsretro\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n<p>Wie vor l\u00e4ngerer Zeit im Blog angek\u00fcndigt, soll der Geigerz\u00e4hler nun eine Software bekommen, die nicht nur die Pulse des Z\u00e4hlrohres z\u00e4hlt, sondern sie auch auf eine Einheit bezieht. Hierzu waren aber noch kleine \u00c4nderungen an der Hardware notwendig. (genauer gesagt habe ich andere Pins des Arduino verwendet &#8211; was bedeutet: Leiterbahnen durchtrennen und mit&hellip; <br \/> <a class=\"read-more\" href=\"https:\/\/blog.fh-kaernten.at\/ingmarsretro\/2016\/09\/28\/geigerzaehler-die-software\/\">Weiterlesen<\/a><\/p>\n","protected":false},"author":86,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"ngg_post_thumbnail":0,"footnotes":""},"categories":[1187,57],"tags":[496,495,65,499,130,67,497,68,498],"class_list":["post-1997","post","type-post","status-publish","format-standard","hentry","category-arduino","category-elektronikbastler","tag-arduino-geigercounter","tag-arduino-geigerzaehler","tag-geiger-mueller-zaehler","tag-geigercounter-mit-mikrocontroller","tag-geigerzaehler","tag-radioaktivitaet","tag-strahlungsmessgeraet","tag-zaehlrohr","tag-zp1400"],"a3_pvc":{"activated":true,"total_views":117,"today_views":0},"_links":{"self":[{"href":"https:\/\/blog.fh-kaernten.at\/ingmarsretro\/wp-json\/wp\/v2\/posts\/1997","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.fh-kaernten.at\/ingmarsretro\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.fh-kaernten.at\/ingmarsretro\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.fh-kaernten.at\/ingmarsretro\/wp-json\/wp\/v2\/users\/86"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.fh-kaernten.at\/ingmarsretro\/wp-json\/wp\/v2\/comments?post=1997"}],"version-history":[{"count":0,"href":"https:\/\/blog.fh-kaernten.at\/ingmarsretro\/wp-json\/wp\/v2\/posts\/1997\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.fh-kaernten.at\/ingmarsretro\/wp-json\/wp\/v2\/media?parent=1997"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.fh-kaernten.at\/ingmarsretro\/wp-json\/wp\/v2\/categories?post=1997"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.fh-kaernten.at\/ingmarsretro\/wp-json\/wp\/v2\/tags?post=1997"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}