OpenSource Remote for VESC ArduBoardControl

Good to hear

Is there any way you could upload the compiled version for hw 4.10? I have no idea how to do that and wouldn't like to brick my vesc trying
 
F..k

Wanted to configure today the motor correctly in bldc after firmware update. In bldc-tool in the Motor Configuration BLDC I wanted to make a Detect parameters. The motor snapped once really havily and no he is off. No function in bldc anymore. Tried to control it over bldc-tool but the motor remains quit. Reupdated the firmware once more because I thought it could be caused by some settings. Nothing! :evil: :evil: :evil:
Any ideas?


I bought also a OLED display to play around for the remote. It is f..ed up to. Not my day.
 
so if I am correct from the nunchuck you only have the joystick?

Controller(arduino nano + rf + led + vibrate motor)
VESC( arduino nano + rf)
?????
 
nRF24 has already a checksum. Furthermore we can add a device-ID (Binding) and we can work with a package counter.
Never the less I want to try around with multiple devices of nRF24 in near filed and parallel working of more than one remote.

Will put it on the to do.

At the moment we have only a timeout. As soon as the signal is lost longer then a defined timeout, VESC gets a neutral signal.

My first task is at the moment to get my VESC back to work. Have no idea how or where the problem is. :x
 
Any lucky with your VESC? the faults command is not giving you anything?

I'm finally getting data back from VESC and into the remote, thank you sir for this library :wink:

Just one thing that i think is missing is Wh in and out, from my point of view is mandatory for coulomb counting fuel gauge, is just a matter of adding to the datatypes.h or much more complex?
 
I don*t know why I skipped them. They are exactly the 8 bits I skipped there. Maybe I wanted to save memory?
I don't really need them. I calculate a battery by the used Ah.
There 2 are ways to do it. One to add this 8 bits (I can do it when I can find the time for) or simply calculate Ah*V and you are at the same results. :)

Still no Idea with my VESC. Need here support because here I'm out of knowledge.
 
RollingGecko said:
I don*t know why I skipped them. They are exactly the 8 bits I skipped there. Maybe I wanted to save memory?
I don't really need them. I calculate a battery by the used Ah.
There 2 are ways to do it. One to add this 8 bits (I can do it when I can find the time for) or simply calculate Ah*V and you are at the same results. :)

Still no Idea with my VESC. Need here support because here I'm out of knowledge.

Will try that, i think that this 8 bits missing is whats making some values not to show, for example tachoABS

Have you posted it in vedder's forum?
 
TachometerAbs is there...

Code:
case COMM_GET_VALUES:
		ind = 14; //Skipped the first 14 bit.
		values.avgMotorCurrent = buffer_get_float32(message, 100.0, &ind);
		values.avgInputCurrent = buffer_get_float32(message, 100.0, &ind);
		values.dutyCycleNow = buffer_get_float16(message, 1000.0, &ind);
		values.rpm = buffer_get_int32(message, &ind);
		values.inpVoltage = buffer_get_float16(message, 10.0, &ind);
		values.ampHours = buffer_get_float32(message, 10000.0, &ind);
		values.ampHoursCharged = buffer_get_float32(message, 10000.0, &ind);
		ind += 8; //Skip 9 bit
		values.tachometer = buffer_get_int32(message, &ind);
		values.tachometerAbs = buffer_get_int32(message, &ind);
		return true;
		break;
 
Yes, just one question, i just have to add the wh and wh count on VescUart.cpp and datatypes.h right? i did that but everything past where i edited stoped working :lol:
 
Tachometer values are as int32. In the commands.c in bldc:

Code:
	case COMM_GET_VALUES:
		ind = 0;
		send_buffer[ind++] = COMM_GET_VALUES;
		buffer_append_float16(send_buffer, NTC_TEMP(ADC_IND_TEMP_MOS1), 1e1, &ind);
		buffer_append_float16(send_buffer, NTC_TEMP(ADC_IND_TEMP_MOS2), 1e1, &ind);
		buffer_append_float16(send_buffer, NTC_TEMP(ADC_IND_TEMP_MOS3), 1e1, &ind);
		buffer_append_float16(send_buffer, NTC_TEMP(ADC_IND_TEMP_MOS4), 1e1, &ind);
		buffer_append_float16(send_buffer, NTC_TEMP(ADC_IND_TEMP_MOS5), 1e1, &ind);
		buffer_append_float16(send_buffer, NTC_TEMP(ADC_IND_TEMP_MOS6), 1e1, &ind);
		buffer_append_float16(send_buffer, NTC_TEMP(ADC_IND_TEMP_PCB), 1e1, &ind);
		buffer_append_float32(send_buffer, mc_interface_read_reset_avg_motor_current(), 1e2, &ind);
		buffer_append_float32(send_buffer, mc_interface_read_reset_avg_input_current(), 1e2, &ind);
		buffer_append_float16(send_buffer, mc_interface_get_duty_cycle_now(), 1e3, &ind);
		buffer_append_float32(send_buffer, mc_interface_get_rpm(), 1e0, &ind);
		buffer_append_float16(send_buffer, GET_INPUT_VOLTAGE(), 1e1, &ind);
		buffer_append_float32(send_buffer, mc_interface_get_amp_hours(false), 1e4, &ind);
		buffer_append_float32(send_buffer, mc_interface_get_amp_hours_charged(false), 1e4, &ind);
		buffer_append_float32(send_buffer, mc_interface_get_watt_hours(false), 1e4, &ind);
		buffer_append_float32(send_buffer, mc_interface_get_watt_hours_charged(false), 1e4, &ind);
		buffer_append_int32(send_buffer, mc_interface_get_tachometer_value(false), &ind);
		buffer_append_int32(send_buffer, mc_interface_get_tachometer_abs_value(false), &ind);
		send_buffer[ind++] = mc_interface_get_fault();
		// TODO: send FOC values id, iq, abs
		commands_send_packet(send_buffer, ind);
		break;

