Part review – NXP 74HC4066 Quad bilateral switch IC

Hello readers!

Today we are going to examine the 74HC4066 quad bilateral switch IC. My reason for writing this comes from a comment left by a reader on chapter nine of the Arduino tutorial. They suggested using a 4066 IC to control the cathodes of the LED matrix instead of resistors and NPN transistors. This was a good suggestion, however the 4066 can only switch a current of 10mA per pin. Luckily the 74HC4066 can handle up to 25mA per switch – so we’ll look into this instead.

First of all, let’s say hello:

74hc4066

This is the 14-pin DIP package. It is also available in surface mount, and other newer package styles. Although we are looking at an example from NXP, according to my main component supplier (element-14/Newark) this IC is also manufactured by Texas Instruments, ON Semi, ST Microelectronics and Fairchild. So, what is a quad-bilateral switch? Four switches in one IC. Here is a diagram:

Imagine a simple normally-open push button. You press the button, and current can flow through the switch. Using the 74HC4066, when current is applied to the E pin, current can pass through from the matching Y pin to the Z pin. As you can see above, there are four of these switches in the IC. This is where the benefit of the IC comes to mind, normally one might use a 1k ohm resistor and an NPN switching transistor as an electronic switch, and I have done so myself. But when you need a few of them, it can be easier to start using these 74HC4066s as long as the current requirements are met.

With regards to the current the IC can switch, Is, the maximum is 25mA per switch. This is more than enough to run a typical LED, TTL logic gate, etc. The other interesting parameter is the turn-on and turn off times – at 6 volts it can turn on in around 10 nanoseconds and turn off at around 13 nanoseconds (so a rough calculation – say it takes 30 nanoseconds to switch on and then switch off, that’s 33.3 million times per seconds (33.3 MHz). All these parameters and more are available from the data sheet (pdf). Someone correct me if I’m wrong!

That’s enough theory – let’s put it to work now. Our first demonstration is quite simple – just switch on and off some LEDs via a 74HC595 shift register and an Arduino. We send a number (0, 1, 2, 4, 8 ) to the shift register, which stays off, then sets pins Q0, Q1, Q2, Q3 high in order, which in turn activate the switches 1~4 on the 74HC4066. The 74HC4066 sends a current to each LED connected to the switch outputs.

Here is the schematic:

demo1schematicsmall1

Laid out on the breadboard:

demo1small

And the ubiquitous video:

And here is the Arduino sketch: demo1.pdf. Well that was interesting. I know these simple demonstrations may be… well a little simple, but after taking the time to build them from scratch you get a better understanding of the part and how they work. Practice makes perfect and all that. Anyhow, let’s have a look at something much more interesting – a very basic (!) digital to analogue converter. Consider the circuit below:

demo2schematic

The 74HC4066 switches creates a final voltage through the sum of various currents being switched into the final output. First of all, here is a video of the switches being turned on and off one at a time:

and the corresponding Arduino sketch:demo2.pdf. The next video shows the results of sending decimal numbers 0~15 to the shift register – in effect continually adding the outputs of the pins until all pins are on, then in reverse:

and the corresponding Ardiono sketch:demo3.pdf.

Well I hope you found this part review interesting, and helped you think of something new to make. In conclusion I would consider the 74HC4066 easier and quicker for end user to use in projects (less pins to solder, etc) however using it could cost more depending on the volume required. Furthermore, this would only apply if the current restrictions of the IC are met.

So have fun and keep checking into tronixstuff.com. Why not follow things on twitterGoogle+, subscribe  for email updates or RSS using the links on the right-hand column, or join our Google Group – dedicated to the projects and related items on this website. Sign up – it’s free, helpful to each other –  and we can all learn something.

Notes: In writing this post, I used information from NXP, plus information and circuit inspiration from various books by Forrest Mims III.

The following two tabs change content below.

John Boxall

Founder, owner and managing editor of tronixstuff.com.

24 Responses to “Part review – NXP 74HC4066 Quad bilateral switch IC”

  1. Hey John, I’m lovng ths tutoral seres! You’re dong a brllant job explanng so many useful technques and concepts. Keep t up.

  2. You mentoned that ths s easer than usng a bunch of NPN transstors. Why s ths easer?

    • John Boxall says:

      Hello Danel
      I probably should have explaned that earler n the post. It was referrng to the use of a 1k resstor and an NPN transstor used as a swtch – provded the current lmts are met. For example controllng the cathodes of an LED matrx. It s easer n that there are much less components to have to handle, and f you are solderng the project usng ths chp, 1 or 2 ICs are easer to solder n than many transstors and resstors.
      Thank you for your queston.
      Cheers
      John

  3. Robert says:

    H there Danel

    I found a chp lke ths one… t’s number was 4016 whch s dscontnued… so the 4066 must be t’s replacement… n a Broadcast Electroncs operatons manual for ther mxer model 4S50. they were usng t as an analog swtch, to swtch on and off audo sgnals nto the program buss. How much attenuaton does ths chp have? how much would leak thru when n the off condton? Data sheet says -50db but aganst a machnal swtch when open s nfnty.

    Thanks n advance
    Robert

  4. Basava says:

    H,

    Please help me to desgn followng crcut,

    Actually t s basc requrement, but I am facng dffculty to desgn,
    My Query s as follows,

    How to control IC 4066 (for swtchng acton), I mean what s current and voltage supply for control lnes, to make t ON or OFF, please help me wth crcut dagram,

    Actually I want to control 4 lnes (lnes are less the DC 5V) and I want to Use IC 4066 nstead of push button,

    Regards,
    Basava!!!

  5. Delix Dangs says:

    am havng dffcultes n contructng analog to dgtal coverter usng 4066.pls what should do!

  6. Omer says:

    Good but thS IC met me In samplng crcuts can you tell us about ths

  7. rednaskellar says:

    H John!
    Thank you for all your tutorals – they very usefull for me as a begnner n electroncs.
    Whle readng ths one I ht upon the dea to make an Arduno audo nput/output swtch. But I’m not sure f t’s possble wth 74HC4066. Can I nstead of LEDs n the frst example swtch several audo source, for example PC, CD player, etc.? And can I use than second one IC to swtch the output audo sgnal between speakers or headphones? Of course I would swtch separately left and rght stereo channels.
    Do you thnk t’s possble?

  8. Deepthi says:

    H John ,

    Ths s deepth workng n larsen toubro( Meter manufacturere’s ),just a smple query f you could clear me , earler we were usng 4016 n our Energy meters , but now NXP has suggested ous to use 4066 , concerned on ths let me what are the Merts and De-Merts between the two
    Apprecate your ealest reply .

  9. Nce work John:

    Your readers may fnd my ltspce smulaton of the cd4066 quad blateral swtch useful:
    http://www.embeddedcomponents.com/blogs/2011/12/cd4066-ltspce-smulaton/

  10. Jeffrey says:

    H John, what would your suggeston be to decouple ths IC? The standard 1 decouplng capactor per IC or 1 decouplng capactor per swtch of the 4066?

  11. Marco says:

    H John,
    Ths IC could be used wth arduno for swtchng the button of a Garage door opener remote!?, If not, any recomendaton?.
    Thanks

Trackbacks/Pingbacks


Leave a Reply

Subscribe via email

Receive notifications of new posts by email.

The Arduino Book

Arduino Workshop

Für unsere deutschen Freunde

Dla naszych polskich przyjaciół ...

Australian Electronics!

Buy and support Silicon Chip - Australia's only Electronics Magazine.

Use of our content…

%d bloggers like this: