<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://revspace.nl/wiki/index.php?action=history&amp;feed=atom&amp;title=Deurbedieningspaneel</id>
	<title>Deurbedieningspaneel - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://revspace.nl/wiki/index.php?action=history&amp;feed=atom&amp;title=Deurbedieningspaneel"/>
	<link rel="alternate" type="text/html" href="https://revspace.nl/wiki/index.php?title=Deurbedieningspaneel&amp;action=history"/>
	<updated>2026-05-13T12:04:14Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.6</generator>
	<entry>
		<id>https://revspace.nl/wiki/index.php?title=Deurbedieningspaneel&amp;diff=4639&amp;oldid=prev</id>
		<title>Raymii at 15:15, 30 March 2014</title>
		<link rel="alternate" type="text/html" href="https://revspace.nl/wiki/index.php?title=Deurbedieningspaneel&amp;diff=4639&amp;oldid=prev"/>
		<updated>2014-03-30T15:15:17Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en-GB&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 15:15, 30 March 2014&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l27&quot;&gt;Line 27:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 27:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;With the help of Juerd and Hans I found out that connectors 4 &amp;amp;amp; 5 got a connection when the “Openen” button was pressed.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;With the help of Juerd and Hans I found out that connectors 4 &amp;amp;amp; 5 got a connection when the “Openen” button was pressed.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;There always is a connection on the connectors 2 and 6, except for when the “Sluiten” button is pressed. This is called a&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;There always is a connection on the connectors 2 and 6, except for when the “Sluiten” button is pressed. This is called a &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Normally Closed Circuit&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The key part was a bit more troublesome. A lot of wires were connected to one another, and a few more gave a connection when the key is used. The special key can only turn 45 degrees to the left, so there is only one state to monitor.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The key part was a bit more troublesome. A lot of wires were connected to one another, and a few more gave a connection when the key is used. The special key can only turn 45 degrees to the left, so there is only one state to monitor.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Raymii</name></author>
	</entry>
	<entry>
		<id>https://revspace.nl/wiki/index.php?title=Deurbedieningspaneel&amp;diff=4638&amp;oldid=prev</id>
		<title>Raymii: Created page with &quot;  {{Project    |Name=Deurbedieningspaneel    |Status=In progress    |Contact=Raymii   }}  This page describes the process used to get a very simple arduino program which can b...&quot;</title>
		<link rel="alternate" type="text/html" href="https://revspace.nl/wiki/index.php?title=Deurbedieningspaneel&amp;diff=4638&amp;oldid=prev"/>
		<updated>2014-03-30T15:11:50Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;  {{Project    |Name=Deurbedieningspaneel    |Status=In progress    |Contact=Raymii   }}  This page describes the process used to get a very simple arduino program which can b...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;  {{Project&lt;br /&gt;
   |Name=Deurbedieningspaneel&lt;br /&gt;
   |Status=In progress&lt;br /&gt;
   |Contact=Raymii&lt;br /&gt;
  }}&lt;br /&gt;
