Open RoboDurden opened 5 months ago
If 30 mA would be the max current of the dac pin, then the low pass resistor should not be smaller than 3V/0,03A = 100 Ohm. I am using R10=12k + R11=0.9k = 12.9k and can control the output voltage from 27.6V to 58.8V. That is a range of 31.2 Volt, divided by 255 steps gives a resolution of 0.12 Volt, that currently needs to be shifted with the original potentiometer on the dcdc module if you would want to charge a 12 Volt battery..
I can easily go to 10 bit and would have a step size of 0.03 Volt. 12 bit and i had 7.7 mV
And reducing R10 to 3.3k might already give the full range from 1.4V to 79V. Which should increase the step size to 0.1V at 10bit and 0.023V for 12 bit. The dac would then cover a greater voltage range.
for refrence,this is a schematic of a dps5005 power supply https://github.com/kanflo/opendps/blob/master/hardware/reverse-engineering/dps3003/DPS3003.pdf
I did some testing today to go from 8bit dac to 10bit or 12bit. As the dac_2 does not work on my S2 Minis, i already had to use pwm and a 100 nF low pass anyway. So i tested this PIN_DACout with higher bit ranges:
Here 10 bit with 10,000 Hz:
For 12 bit the frequency must be reduced to 5000 Hz, otherwise
ledcAttach(PIN_DACout, DAC_Freq, DAC_Bits)
will fail:14 bit only succeeds at 2000 Hz but i guess that would need a 1 uF low pass:
@AILIFE4798, you need an opamp when you want to drive something like a loudspeaker. I am still confident that the max 40mA source- and 28mA sink-currents of the Esp32S2 are enough to control the feedback inputs(!) of the LT8705
Here the Arduino test code. 'f5000' sent from the terminal will change frequency to 5000 Hz, 'b8' will set the bit range to 8: