Page 2 of 2

Re: LV8729V with STM32

Posted: Tue Nov 24, 2020 4:57 pm
by sigi
the unit I have maybe works... it is a 12v to 12v non regulated converter of very low power rate (B1212S-1W) I test it with 3.8V in and it gives 3.82v out (so not exactly 1:1) of course I need a 3:1 voltage divider in the input to not burn it with 28v... MAYBE it works.

the only doubt I have about it is the resistor may be used in parallel or series with the output, or maybe no resistor at all... so just connect one leg to ground and the other directly to an ADC pin of the MCU.

Now I realize that the reverse spikes that comes from the motor coils are the problem and maybe they will not let the DC-DC converter works properly.

Re: LV8729V with STM32

Posted: Tue Nov 24, 2020 5:06 pm
by stevestrong
You can eventually use a resistor divider on the input side, dependent on the input impedance.
On the output you also have to check the impedance, maybe it allows to use ~10..100kOhm values for a divider.

The spikes should be filtered with a capacitor on the Vmotor, together with the integrated reverse diodes on the power transistors.
But if the motor supply is separated from the digital supply the spikes should not cause any trouble.

Re: LV8729V with STM32

Posted: Tue Nov 24, 2020 5:34 pm
by sigi
but the voltage Im talking about is exactly the motor supply... so as u pointed it is important that the DC-DC converter must be near to the motor capacitor

Re: LV8729V with STM32

Posted: Tue Nov 24, 2020 6:47 pm
by stevestrong
I do not think that the spikes on motor voltage will disturb the DC-DC converter from working properly.
The converter will most probably filter out the spikes by design if it has low frequency response.
The most important thing first is to avoid STM32 frying ;)

Re: LV8729V with STM32

Posted: Wed Nov 25, 2020 12:36 am
by sigi
well all was good in theory BUT surprise! both grounds on the LV8729V modules are already shorted!!! so no matter if I separate them the problem will persist... A similar driver the DRV8825 has the same "mistake" the 2 grounds are shorted...
At least I was lucky to test them before burning another MCU... the sleep and reset pins are shorted too by default... Why in the name of God I do not test that in the beginning...

I just wondering now if the driver makers do it on purpose... I know that Im trying to use them on a different design, I mean people buy these things for CNC machines using 5v normal Arduinos that maybe can support the 12 motor voltage for a good time... and another difference is that they never use high speed like me... or change micro stepping settings on demand.

I have seen a lot of cases where people do not like these "chip based drivers" and comments like "we use real mosfets not chips..." like the TB6560 based ones, so maybe the chip is not the problem but the design used on the modules that any one can buy... designed to burn? so read the datasheet again can be useful to clarify this... by the way the TB6560 drivers that I have NEVER give me any problem maybe just because of the optos included. But even with that units the input logic (secondary of the optos) and the motor power use the same ground.

Re: LV8729V with STM32

Posted: Wed Nov 25, 2020 8:39 am
by stevestrong
Just because the motor and digital signal GNDs are common does not necessarily mean that the chip will be fried.
In your drawing I cannot see any direct GND connection between power supply module and STM module, please check.

The TB6560 may require the opto-couplers because of the supported high voltage (up to 35V) and internal design of the upper power switches.

Your issue may be related to the 5v and 3.3V difference?

Anyway, as long as you don't have the module schematic we can just tap in the dark and guess what else it can be.

Re: LV8729V with STM32

Posted: Wed Nov 25, 2020 1:50 pm
by sigi
The problem are the reverse polarity spikes... I deal with that more than a decade ago when I start with the electronics of the telescope...
a single 12v impulse going to a low impedance coil can produce a 700v+ back spike!... It is literally Tesla stuff!!!
I remember the "Electric sparks" like in the new AC/DC song... :twisted:

Because I use high voltage too (28v-32v) @ far greater pulse rate I need the optos like in the TB6560 modules... I think that when u use that level of voltage optos are not optional. When u read about the CNC shields they always recommend not exceed 12v for the same reason.

Re: LV8729V with STM32

Posted: Wed Nov 25, 2020 2:52 pm
by stevestrong
Yes, you get those spikes if you do not protect the voltage.
But those driver chips have protective diodes included in parallel to the power transistors, which diodes minimize those spikes charging the capacitors on the motor voltage.

Using optos the system will probably work fine.

Re: LV8729V with STM32

Posted: Wed Nov 25, 2020 4:57 pm
by sigi
Im working on that... Im worried about the "invert logic" involved on using optos... I know I can fix it with code but I really like not to need that.