&lt;br /&gt;
This page describes the process used to get a very simple arduino program which can be used to find out if a button is pressed on a train door control panel or if the key for the panel is used.&lt;br /&gt;
&lt;br /&gt;
[[Image:lL7ihLa.jpg|none|350px|alt=|Plan V]]&lt;br /&gt;
&lt;br /&gt;
I acquired a door control panel from a demolition yard out of a Plan V (Mat 64) train.&lt;br /&gt;
&lt;br /&gt;
[[Image:Deurbedieningstableau.jpg|none|300px|alt=|Door control panel]]&lt;br /&gt;
&lt;br /&gt;
I wanted to find out via an arduino if a button was pressed or if the special key was used. This was my first arduino project.&lt;br /&gt;
&lt;br /&gt;
[[Image:zRXXfll.jpg|none|350px|alt=|Workspace]]&lt;br /&gt;
&lt;br /&gt;
The above image shows my workspace. It includes the panel, a breadboard, an arduino nano, the key, [https://raymii.org/s/articles/3D_modelling_a_real_world_object_in_OpenSCAD.html a few 3d printed keys] and some tools. Also some papers and a fused arduino.&lt;br /&gt;
&lt;br /&gt;
The back of the panel has 10 semi-wire connectors. I took a multimeter and started to find out which connectors had an electrical connection when none of the buttons were pressed. (doorpiepen)&lt;br /&gt;
&lt;br /&gt;
[[Image:UcSdmR5.png|none|300pc|alt=|Schema Panel]]&lt;br /&gt;
&lt;br /&gt;
The above, very professional, drawing shows a schematic of the front and back side of the panel. The numbers are actually there on the wires in the panel.&lt;br /&gt;
&lt;br /&gt;
With the help of Juerd and Hans I found out that connectors 4 &amp;amp;amp; 5 got a connection when the “Openen” button was pressed.&lt;br /&gt;
&lt;br /&gt;
There always is a connection on the connectors 2 and 6, except for when the “Sluiten” button is pressed. This is called a&lt;br /&gt;
&lt;br /&gt;
The key part was a bit more troublesome. A lot of wires were connected to one another, and a few more gave a connection when the key is used. The special key can only turn 45 degrees to the left, so there is only one state to monitor.&lt;br /&gt;
&lt;br /&gt;
After some time it seemed that connectors one and three gave a connection when the key was turned. I now had all the states I wanted to monitor.&lt;br /&gt;
&lt;br /&gt;
Time to hook up an arduino.&lt;br /&gt;
&lt;br /&gt;
I started with the openen button. I hooked up a wire to connector 4 on the panel and to pin D4 on the Arduino Nano. Another wire went to connector 5 on the panel and to the GND on the arduino. The following code was used to print out the state of the button:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;int openPin = 4;&lt;br /&gt;
&lt;br /&gt;
void setup() {&lt;br /&gt;
  Serial.begin(9600);&lt;br /&gt;
  pinMode(openPin, INPUT);&lt;br /&gt;
}&lt;br /&gt;
void loop() {&lt;br /&gt;
    int openButtonState = digitalRead(openPin);&lt;br /&gt;
    Serial.println(openButtonState);&lt;br /&gt;
    delay(500);&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
However, this printed out random results, instead of the 1 or 0 for the state of the button.&lt;br /&gt;
&lt;br /&gt;
After a lecture from Juerd about power and the concept of [https://en.wikipedia.org/wiki/Pull-up_resistor Pull-up and Pull-down resistors], plus the fact that the arduino includes a built in pull-up resistor I changed the code to this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;int openPin = 4;&lt;br /&gt;
&lt;br /&gt;
void setup() {&lt;br /&gt;
  Serial.begin(9600);&lt;br /&gt;
  pinMode(openPin, INPUT);&lt;br /&gt;
  digitalWrite(openPin, HIGH);&lt;br /&gt;
}&lt;br /&gt;
void loop() {&lt;br /&gt;
    int openButtonState = digitalRead(openPin);&lt;br /&gt;
    Serial.println(openButtonState);&lt;br /&gt;
    delay(500);&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;digitalWrite(openPin, HIGH);&amp;lt;/code&amp;gt; turns the Pull-up resistor functionality on for that pin.&lt;br /&gt;
&lt;br /&gt;
Now I got better results from the arduino. When the Openen button was pressed, it printed out 0, which is exactly what we want.&lt;br /&gt;
&lt;br /&gt;
The “Sluiten” knop was a different story. Pins 2 and 6 are always connected, unless the button is pressed. This is a “Normally Closed” circuit ([http://en.wikipedia.org/wiki/Relay wiki]). Since the arduino has no built in Pull-down we need to build one on the breadboard. I used a 100KΩ resistor for this. The resistor was plugged in to the breadboard from arduino D2 to GND. A wire from arduino D2 went to connector 2 on the panel and a wire went from 5V on the arduino to connector 6 on the panel.&lt;br /&gt;
&lt;br /&gt;
For the keying part I thought that it would be the same as for the Openen button. When the key is turned connector 1 &amp;amp;amp; 3 on the panel had a connection. I hooked them up to pin D8 on the arduino and to GND. The code had evoled a bit to show the state a bit more verbose, like so:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;int sleutelPin = 8;&lt;br /&gt;
void setup() {&lt;br /&gt;
  Serial.begin(9600);&lt;br /&gt;
  pinMode(sleutelPin, INPUT);&lt;br /&gt;
  digitalWrite(sleutelPin, HIGH);&lt;br /&gt;
}&lt;br /&gt;
void loop() {&lt;br /&gt;
  int sleutelState = digitalRead(sleutelPin);&lt;br /&gt;
  &lt;br /&gt;
  if (sleutelState == 0) {&lt;br /&gt;
    Serial.println(&amp;amp;quot;Gesleuteld&amp;amp;quot;);  &lt;br /&gt;
    Serial.println(&amp;amp;quot;   &amp;amp;quot;);&lt;br /&gt;
    delay(200);&lt;br /&gt;
  }&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, when I used the key the power LED on the arduino went out. When the key was turned back the led went back on. After trying this a few times the arduino stoped working. Hans pointed out to me that I fused the arduino. I do not know why these pins fused the arduino, however, they did.&lt;br /&gt;
&lt;br /&gt;
I grabbed a new arduino from the vending machine and started beeping with the multimeter for another combination of connectors which triggered when the key was used. Turns out, 9 and 10 did. So again, one wire was hooked up to pin D8 on the arduino and one to the GND.&lt;br /&gt;
&lt;br /&gt;
This worked, except for it also triggering the Sluiten button. I also don’t know why, but I changed the Sluiten code to check if the key is not being used:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;  if (closeButtonState == 0) {&lt;br /&gt;
    if (sleutelState == 1) {&lt;br /&gt;
      // ingedrukt&lt;br /&gt;
      Serial.println(&amp;amp;quot;Sluiten ingedrukt&amp;amp;quot;);&lt;br /&gt;
      Serial.println(&amp;amp;quot;   &amp;amp;quot;);&lt;br /&gt;
      digitalWrite(led, HIGH);&lt;br /&gt;
      delay(200);&lt;br /&gt;
    }&lt;br /&gt;
  }&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This allows me to reliably measure the three states.&lt;br /&gt;
&lt;br /&gt;
Here is a picture of the wiring drawn in [http://fritzing.org/home/ Fritzing]:&lt;br /&gt;
&lt;br /&gt;
[[Image:vM9FWvo.png|none|none|alt=|Wiring]]&lt;br /&gt;
&lt;br /&gt;
The buttons from the panel are on the breadboard there.&lt;br /&gt;
&lt;br /&gt;
The end result in the arduino serial monitor:&lt;br /&gt;
&lt;br /&gt;
[[Image:7nvzT4K.png|none|none|alt=|Result]]&lt;br /&gt;
&lt;br /&gt;
Plus the LED on the Arduino Nano which turns on when an action is done.&lt;br /&gt;
&lt;br /&gt;
Overall this was a very educational experience. I’m still looking for a purpose for the panel, however, I’m sure that will come.&lt;br /&gt;
&lt;br /&gt;
The code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;// sluiten == 2 &amp;amp;amp; 6, 6 == 5v, 2 == D2. D2 == ook 100 Kh Ohm weerstand naar ground. &lt;br /&gt;
// Openen == 4 &amp;amp;amp; 5, 5 == ground, 4 == D4&lt;br /&gt;
// sleutelen == 9 &amp;amp;amp; 10, 9 == D8, 10 == ground (niet in 1 &amp;amp;amp; 3 doen want dan kortsluiting)&lt;br /&gt;
// &lt;br /&gt;
int openPin = 4;&lt;br /&gt;
int closePin = 2;&lt;br /&gt;
int sleutelPin = 8;&lt;br /&gt;
int led = 13;&lt;br /&gt;
&lt;br /&gt;
void setup() {&lt;br /&gt;
&lt;br /&gt;
  Serial.begin(9600);&lt;br /&gt;
  &lt;br /&gt;
  pinMode(closePin, INPUT);&lt;br /&gt;
  pinMode(openPin, INPUT);&lt;br /&gt;
  pinMode(sleutelPin, INPUT);&lt;br /&gt;
  // make pull up for openPin and sleutelPin&lt;br /&gt;
  digitalWrite(openPin, HIGH);&lt;br /&gt;
  digitalWrite(sleutelPin, HIGH);&lt;br /&gt;
  pinMode(led, OUTPUT);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void loop() {&lt;br /&gt;
  digitalWrite(led, LOW);&lt;br /&gt;
&lt;br /&gt;
  int openButtonState = digitalRead(openPin);&lt;br /&gt;
  int closeButtonState = digitalRead(closePin);&lt;br /&gt;
  int sleutelState = digitalRead(sleutelPin);&lt;br /&gt;
  &lt;br /&gt;
    if (closeButtonState == 0) {&lt;br /&gt;
    if (sleutelState == 1) {&lt;br /&gt;
      // ingedrukt&lt;br /&gt;
      Serial.println(&amp;amp;quot;Sluiten ingedrukt&amp;amp;quot;);&lt;br /&gt;
      Serial.println(&amp;amp;quot;   &amp;amp;quot;);&lt;br /&gt;
      digitalWrite(led, HIGH);&lt;br /&gt;
      delay(200);&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  if (openButtonState == 0) {&lt;br /&gt;
    // ingedrukt&lt;br /&gt;
    Serial.println(&amp;amp;quot;Openenen ingedrukt&amp;amp;quot;);&lt;br /&gt;
    Serial.println(&amp;amp;quot;   &amp;amp;quot;);&lt;br /&gt;
    digitalWrite(led, HIGH);&lt;br /&gt;
    delay(200);&lt;br /&gt;
  } &lt;br /&gt;
   &lt;br /&gt;
  if (sleutelState == 0) {&lt;br /&gt;
    Serial.println(&amp;amp;quot;Gesleuteld&amp;amp;quot;);  &lt;br /&gt;
    Serial.println(&amp;amp;quot;   &amp;amp;quot;);&lt;br /&gt;
    digitalWrite(led, HIGH);&lt;br /&gt;
    delay(200);&lt;br /&gt;
  }&lt;br /&gt;
 &lt;br /&gt;
  digitalWrite(led, LOW);&lt;br /&gt;
  delay(100);&lt;br /&gt;
    &lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Raymii</name></author>
	</entry>
</feed>