View previous topic :: View next topic |
Author |
Message |
Joshua Lai
Joined: 19 Jul 2004 Posts: 42 Location: Malaysia, PJ
|
How to do 10 channels analog output? |
Posted: Sun Oct 02, 2005 8:28 pm |
|
|
I am using PIC 16F876, PCM compiler 2.7
I need to output 10 channels of analog signal simultaneously. Each sampling rate is 250Hz, and 8-bit resolution.
Any suggestion how I can do that? Thanks in advance. |
|
|
kender
Joined: 09 Aug 2004 Posts: 768 Location: Silicon Valley
|
|
Posted: Sun Oct 02, 2005 8:58 pm |
|
|
How much delay can between the outputs can you tolerate? Do you want all the outputs to update one the same edge?
Analog Devices, Linear Technology, Maxim and Texas Instruments makes a bunch of serial DACs, which will fit your spec. I would recomment I2C or SPI.
Nick
P.S. Unfortunately DigiKey's parametric search doesn't allow to filter by the number of channels. |
|
|
Joshua Lai
Joined: 19 Jul 2004 Posts: 42 Location: Malaysia, PJ
|
|
Posted: Sun Oct 02, 2005 9:19 pm |
|
|
I am thinking of using multiplexer on one DAC output, then multiplex the output to the 10 channels one.
Possible to update 10 channels together? You mean using 10 channels DAC? Update 10 channels together using an edge trigger? Is it very expensive?
I am doing student project, so cost is limited. |
|
|
kender
Joined: 09 Aug 2004 Posts: 768 Location: Silicon Valley
|
|
Posted: Sun Oct 02, 2005 9:44 pm |
|
|
Joshua Lai wrote: | I am thinking of using multiplexer on one DAC output, then multiplex the output to the 10 channels one. |
Confused I am... But I guess, that you are talking about multiplexin an output of a single DAC. If you want the DAC voltage to hold on all of the 10 outputs between the updates, then multiplexor alone will not work - you need sample&hold or track&hold.
Joshua Lai wrote: | You mean using 10 channels DAC? |
Yes, that's what I thought of initially - 10-ch DAC or several smaller DACs. There are many different types of DACs. The cheapest multichannel DACs are really single-channel DACs with multiplexors and sample&holds [EDIT: on one DAC chip].
By the way, what's your project?
Last edited by kender on Mon Oct 03, 2005 12:41 am; edited 1 time in total |
|
|
Joshua Lai
Joined: 19 Jul 2004 Posts: 42 Location: Malaysia, PJ
|
|
Posted: Sun Oct 02, 2005 11:41 pm |
|
|
My project is patient simulator. Need to output biological signals such ecg. For 12-lead ecg, I need 10 channels of different waveform signal.
Can I just put multiplexer without sample-hold? What will happen to the output? Fall immedialy after I switch to another channel?
I bought one sample-hold LF398 form National semiconductor, which cost about half price of my PIC 16F876.
If I have to use 10 sample-hold, any cheaper alternative? |
|
|
kender
Joined: 09 Aug 2004 Posts: 768 Location: Silicon Valley
|
|
Posted: Mon Oct 03, 2005 12:35 am |
|
|
Joshua Lai wrote: | My project is patient simulator. Need to output biological signals such ecg. For 12-lead ecg, I need 10 channels of different waveform signal. |
OK, so, I guess, there is no need to output the voltages really simultaneously.
If you think that parts cost you too much, you can try to order samples. Maxim, Microchip (which, by the way ships from Malasia), Analog and TI are particularly good for getting samples (at least in the US). I'm in the medical device field myself, and getting parts is often the longest part of the project.
Joshua Lai wrote: | Can I just put multiplexer without sample-hold? What will happen to the output? Fall immedialy after I switch to another channel? |
Exactly.
Joshua Lai wrote: | If I have to use 10 sample-hold, any cheaper alternative? |
Use multi-channel DAC(s). Since you have I2C in your system already, check out these I2C DACs:
- MAX519 (2-ch), MAX521 (8-ch), Maxim, DIP package available
- DAC5573 (4-ch), Texas Instruments, TSSOP, although quite a bit cheaper.
In general DACs cost on the order of a PIC. At least I haven't found my favorite cheap DAC yet. |
|
|
kender
Joined: 09 Aug 2004 Posts: 768 Location: Silicon Valley
|
|
|
Joshua Lai
Joined: 19 Jul 2004 Posts: 42 Location: Malaysia, PJ
|
|
Posted: Mon Oct 03, 2005 11:23 pm |
|
|
Oh! That cute 1-bit picsound.
I already gave up about it, because his free encoder software not work on Windows XP. Then I also don't know how to copy his code into C program. For instant, RETLW '01010101' ??
I got a simple method, connecting 8 resistors on a port. Now i am doing that. But one channels use up a whole port already. |
|
|
Joshua Lai
Joined: 19 Jul 2004 Posts: 42 Location: Malaysia, PJ
|
|
Posted: Mon Oct 03, 2005 11:36 pm |
|
|
I tried multiplexer CD4015 from national semiconductor.
www.national.com/pf/CD/CD4051BC.html#Datasheet
I multiplex a sinewave and a triangular wave in my program then output on PIC. I use another pin to trigger the CD4015.
I tried to trigger manually and it works well. Maybe CD4015 cannot support fast switching? The datasheet stated the on/off time is less than 1us.
I output high to channel select pin A, delay 100 us.
Then output analog signal to common in/out, dalay 100 us.
I found that the mixed signals at channel 1 of CD4015, but nothing on channel 2. |
|
|
Joshua Lai
Joined: 19 Jul 2004 Posts: 42 Location: Malaysia, PJ
|
|
Posted: Mon Oct 03, 2005 11:46 pm |
|
|
I can make a sample hold using op-amp right? I read that just put a capacitor with a voltage follower. Then what op-amp is suitable? |
|
|
kender
Joined: 09 Aug 2004 Posts: 768 Location: Silicon Valley
|
|
Posted: Tue Oct 04, 2005 1:23 pm |
|
|
Joshua Lai wrote: | I can make a sample hold using op-amp right? I read that just put a capacitor with a voltage follower. Then what op-amp is suitable? |
Yes, you can. I guess, for your purpose any OpAmp will do, and your choice is limited only by power supply voltages. |
|
|
SherpaDoug
Joined: 07 Sep 2003 Posts: 1640 Location: Cape Cod Mass USA
|
|
Posted: Tue Oct 04, 2005 1:55 pm |
|
|
Joshua Lai wrote: | I can make a sample hold using op-amp right? I read that just put a capacitor with a voltage follower. Then what op-amp is suitable? |
For any decent performance it should be an op amp with low input current, something with a FET input _________________ The search for better is endless. Instead simply find very good and get the job done. |
|
|
Joshua Lai
Joined: 19 Jul 2004 Posts: 42 Location: Malaysia, PJ
|
|
Posted: Tue Oct 04, 2005 11:18 pm |
|
|
Any suggestion for what opamp? |
|
|
Joshua Lai
Joined: 19 Jul 2004 Posts: 42 Location: Malaysia, PJ
|
|
Posted: Tue Oct 04, 2005 11:20 pm |
|
|
Do I need to change to any fast switching multiplexer? Any cheap example? |
|
|
|