drv8825 nVREF

I’ve recently bought two drv8825 for control two stepper motor for an application. Eveything works fine.
Next I tried to control winding current from a microntroller using a DAC (SAMD21) to control standstill current when motor is stoped. So, I remove the potentiometers from the board and change them with DAC output from microcontroller. I just connected DAC output to wiper PAD of the removed potentiometer of both drivers.
I can control current but my surprise was I’m getting a noise from the motors using DAC output.
So, with potentiometer no noise and with DAC quite noisy.
I really need to control current winding from a microcontroller.
Are AVRF and BVREF voltage inputs??
Should I use a digital potentiometer??
Any suggestion??
Thank you!
BR,
daniel

Do you have a decoupling capacitor from AVRF and BVREF to GND? Is DAC GND connected to DRV8825 GND? See pages 10 - 18 of datasheet.

I would do something like this, when motor is at standstill, enable the transistor to pull VREF down to a voltage adjusted by a variable resistor (trimmer), (size determined by trial), to the standby current you want. After determining current, replace trimmer with closest fixed resistor.
iAdj.png

iAdj.png

dani68k:
I’ve recently bought two drv8825 for control two stepper motor for an application. Eveything works fine.
Next I tried to control winding current from a microntroller using a DAC (SAMD21) to control standstill current when motor is stoped. So, I remove the potentiometers from the board and change them with DAC output from microcontroller. I just connected DAC output to wiper PAD of the removed potentiometer of both drivers.
I can control current but my surprise was I’m getting a noise from the motors using DAC output.
So, with potentiometer no noise and with DAC quite noisy.
I really need to control current winding from a microcontroller.
Are AVRF and BVREF voltage inputs??
Should I use a digital potentiometer??
Any suggestion??
Thank you!
BR,
daniel

The SAMD21 DAC is not suitable for this purpose, it is not rail-to-rail. Its also got a lot of sparkle codes and is generally of low quality. An external DAC chip is what you want for this.

Hello JCA34F,

Thank you for your suggestion, I'm sure it works. The only thing I need to setup Vref from code and not from hardware.

Hello MarkT,

Ok, but it's no clear for me what is exactly rail-to-rail DAC. I tried to use an external DAC as MCP4725 I2C DAC and I'm getting the same problem. Do you have a reference to use as DAC for what I'm tryng to do?

I order a coulple of digital potentiometer. I think will the best solution for me now. Just giving a I2C value to setup the VREF each time I want to change.

Thank you!

BR,

daniel

Almost any DAC except the SAM21 one is rail-to-rail. The DAC on the SAM21 is not designed for DC use, its a sigma-delta DAC for audio, but its dreadful.

You have decoupling on that wiper track right close to the DRV8825 chip? Any noise there will be amplified and vibrate the motor windings, which is probably what you are experiencing - the noise is probably nothing to do with the DAC, everything to do with noise pickup.