# Pedal-O-Matic foot pedal module

**URL:** <https://lookmumnocomputer.discourse.group/t/pedal-o-matic-foot-pedal-module/1210>\
**Category:** DIY STUFF\
**Created:** [June 13, 2020, 3:34pm UTC](https://lookmumnocomputer.discourse.group/t/pedal-o-matic-foot-pedal-module/1210 "2020-06-13T15:34:42Z")\
**Posts on this page:** 14\
**Page:** 2

<div class="post-metadata">

**Author:** ![analogoutput](https://yyz2.discourse-cdn.com/free1/user_avatar/lookmumnocomputer.discourse.group/analogoutput/32/29663_2.png) [@analogoutput](https://lookmumnocomputer.discourse.group/u/analogoutput)\
**Post date:** [June 29, 2020, 11:32am UTC](https://lookmumnocomputer.discourse.group/t/pedal-o-matic-foot-pedal-module/1210/21 "2020-06-29T11:32:21Z")

</div>

Here’s a [differential amplifier](https://www.electronics-tutorials.ws/opamp/opamp_5.html) topology:  
 ![image](https://global.discourse-cdn.com/free1/uploads/lookmumnocomputer/original/2X/d/d468877d4e98528bc25aa18370013dc7ddea371c.png)  
When R1 = R2 and R3 = R4, Vout = (R3/R1)(V2-V1).

---

<div class="post-metadata">

**Author:** ![Jos](https://yyz2.discourse-cdn.com/free1/user_avatar/lookmumnocomputer.discourse.group/jos/32/151_2.png) [@Jos](https://lookmumnocomputer.discourse.group/u/Jos)\
**Post date:** [June 29, 2020, 6:26pm UTC](https://lookmumnocomputer.discourse.group/t/pedal-o-matic-foot-pedal-module/1210/22 "2020-06-29T18:26:30Z")

</div>

[EDIT] Rats! The + and - input of the U2A op-amp are swapped in the drawing. As you can see this is not the case in the hand drawn original design / schematic, I posted earlier. I will change this.

---

<div class="post-metadata">

**Author:** ![Jos](https://yyz2.discourse-cdn.com/free1/user_avatar/lookmumnocomputer.discourse.group/jos/32/151_2.png) [@Jos](https://lookmumnocomputer.discourse.group/u/Jos)\
**Post date:** [June 29, 2020, 6:33pm UTC](https://lookmumnocomputer.discourse.group/t/pedal-o-matic-foot-pedal-module/1210/23 "2020-06-29T18:33:35Z")

</div>

And then one would need 8 pwm outputs of the Nano to be able to light the LEDs proportionally to the voltage and 4 ‘plain’ ports for the midi LEDs. Or use less ports in combination with a multiplexing network. There are various possible approaches to this.

---

<div class="post-metadata">

**Author:** ![analogoutput](https://yyz2.discourse-cdn.com/free1/user_avatar/lookmumnocomputer.discourse.group/analogoutput/32/29663_2.png) [@analogoutput](https://lookmumnocomputer.discourse.group/u/analogoutput)\
**Post date:** [June 29, 2020, 6:34pm UTC](https://lookmumnocomputer.discourse.group/t/pedal-o-matic-foot-pedal-module/1210/24 "2020-06-29T18:34:23Z")

</div>

U1B has feedback on the inverting input, which is as it should be, right?

---

<div class="post-metadata">

**Author:** ![Jos](https://yyz2.discourse-cdn.com/free1/user_avatar/lookmumnocomputer.discourse.group/jos/32/151_2.png) [@Jos](https://lookmumnocomputer.discourse.group/u/Jos)\
**Post date:** [June 29, 2020, 6:37pm UTC](https://lookmumnocomputer.discourse.group/t/pedal-o-matic-foot-pedal-module/1210/25 "2020-06-29T18:37:21Z")

</div>

Yep, U1B is drawn correctly. I will change the schematic now and correct the text in my previous post.

---

<div class="post-metadata">

**Author:** ![Jos](https://yyz2.discourse-cdn.com/free1/user_avatar/lookmumnocomputer.discourse.group/jos/32/151_2.png) [@Jos](https://lookmumnocomputer.discourse.group/u/Jos)\
**Post date:** [June 29, 2020, 6:55pm UTC](https://lookmumnocomputer.discourse.group/t/pedal-o-matic-foot-pedal-module/1210/26 "2020-06-29T18:55:16Z")

</div>

In the original sub schematic unfortunately the + and - inputs of the (subtracting) op-amp U2A were swapped. This has been corrected in this schematic:

 ![schematic_sub_pedal_01_v0.2_cropped](https://global.discourse-cdn.com/free1/uploads/lookmumnocomputer/original/2X/c/c6f51032dd34a77b9ff1bdb2e3477d89fba38f1d.png)  
If you are not interested in using the LEDs to show the foot pedal position, you can leave U2C and U2D out and all signal circuitry connected to them. You could then use a TL072 in stead and adapt the schematic to the pin out of that op-amp.

---

<div class="post-metadata">

**Author:** ![Jos](https://yyz2.discourse-cdn.com/free1/user_avatar/lookmumnocomputer.discourse.group/jos/32/151_2.png) [@Jos](https://lookmumnocomputer.discourse.group/u/Jos)\
**Post date:** [June 30, 2020, 6:43pm UTC](https://lookmumnocomputer.discourse.group/t/pedal-o-matic-foot-pedal-module/1210/27 "2020-06-30T18:43:24Z")

</div>

I added the schematics to the [Pedal-O-Matic repository](https://github.com/josbouten/Pedal-O-Matic.git).

---

<div class="post-metadata">

**Author:** ![Jos](https://yyz2.discourse-cdn.com/free1/user_avatar/lookmumnocomputer.discourse.group/jos/32/151_2.png) [@Jos](https://lookmumnocomputer.discourse.group/u/Jos)\
**Post date:** [July 4, 2020, 3:38pm UTC](https://lookmumnocomputer.discourse.group/t/pedal-o-matic-foot-pedal-module/1210/28 "2020-07-04T15:38:37Z")

</div>

Calibration of the LEDs: Set the switch to 0V…5V range. Attach a foot pedal. Now only the green LED may vary in intensity. Set the trim potentiometer RV1 so that the green LED can be varied from off to brightly lit when using the pedal. Set the trim potentiometer RV3 for the Yellow Led so that the LED will not light up but is close to lighting up (if the green LED is dark). If the yellow LEDs does not dimm enough, adjust RV2. You need to adjust RV2 only once, it supplies a bias voltage to all yellow LEDs.

---

<div class="post-metadata">

**Author:** ![Jos](https://yyz2.discourse-cdn.com/free1/user_avatar/lookmumnocomputer.discourse.group/jos/32/151_2.png) [@Jos](https://lookmumnocomputer.discourse.group/u/Jos)\
**Post date:** [July 6, 2020, 8:26pm UTC](https://lookmumnocomputer.discourse.group/t/pedal-o-matic-foot-pedal-module/1210/29 "2020-07-06T20:26:43Z")

</div>

Today I connected 4 foot pedals to Pedal-O-Matic and connected its midi out to Ableton. From Ableton I sent the midi data to a synth which I had programmed to use midi controllers for a.o. the center frequency of a ladder filter, the resonance of that filter and the mix between the output of the ladder filter and a variable state filter. While playing around with this setup I really got the feeling that this will add great modulation possibilities to the way I normally play the instrument.

---

<div class="post-metadata">

**Author:** ![eric](https://avatars.discourse-cdn.com/v4/letter/e/898d66/32.png) [@eric](https://lookmumnocomputer.discourse.group/u/eric)\
**Post date:** [July 24, 2020, 11:23am UTC](https://lookmumnocomputer.discourse.group/t/pedal-o-matic-foot-pedal-module/1210/30 "2020-07-24T11:23:15Z")

</div>

Nope, because a single LED of a pair can be on, 4 PWM are enough, with another 4 plain digital outputs.  
Just connect the two LEDs of one channel in “anti-parallel” between a PWM and a digital pin (with limiting resistors obviously…).  
By setting the digital pin to 0 or 1, you chooses which of the LEDs is on, with the PWM you choose intensity (take care, one of the LEDs will be “reversed”, so for one you have to use MAX-value for the PWM)

Edit: to turn both LEDs off, put the digital pin in high-impedance mode (i.e. input).

---

<div class="post-metadata">

**Author:** ![Jos](https://yyz2.discourse-cdn.com/free1/user_avatar/lookmumnocomputer.discourse.group/jos/32/151_2.png) [@Jos](https://lookmumnocomputer.discourse.group/u/Jos)\
**Post date:** [July 24, 2020, 11:27am UTC](https://lookmumnocomputer.discourse.group/t/pedal-o-matic-foot-pedal-module/1210/31 "2020-07-24T11:27:56Z")

</div>

Doesn’t anti-parallel imply that one of the LEDs is always on? In your setup what do you do if you don’t want either to be on?

---

<div class="post-metadata">

**Author:** ![eric](https://avatars.discourse-cdn.com/v4/letter/e/898d66/32.png) [@eric](https://lookmumnocomputer.discourse.group/u/eric)\
**Post date:** [July 24, 2020, 11:35am UTC](https://lookmumnocomputer.discourse.group/t/pedal-o-matic-foot-pedal-module/1210/32 "2020-07-24T11:35:04Z")

</div>

Put the digital pin in high-impedence mode (i.e. input).  
This is a really simplified version of charlieplexing :

> **[Charlieplexing](https://en.wikipedia.org/wiki/Charlieplexing)**
>
> Charlieplexing is a technique for driving a multiplexed display in which relatively few I/O pins on a microcontroller are used e.g. to drive an array of LEDs.
> The method uses the tri-state logic capabilities of microcontrollers in order to gain efficiency over traditional multiplexing. Although it is more efficient in its use of I/O, there are issues that cause it to be more complicated to design and render it impractical for larger displays. These issues include duty cycle, current requirements...

---

<div class="post-metadata">

**Author:** ![Jos](https://yyz2.discourse-cdn.com/free1/user_avatar/lookmumnocomputer.discourse.group/jos/32/151_2.png) [@Jos](https://lookmumnocomputer.discourse.group/u/Jos)\
**Post date:** [July 24, 2020, 11:37am UTC](https://lookmumnocomputer.discourse.group/t/pedal-o-matic-foot-pedal-module/1210/33 "2020-07-24T11:37:28Z")

</div>

High impedance mode, of course, I should have thought of that !

---

<div class="post-metadata">

**Author:** ![eric](https://avatars.discourse-cdn.com/v4/letter/e/898d66/32.png) [@eric](https://lookmumnocomputer.discourse.group/u/eric)\
**Post date:** [July 24, 2020, 11:38am UTC](https://lookmumnocomputer.discourse.group/t/pedal-o-matic-foot-pedal-module/1210/34 "2020-07-24T11:38:39Z")

</div>

And I should have mentionned it in my post…

[Previous page](https://lookmumnocomputer.discourse.group/t/pedal-o-matic-foot-pedal-module/1210.md?page=1)
