Maker Pro
Maker Pro

Connecting a 4066 switch - new to this!

Hi, I'm a complete beginner when it comes to circuits, the most I've done is a simple led circuit in school! Ok so basically I need to make a simple circuit with a 4066 analogue switch and connect an arduino across it. But my problem is this, It looks nothing like what I'm used to, how do you solder it into the circuit?! I have a solderless breadboard if that helps, as well as gods only amount of wire and solder.

Thanks for any help in advance
 
Hi! Welcome to the forum!

The first step is to draw a schematic and describe exactly what you're trying to do. When I do this, I just sketch the circuit on paper, then take a photo of it with my camera (this is usually faster than using some computer tool).
 
By looking at the datasheet, it might be possible you have a surface-mount package instead of a through-hole package. Can you take a picture of the 4066, in addition to drawing the schematic?
 
Ok this is such a bad drawing, and I know I haven't used the right symbols, but hopefully it's all clear enough!
 

Attachments

  • hack.jpg
    hack.jpg
    19.1 KB · Views: 417

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
I think that would not work. Arduino's have more than 3 connections and analog switches more than 2. And the connections are not labelled.

What are you actually wanting to do? (not how, WHAT)
 
Oh, well yeah that's where I'm confused.... I'm using pin12 in the arduino. Pretty much I'm using the arduino to control the keyboard, 'pressing' the button at pseudo random intervals using a keyboard hack. I have all the code written correctly, it's the circuitry I'm really confused with... Like mainly just where on the switch it needs to be connected!
Thanks
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
OK, so basically, you would connect the in and out connections of one of the 4066's switches across the keyboard (presuming that the keys are simple contacts and not something exotic like capacitive or hall effect).

Then connect the control input of that switch in the 4066 to pin 12 of the arduino.

Connect the Vss and Vdd of the 4066 to the 0v and +5v of the keyboard (anything between 5V and 12V should be fine, but check the specs on the chip you have.

Ensure that the power to the arduino has a common ground with the 4066 (and therefore the keyboard.

You will also want to connect all the other (unused) control inputs of the 4066 to ground.
 
Thanks for your help steve, you've cleared an awful lot up for me and I'm almost ready to go. It's just the business of grounding everything. In school we learnt that meant to stick a big rod into the soil and attach the wire to it, surely that's not what I should be doing here, right?
 
Make sure all the negatives / 0V are connected together. This ensures you have all your devices connected to the same reference level. After all, voltage is the difference in potential.
 
Sorry I feel like such a plonker, it was only 3 years ago I could've done all this in my sleep. But I really don't get what I've to do here. I've included a load of photos (sorry about the quality, my camera's broke so I had to use my phone!) of what I've done which should hopefully help!

Sorry and thanks!
 

Attachments

  • Photo0108.jpg
    Photo0108.jpg
    141.8 KB · Views: 207
  • Photo0105.jpg
    Photo0105.jpg
    148.3 KB · Views: 197
  • Photo0107.jpg
    Photo0107.jpg
    112.8 KB · Views: 208
  • Photo0106.jpg
    Photo0106.jpg
    138.1 KB · Views: 220

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
The first big thing is that you have no power connected to the 4066, and you have left all the other control inputs floating.

There is no way it can work.

Connect up the power supply to it, and then connect all the other control inputs to ground.
 
Yes I get that from your last post, what I mean is I'm not sure where the power supply is, you said about the 0V and the +5V of the keyboard, but I'm not sure where they are, also I've no idea how to ground the other controls, does that just involve connecting them all to one of the GNDs on the arduino?
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
you need to find the power supply in the keyboard. This should not be too hard. Get a multimeter and find out which pins connect to ground and +5v (I'm assuming it's +5V). If it's a USB keyboard, look up the specs for USB. Tat will tel you where 0V and +5V are.

0V is ground.

You also have a power supply for your arduino. The most negative tail as also ground.

Connect ground on the arduino to ground on the keyboard.

The 4066 needs +5v and ground Connect the ground pin (pin 7) and all the unused control inputs to the common ground that you have.

Connect the VDD pin (pin 14) to your +5V.
 
+5V on the USB connector on the tan board from the keyboard will be the red wire. Ground will be the black wire next to the green wire. The green and white are Data+ and Data-, respectively. The last black is a ground pin for the cable shield.

For reference for anybody else who might want more information on (along with better pictures of the front and back of) the Arduino board, it can be found here:

http://arduino.cc/en/Main/ArduinoBoardUno

Be sure to keep us updated on your progress, especially if you have any success. ;)
 
Top