What are you doing with it?
 
They are in int32 here, here's what i changed

Code:
	case COMM_GET_VALUES:
		ind = 14; //Skipped the first 14 bit.
		values.avgMotorCurrent = buffer_get_float32(message, 100.0, &ind);
		values.avgInputCurrent = buffer_get_float32(message, 100.0, &ind);
		values.dutyCycleNow = buffer_get_float16(message, 1000.0, &ind);
		values.rpm = buffer_get_int32(message, &ind);
		values.inpVoltage = buffer_get_float16(message, 10.0, &ind);
		values.ampHours = buffer_get_float32(message, 10000.0, &ind);
		values.ampHoursCharged = buffer_get_float32(message, 10000.0, &ind);
		values.Wh = buffer_get_float32(message, 10000.0, &ind);
		values.WhCharged = buffer_get_float32(message, 10000.0, &ind);
		values.tachometer = buffer_get_int32(message, &ind);
		values.tachometerAbs = buffer_get_int32(message, &ind);
		return true;
		break;

	default:
		return false;
		break;
	}

Code:
struct bldcMeasure {
	//7 Values int16_t not read(14 byte)
	float avgMotorCurrent;
	float avgInputCurrent;
	float dutyCycleNow;
	long rpm;
	float inpVoltage;
	float ampHours;
	float ampHoursCharged;
	float Wh;
     float WhCharged;
	long tachometer;
	long tachometerAbs;
}	;
 
After a few hours solved

As soon i connect the Arduíno usb, VESC start dumping data on the rx port, the same port used for the upload of the new sketch :roll:

The problem was that the code with Wh counting never had been uploaded, now almost everything is working, i'm still getting zero on battery current, duty cycle and booth tachometers, but enough for today, the goal was to get Wh reading

EDIT:

Obviously i was getting zero on both current readings, the motor was not spinning :|
 
Just get Wh on the remote do have an accurate battery indicator

Just saw that vedder merged your pull request on FW2.10, but unfortunately everything stopped working on this update, i'm not getting data back nor can i control the nunchuck app

For it to work, i have to set the control method to Nunchuck or UART?

EDIT:

No go, i'm back on 2.8 and still not working, everything is back exactly as it was yesterday

EDIT2:

I remembered that i was in firmware 2.7 last night, not 2.8, so back to it and getting data back starts working again (minus the tachometer_ABS)

So something changed in firmwares beyond 2.7 that made the library incompatible, will look into it tomorrow

I saw on the last page that you had the same problem, but getting the datatypes.h from the latest firmware did not help
 
Finally (almost) everything working

Getting data back and nunchuck app, shame that my motor support is bent and i can't teste the board for the next weeks
 
Statusupdate:

Vedder merged already my changes in the FW. So please use directly his repo.

My VESC is now finally dead. Reason: I updated the FW without setting the Hardware to my Version in the file conf_general.h. After using the Autodetect it seams that the MOSFET driver get killed. As I tried to change this part, I damaged the PCB....F...k

So take care to set your Hardware Version correctly!!!

Now I'm without VESC and the development stagnates till I get a replacement.

Regards

Andreas
 
RollingGecko said:
Statusupdate:

So take care to set your Hardware Version correctly!!!

Andreas

is it fried for good? What should I look out for?

I've been quietly following this, but no time to try it out yet.

So for I have a nano and nrf with sma ant (no amplifier).
a 2 axis joystick (with pushbutton)
2 micro lever swtich for nunchuck style options
2-3 pot (trim, speed, punch) analog setting
2s li ion/lipo
I was thinking of doing something similar and adding an i2c oled to display stats, change settings, etc...

just an example, not connected, plan on a 3d printed case smaller than the controller shown.
tumblr_o2u76zgRgg1v905p6o1_540.jpg
 
Hi,

That sounds good. The OLED is also the next step I want to go. Already bought 2 china OLEDs from Ebay. I was not able to bring them to work. I'm searching for a reliable supplier for a .96 OLED 128x64 which I can operate with U8glib. And I want go with the featherwing to have more memory and SD for telemetry: https://www.adafruit.com/products/2922

@Saul: We should through our design for the OLED and all the abilities of configuration over that module together to run in the same direction and to share some workload if you want to. Maybe we can discus this first separately before presenting here our idea. Otherwise we get to much discussion. I want to start this discussion when the first sketch of a design is available. Maybe we can skype once? At the moment I'm on holiday but I'm back on the 5th of March.
 
You have to get the exact HEX Address for your specific oled in order to work. Hope it helps
 
No. Get and i2c OLEd and made a port scan and used this address. Without success. The other one should have bin an SPI but a pin is missing to be and SPI. Get already the money back for on ebay
 
What hardware is required to do this?

Arduino Nano and nRF24 on both RX and TX sides? Does one plug into the VESC and the other go into the nunchuck, then they speak between themselves across the nRF24?

I want to order some parts to start working on this, while I wait for VESC to come. New to the VESC, but not writing software.
 
Back
Top