i think the thing that helps us here, is that were interested in audio rate or slower, and most of those sources are much higher. the powersupply input, although experiencing all the current draws of all the internals, has a decoupling cap and all the internal inductances doing a bit of filtering for you. it was producing a sinewave centered at 50%, so the full powersupply noise wanst coupled in all the time.īut, youre right in that a single pin can be noisier than just the powersupply, depending upon what the nieghboring pins are doing, and the exact microcontroller. there are only 100 bins across the 100kHz range, so thats 20 bins in the audio range giving a 13dB increase when you sum them, making it -72dB noise. The noise floor in the audio range is around -85dB per bin (possibly lower in regions, as thats the bottom end of my spectrum analyzer). i have some old data here, taken on an arduion uno: the output noise floor increases linearly with PWM duty cycle (the time spent connected to a noisey powersupply). I cant remember if i did the above test on just the powersupply, or a PWM at 50%. I would go as far as saying that as long as you don't need a high bandwidth, a correctly designed PWM DAC will be more accurate than many 8-bit or even 12-bit resistor DACs. The ATmega328 used in the Arduino Nano is much better and has 30ohm for both high and low outputs so I expect it will perform much better. This is a common problem with many Microchip processors and most logic chips but it can be reduced with a higher external filter resistance. The high output has 120ohm and the low output 60ohm so the filter capacitor is charged and discharged with slightly different time constants resulting in a slightly too low average at 50% duty cycle. The error was caused by a slight curvature in the transfer function due to a mismatch in output resistance for high and low output signals in the PIC16F18325. Over a 10V range the maximum error was only 2-3mV and compares favorably with the MCP4822. I while ago I did a clocked random generator with a 7-bit PWM output. I don't know where these numbers comes from. With 5V output swing that gives you effective resolution of 78-156mV PWM and R2R DAC rarely get ENOB >5-6bits without special output tricks. Remember that number of input bits is always higher than ENOB (effective number of bits). To reduce latency as much as possible I'd suggest loading random value to DAC before you need to switch it and just use strobe pin to change it whenever trigger comes (LDAC pin in MCP family). It's even dual channel so you can get 2 output signals for (nearly) no cost. The only downside is that it has 2.048 or 4.096V internal reference so it requires a bit of scaling to get to 0-5V range but that can be simply achieved with single op-amp. As someone already recommended MCP family is perfect, in this case MCP4822 might be most suitable. Settles down to new value quickly, has high resolution and reference removes switching noise issues. The more you filter switching waveform the slower will output take to settle to new voltage and you'll get sort of slew limitter at the output.Īlso R2R and PWM require separate buffer, powered from clean power supply, otherwise switching noise of uC will directly couple to output lowering much output SNR.Įxternal DAC with internal or external reference solves all of this issues. PWM is terrible way to get output voltage because it's constantly switching.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |