Go Down

Topic: multiplexing and max/msp ? a survey (Read 17473 times) previous topic - next topic


Tutorials with pictures are the best way of doing them, and it doesn't take that much time to add picts to a tutorial.

ps: any idea about my question on the difference between the 3 products and/or which one is the one from the tutorial?


Not sure but I think I found it at maplin ( uk ), the 4051:

So I could try to buy two directly from my local Maplin and try the thing before I order more online. :)
Please could anyone could confirm that I am looking in the right direction   :-/

If it works I am also going to try to use it with the "arduino as a capacitive sensor" ( http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1171076259 ). This technique is really great, the guy who done that is really good.
I imagine I would need two 4051, one for demultiplex and one for multiplex as the technique need two pin ( 1 input 1 output ) for each sensor.

Anyway if it works I will put the code and picts as a tutorials for people like me who doesn't know much about electronic.


i dont know enough about electronics to help you. i would just go with the one on jameco that was discussed earlier on this forum.

btw: i got a call from jameco this morning all my stuff should ship on the 19th.


Sep 18, 2007, 10:25 am Last Edit: Sep 18, 2007, 10:26 am by TM Reason: 1
Thanks for replying. Jameco looks good but it's the US and I live in the UK.
They will receive two 4051 next monday at my local maplin. If they are the right ones ( hope so ) that will mean that UK people will know that they can find them there.
good luck for with yours  :)


they should be ok.

Maplin is not great for that kind of stuff these days  - they seem to be more interested in consumer electronics than components. Their online info about their components is minimal too.

I tend to use


in that order, as they carry good range of stuff and have datasheets links for nearly every product they sell


Thanks Nick.
I knew the 2 first links but I could find the 4051, I am sure it's because I really don't know much about electronics.
I only used Rapid once for buying vibration tilt sensors.
It's true that maplin don't give the data sheet online ,you have to ask by mail for it !!!!  :o


Sep 20, 2007, 08:03 am Last Edit: Sep 20, 2007, 08:14 am by Daniel Reason: 1

IC part numbers for the 4000 series CMOS line work like this:

Prefix - part number - B for current series - package style

HEF 4051 B T = Philips, plastic SO16 package
CD 4051 B F =  Texas Instruments, 4051, ceramic dip, military temperature range.

The first letters are usually specific to the manufacturer. For example, HEF= Philips, while CD= Texas Instruments. over the years some of these prefixes get generizied, and everyone starts using them too.

Look in the appropriate manufacturer's datasheet. All the package suffixes will be described there.
When in doubt, write down the part numbers and look in the datasheet. A tip is that plastic DIP packages usually have P in the suffix.

PS current datasheets are ALWAYS Free. Just go to the manufacturer's site. they want you to buy this stuff. In the old days they would even send you books. I have to go now, my hearing aid battery is low. :)


cheeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeerrrrrs  :-*


well my 4051's came today along with my 10K linear taper pots and some knobs? i'm in business. hopefully by the end of the weekend ill be ready to attack the software finally!


Ok! So i wired up my board with a single 4051 as per these following instructions http://www.arduino.cc/playground/Learning/4051  i them wired up a single 10K pot with a 10k resistor up to to my setup and used the following code from the afore mentioned tutorial. and i got not nothing. in the arduino window there was nothing printed. am i doing something wrong? see the attached photos for examples of my wiring setup.

Code: [Select]

* codeexample for useing a 4051 * analog multiplexer / demultiplexer
* by david c. and tomek n.* for k3 / malmö högskola

int led = 13; //just a led
int r0 = 0; //value select pin at the 4051 (s0)
int r1 = 0; //value select pin at the 4051 (s1)
int r2 = 0; //value select pin at the 4051 (s2)
int row = 0; // storeing the bin code
int count = 0; // just a count
int bin [] = {000, 1, 10, 11, 100, 101, 110, 111};//bin = binär, some times it is so easy

void setup(){

 pinMode(2, OUTPUT);    // s0
 pinMode(3, OUTPUT);    // s1
 pinMode(4, OUTPUT);    // s2
digitalWrite(led, HIGH);


void loop () {

 for (count=0; count<=7; count++) {
   row = bin[count];      
   r0 = row & 0x01;
   r1 = (row>>1) & 0x01;
   r2 = (row>>2) & 0x01;
   digitalWrite(2, r0);
   digitalWrite(3, r1);
   digitalWrite(4, r2);
   delay (1000);


all this stuff is also available in a pdf:


Sep 23, 2007, 03:37 am Last Edit: Sep 23, 2007, 03:43 am by Daniel Reason: 1
You only have +5V going to the pot. It needs to go to Vcc on the 4051. also you should put a .1Uf capacitor across the chip's Vcc and ground connections.


edit: same goes for the ground connection to the chip.

Very broadly and generally speaking, there are roughly two kinds of components in electronics: passive and active.

Passive components (resistors, capacitors, diodes, inductors etc) can be wired into an existing circuit without power supply connections, as they serve to modify an already powered circuit.

Active components (transistors, integrated circuits, op-amps, etc) need their own power source to do their thing. Your chip is an active device, and right now it can't do anything as it has no power. Wire the +5 and GND to it according to the datasheet, and it should work.  


i had wondered about that because on the 4051 sheet it described the vcc in etc. but then it also said that the vcc should go out to the digital input.

i guess this image confused me? made me think you either use it like it is on the left -OR- the right.

so effectively the upper right pin on the 4051 should go both to a digital pin and receive power? that seems odd to me but i'm way new to electronics. let me know if im misunderstanding? i dont wanna burn anything up.


yes connect pin 16 to +5V and pin 8 to GND. leave the other connections to the chip that you've already made.



hmm with the proto board on arduino.app says the programmer isn't responding. i don't have any 1uf capacitors only .01uf is it crucial?

board pics posted below.


Sep 23, 2007, 04:43 am Last Edit: Sep 23, 2007, 04:44 am by Daniel Reason: 1
ok you are doing good. We'll talk you through this thing, don't panic.

Very carefully,
- take the wires out of Digital 0 and 1,
- assuming no explosion, proceed to next step.
- Rewire your circuit. as you had it in the old images, except you'll have your new power connections ( excellent!) and  you won't be using pins 0 and 1.

You can't use 0/1 as they're used during programming.


Go Up