cancel
Showing results for 
Search instead for 
Did you mean: 

How can i set vref of DAC to some voltage,say 3.2v and that voltage should give to BJT ?stm32f413zh mcu

mani s
Associate III

Im using stn32f413zh nucleo board.

I want to voltage to BJT from stm32 using DAC ,how can i do it or what to configure?

please any thoughts.

1 ACCEPTED SOLUTION

Accepted Solutions
AvaTar
Lead

IMHO is a common abbreviation for "in my humble opinion".

> how can is use op-amp for this?

A simple inverting or non-inverting DC amplifier. There are plenty of opamp tutorials and example schematics available. Just taylor for your needs.

Just mind the offset voltage of the DAC when the output buffer is enabled (up to 200mV).

View solution in original post

5 REPLIES 5
AvaTar
Lead

IMHO not a good idea.

Besides the highly non-linear Ib/Ic transfer function, the output impedance of the DAC is hardly sufficient to drive a BJT, even with enabled buffer.

A power opamp (or audio amplifier) would be an alternative.

mani s
Associate III

thank you for reply ,what is IMHO and how can is use op-amp for this?

AvaTar
Lead

IMHO is a common abbreviation for "in my humble opinion".

> how can is use op-amp for this?

A simple inverting or non-inverting DC amplifier. There are plenty of opamp tutorials and example schematics available. Just taylor for your needs.

Just mind the offset voltage of the DAC when the output buffer is enabled (up to 200mV).

mani s
Associate III

1.yeah i will try to implement using op-amp,

2.is that below two lines is enough to set vref voltage for DAC, is im selecting channel

HAL_DAC_SetValue(&hdac, DAC_CHANNEL_1, DAC_ALIGN_12B_R, 2048); 

HAL_DAC_Start(&hdac, DAC_CHANNEL_1); 

if not what and all shall i configure ?

mani s
Associate III

above two lines of code is correct or i have to add any registers for Dac in stm32f4 seires?