Lego Sherlock Holmes figure focuses a light beam on a Lego criminal with a small magnifying glass.

EV3 Voltage Source

A schematic shows how to connect the wires of the EV3 connector.

The EV3 Intelligent can be setup to be a programmable power supply of adjustable voltage. This idea is a sort of reverse of my other blog post on Reading Analog Voltage. Both this post and Reading Analog Voltage use customized configurations of the wires of the EV3 connector, which I have implemented using the adapter described in my post called Breakout Board. The schematic for configuring the EV3 connector wires is shown in the schematic above, corresponding to use of the Unregulated Motor block in the EV3 programming environment. The schematic is a little complicated in the handling of pins 3-6 (the red, green, yellow, and blue wires). The need for connecting these four pins in the circuit shown using resistors is to convince the EV3 that the entire connection is to a motor. In other words, the EV3 program is looking for feedback signals that would come from an encoder if the connection were made to a motor--the connection shown in the schematic provides a signal that looks like reasonable encoder data, so that the output voltage is steady. The output voltage of interest between 1 and 2 can be used to supply power to a variety of actuators, such as in my blog posts on Powering Vintage Motors, EV3 Laser, and Lissajous Laser Show.

An example EV3 program is shown below, using the Unregulated Motor block. Changing the percent power in this block will change the output voltage. The 38% setting in the figure below gives a 3-V output that is useful for powering a diode laser module (see blog post on EV3 Laser). The relationship I measured between output voltage and percent power is given in the plot at the bottom of the page. However, this is the output voltage that would be read on a voltmeter. The output is actually a square wave of 12.8 kHz with a peak amplitude 7.5-V. The square wave is sort of pulse width modulated, so that the RMS voltage varies. This is a strange way to power devices and probably shouldn't be used with sensitive or expensive components.

EV3 program based on Unregulated Motor block.

graph shows voltage output versus power setting.