Multiplexing interrups

So right now I`m working on a project in which i want to control 5 Fans with an Arduino Mico

The problem is the Micro only has 5 Interrupts 2 of which are used for Serial communication.

What i want to thatch to the Interrupts are the 5 hall effect outputs of the fans.

My questions are:

Should I use a Multiplexer? If Yes Analog or Digital?
Do you know other solutions for my little problem?

Thanks in advance :slight_smile:

How do you control the fans, using PWM or what else? Does the controller have enough pins for that purpose?

A multiplexer won't help, as long as you risk to loose hall effect signals from the fans. But you can try to poll these signals, instead of using interrupts.

Why do you need interrupts? For speed detection? Also why is the serial using external interrupt pins?

Anyway a MUX will not do, you could AND the 5 signals together with diodes to get a single interrupt then read five pins to see which one caused the interrupt. However there may be problems when 2 or more hall outputs are low at the same time.

DrDiettrich:
How do you control the fans, using PWM or what else? Does the controller have enough pins for that purpose?

A multiplexer won't help, as long as you risk to loose hall effect signals from the fans. But you can try to poll these signals, instead of using interrupts.

For controlling the speed I`m using a Digital potentiometer. And with the Interrupts i would count the number of activations of the sensor(s) in a defined time.

I would connect the Hall efect Sensor to the multiplexers the same way as it is connected in this picture to the arduino And i would like to use the interrupts because of the better accuracy.

a priority encoder would do the job .

regards

Allan

allanhurst:
a priority encoder would do the job .

regards

Allan

I can`t choose the priority of the pins with a priority encoder right?
And that is what i would like to be able to do

regards Thomas

Look at the 74148 - good old TTL!

regards

Allan.