Multiplexing with 74HC4067

How would you go about that in xod? using the 74HC4067 or similar?
Would love to multiplex analog inputs (pots), and output, via demultiplexing, multiple DC outputs from 0-5v.

Can it be done? I’m a compllete noob:)
thanks!

Hello, you can try this and comment if it works

cesars/4067 update!

Cool! thanks!

In my noobness, i cant seem to find that node. Where is it located in xod? Isnt there a search bar in the software somewhere?

If it doesnt work, and there is no node for it, can you make your own? I have no programming skills, but i have seen other examples, and the code for it, so i guess i could pretty much copy paste that.

thanks!

the name of the node is ctrl-4067

add the library

1 Like

Ok. Thanks. Found it.

load the library again, is updated

You are freaking amazing!
If you could make a small explanation on how to use it in an actual project (just explaining the ins/outs), that would be awesesome, but only if you have time - I dont really know how to hook it up myself:) Will go get a arduino nano and the 4067 chip today, and test next week.
Wohooooo!!

update with an example, I hope it’s useful, let me know if it does not work
this only works for inputs

I dont really get it, but like look into it:)
I know how a multiplexer works, but can’t really follow everything. But again. I’ll experiment and look into it.

It seems to me that you have a clock generator, and from there you go to a device that steps up from 0-15 I would assume, and the number 6, in green, is where the step has reached? The select block, I don’t fully understand. Also don’t understand the “value” on the lower left.

But I’ll get it at some point:)

Is there an output version in the works?:wink:
Or maybe I can find that somewhere else?

Ok, VAL is the reading of PORT (A0), with a, b, c, d you control the outputs ABCD for channel 0-15, if it is at 6 the value that arrives at PORT is channel 6(0-15), and that value will you can see in VAL

PORT, INH, A, B, C, D are ports in arduino

update, please try it

THANKS MAN! :slight_smile:
I dont have time to test it now, but will probably try it out sometime next week.

WOHOOO. the multiplexing part is working! (well, only have one pot to test with -10k lin -), its working, and i can move the pot to different locations and they all work.

One question:
I get analog value, ranging from 0-96, i actually thougth i would be getting 0-1023?

another one:
Filtering:
I multiply the analog in by 20, just to get a good readout with decimals, to read pot reading stability
And at the extreme pot point (closed), i get a pretty jumpy value between 0 and 2,5. Other pot locations seem pretty solid.
Could this be a psu thing? (running the board from my pc at the moment), maybe i need to solder in a cap somewhere between each pot output connection to the multiplexer?
I can do filtering in XOD, in the sense that i could apply low pass filtering, but my logic tells me that this wont fix the 0-2,5 problem, only small jittery things (which is also needed). Something like a low pass filter/lag processor/slew limiter is needed for the jitter correction. How would i go about doing htis in xod?

If you have any tips/tricks, please reply here: Pot filtering help

I’ll keep this thread used only for multiplexer stuff (i’ll probably have other questions, once i need to de-multiplex).

thanks

Ok, i updated to your newest nodes. A couple of things i dont understand (and yes, its me not you;)

In the node “example 1”. If i plug the output of the 4067 common in/out to the A0 in of my arduino, i get a pot reading from 0 to 97.
Then i tried for fun to take the common in/out and connect it to analog 1 instead, and still got a reading. This time from 0-60. and in a2 i get a reading from 0-38 and i can go on from there. Is this normal behaviour? Maybe i connected something wrong.

With a 10k lin pot connected the the4067, what is the normal max value i would get? Thanks!

I have a hard time understanding English, could you upload an outline of your connection?
I do not understand if the value 0-97 is at the exit of 4067 or the reading in XOD.
To adapt the signal you must use map or map clip node

With those nodes you can not do read write, unless you use 2 HC4067

If you are going to read, delete the dataselect and 4067-write nodes

test-4067-read.xodball (1.8 KB)

Thanks. I’ll look into it and write later.

Ok. I have been working with 2 pots now, and cannot get it to read both pots.

In the “read 4067” node, from left to right, there is: IN (what is this?), INH-Out (what is this?), INH(what is this?), D,C,B,A (I know that that is). and lastly, IN0-15. Im assuming the IN0-15 is where you connect at constant value. If the value is set to 0, It will read port 0 on the 4067 and output in on VAL. And if the constant is 1, it will read port1 on the multiplexer and output that on VAL. Right?

RIght now, I have 2 pots connected to a 4067, and therefore I have 2 of your “read 4067” nodes in my patch. On has the constant value, at IN0-15 set to 0, the other has it set to 1. That way I should be able to read both pots, right?
Right now, the pot connected to multiplexer 1, controls both values, for some reason. The one connected to inout 0 on the multiplexer does nothing.
1

Maybe i’ll order a different 4067 and see if that tmakes a difference.

Hi, Here is a description and an example, I could connect N from wave-square to IN0-15, when N exceeds 15 it does a reset… link

  • IN - input port A0 (it can be another)

  • INH-OUT- output PORT D1(it can be another)

  • INH - change out INH-OUT (True-False)

  • A,B,C,D -output PORT D8,D9,D10,D11()

  • IN 0-15 - is input value.(if you want to read more than 1 pot it should be variable, not constant)

if it uses 2 nodes it will have to have 2 hc4067, and it will occupy twice as many pins

Thanks. In real life, i want to use all 16 inputs of the multiplexer. In your example, you use “if-else”. Which only can have 2 pots. What node would you use instead of “if-else” if you need 16 inputs?

Another thing: Why do i need INH-OUT port? Normally, in all examples i can find, there is no need for this port. Normally (also in the drawing you sent me earlier in this post), there are 4 digital ports connected to S0-S3, 5v and analog in. Thats all that is needed. Why the INH-OUT port?
Sorry for asking so much, but for some reason, its hard for me to understand.

:point_down:

this output connects to the EN pin (board HC4067) I’m going to change it because it confuses, sorry
cesars/4067 update

as soon as I can I will update it completely …

if on board 4067, EN is ground, in node it is not necessary.