{"id":82592,"date":"2026-09-08T07:39:56","date_gmt":"2026-09-08T05:39:56","guid":{"rendered":"https:\/\/www.dclabs.lt\/dainiaus\/?p=82592"},"modified":"2026-09-08T12:45:10","modified_gmt":"2026-09-08T10:45:10","slug":"connection-of-two-different-control-systems","status":"publish","type":"post","link":"https:\/\/www.dclabs.lt\/dainiaus\/connection-of-two-different-control-systems\/","title":{"rendered":"Connection of opposite control systems"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">What started as a simple project evolved into some light engineering. We have a magnetic control device \u2013 let&#8217;s say it&#8217;s an electronic equivalent of a reed switch. It outputs +12 VDC when inactive and is floating when activated. Next, we have a control device with two pins \u2013 one is connected to ground (GND), while the other expects to be connected to ground to know that something has happened. The task is simple: connect these two devices so that when the magnetic switch outputs +12 VDC, the control device receives GND and knows that something has happened. And there is one additional requirement \u2013 the circuit should consume no current, or at least veeeery little current, because it might be running from a battery. At first, I thought about using a relay. Easy peasy \u2013 converting +12 V to GND with a relay is trivial. But the relay would consume about 100 mA while energized. Can we go lower? We could use an optocoupler, but it has an LED that would consume some current:<\/p>\n\n\n\n<div class=\"wp-block-mathml-mathmlblock\">\\[\nI_{LED}=\\frac{V_{IN}-V_{F}}{R}\n\\]\n\n\\[\nI_{LED}=\\frac{12-1,2}{2200}\n\\]\n\n\\[\nI_{LED}=\\frac{10,8}{2200}=0,00491~\\text{A}\n\\]\n\n\\[\n\\boxed{I_{LED}\\approx4,9~\\text{mA}}\n\\]<script id=\"wp-hooks-js\" src=\"https:\/\/www.dclabs.lt\/dainiaus\/wp-includes\/js\/dist\/hooks.min.js?ver=f0f188028580e8dc1255\"><\/script>\n<script id=\"wp-i18n-js\" src=\"https:\/\/www.dclabs.lt\/dainiaus\/wp-includes\/js\/dist\/i18n.min.js?ver=1dfe7db3940c23ea9216\"><\/script>\n<script id=\"wp-i18n-js-after\">\nwp.i18n.setLocaleData( { 'text direction\\u0004ltr': [ 'ltr' ] } );\n\/\/# sourceURL=wp-i18n-js-after\n<\/script>\n<script  async id=\"mathjax-js\" src=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/mathjax\/2.7.7\/MathJax.js?config=TeX-MML-AM_CHTML\"><\/script>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">So about 5 mA. That&#8217;s already 20 times less, but can we go even lower? It seems we can. We could take small NPN transistor, for example BC847, to do the job. Lets try to draw preliminary schematics:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><a href=\"https:\/\/www.dclabs.lt\/dainiaus\/wp-content\/uploads\/2026\/09\/Ekrano-kopija-2026-09-07-162457.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"424\" src=\"https:\/\/www.dclabs.lt\/dainiaus\/wp-content\/uploads\/2026\/09\/Ekrano-kopija-2026-09-07-162457-1024x424.png\" alt=\"\" class=\"wp-image-82600\" style=\"width:739px;height:auto\" srcset=\"https:\/\/www.dclabs.lt\/dainiaus\/wp-content\/uploads\/2026\/09\/Ekrano-kopija-2026-09-07-162457-1024x424.png 1024w, https:\/\/www.dclabs.lt\/dainiaus\/wp-content\/uploads\/2026\/09\/Ekrano-kopija-2026-09-07-162457-300x124.png 300w, https:\/\/www.dclabs.lt\/dainiaus\/wp-content\/uploads\/2026\/09\/Ekrano-kopija-2026-09-07-162457-768x318.png 768w, https:\/\/www.dclabs.lt\/dainiaus\/wp-content\/uploads\/2026\/09\/Ekrano-kopija-2026-09-07-162457-1536x636.png 1536w, https:\/\/www.dclabs.lt\/dainiaus\/wp-content\/uploads\/2026\/09\/Ekrano-kopija-2026-09-07-162457-299x124.png 299w, https:\/\/www.dclabs.lt\/dainiaus\/wp-content\/uploads\/2026\/09\/Ekrano-kopija-2026-09-07-162457-850x352.png 850w, https:\/\/www.dclabs.lt\/dainiaus\/wp-content\/uploads\/2026\/09\/Ekrano-kopija-2026-09-07-162457.png 1869w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">R1 &#8211; to control transistor base current, R2 &#8211; to make sure transistor is closed when S2 is open. Current through Virtual DS is only 0,4833 mA, so even smallest transistor would easily survive, not even mentioning, that BC847 can withstand 100 mA, so ~200 times more. Resistor values in schematics I inserted, because first calculated them and writing this article afterwards<img decoding=\"async\" draggable=\"false\" class=\"eedee-emoji\" src=\"https:\/\/s.w.org\/images\/core\/emoji\/12.0.0-1\/svg\/1f605.svg\" alt=\"\ud83d\ude05\">.<\/p>\n\n\n\n<div class=\"wp-block-mathml-mathmlblock\">When S2 is activated, its output rises to approximately:\n\n\\[\nV_{IN}=12~\\text{V}\n\\]\n\nFor a silicon NPN transistor, we can assume a base-emitter voltage of approximately:\n\n\\[\nV_{BE}\\approx0.7~\\text{V}\n\\]\n\nThe current flowing through the 22 k\u2126 base resistor is therefore:\n\n\\[\nI_{R1}=\\frac{V_{IN}-V_{BE}}{R_1}\n\\]\n\n\\[\nI_{R1}=\\frac{12-0.7}{22000}\n\\]\n\n\\[\nI_{R1}=\\frac{11.3}{22000}\n=0.000514~\\text{A}\n\\]\n\n\\[\n\\boxed{I_{R1}\\approx514~\\mu\\text{A}}\n\\]\n\nHowever, we also have a 100 k\u2126 resistor between the transistor base\nand emitter. The current flowing through this resistor is:\n\n\\[\nI_{R2}=\\frac{V_{BE}}{R_2}\n\\]\n\n\\[\nI_{R2}=\\frac{0.7}{100000}\n=0.000007~\\text{A}\n\\]\n\n\\[\n\\boxed{I_{R2}\\approx7~\\mu\\text{A}}\n\\]\n\nTherefore, the actual transistor base current is approximately:\n\n\\[\nI_B=I_{R1}-I_{R2}\n\\]\n\n\\[\nI_B=514~\\mu\\text{A}-7~\\mu\\text{A}\n\\]\n\n\\[\n\\boxed{I_B\\approx507~\\mu\\text{A}}\n\\]\n\nThe total current drawn from the 12 V magnetic switch output is still only:\n\n\\[\n\\boxed{I_{IN}\\approx514~\\mu\\text{A}=0.514~\\text{mA}}\n\\]<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">That means transistor control option would use 0,5 mA, that is 10 times less than optocoupler and 200 times less than relay. I think I cal live with such current consumption. Transistor is very small, SMD type, SOT-23 housing &#8211; not always good to be so small. Bigger substitute can be BC547, TO-92 housing.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">That is only basic idea, I would add TVS diode on transistor base.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>What started as a simple project evolved into some light engineering. We have a magnetic control device \u2013 let&#8217;s say it&#8217;s an electronic equivalent of a reed switch. It outputs +12 VDC when inactive and is floating when activated. Next, we have a control device with two pins \u2013 one is connected to ground (GND),&#8230;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-82592","post","type-post","status-publish","format-standard","hentry","category-elektronika"],"_links":{"self":[{"href":"https:\/\/www.dclabs.lt\/dainiaus\/wp-json\/wp\/v2\/posts\/82592","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dclabs.lt\/dainiaus\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dclabs.lt\/dainiaus\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dclabs.lt\/dainiaus\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dclabs.lt\/dainiaus\/wp-json\/wp\/v2\/comments?post=82592"}],"version-history":[{"count":21,"href":"https:\/\/www.dclabs.lt\/dainiaus\/wp-json\/wp\/v2\/posts\/82592\/revisions"}],"predecessor-version":[{"id":82615,"href":"https:\/\/www.dclabs.lt\/dainiaus\/wp-json\/wp\/v2\/posts\/82592\/revisions\/82615"}],"wp:attachment":[{"href":"https:\/\/www.dclabs.lt\/dainiaus\/wp-json\/wp\/v2\/media?parent=82592"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dclabs.lt\/dainiaus\/wp-json\/wp\/v2\/categories?post=82592"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dclabs.lt\/dainiaus\/wp-json\/wp\/v2\/tags?post=82592"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}