Thinking through a project: encoder emulation

So I have a guitar pedal with an encoder that selects mode/preset. I'm thinking it should be relatively simple to add MIDI in as long as I can properly emulate the encoder.

I'd be using software serial listening on the 0 pin of an Attiny85 exclusively for program changes on the channel.

Measuring the encoder in my guitar pedal, the center pin is ground while the outer pins are both 3.2V.

When the encoder is operated on the pedal, it changes the mode until it reaches either the first or last mode, and then it stays there. So my emulation would need to set the encoder to Mode 1 and then either keep it there (say if my MIDI program change is 1) or turn it up to 11 steps to get to Mode 12.

What's tripping me up is that the default state of the pins. If the center pin was high and the outer pins were low, I'd just need to send out of phase high pulses to the outer pins to emulate the encoder turning in either direction, but since it's opposite I want to send alternate low pulses. But when the output pin goes high I don't want to add 3.2 V onto the 3.2 V that's already present on the pin. Would pull-up resistors be the answer?

I'm thinking this is a relatively simple problem but I want to make informed decisions before wiring things up rather than just guessing and checking.

Visual of what I'm thinking. The Midi portion of this was copied from another circuit I'm working on which is why there's an AGND, but E1, E2, and ES are the encoder connections, ES being for the switch.

I manually tested the encoder switching and it works in theory. When I ground out one pin A, ground out pin B, and then deground A it moves to the next mode. So low pulses should work, I'm just concerned with what happens when the Attiny pin goes high.

OK brain fart. I realized what I want to do is to use transistor switching. Sheesh!

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.