cancel
Showing results for 
Search instead for 
Did you mean: 

inverted dac

es131245
Associate II
Posted on October 27, 2016 at 19:26

I've been making a device on STM32F407VGT6

That uses UART with both DMAs, DAC, few GPIO and Timers

After some time coding it, ive came into shocking situation.

DAC have become inverted!

If i send 0, it sets 3.3V, if 4095 then 0.0V !

I've tried 1024, 2048, 3072 all of them are opocite like

U=Vref-Vref*data/4095

Tried other device and they are fine.

Maybe it's because i've passed few overbuffers ints to HAL_DAC_SetValue?

Tried full erasing & reprogramming. Nothing helped. Is this chip wasted?

#stm32 #stm32f4 #dac
4 REPLIES 4
Posted on October 27, 2016 at 21:03

Seen several similar reports on the forum, you might want to review them and see if you share anything in common.

Maybe it's because i've passed few overbuffers ints to HAL_DAC_SetValue?

Doubt it.

Tried full erasing & reprogramming. 

There are few things that can be fixed in such a way. Especially if you program it with the same code.

Is this chip wasted?

Quite likely, you should perhaps examine your design and power configuration. Consider what you did that might cause failure, like applying large voltages.

Desolder and replace, evaluate new part in circuit.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
ColdWeather
Senior
Posted on October 27, 2016 at 22:50

Be sure, you measure between the DAC output and GND, not VCC 😉

es131245
Associate II
Posted on October 28, 2016 at 20:52

I can guess that DAC should not be used as a power source it self, that there should be an OP repeater after it.

But i just want to control of mosfets gate of IRL.

Is that's fine? I can't find any data on current load of the DAC.

Is there any other warnings except noise about connecting V+ and Vref to Vcc of MCU?

ColdWeather
Senior
Posted on October 28, 2016 at 21:29

You can find the output capability of the DAC in the data sheet. AFAIK the DAC has the output impedance of about 15K. It's enough to drive MOSFET's gate directly provided, the frequency is not too high (say, under 100Hz). The reason: MOSFET's gate has a parasitic capacitance: the higher the frequency, the lower the impedance. It would not damage the DAC output but the signal form will suffer, should it be important.