Pots V DAC for Vref

frank freedmanfrank freedman Posts: 1,702
edited 2020-09-07 - 22:32:58 in General Discussion
Hey @Peter Jakacki rather than hijacking @idbruce's thread, perhaps a new topic would be better.

Set up a DAC example from AN001. Looked noisy as 7734. Raw square wave looked really horrid. Overshoot and ringing, total mess. PPDB. Significant cleanup by moding PPDB with 100uF on both sides of the chip with 0.1uF across the 100uf. Much improved output, still some ringing. DAC output looks better as well. currently using 100uF and 4.7K with a nicely controlled value 80% gives me 3V. there is still some noise on the output ~200mv @800khz. Does this seem reasonable for just quick RC DAC on the prop?

Comments

  • I'm sure what you mean by "100uF on both sides" as E-caps have no place in a high frequency filter circuit nor does their internal impedance at those frequencies make them useful at all. A 100nF ceramic is far more effective and a larger value of series resistance will increasingly filter the output, although the response will decrease. Start off with 1k series resistance and 100nF ceramic and you should see DC with very little ripple, certainly nowhere near 200mV.

    I just check a Prop fitted with a 220R and 100nF and set the output to 50%. On the scope I measure 1.67V and a few millivolts ripple.
  • Sorry not so clear. The 100uF caps were put between the Vss and Vdd on both sides of the Prop chip (pins 9&12 and 32&29) for bypass as well 0.1uf across these same pins. I did this because looking at the square wave output of the pin looked like a lot of ringing. I was thinking this was causing the noise in the DAC when I had the RC part in place. The PPDB bypass is at the regulators and was not cure this was part of the noise issue given all the threads regarding placing bypass very close to the prop power pins. I will try your values shortly. Thank you. Your dislike of pots may have saved me some parts and board space if I can use a cog counter or two and an RC net to generate reference values.
  • Ringing will be due to termination and mostly lacking a good ground for your scope probe. Be assured though that the RC method works well.
  • OK, using the 1k & .1uF. wired as shown in Prop Ed. Looks like it should. Prop pin into resistor to cap with opposite side of cap to gnd. looks good, I think now it was a bit of a garden path problem. The prop manual shows an RC measurement ckt with notes regarding 1 100ohm resistor in the circuit. This is the circuit I started with and it had only a fixed R and C. And looked horrible. It talks about placing the limiting resistor in front of the RC measurement and states that the value will not be able to reach 3.3V. So, I figured this one would be the one to start with. Hence this post. After my last note, I put the 1k in series with the cap and the output looks very solid with the occasional glitch going by. (using my A/D 2 scope rather than my Tek2247) So a bit more learn and try for this one. Hmmm, lots of ideas come to mind with this setup and some external power handling circuits....... Imagining the smell of magic smoke........
  • Peter JakackiPeter Jakacki Posts: 9,597
    edited 2020-09-08 - 01:02:54
    Ah, the smell of magic smoke lingers long long after it has dissipated, and how keen are noses to even the slightest hint that it was there.

    That prop manual must have very strange wording but to say it would not be able to reach 3.3V is incorrect unless it was loaded.

    I can type "1860 mv" into Tachyon and I read 1.86V on the scope, then "3300 mv" I read 3.31V.

    That glitch shouldn't be there though.


  • frank freedmanfrank freedman Posts: 1,702
    edited 2020-09-08 - 02:34:15
    The write up is on P127 of the Prop Ed manual. regarding 100ohm limiting resistor for the RC circuit discussed on that page. I simply used the circuit shown with initially a 4.7k paralleled with the cap. Had good control of the resulting DC level, just an unacceptable level of noise present in that configuration. Interestingly the load of providing Vref to 4MCP3201s will take ripple from less than 5mV to the same 5mV but with almost 10mV spikes where the rising edge of the prop output wave1.png
    2253 x 1446 - 158K
  • I have no idea what the Prop Ed manual is or where to find it but the 100ohm "limiting" resistor is all wrong as this resistor forms the RC filter with the cap. The 4.7k is unnecessarily loading and degrading the filter circuit. Increasing the series resistor will increase the RC filter time and the circuit I tested on had 220R + 100nF but no loading. If I wanted to generate a general purpose signal of 0 to 3.3V I would buffer that with a non-inverting opamp. Just add resistors to the opamp though and you can do 0..10V or whatever easily.
  • frank freedmanfrank freedman Posts: 1,702
    edited 2020-09-08 - 03:06:51
    Little adjustment of the R with a 0,01uF cap, and 5.6k gave best results into 4x MCP3201 as Vref gave wave_final and initial try, wave1 was 1k and 0,1uF


    2251 x 1446 - 143K
    2253 x 1446 - 158K
  • If you skip the MCP3201 altogether and just have a comparator driven by the Vref and input then you have created your own ADC. Binary approximation to find the range and then home in quickly with a simple ramp on the DAC until the comparator transistions and presto, you have your reading!

    You can also run a Prop pin in A/D mode with a feedback resistor from another pin, caps to ground and Vdd, and a series input resistor. This replies upon the 1/2 Vdd switching threshold of the CMOS input.
  • Frank I found with the MCP3208 and 3304 you really needed to drive them from a unity gain buffer (like Peter mentioned) to get decent performance. The 1k or 5k resistor really isn't doing you any favours

    If you don't want to add an op amp, at least reduce the R and raise the C (so the RC time contsant is still the same)

Sign In or Register to comment.