Digital electronics to control analog signals?

RaynorWolfcastle

Diamond Member
Feb 8, 2001
8,968
16
81
I have this little project I'm working on which involves multiplexing an analog input. Now, I could do the switching mechanically, but that seems kind of old-school.

I figure that if I want to mux the analog signals properly I'd need 2, 8-input multiplexers that can handle an analog input fairly transparently (low Rin, low Rout, DC points are important).

Now, the input part would likely be 2 buttons (up & down),. Also, to since the inputs have to follow a specific sequence I'd probably need two counters set up so that the correct inputs are selected by the muxes. Finally, I'd need some debouncing circuitry and probably a few more gates so that I could program an 8-segment display to display the input selection.

In any case, I figure this really wouldn't be all that much logic involved and the actual design of that is really straightforward. I've browsed around a bit and I've found that Analog Devices does make analog muxes that would do the trick, however I'm not sure how/if I can implement the rest of the logic in a cost-efficient manner.

I'm not looking to spend FPGAesque money on this, it's just for a little DIY project and if it's too expensive I'll just go mechanical. :)

Does anyone have experience with this sort of thing? Are there any off-the-shelf (programmable?) devices that might do the trick?

 

blahblah99

Platinum Member
Oct 10, 2000
2,689
0
0
Originally posted by: RaynorWolfcastle
I have this little project I'm working on which involves multiplexing an analog input. Now, I could do the switching mechanically, but that seems kind of old-school.

I figure that if I want to mux the analog signals properly I'd need 2, 8-input multiplexers that can handle an analog input fairly transparently (low Rin, low Rout, DC points are important).

Now, the input part would likely be 2 buttons (up & down),. Also, to since the inputs have to follow a specific sequence I'd probably need two counters set up so that the correct inputs are selected by the muxes. Finally, I'd need some debouncing circuitry and probably a few more gates so that I could program an 8-segment display to display the input selection.

In any case, I figure this really wouldn't be all that much logic involved and the actual design of that is really straightforward. I've browsed around a bit and I've found that Analog Devices does make analog muxes that would do the trick, however I'm not sure how/if I can implement the rest of the logic in a cost-efficient manner.

I'm not looking to spend FPGAesque money on this, it's just for a little DIY project and if it's too expensive I'll just go mechanical. :)

Does anyone have experience with this sort of thing? Are there any off-the-shelf (programmable?) devices that might do the trick?


Try looking at Maxim's analog switches... DG406 or DG408's I think. For each 8-input mux, you need 3 control lines and an enable line - total of 4 for each. With some external logic, you can control the two muxes with as few as 5 lines (4 for the control, and 1 for enable).

Anyhow, I would use a PIC microcontroller 16F84 ($5), or any of the 16-pin PIC chips. That'll give you enough i/o to control each mux ndividually and allow up/down.. If done without external logic, that comes out to 10 i/o. Debouncing can be done in code via timers/counters. The software to develop the code is free off Microchip's website, and you can buy a parallel port programmer for under $20.

Or, you can do it the discrete way and use external logic and debouncing techniques but it'll be a mess, and you'll have to draw out the logic.

Also, remember that those switches aren't "perfect" switches per se. They introduce distortion, have a maximum operating speed, and should be buffered on the input and output side for best performance.
 

FrankSchwab

Senior member
Nov 8, 2002
218
0
0
For this kind of jelly-bean project, you've got several options.
1. Pull out the old 4000 series CMOS books, and just wire a few chips together. The advantage is that they're in DIP packages, so home-brew circuitry is reasonably easy. Also, most of the parts are available at the normal places; check out Jameco, Digi-Key, All Electronics, Electronic Goldmine, etc.

Look at the 4051 or 4067 for your analog multiplexers, use a schmitt trigger such as a 4093 to Debounce the switch input, maybe use a 4029 for your count up/down function and a 4511 to drive your output display.

2. Go high-tech. Maxim, Analog Devices and others make more modern analog multiplexers (lower on-resistance, lower crosstalk, etc), but they cost more - probably not a big deal for a one-off project though. Use a PIC or a Basic Stamp to read the switch inputs (doing the debounce in software), set the multiplexers, and drive the display. The PIC allows you to make the smallest project; the Basic Stamp costs more, but means you could probably put the whole thing together in an afternoon.

This approach is most flexible; you can program it to go through any sequence of analog inputs you want when you push the up/down buttons. This flexibility comes at a cost, though - either dollars or time.

/frank

 

RaynorWolfcastle

Diamond Member
Feb 8, 2001
8,968
16
81
thanks blahblah99 and FrankShwab, I think I'll be using a couple of Maxim multiplexers with a PIC. I'll have to brush up on my assembler though, I was hoping I could use VHDL to handle it,