I would like to make a shield that will use 2 4051 multiplexers and 1 tlc5940 led driver
The tlc5940 is awesome because it has a serial output and serial input pin. By connected the serial output to the serial input of the "next" tlc5940 you can daisy chain them together to create as many pwm digital outputs as you like.
The 4051 allows you to select one out of eight inputs using 3 digital selection inputs. It also has an enable pin. The output of this device can be fed directly into one of the arduino analog inputs (say a0).
The tlc5940 has 16 outputs, but 3 of those will be fed into the 2 4051s to select which input is desired, 2 more tlc5940 outputs will used to populate the enable pins on the 2 4051s allowing us to inhibit one or both of them. This leaves 11 pwm outputs which can be used to drive external components.
So each shield will give you 11 additional pwm digital outputs and allow you to read 16 additional analog inputs.
By connecting the serial output of the tlc5940 to a jumper wire connected to a male header, you can use this "optional" pin to connect to the next shield in the stack. Each shield must have serial input broken out as a female header. The first one in the stack however, will gets its serial input from the arduino (D?). I think this should be accomplished by a dip switch to connect the serial input to the Arduino digital output.
So n shields should be stackable allowing for n*11 additional digital outputs and n*16 additional analog inputs.
Schematics and code will follow. This will be totally open.