Answers.Body: <p>The light turning off happens because of the <a href="https://github.com/mindboards/ev3sources/blob/master/lms2012/d_analog/Linuxmod_AM1808/d_analog.c#L198" rel="nofollow noreferrer">Device Connection Manager</a> in the EV3 firmware. The algorithm used to detect when a motor is connected relies on there being a load on pins 5 and 6 of the output ports to determine if the motor is a Large or Medium motor. The 8528 adapter cable only has wires on pins 1 and 2.</p>
  
  <p>When you use a VM command (via a programming block or by using the on-brick app) to tell a motor to run, it forces the motor to run, but then the device connection manager immediately resets everything because it doesn't think that a motor is connected.</p>
  
  <p>Also see <a href="https://bricks.stackexchange.com/questions/2325/how-to-use-power-functions-with-mindstorms-ev3">How to use Power Functions with Mindstorms EV3?</a></p>
  
  <p><s>The fact that setting a power of -100 keeps the power on continuously, though, is new to me. I'm at a bit of a loss to explain that observation.</s></p>
  
  <p>UPDATE:</p>
  
  <p>I've done some digging and now I better understand what is going on.</p>
  
  <p>Output port pin 2 is connected to pin 6 via a 100k resistor as seen in the schematic diagrams below.</p>
  
  <p><a href="https://i.sstatic.net/gkLcw.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/gkLcw.png" alt="electrical schematic depicting LEGO MINDSTORMS EV3 output port connector"></a></p>
  
  <p><a href="https://i.sstatic.net/vkgIf.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/vkgIf.png" alt="electrical schematic depicting LEGO MINDSTORMS EV3 output port pin 6 electronic circuit"></a></p>
  
  <p>When the EV3 is instructed to run a motor in the forward direction pin 1 will have battery voltage and pin 2 will be at 0V. When running in reverse, however, pin 1 will be at 0V and pin 2 will be at battery voltage.</p>
  
  <p>When using the converter cable, nothing is connected to pin 6 externally, so it will also be at battery voltage (pulled down slightly by R216 to +5V). This <a href="https://github.com/mindboards/ev3sources/blob/master/lms2012/d_analog/Linuxmod_AM1808/d_analog.c#L3078" rel="nofollow noreferrer">triggers an event in the device connection manager</a>. Most of the time (but not 100% of the time) the EV3 will think that it has a motor attached because of this and so the LED will stay on.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-03-31T17:28:09.070Z
Answers.LastActivityDate: 2018-10-28T19:31:03.913Z
Answers.LastEditDate: 2018-10-28T19:31:03.913Z
Answers.UserDisplayName: David Lechner
Body: <p>I have the following setup:
  <a href="https://i.sstatic.net/yByne.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/yByne.jpg" alt="Setup"></a>
  It consists out of</p>
  
  <ul>
  <li>An EV3 brick </li>
  <li>A nxt to 9v conversion cable (<a href="https://www.bricklink.com/v2/catalog/catalogitem.page?P=x1676" rel="nofollow noreferrer">https://www.bricklink.com/v2/catalog/catalogitem.page?P=x1676</a>) </li>
  <li>A 20 cm 9v to Power Functions conversion cable </li>
  <li>Power functions LED's</li>
  </ul>
  
  <p>This is my program:
  <a href="https://i.sstatic.net/8EZM3.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/8EZM3.png" alt="ev3 program"></a></p>
  
  <p>It works fine if I provide a negative power to the unregulated motor (i.e. the LEDs light up for 5 seconds), however with a positive power, it flashes just shortly.
  This does not seem to depend on the orientation of the connectors between the conversion cables.</p>
  
  <p>Also the motor test pane on the EV3 brick behaves similarly, the LEDs flash when pressing the button to move 'forward' and lights up continuously when pressing the 'reverse' button.</p>
  
  <p>So I have an acceptable workaround, but I would like to know why this is.</p>
  
Tags: <ev3><power-functions>
Title: Using the unregulated motor block and conversion cable to light LEDs
UserDisplayName: Michael Verschaeve
ThreadText: # Using the unregulated motor block and conversion cable to light LEDs
  
  (Asked by: username_0 on 2018-03-31)
  
  I have the following setup:
  [![Setup](https://i.sstatic.net/yByne.jpg)](https://i.sstatic.net/yByne.jpg)
  It consists out of
  
  * An EV3 brick
  * A nxt to 9v conversion cable (<https://www.bricklink.com/v2/catalog/catalogitem.page?P=x1676>)
  * A 20 cm 9v to Power Functions conversion cable
  * Power functions LED's
  
  This is my program:
  [![ev3 program](https://i.sstatic.net/8EZM3.png)](https://i.sstatic.net/8EZM3.png)
  
  It works fine if I provide a negative power to the unregulated motor (i.e. the LEDs light up for 5 seconds), however with a positive power, it flashes just shortly.
  This does not seem to depend on the orientation of the connectors between the conversion cables.
  
  Also the motor test pane on the EV3 brick behaves similarly, the LEDs flash when pressing the button to move 'forward' and lights up continuously when pressing the 'reverse' button.
  
  So I have an acceptable workaround, but I would like to know why this is.
  
  **Tags:** ev3, power-functions
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2018-03-31. Score: 4
  
  The light turning off happens because of the [Device Connection Manager](https://github.com/mindboards/ev3sources/blob/master/lms2012/d_analog/Linuxmod_AM1808/d_analog.c#L198) in the EV3 firmware. The algorithm used to detect when a motor is connected relies on there being a load on pins 5 and 6 of the output ports to determine if the motor is a Large or Medium motor. The 8528 adapter cable only has wires on pins 1 and 2.
  
  When you use a VM command (via a programming block or by using the on-brick app) to tell a motor to run, it forces the motor to run, but then the device connection manager immediately resets everything because it doesn't think that a motor is connected.
  
  Also see [How to use Power Functions with Mindstorms EV3?](https://bricks.stackexchange.com/questions/2325/how-to-use-power-functions-with-mindstorms-ev3)
  
  ~~The fact that setting a power of -100 keeps the power on continuously, though, is new to me. I'm at a bit of a loss to explain that observation.~~
  
  UPDATE:
  
  I've done some digging and now I better understand what is going on.
  
  Output port pin 2 is connected to pin 6 via a 100k resistor as seen in the schematic diagrams below.
  
  [![electrical schematic depicting LEGO MINDSTORMS EV3 output port connector](https://i.sstatic.net/gkLcw.png)](https://i.sstatic.net/gkLcw.png)
  
  [![electrical schematic depicting LEGO MINDSTORMS EV3 output port pin 6 electronic circuit](https://i.sstatic.net/vkgIf.png)](https://i.sstatic.net/vkgIf.png)
  
  When the EV3 is instructed to run a motor in the forward direction pin 1 will have battery voltage and pin 2 will be at 0V. When running in reverse, however, pin 1 will be at 0V and pin 2 will be at battery voltage.
  
  When using the converter cable, nothing is connected to pin 6 externally, so it will also be at battery voltage (pulled down slightly by R216 to +5V). This [triggers an event in the device connection manager](https://github.com/mindboards/ev3sources/blob/master/lms2012/d_analog/Linuxmod_AM1808/d_analog.c#L3078). Most of the time (but not 100% of the time) the EV3 will think that it has a motor attached because of this and so the LED will stay on.
  
  
  ---
  
  