Using the Arduino with a DeMUX

Hi everyone!

I've looked around this forum, but I wasn't able to get all the information I wanted, therefore I opened this thread...

I wanted to build a circuit that used the Arduino as a DAC, that is, a Digital to Analog Converter to control some lights, using the instructions coming from a computer program (MaxDSP).

The thing is, I am thinking of using a lot of lights... still don't know the exact number, but a lot :slight_smile:

Therefore, I need (I think) a MUX between the Arduino and the lights. With the information I saw in this forum, I got the idea that I should use a 8051 IC as MUX. That is, Using just one OUT of the Arduino, connected to an IN of the 8051, to control all the OUTs of the 8051...

(Stop me now if I'm wrong...)

Is this even possible? if so, will it be possible to control the intensity of the lights, or just ON/OFF?

Thanks in advance to any help given :smiley:

Cheers

The basic problem, I'd say, is that the Arduino doesn't output true analog, but rather PWM. PWM is fine if you not trying to trick the eye into thinking there's more than one light on at a time. Once you crank up the refresh rate, say on a matrix of lights, then the PWM doesn't do the trick, becuase it takes time to "render" the analog value as PWM. Controling light brightnes with PWM is ALSO a persistence of vision-type method...

What kind of lights are you using? What's the application?

However, your assumption about the one voltage in sets all voltages out on the 8051 may be correct, if by 8051, you really mean 4051 (analog mux/demux chip). You then select which line the voltage (or PWM pulse) is to go out on.

(The 8051 was an early predecessor to the 8088, the first PC processor)

You can not control the 4051 with 1 Arduino pin. You need 3 digital pins to selct the in/out pin on the 4051 and a least one analog pin too.

If you need to use some voltage to control the ligths, then you should look into some of the multichannel DAC IC's. There are many different you need to know the oytput voltage requirement, and the precision you need to control the lights.

I wanted to build a circuit that used the Arduino as a DAC

No you don't. you want to:-

to control some lights, using the instructions coming from a computer program (MaxDSP).

That's not an Analogue to Digital converter.

The 4051 is an analogue multiplexer do not use it to control lights.
If you want lots of LEDs then a TLC5945 will let you control 16 of them and allow you to dim them. You can chain about 5 of these together. You control them by setting numbers that you have got from MAX, there is no D to A involved.

If you just want on and off use a MCP23016, you can control 16 LEDs from just two Arduino lines and can have 8 of them giving you 128 LEDs. There are examples an tutorials on these two chips in the playground.

The thing is, I am thinking of using a lot of lights.

Yes every beginner starts of thinking like this. The less they know more lights they want to control.

Start off simple, get 16 LEDs going. Get a feel for how much work that is in wiring up, what techniques are involved and whether you can be bothered.
If you start off with something big you will fail and be put off the whole thing and that is not good. So byte off something you can chew.

Best of luck. :slight_smile: