2021-08-25 4:44 AM
I'm using the DACs of STM32F303K8.
The max voltage of the DAC1 is 3.3V but the second is 3V.
I don't find any explanation for it and it looks like also quite strange.
PS. To my nucleo is not. Connected to any Vref. It is necessary?
Anyone can help me?
2021-09-09 3:29 AM
If the dac output is higher than stm supply voltage, it is probably an external hw issue. Also check another board in case the pin was damaged by applying overvoltage....
2021-09-09 4:21 AM
Thank JW, your advice helped me a lot.
no, I did not disconnect. Effectively PA6 is connected with PB6 (that I don't use).
Without SB16 I have much better measures;
no external power supply and no load: 3.3V
no external power supply and with load 2.93V
with external power supply and no load: 3.24V
with external power supply and with load 2.94 V
So without load, the 3.3V gets down to 3V. This is strange because the load is 50k and with the other DAC the load is 65k, so not so much different.
2021-09-09 4:22 AM
as I said, I have measured without load and with only the USB connected. But anyway I will try with another board
2021-09-11 4:06 AM
The point is the DACs one is buffered with load of 55k and the second is NOT buffered with a load a load of 64k.
THe unbuffered without any load is perfect: it makes a curve voltage as I wish. With the load this curve is full of "noice". It is like a small oscillation.
I have tried to insert in between a buffer without any result.
I wonder if it is a problem of load resistance and what can I do.
Hopefully you can help.
Fausto
2021-09-11 4:18 AM
The internal dac buffer will help to adapt to some extend to the output load, at the expense of the rail to rail voltage. Using an external follower opamp, you should get ideal waveform and it comes at a cost.
2021-09-20 4:18 AM
I insert an external opamp with a low filter and follower opamp Rail to Rail.
In the file attached, you can see 2 curves: yellow is what the motor driver measure. So is the ideal set point of the motor. So is simply the voltage of the DAC; the red is the feedback of the motor driver so it is its real behaviour. In the first curve, when the DAC is open and not connected to anything the red curve is "clean" and the yellow is flat because there is nothing connected.
in the second curve, when I connect the DAC to the ADC of the motor driver, the red curve is not clean anymore.
the analogue input of the motor driver is 50k.
2021-09-20 4:44 AM
How did you measure those waveforms? How exactly do you connect DAC to ADC?
The ADC is a significant pulsed load, at every sampling moment the sampling capacitor is connected, so it has to be driven from a high-impedance source.
JW
2021-10-19 12:52 AM
I have found out why there was this strange waveform.
But I did not resolve my last issue: without an external reference of 3V, the DAC1 at 4095 provides 3.3V and the DAC2 3V. With the external reference and removig the bridge SB10 on my Nucleo I have the same behaviour. Should I modify something else in the Software or Hardware?
2021-10-31 10:01 AM
I have found the cos and so also the solution of my issue. The Nucleo received signals for the 3.3V from the encoders. Apparently, somehow those created some instability in only my DAC not buffered. An issue that did not appear with the STM32F303RE.