Odd spikes on virtual ground graph

Report your hardware problems here. Include as many details as possible with pictures to get the best possible help and feedback.
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable
jpa
Posts: 5
Joined: 22 Dec 2015, 18:23
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable

Odd spikes on virtual ground graph

Postby jpa » 22 Dec 2015, 18:27

Hi,

I'm having several problems, starting with autodetection not working.
However one thing that seems like a hardware problem with my self-assembled PCB is this graph:

Image

The motor is idle in that image. Are the virtual ground spikes normal or does this indicate some sort of a problem?

benjamin
Site Admin
Posts: 280
Joined: 15 Dec 2015, 08:38
Location: Sweden
Contact:

Re: Odd spikes on virtual ground graph

Postby benjamin » 23 Dec 2015, 08:03

Hi,
The virtual ground spikes are not normal. What is the measured input voltage in the RT data?

jpa
Posts: 5
Joined: 22 Dec 2015, 18:23
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable

Re: Odd spikes on virtual ground graph

Postby jpa » 23 Dec 2015, 09:01


benjamin
Site Admin
Posts: 280
Joined: 15 Dec 2015, 08:38
Location: Sweden
Contact:

Re: Odd spikes on virtual ground graph

Postby benjamin » 23 Dec 2015, 12:55

The virtual ground is calculated differently depending on whether the motor is running or not, and how hight the duty cycle is.

What happens when you run detection or when you try to run the motor? Do you get any fault code? What do the currents look like?

One thing I noticed is that you moved the EN_GATE pin to PB4. You changed the hwconf.h, but did you also update hwconf.c and set it to an output? One thing that is a bit tricky with that pin is that it is for the jtag interface, which is on by default. I think you have to add some code to disable the jtag interface to use pb4 as gpio. You can add that to the hw c file for your hardware.

jpa
Posts: 5
Joined: 22 Dec 2015, 18:23
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable

Re: Odd spikes on virtual ground graph

Postby jpa » 30 Dec 2015, 12:42

Thanks for the suggestions.

I checked the pin configurations through a debugger (results http://paste.dy.fi/PeS/plain ). There was a small mistake with the FAULT input that I fixed, but otherwise it was correct. EN_GATE is set to output in https://github.com/PetteriAimonen/bldc/ ... _jpa.c#L51 and seems to be working properly.

Seems that atleast some of the noise in the virtual ground (in this situation that is average of phase voltages) is from hardware. I have made the mistake of routing the SENS1-3 traces under the buck regulator inductor. Also the spikes due to ADC sampling seem to be surprisingly large, perhaps due to inductance of the traces. Adding 100pF capacitors next to the MCU pins seems to have helped with that. With 2kohm impedance from the voltage divider, that gives a cutoff of around 1 MHz, which I hope is high enough not to disturb the sensing.

This is what idle state (after pressing "release") looks now:
Image

---

However, detection is still not working. I have adjusted the parameters to 3A, 400 ERPM and 0.20 duty, which to me seems to spin the smoothest. Still just getting "Detection failed". I haven't tried adding more debug info to that yet. When it is starting the detection the currents look like this:

Image

And here is a video of how the motor behaves & sounds: http://kapsi.fi/~jpa/stuff/pix/P1010600.webm

---

Would it be possible for you to provide some screenshots what the voltages and currents are supposed to look? I'd be interested both in idle state (after "Release" has been clicked) and when the detection is run. My motor is a 36V geared hub motor, but I think any reference waveforms would help me get started with the debugging.

jpa
Posts: 5
Joined: 22 Dec 2015, 18:23
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable

Re: Odd spikes on virtual ground graph

Postby jpa » 06 Jan 2016, 17:59

Ah, finally I found out the reason.

I had added the overcurrent limit voltage divider to the DRV8302, thinking that if I do not need it, I can always disable it. Then I promptly totally forgot about that modification. Well, turns out it was way too sensitive and was limiting the current.

After removing R5 from my board, everything seems to work fine!


[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable

Return to “Hardware Problems”

Who is online

Users browsing this forum: No registered users and 3 guests