OpenSource Remote for VESC ArduBoardControl

Hi,

I used a simple voltage divisor with 2 resistors. I soldered it in a flying connection without PCB.

Depending on your quotient for voltage devisor your can set in the config.h:

//TX Voltage measurement
#define VOLTAGE_DIVISOR_TX 102.5

Regards

Andy
 
RollingGecko said:
Hi,

I used a simple voltage divisor with 2 resistors. I soldered it in a flying connection without PCB.

Depending on your quotient for voltage devisor your can set in the config.h:

//TX Voltage measurement
#define VOLTAGE_DIVISOR_TX 102.5

Regards

Andy

What resistor values did you use?
 
Anyone looked at the new NRF52 based feather designs? They have some support for central mode no re-flashing required. A UART example is provided. I'm going to order a couple and see how the reliability of the connection is.

https://www.adafruit.com/product/3406
 
Bought two feather NRF52s from amazon, they came in today and are working beautifully in my initial testing. I am getting round trip latency (sending a message and echoing it back to the central node) of something around 13-15 milliseconds with minor tweaks to the example code provided by adafruit. 5ms or lower one way latency should feel plenty responsive I'd imagine. They pair quickly (within half a second of turning on) and reliably in my testing so far though I need to work out some code for a more permanent pairing setup so you don't accidentally pair to your friends board etc. Haven't hit any roadblocks yet.

Conducted some initial range testing, at first I was very skeptical because more than 20ft apart I was getting very dodgy connections until I realized the default transmit power on the modules is 0 dB and it can go up to 4 dB. After using:
Bluefruit.setTxPower(4);
I saw a dramatic improvement in range and transmission through obstacles (such as enclosing my hand completely around the device). It seems pretty reliable after this change, only drops if I completely enclose the device in things that aren't rf transparent (metal box etc.) or mov them two rooms apart in my apartment.

I also hooked up a sharp memory display (128x128) and am able to refresh that guy with about 14 ms of CPU time (again completely non-optimized just printing some random stuff each time). Considering you only need to update the screen around 20 Hz it should only take 20-30% CPU to run the display worst case (I think I could at least halve this with simple tweaks/optimization).

Need to head into my lab to test power consumption numbers etc. So far my experience with the RTOS running underneath the arduino layer is pretty awesome. Having the ability to start extra event driven threads etc. will make writing code with lots of safety checks in place more straightforward. When I make more progress I'll post again.

FYI I am still waiting on my board to ship so it will be awhile until I can start testing with these things plugged into some VESCs. Regular arduino code runs fine on these feathers it seems so hopefully I can leverage a lot of the previous stuff you guys have done to accelerate there.
 
Hey @RollingGecko,

It has been a while I have visited this topic. My remote still works great with my VESC (using an Ardnuino Nano).
I want to add a WS2812 LED to see the battery level of my longboard. I assume your code automatically enables the TX battery LED and the LED for the longboard battery level (since you have connected two ws2812 leds connected to each other)?

The problem I have is, I power the TX Arduino Nano with a battery booster (sparkfun power cell) because I'm powering the TX with a 1s Lipo.
So, is it still possible to measure the voltage of the 1S Lipo if the voltage of the Lipo gets boosted to 5v? Of course I want the Lipo voltage to be measured. Not the boosted voltage (because this will be always 5V till the battery voltage gets to low :lol: ).

Or, is it possible to disable the TX battery LED and only use one LED to diplay the longboard battery voltage with a simpel code edit?

Kind regards!
 
Great to hear, that the remote works!
To your questions:
To use it with one Cell just leave away the voltage divider at
Code:
VOLTAGE_PIN
To define which LED is for what define it here:
Code:
//WS2812 settings

#define NUM2812		4
#define BRIGHTNESS	20
#define LED_TX		0	//TX-Voltage
#define LED_TRANS	1	//Transmission
#define LED_VOLTAGE	2
#define LED_FOUR	3

And you have enable
Code:
#define STATUS_LED_USED		//define out if not used
Number of cells is detected automatically.
 
RollingGecko said:
Great to hear, that the remote works!
To your questions:
To use it with one Cell just leave away the voltage divider at
Code:
VOLTAGE_PIN
To define which LED is for what define it here:
Code:
//WS2812 settings

#define NUM2812		4
#define BRIGHTNESS	20
#define LED_TX		0	//TX-Voltage
#define LED_TRANS	1	//Transmission
#define LED_VOLTAGE	2
#define LED_FOUR	3

And you have enable
Code:
#define STATUS_LED_USED		//define out if not used
Number of cells is detected automatically.

Thanks for the fast reply!

A few questions.
What value do I have to give VOLTAGE_DIVISOR_TX if I do not use a voltage divider? (I guess it will be 1 but don't realy know what is going on in the code :oops: )
Because I use a switching powersupply (sparkfun power cell). Is it safe to keep the positive lead of the battery connected to pin A2 all the time? (even when the TX is turned off?)
 
Thanks!

Connecting the positive wire to a2 after switching on the TX will be some what of a challenge for me. But thanks for the fast reply!
 
Hi all,

I've been using my electric longboard for quite awhile now and want to fiddle with it.

I'm controlling my longboard on a PPM tx/rx. I am looking into having some form of telemetry from the VESC.

my VESC is 4.10 and running the latest 3.33 firmware. I've tried wiring the VESC Tx to arduino nano v3 and mega Rx and VESC Rx to Tx. I used RollingGecko's arduino library and files (including the vesc6 branch on his github), ran the setup on debug and the serial monitor was printing garbage. and don't seem to be able to be getting any values.

VESC is configured to be running PPM + UART. Can anyone advise what is the problem? Is there any way i could find out if the UART connection on my VESC is faulty ?
 
Hi RollingGecko,

I've tried connected to both the Nano V3 and Mega (not at the same time).

I re-downloaded all the files from your github with the rf library. Get it to run DEBUG mode again by uncommenting the //define DEBUG in the Config.h

This is the following print out in the Serial Monitor. Everytime before printing "Failed to get data from UART" there will be some gibberish
Code:
Nrf24L01 Receiver Starting
@⸮Failed to get data from UART!
Received TX successfully!
Received package / Package in main loop: 
valXJoy = 128 valYJoy = 128
LowerButton = 0 UpperButton = 0
Calcx: 0.00
 
Back
Top