Page 1 of 4 1234 LastLast
Results 1 to 10 of 33

Thread: DACs and analog inputs

  1. #1
    FLAC
    Join Date
    Oct 2006
    Location
    Las Vegas
    Posts
    1,286

    DACs and analog inputs

    I thought I remeber reading a while back about plans for a DAC setup that would multiply digital input capacity while only using one analog input. I think, especially considering the new "brain reloaded" format and the use of analog inputs only, that this will be an important accessory. I'm working on one of my own using a National Semiconductor DAC0800 series. I think really the limiting factor for me will be less of the possible combinations with 8 bits, but more of the PCB space required to take in the inputs and deliver unique 8bit combinations for each. I started with a r/2r ladder, but then decided that I can probably save space with this chip. The specific application that I am working on requires 20 inputs, so if you are working on one I'd hope for something of that size.


    Are you?

    Also, do you have good information regarding how many times you can chop up 5 volts (this is using the analog input's 5V out and gnd) and pulling them out with a cascading 'if' loop without errors?

  2. #2
    Fusion Brain Creator 2k1Toaster's Avatar
    Join Date
    Mar 2006
    Location
    Colorado, but Canadian!
    Posts
    9,851
    Well FB accuracy is 10bit, (0.005V steps). Then there is error associated with the readings too. 8bit I think is ok, but anything more than 256 buttons would be error prone.

    We werent really planning on a DAC input, more like a DAC output. But I will see what Tim thinks. It wouldnt be too difficult to make that is for sure.
    Fusion Brain Version 6 Released!
    1.9in x 2.9in -- 47mm x 73mm
    30 Digital Outputs -- Directly drive a relay
    15 Analogue Inputs -- Read sensors like temperature, light, distance, acceleration, and more
    Buy now in the MP3Car.com Store

  3. #3
    FLAC
    Join Date
    Oct 2006
    Location
    Las Vegas
    Posts
    1,286
    So I think this is what I plan to use for my Analog input DAC. I think 32 is a good number (2k1Toaster's suggestion from another thread).
    But my question is would you use only 5 bit inputs, or would spacing them out over the entire range be better?
    I have a xls I here where I spaced out 32 inputs over the 256 combination range, so that I got even voltage seperation, the problem is the bit combinations are complex. Implementing that will be the hardest part of the design I suppose. Perhaps changing the output buffer so that it has a larger full scale output range, but cap it at 5V to protect the input, will work for the case of only using 5 input bits, while having a full 0-5V output.

    National Semiconductor made the circuit pretty easy with their application note AN-1525, which dispells the percieved drawback that the DAC0800 requires negative suppply voltages (figure 5 is a complete single supply DAC circuit (12V)).

    Anyway, creating the matrix to provide the proper unique input bit combinations is a task that I'm uncertain as to how to accomplish (sure I could draw it fine on paper, but simplified enough to put on PCB is a different story).

    Which way would you lean more towards, using all 8 bits to simplify the output or simplify the input by using only 5 bits (or live with a smaller output range than 0-5Vdc)?

    Other chips that might work better?

  4. #4
    Fusion Brain Creator 2k1Toaster's Avatar
    Join Date
    Mar 2006
    Location
    Colorado, but Canadian!
    Posts
    9,851
    Well if you get an 8bit DAC, then you are limiting your steps to be 1/(2^8) even if you only use 32 buttons. if you scaled this up, you are scaling error with it too.

    If you want an 8bit dac, I like this one as I have used it before on a single 5v supply: http://focus.ti.com/lit/ds/symlink/tlc7528.pdf

    But if you want 31 buttons a 5bit dac is all you need/want. 63 would be a 6bit and probably easier to find.

    You are correct the hardest part is getting from a 31bit or 63bit parallel stream into an encoded 5/6 bit stream. It isnt all that hard, but to do it in the cheapest/easiest way, it will take some thinking.
    Fusion Brain Version 6 Released!
    1.9in x 2.9in -- 47mm x 73mm
    30 Digital Outputs -- Directly drive a relay
    15 Analogue Inputs -- Read sensors like temperature, light, distance, acceleration, and more
    Buy now in the MP3Car.com Store

  5. #5
    FLAC
    Join Date
    Oct 2006
    Location
    Las Vegas
    Posts
    1,286
    Well after playing with that excel file a little more, I started to see that the input section wouldn't necessarily be too hard. I added a a second section in sheet 2 that parses out the bits and does some conditional formatting. In doing that I began to see the familiar pattern and something else too, that should have jumped out at me before. If I use a 8 bit encoder, but tie the 3 most LSBs together, it's just like an 6 bit encoder and if all inputs connect to the LSB line, it can be made to be similar to a 5 bit encoder. That way each ascending input increments by 2^3 starting at 7. That spaces the voltages out evenly. I made a picture of what I'm talking about with a really cool graphics editor:

    embarassing picture was here (I'm afraid it will sap the intelligence out of anyone who encounters it, so I burned it in the fireplace)

    I think even I might be able to make this with a rather small footprint. I'm not sure if the 0.05" stagger will cause problems for me though. I just took what I have on sheet 2 of the xls and overlapped 17-32 over 1-16.

  6. #6
    FLAC
    Join Date
    Oct 2006
    Location
    Las Vegas
    Posts
    1,286
    Well, thank you to all who read this and felt inclined not to say anything as to not hurt my feelings. I see it now... as any switch would always light up all of the bit inputs. so that would mean that each node would have to be driven high by a seperate line (maybe by transistors or even diodes which could be turned on in groups, thereby using one switch to turn on varied lines while providing isolation). That's a little more real estate.

    I like the 5V single supply operation of the 7528 above, and also the AD7801. But I'm not too embarassed not to admit that I'm having a hard time with the CS and WR and LDAC. I'm assuming in the 7801 case I would tie the LDAC to ground and use the WR to load the inputs, but how do I fire that, do I use something like an OR looking at all 6 lines? What kind of pulse width do I need (can I get something appropriate with a capacitor to ground?). The function of CS (chip select) escapes me a little, even while looking at the timing diags.

    Whew, that would be a lot of diodes (160, because I could probably just tie directly to the LSB line since they ALL send it high).

    There has got to be an easier way.

  7. #7
    Fusion Brain Creator 2k1Toaster's Avatar
    Join Date
    Mar 2006
    Location
    Colorado, but Canadian!
    Posts
    9,851
    The 7528 is a multiple dac, but the easy part is you can select 1 all the time. Just tie the select pin to high or low all the time. So essentially just dont use the other half of the chip.

    As for your logic diagram (with the awesome graphical editor program) I didnt have too much time to look at it, but again I am not sure what it is. Are you trying to make a pin grid? Such as how a keyboard works?
    Fusion Brain Version 6 Released!
    1.9in x 2.9in -- 47mm x 73mm
    30 Digital Outputs -- Directly drive a relay
    15 Analogue Inputs -- Read sensors like temperature, light, distance, acceleration, and more
    Buy now in the MP3Car.com Store

  8. #8
    Fusion Brain Creator 2k1Toaster's Avatar
    Join Date
    Mar 2006
    Location
    Colorado, but Canadian!
    Posts
    9,851
    I am almost certain I know a name for what this is (parallel binary input to parallel bcd output type thing) but knowing it and remembering it are different things Funny how the brain works. I will get out my logic books and draw up a truth table. Something obvious should jump out at me then.
    Fusion Brain Version 6 Released!
    1.9in x 2.9in -- 47mm x 73mm
    30 Digital Outputs -- Directly drive a relay
    15 Analogue Inputs -- Read sensors like temperature, light, distance, acceleration, and more
    Buy now in the MP3Car.com Store

  9. #9
    FLAC
    Join Date
    Oct 2006
    Location
    Las Vegas
    Posts
    1,286
    Well the way I had it there in that drawing the green line is voltage available to go through the switch, through the red lines to each of the black lines going to the input bits. So yeah, kind of like a keyboard grid. I chose the connections to the bit-lines (red circles on black lines) based on the DAC.xls values I have on sheet 2 (starting at seven with with input 32 (3 LSB lines) and incrementing up to 255 by 8 at input 1 (every line,MSB through LSB). To increment by 8 I just used the 5 most significant bit-lines and tied the 3 least significant bit-lines together, the LSB line would be turned on with every switch, basically biasing everything up by 3 bits. The problem is that I can't daisy chain the bit-line connection, each connection has to be connected individually to the switch output, and diode isolated, so that one switch doesn't avalanch the whole thing on. So, more lines for each switch output and a bunch of diodes maybe.

    I originally wanted to stay away from the type of DAC you recommended because I dont understand how it write-enables and what CS is for, I did figure I could select one DAC the way you recommended. What kept me looking (AD7801) was a desire for a datasheet with a really good application diagram for 5V. And I'm still looking for a good explaination on how to set the control inputs (as I mentioned above). The cascading opamps in the application info (page 8) of the TLC7528, seems complicated. I wish I could find one with the simplicity of DAC0800 (no control inputs) that works with 5V.

    I'll try to get a better drawing of what I'm thinking of (with new corrections) up soon.

  10. #10
    Fusion Brain Creator 2k1Toaster's Avatar
    Join Date
    Mar 2006
    Location
    Colorado, but Canadian!
    Posts
    9,851
    Save you some time, what about this: http://www.datasheetcatalog.org/data.../243043_DS.pdf

    Speaking about keyboards, might as well use an actual keyboard IC or other key matrix. That linked one works for 20 inputs. I am sure they make them up more bits.
    Fusion Brain Version 6 Released!
    1.9in x 2.9in -- 47mm x 73mm
    30 Digital Outputs -- Directly drive a relay
    15 Analogue Inputs -- Read sensors like temperature, light, distance, acceleration, and more
    Buy now in the MP3Car.com Store

Page 1 of 4 1234 LastLast

Similar Threads

  1. Alpine PXA-H701 Questions
    By unixxx in forum Car Audio FAQ
    Replies: 460
    Last Post: 02-10-2012, 09:09 AM
  2. Ultimate USB, Firewire, External Soundcard List
    By durwood in forum Car Audio FAQ
    Replies: 121
    Last Post: 12-30-2009, 06:15 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •