multiplexing and max/msp ? a survey

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.

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 :slight_smile:

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

folks:

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.
D

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. :slight_smile:

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 Arduino Playground - 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.

/*

 * 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); 
  beginSerial(9600);

}

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);
    //Serial.println(bin[count]);
    delay (1000);
  }  

}

all this stuff is also available in a pdf:

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.

D

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.

D

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.

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.

D

unplugged d0 and d1 programmed it and then replugged them both in? cool. however still no print out in arduino.app when i twist the pot. typically i see a stream of data in the sketch window when i test stuff like this? but i haevtn really looked at this guys code to see if thats how its setup.

by the way youre a champ for helping me with all of this jazz!

i forgot to mention on the last image i took out the pot to make it less confusing looking.

whew

i think we can just thank god that you didn't blow up...:slight_smile:
It only too me two minutes to help, as I'm designing a web site and when my email went 'ding' it was a good distraction. I guess that's what the team means by the "support" that they provide for official Arduino products.... i.e. support by someone other than the team. ;D Ok, ok , they're paying for the hosting.

beginSerial(9600);

that's wrong, check the reference and comment out the other serial command and it should work.

You're on your own now, Vancouver sushi is calling.

D

right on man? have poke roll for me ;] i think im gonna quit for the night too. hopefully we can get this crap rolling soon.

hmm what makes you think that the 9600 baud was incorrect. i really have no idea what it should be if thats wrong. i basically just copy pasted the text from the tutorial.

however that said, when i uncommented the this line:
Serial.println(bin[count]); in the serial inspecting window i did get it counting 0 1 10 100 101 110 111 etc.

Lastly i moved the jumpers from the 4051 to only occupy d2 d3 and d4 so that way no more unplugging and plugging back in every time i reprogram the arduino. it also seem according to this code that 2 3 and 4 are the ones hes calling as per this line

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

hmm what makes you think that the 9600 baud was incorrect.

Like I said, check the reference... there is no "beginSerial" command.

file://localhost/Applications/arduino-0009/reference/Serial_Begin.html

D

whoops. sorry. hopefully this isn't way more hand holding than you counted on? i'm just hoping i haven't bit off more than i can chew. switched that code out. but in looking at the code i don't think there is anything to tell the arduino.app to read the pins when a pots values change. now this is the part i'm confused about do i use an analog read http://www.arduino.cc/en/Reference/AnalogRead which would only check the values coming out of the 4051 into the a0 port. or do i read all the values from the digital pins ? http://www.arduino.cc/en/Reference/DigitalRead. seems like analog since the digital pins are all 1/0 rather than variable.

thanks again for all your help i really do appreciate it. and i think if we get this thing rolling it could serve as a rad tutorial for other folks step by step wise.

hmm

sounds like more work than I have time for, but maybe someone else will jump in here and help you with that part?

D