Cascading two CD74HC4067 (or more)

Hi people that are smarter than me.

I have a question

First some background, I am building a 20 bay 18650 charging desk, and for all intents and purposes it is working well at this point in time.
However I wish to enhance some of its features.

One of those feature includes adding the ability to "Auto" cycle charge discharge without human interaction.

To do this I need to have the ability to bring a individual ground(0v) pulse to the 20 HW586/ZB2L3 discharger modules at the appropriate time.

I do have enough pins "free" on the Mega to do this, but I dont want to "waste" pins unnecessarily. To do this will restrict future expansion as I think of other things I want the desk to do.

So I have opted to use two CD74HC4067 multiplexers and forfeit the 5 pins necessary to do this.

As these chips have a common input, I take it that if I tie this to ground instead of 5v , each selected output of the chip with give a switched Low instead of a switched High.

Now to cascade two of these chips I propose to do the following:-

Parallel the S0-S3 data lines to each chip. So both chips will get the same data, but by using 2 other Mega pins to the enable pins of each mux, I can select which one of the two chips is awake and enabled to receive and act on the data send via the address lines.

As far as I am aware the CD74HC4067 Multiplexer does not have a "cascade" pin to allow it to hand off to the next chip like other Mux's have. This shows you the limited knowledge I have , and the reason for this post to ask for advice.

I would love a 64:1 mux on a breakout board, but to my knowledge not such animal is available.

Thanks for any assistance in advance..

Mike.

As far as I am aware the CD74HC4067 Multiplexer does not have a "cascade" pin to allow it to hand off to the next chip

Cascading is simple, you just wire one of the outputs from the first level multiplexer to the second one. In fact all 16 outputs can be wired to the inputs of 16 other multiplexers giving you a total of a 256 to 1 multiplexer.

Control the first chip with pins S0-S3 with one set of Arduino pins and parallel the S0-S3 data lines to each chip in the second level whit another set of Arduino pins.

......hand off to the next chip like other Mux's have.

Really? What multiplexers do that?

Ah OK, Thanks.
Probably be just as easy to wire direct to each Multiplexer.
However in the scheme of saving pins , I think I will just wire the enable/disable to two pins, that way I can tell which one to listen or ignore info on the S0-S3 pins

Grumpy_Mike:
Really? What multiplexers do that?

As I said I am not aware, but thought you might.

Mike.

One of those feature includes adding the ability to "Auto" cycle charge discharge without human interaction.

For what reason do you want to do this? What benefit do you think it will give?

There are clearly two ways of fanning the multiplexers.

One is as Mike describes, to connect the commons of second-level multiplexers to the selected pins of the first level multiplexer.

The other is as the OP describes, to parallel the commons of each multiplexer, and use a decoder to selectively enable one of the multiplexers. This has the advantage that you only have the switching resistance of one chip (about 50 Ohms) rather than two (or more!) in series, but the disadvantage of the combined capacitance of the paralleled commons.

For few multiplexers, the latter is significantly more practical, as when you chain the multiplexers, you lose one of the selected pins of the first level chip for each second level, so chaining three you get 46 selections, paralleling three you get 48 and require one fewer control pins. :grinning:

PerryBebbington:
For what reason do you want to do this? What benefit do you think it will give?

I am hoping to get the desk to firstly charge a cell to 4.1v then auto discharge to 2.8v to report its capacity.
Once that has been done recharge the cell to 3.8v for storage.

Unfortunately both the ZB2L3 or it's clone the HW586 both need a button press to actually start discharging.

Ergo the need for a multiplexer to supply that "button Press" via the Arduino sketch.

Each Cell in the 20 bays currently charges via its own TP4056 unit, the arduino detects when that has been accomplished and switches the TP4056 out of circuit and switched in a HW586. Even though the Arduino can do all this all by itself, clever little bugger that it is, it still needs that human digit on the OK button for the discharger. THAT is my current goal with the MUX(s).

Mike.

I am hoping to get the desk to firstly charge a cell to 4.1v then auto discharge to 2.8v to report its capacity.

Good idea!

I asked because I know from experience that some people think it is somehow good for the battery to completely discharge it before charging. This comes from the fact that nickel cadmium batteries have a memory and should be fully discharged before charging, otherwise they 'remember' their discharge point and this becomes their, now reduced, capacity. However, this applies to only nickel cadmium batteries, not to ones with other chemistries.