CD4066 chip messing up my power supply

Hello,
I am trying to use an standalone Atmega328p chip powered by 5v battery to turn on/off the power (12v battery) to a drone, and mimic pushing one of the momentary buttons on the drone circuit (start/stop recording).

I have tried successfully using a TIP120 transistor to switch on/off the 12v power supply to the drone circuit. Next I decided to use a CD4066 chip to mimic the push button on the drone. Now this circuit stops working, and the voltmeter is reading 7-8 volts. If i remove the TIP120, and just power the drone directly, the CD4066 chip successfully toggles the button, and the voltmeter reads 5v.

With the TIP120 back in place, it seems that when i connect the power to the CD4066 chip, the arduino gets 7-8 volts all of a sudden. But when i cut that wire ( green circle/cross) the voltage goes back to 5v and the remaining part of the circuit works fine. I can't seem to have both switches be operable at once.

I could just use a relay to push the switch for me, but it's big and bulky.

What should i poke first??

There are DIP relays the same size as the '4066.

PE - adding link
https://www.jameco.com/z/HE721C0510-Hamlin-Electronics-SPDT-PC-Mount-Relay-200-Ohm-1-5A-5V_2276919.html

1 Like

Wiring mistake. There is a good chance that the chip, and possibly other parts have been destroyed.

1 Like

Aha! this should work! Thank you very much!

I can't see the mistake though, everything still works, i was suprised that the 8 volts didn't do something though..

Why do you need an analog switch to connected to the start/stop button? Check the button to figure out if it is normally HIGH and LOW when pressed or the other way around and then just connect it directly to your '328. It looks like that system is 5V

1 Like

You show the volt meter reading off a block labeled “5 V BATT”, what is that actually?

If you leave off the wires hijacking the pushbutton (the ones from the 4066), does it behave the same?

a7

1 Like

I use a 1000mAh 3.7v lipo battery, which i put through a voltage booster to get 5 volts power supply. The 12v battery is a big lipo you get from drones.

I just tried removing the wires hijacking the button and the voltage dropped to 5v !! but when i connect even just one wire to the 4066, the voltage goes back up, some of the leds on the pcb would flicker too, even though the TIP120 was "off", but it doesn't happen anymore. All pieces still work though. I'm worried i'm damaging it now.

I was wondering whether to do that, but i'm worried that it might not be that simple. I'll try to find a schematic of it.

Thanks for doing the experiment with the 4066.

I think the problem arises because the 4066 Vcc is 5 volts, and you may be asking the switch to handle an unknown voltage considerably higher.

A solution Something to try would be to

  • power the 4066 from the 12 volt nominal you have.
  • level translate the logic signal from the Arduino (0 volts LOW, 5 volts HIGH) to 0-12 volts to properly drive the 4066 switch.

A single transistor would work here, the signal is very slow emulating a human finger. You might have to change what is the sense of "pressed" and "not pressed" in the code at the point where you digitalWrite that signal.

But I am out on a limb here. If the above isn't something you could do in your sleep, so to speak, you might wanna wait until one of the heavies weighs in with better confidence.

I am mostly following along because… I just took delivery of a few 4066s and am planning to hijack some certain switches, so anything I can learn here will be useful. Because what you doing should work; the disparate voltages between the two sections is the only thing I can see in your way, otherwise your description seems impossible. :expressionless:

a7

1 Like

I see what you mean about the voltage driving the 4066. I think the two voltages may be "fighting" or something, 12-5 = 7v ? but the voltage around the button should also be 5v? I think it gets stepped down from 12 in the first pcb, now i'm even more confused lol.
I'm not overly confident in what i'm doing but i'm going to tinker with the 4066 on it's own away from my 328 and drone for now. maybe try to find the schematic for the button.
Thanks for your help!
i'll let you know if i find anything out
bl

What is the voltage between pin 1 and 2 on CD4066 ? What is the voltage to ground on them ? Check the voltage marked in red 5V (right side bottom on drawing )

1 Like

When i have all wires connected the voltage across from ground to pin 1 on 4066 is +8v, same on pin 2. But when i measured the voltage between pin 1 and 2 it kind of "paralyses" the circuit?? i get no readings, everything is off, and i have to disconnect/reconnect ground from 5v batt to get it back to normal. The first time this happened, i have an LED on D10 (not in diagram) that got turned on somehow, it doesn't do that anymore, but it still works.

i measured the 5v supply to the pcb to be correct. But i measured from the negative of the 12v battery to both sides of the button. One side got 0v, and the other side got 3.3v ! So now i'm thinking either the 4066 need to be powered by 3v3 or maybe the logic control pin needs to be level shifted(?) to 3v3?

An opto coupler could also be good in this case for replacing a switch (mimicking a push button) in that you need to know little about the circuit you are interfacing to.

1 Like

That's a good ieda, i still can't find the schematic though. but i did figure out the voltage on one side of the button is 0v and the other side is +3.3v

That is enough to know how to connect the opto coupler. The emitter goes on the low side.
I'd measure the current between the 2 poles of the push button and expect to see less than 1mA. If it is much higher, then look more carefully because that could mean the push button is carrying power say to initiate a latch circuit.

1 Like

opto coupler works a charm! Thanks!