Joining a 5v and a 3.3v input pin

Started by any, June 08, 2021, 07:34:40 AM

Previous topic - Next topic

any

Quote from: potul on June 22, 2021, 01:41:06 AM
Quote from: any on June 21, 2021, 11:54:09 PM
Ok, well... good news and bad news.

Good news first? Line6 M5 (and likely M9, M13 etc..) are 5v tolerant.  :D
Why do I know? well I accidentally connected them and nothing blew up.. heh
Tap tempo button works fine on the Line6 with the 5v spliced in AND sets tempo for both
simultaneously. So that's good.

Bad news is I'm probably making a real rookie mistake here, but the CD4066 is not doing what I
wanted it to do... sound familiar?

I just wanted to use the switch to shunt the 5v from the tap button and the 3.3v from the effect on/off to ground.
But that's not happening? I'm getting about a .2v voltage drop when the switch is closed.
(so to be clear 5v supply to the 4066. 5v on one side of a switch, ground on the other, supplying a 5v 'high' signal to the switch control)

I've tried to find a post/article that explains why this doesn't work, but all i can find are these
'button hack' tutorials that have the same setup so what am I missing here?

Image is how I wired it up, but that's clearly wrong... lol



without seeing what is connected to these 3.3v and 5v it's difficult to troubleshoot. What type of switch are you using (SPST or SPDT). If you want to be able to "shunt" it, you need to have a the 5v and 3.3v coming from a pull up resistor, and the switch to be "floating", otherwise you will be trying to short the power supply

Ha, Excuse my incompleteness... the 5v comes from an arduino pin with input_PULLUP and the 3.3v is a pin from the line6 M5. They (both lines) are also connected to spst 'soft touch' footswitches to make the same connection with a physical switch.

All it's supposed to do is emulate pressing both of the physical buttons simultenously.
It's supposed to sound that way.

any

Ok, so I hope this updated picture is clearer as to what I've done, and what I'm trying to do.

When i press the button connected to the arduino (not shown here) the following happens:
- the Arduino pin connected to 12 on the 4066 (control D) goes low (digitalWrite LOW) to disconnect the tap input
(the tap input uses input_PULLUP so will stay high when disconnected. (That's the plan anyway...)
- 100ms Delay
- after that the Arduino pin connected to 13 and 5 on the 4066 (control A and control B) goes HIGH to ground both the
tap and effect switch (imitate the 'simultaneous' two button press for preset select on the M5)
-100ms Delay
After that back in reverse order.

But yeah, voltages only drop like 0.2v instead of down to 0... so no worky worky hahaha!
I'm sure I'm just going about it the wrong way, so hit me with some wisdom.


It's supposed to sound that way.

potul

Ok, I see it now. I don't know why it doesn't work,... I would experiment with some resistors to ground first to see if you can pull down these inputs. Do you know the values of the pull up resistors?

On the other hand, this looks overcomplicated.... Can't you do it with some diodes, a level converter, or even using a Zener to prevent the 5v going to the Line6, and avoid the CD4066 ?


potul

Thanks Jack for the nice converter. I might use it in a project I'm building.

I must admit it took me some time to understand how the Arduino pin was able to pull down the "low voltage circuit". I had to google and found the Phillips AN97055. And then I realized of the diode inside the mosfet....

Ice-9

If you need to have more than just 1 level shifter then it easier to use a single chip level shifter, I use the Texas Instruments TXS0108EPWR which has 8 level shifters in one IC. Very simple to use 3.3v  and 5V power to the chip. Very neat compared to multiple mosfet/resistor level shifters.
www.stanleyfx.co.uk

Sanity: doing the same thing over and over again and expecting the same result. Mick Taylor

Please at least have 1 forum post before sending me a PM demanding something.