You are here

virtual ground voltage

1 post / 0 new
vbashiri
Offline
Last seen: 3 days 11 hours ago
VESC Free
Joined: 2025-11-10 12:14
Posts: 2
virtual ground voltage

Hello all,

I am developing a costume hardware for VESC. So my voltages are coming from a separate measurement board and I have the input source connected but there is no motor connected and all phase voltages are zero. In "Sampled Data/BEMF" what I see is all 3 phase voltages are zero but I have about 30v of virtual ground voltage ( https://drive.google.com/file/d/1DhN0xhb8FXrmBLLaoROOkJdHgbzqDvto/view?usp=sharing ). Here is part of "mc_interface.c" that I believe does the sampling of these values:

if (conf_now->motor_type == MOTOR_TYPE_FOC) {
				if (is_second_motor) {
					zero = (ADC_V_L4 + ADC_V_L5 + ADC_V_L6) / 3;
				} else {
					zero = (ADC_V_L1 + ADC_V_L2 + ADC_V_L3) / 3;
				}
				if (is_second_motor) {
.....
					m_ph1_samples[m_sample_now] = ADC_V_L4 - zero;
					m_ph2_samples[m_sample_now] = ADC_V_L5 - zero;
					m_ph3_samples[m_sample_now] = ADC_V_L6 - zero;
				} else {
....					

					m_ph1_samples[m_sample_now] = ADC_V_L1 - zero;
					m_ph2_samples[m_sample_now] = ADC_V_L2 - zero;
					m_ph3_samples[m_sample_now] = ADC_V_L3 - zero;
....

			m_vzero_samples[m_sample_now] = zero;

I don't know what happening inside the VESC software code, but in this part of firmware it looks like we are sampling the raw ADC data and sending it to software. 

here is my question: Is VESC software do further processing on these data before plotting them and how to explain the 30v virtual ground volatge?