| Electronics > Projects, Designs, and Technical Stuff |
| Small and cheap MCU with DAC |
| << < (5/7) > >> |
| wraper:
--- Quote from: Unixon on December 16, 2018, 05:55:22 pm --- --- Quote from: wraper on December 16, 2018, 05:34:06 pm ---Did you actually check mouser link? And who the hell uses local supplier when price is concern? --- End quote --- Yes, I've checked that. We're in a little different location to mouser, so... :) --- End quote --- So what? Depending on where you are located $50-200 order value will give free shipping and they'll do customs for you. Where are you located BTW? |
| 0xdeadbeef:
For the record: the NXP LPC802/LPC804 also come with a DAC and are available down to TSSOP20 packages. Price for a single LPC802 is $1,12 at Mouser. |
| nick_d:
Can I ask what is going to happen to the DAC signal, will it go to some kind of power amp IC or even an op-amp to drive a speaker? And, another question, is power consumption an issue? If it is something like a children's toy then power consumption is a big issue, but I can't see why this would need 12 bit accuracy at such a high sample rate? The reason I ask is that if cost is the only consideration then much can be done by bit-banging or using timer channels. For example, in one project I had 8 spare outputs and a slow ADC available. So I created a resistive ladder with 8 bits of precision (256 levels basically) and on each power up I calibrated it using the ADC to determine the exact resistor values. If I then ran at 16x the rate I could get 12 bits. Another thing to keep in mind is oversampling and digital signal processing. See, if you want 20 kHz output from a 1-bit DAC at 12 bit precision, you might think that you need 20 x 4096 kHz = 8 MHz output rate, but that's NOT correct. For a very slow moving signal, true, to control the average over a 50us period (20 kHz) you do need 4096 individual outputs so that you can set the correct number of them to be "1". BUT, for a fast-moving signal a "1" at time t has a very different effect than a "1" at time t+1, so by taking into account the timing of your output pulses rather than just which 20us period they fall into, you can get very accurate reproduction. To do this requires sigma-delta modulation, and it costs you CPU time and power, hence why I ask about your budget, but it can be done with a low parts count. Bear in mind also that a 1-bit DAC is only stable over a small part of its output range, this can be improved a lot using more levels. I think a good compromise may be a 3-level DAC using the average or difference of 2 digital output pins. This can be achieved with clever connections to your output op-amp if any. cheers, Nick |
| Unixon:
--- Quote from: nick_d on December 18, 2018, 05:27:05 am ---Can I ask what is going to happen to the DAC signal, will it go to some kind of power amp IC or even an op-amp to drive a speaker? --- End quote --- Yes, it will. This must be a simple module playing a predefined sound sample when triggered. --- Quote from: nick_d on December 18, 2018, 05:27:05 am --- And, another question, is power consumption an issue? If it is something like a children's toy then power consumption is a big issue, but I can't see why this would need 12 bit accuracy at such a high sample rate? --- End quote --- I think it's not an issue, but the device low power anyway. Considering the resolution and sample rate... well, I'm not sure beforehand what will it sound like, so probably I'm searching for more than would be enough for the job. May be even 8bit with half of mentioned sample rate would be OK, I just don't know at the moment. |
| technix:
--- Quote from: Unixon on December 18, 2018, 10:35:36 am --- --- Quote from: nick_d on December 18, 2018, 05:27:05 am ---Can I ask what is going to happen to the DAC signal, will it go to some kind of power amp IC or even an op-amp to drive a speaker? --- End quote --- Yes, it will. This must be a simple module playing a predefined sound sample when triggered. --- Quote from: nick_d on December 18, 2018, 05:27:05 am --- And, another question, is power consumption an issue? If it is something like a children's toy then power consumption is a big issue, but I can't see why this would need 12 bit accuracy at such a high sample rate? --- End quote --- I think it's not an issue, but the device low power anyway. Considering the resolution and sample rate... well, I'm not sure beforehand what will it sound like, so probably I'm searching for more than would be enough for the job. May be even 8bit with half of mentioned sample rate would be OK, I just don't know at the moment. --- End quote --- If that is the case there are dedicated MP3 playback chips. You may need an SPI Flash to go with it, but otherwise it runs on its internal mask ROM firmware. |
| Navigation |
| Message Index |
| Next page |
| Previous page |