OpenSource Remote for VESC ArduBoardControl

Lightweight / Folding / Portable EVs - seats optional

Re: OpenSource Remote for VESC ArduBoardControl

Postby RollingGecko » Sat Apr 08, 2017 5:38 pm

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
Github: https://github.com/RollingGecko
ArduBoardControl: The Nunchuk Arduino implementation for the VESC: https://github.com/RollingGecko/ArduBoardControler
Berlin Custom Boards: All around DIY longboards: https://www.facebook.com/berlincustomboards/
RollingGecko
100 W
100 W
 
Posts: 109
Joined: Tue Jul 14, 2015 2:20 am

Re: OpenSource Remote for VESC ArduBoardControl

Postby maxxxx » Sat Apr 15, 2017 11:53 am

RollingGecko wrote: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?
maxxxx
1 µW
1 µW
 
Posts: 2
Joined: Fri Apr 07, 2017 3:02 am

Re: OpenSource Remote for VESC ArduBoardControl

Postby Jfriesen » Sun May 28, 2017 4:25 pm

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
Jfriesen
1 µW
1 µW
 
Posts: 2
Joined: Sun May 28, 2017 4:20 pm

Re: OpenSource Remote for VESC ArduBoardControl

Postby RollingGecko » Sun May 28, 2017 5:55 pm

Go for it and keep us updated!
Github: https://github.com/RollingGecko
ArduBoardControl: The Nunchuk Arduino implementation for the VESC: https://github.com/RollingGecko/ArduBoardControler
Berlin Custom Boards: All around DIY longboards: https://www.facebook.com/berlincustomboards/
RollingGecko
100 W
100 W
 
Posts: 109
Joined: Tue Jul 14, 2015 2:20 am

Re: OpenSource Remote for VESC ArduBoardControl

Postby Jfriesen » Thu Jun 01, 2017 10:48 pm

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.
Jfriesen
1 µW
1 µW
 
Posts: 2
Joined: Sun May 28, 2017 4:20 pm

Re: OpenSource Remote for VESC ArduBoardControl

Postby Jeefberky » Mon Jun 19, 2017 2:37 pm

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!
Jeefberky
1 mW
1 mW
 
Posts: 14
Joined: Sat Apr 09, 2016 4:53 am

Re: OpenSource Remote for VESC ArduBoardControl

Postby RollingGecko » Mon Jun 19, 2017 3:24 pm

Great to hear, that the remote works!
To your questions:
To use it with one Cell just leave away the voltage divider at
Code: Select all
VOLTAGE_PIN

To define which LED is for what define it here:
Code: Select all
//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: Select all
#define STATUS_LED_USED      //define out if not used

Number of cells is detected automatically.
Github: https://github.com/RollingGecko
ArduBoardControl: The Nunchuk Arduino implementation for the VESC: https://github.com/RollingGecko/ArduBoardControler
Berlin Custom Boards: All around DIY longboards: https://www.facebook.com/berlincustomboards/
RollingGecko
100 W
100 W
 
Posts: 109
Joined: Tue Jul 14, 2015 2:20 am

Re: OpenSource Remote for VESC ArduBoardControl

Postby Jeefberky » Mon Jun 19, 2017 3:55 pm

RollingGecko wrote:Great to hear, that the remote works!
To your questions:
To use it with one Cell just leave away the voltage divider at
Code: Select all
VOLTAGE_PIN

To define which LED is for what define it here:
Code: Select all
//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: Select all
#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?)
Last edited by Jeefberky on Mon Jun 19, 2017 3:56 pm, edited 1 time in total. View post history.
Jeefberky
1 mW
1 mW
 
Posts: 14
Joined: Sat Apr 09, 2016 4:53 am

Re: OpenSource Remote for VESC ArduBoardControl

Postby RollingGecko » Mon Jun 19, 2017 4:02 pm

Set the Devisor to one.
Put the connection to a2 after the Power switch.
Github: https://github.com/RollingGecko
ArduBoardControl: The Nunchuk Arduino implementation for the VESC: https://github.com/RollingGecko/ArduBoardControler
Berlin Custom Boards: All around DIY longboards: https://www.facebook.com/berlincustomboards/
RollingGecko
100 W
100 W
 
Posts: 109
Joined: Tue Jul 14, 2015 2:20 am

Re: OpenSource Remote for VESC ArduBoardControl

Postby Jeefberky » Mon Jun 19, 2017 4:49 pm

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!
Jeefberky
1 mW
1 mW
 
Posts: 14
Joined: Sat Apr 09, 2016 4:53 am

Re: OpenSource Remote for VESC ArduBoardControl

Postby RollingGecko » Mon Jun 19, 2017 6:00 pm

I dont mean after switching. Ich mean the physical switch.
Github: https://github.com/RollingGecko
ArduBoardControl: The Nunchuk Arduino implementation for the VESC: https://github.com/RollingGecko/ArduBoardControler
Berlin Custom Boards: All around DIY longboards: https://www.facebook.com/berlincustomboards/
RollingGecko
100 W
100 W
 
Posts: 109
Joined: Tue Jul 14, 2015 2:20 am

Previous

Return to Stand-up E-scooters and E-skateboards

Who is online

Users browsing this forum: No registered users and 2 guests