VESC Open Source - Android App Features?!?!

Lightweight / Folding / Portable EVs - seats optional
Post Reply
torqueboards   100 MW

100 MW
Posts: 2940
Joined: May 27 2013 10:02pm
Location: San Francisco, CA
Contact:

VESC Open Source - Android App Features?!?!

Post by torqueboards » Apr 28 2015 11:01am

:mrgreen: To make life easier and to enjoy our open source options. I know a few people who are willing to create an app for VESC.

What features would you suggest that you would like for a VESC Android App and possibly an iOS app in the future.

My suggestions are as follows from the top of my head. I'll update later when I get a chance.

- Wireless communication with VESC through Wi-Fi or Bluetooth. *Benjamin Vedder should be testing soon.
- Multiple Configuration files for different motors available to change the VESC. - This makes it so you no longer need a Linux box to configure the VESC at least for configurations that have been pre-configured. Option to upload and/or point to your own configuration files.
- Basic configurations - max amp, max brake
- Remote control option - *Mainly used just for fun. Added feature.
- Ride Logging capabilities - VESC already has logging capabilities. I would like to port this data remotely to the app to see the details. Would be nice.
- Current Battery Status, Consumption, Distance
- Trip Logging
- Warning on 20% low battery. Est. 2 miles left
- miles to empty based on previous usage + battery voltages capacity -chuttney1
- Anti-theft deterrent. -chuttney1
- Please show screenshot of the first completed build. -chuttney1
- option to control AUX channels -furp

What would you like to see and/or use?
Last edited by torqueboards on Apr 28 2015 12:31pm, edited 2 times in total.
DIYElectricSkateboard.com Electric Skateboard Kits

User avatar
ekman   1 mW

1 mW
Posts: 18
Joined: Jun 02 2013 1:42pm
Location: Sweden

Re: VESC Open Source - Android App Features?!?!

Post by ekman » Apr 28 2015 11:46am

I'm actually building an add on PCB with BLE (bluetooth low energy) and iBeacon technology for the VESC. I have a rough prototype done and I'm doing the design for the iOS app as we speak. I've built it around the immensely powerful and flexible NRF51822 chip and I'm planing on making it fully open source as well and fully hackable.
I was personably more interested in features such as current battery status, consumption, distance and alike. But it would be really cool to be able to change the settings that you mention via BLE or WiFi. My current sketch has a feature where you can see your current battery status on your Apple Watch even. Also there is a great ability when combining all this with BLE and iBeacons, what this means in short is that you can have the app recognise when you are near the board and prompt you to open the app. You are also able to use notifications for battery status or distance left, like "Warning: You have only 20% battery left!" or "Warning: You only have 5 km left with your current consumption".

Feel free to use any of those ideas and if you'd like I'll be more than happy to share!
Designer by day, Nerd by night

torqueboards   100 MW

100 MW
Posts: 2940
Joined: May 27 2013 10:02pm
Location: San Francisco, CA
Contact:

Re: VESC Open Source - Android App Features?!?!

Post by torqueboards » Apr 28 2015 11:54am

Ekman - That's awesome. Sounds great.

What you mentioned is similar to what I wanted to add as well. I'll add it to the list.

- Current Battery Status, Consumption, Distance
- Trip Logging
- Warning on 20% low battery. Est. 2 miles left

Yeah, would be great if we can connect to VESC with BLE or Wi-Fi. I would assume Ben would have to make modifications for the ESC to talk to the BLE. I'll hopefully be working on one for Android. Will wait on Ben to report on the WiFi/BLE added options.

I like the idea of the added PCB but I want access/control to VESC since VESC itself has a ton of logging details + being able to change config for motors with the app would be great too for users who aren't as familiar with Linux for configuring the VESC.

Will definitely keep you updated as I move forward.
DIYElectricSkateboard.com Electric Skateboard Kits

furp   100 W

100 W
Posts: 201
Joined: Jun 30 2013 2:44pm
Location: Germany

Re: VESC Open Source - Android App Features?!?!

Post by furp » Apr 28 2015 12:03pm

Awesome! Hopefully it will be possible to upgrade existing VESCs with that option. the features you listed are pretty much everything that comes to my mind right now, except maybe the option to control AUX channels with the app (even if the main control is via controller) like light etc. Kepp it coming!

chuttney1   100 W

100 W
Posts: 243
Joined: Apr 03 2013 2:44pm
Location: Los Angeles, CA

Re: VESC Open Source - Android App Features?!?!

Post by chuttney1 » Apr 28 2015 12:09pm

Add features like miles to empty. This is some feature in newer cars that tell you haow many miles you got before the tank is empty, but more taylored toward battery voltages and capacity. GPS capability for data logging purposes as said by others here. A really good clean interface. An antitheft deturrent like board will not function without correct login credentials if stolen or something like that.

Please show screenshot of the first completed build.

User avatar
ekman   1 mW

1 mW
Posts: 18
Joined: Jun 02 2013 1:42pm
Location: Sweden

Re: VESC Open Source - Android App Features?!?!

Post by ekman » Apr 28 2015 12:22pm

Actually torque he dosen't need to make any changes if we make it a separate board, we can use UART or even better the CAN-Bus to drop in and listen to all the functions. Also as furp mentioned it would having it as a separate option make it compatible with all version, prior and future VESC. As for GPS, it's cheaper and easier to leverage the GPS in the phone than having a separate chip as that would add around $30-40 for just the GPS not to mention the added size and power draw. The only downside to doing this would be no ability to track it if it has been stolen.

Also as a teaser to the iOS app here is the icon that I'm working with at the moment, the entire app is very minimalistic as to be easy to use, stylish and able to port it to (in my case) the Apple Watch.
iOS Simulator Screen Shot 28 Apr 2015 19.20.51.png
iOS Simulator Screen Shot 28 Apr 2015 19.20.51.png (129.16 KiB) Viewed 7900 times
Designer by day, Nerd by night

torqueboards   100 MW

100 MW
Posts: 2940
Joined: May 27 2013 10:02pm
Location: San Francisco, CA
Contact:

Re: VESC Open Source - Android App Features?!?!

Post by torqueboards » Apr 28 2015 12:25pm

@furp - Still thinking for the AUX channels what did you plan on using it for? Front lights, rear lights?

@Chuttney1 - Will add features for miles to empty based on previous usage + battery voltages, capacity. Anti-theft deterrent. Please show screenshot of the first completed build.

Guess, I better look into making an Arduino based controller too as I would like to add in front headlights/rear lights to display when braking, etc. Although VESC already has these capabilities.

Nice Ekman. I'll have to follow up with you then. Sent you a PM.
DIYElectricSkateboard.com Electric Skateboard Kits

User avatar
benj   100 W

100 W
Posts: 242
Joined: Jun 06 2013 3:32am

Re: VESC Open Source - Android App Features?!?!

Post by benj » Apr 29 2015 4:31am

Very interested in this :) I make mobile apps for a living, so happy to help if needed.

Looks like ekman is all over it for iOS though, tease us more please!

I started work on something like this a while ago, but never got to finish it - check it out here: http://endless-sphere.com/forums/viewto ... it=+iphone

Happy to share all that source code if you want ekman, just shout. It does all the BLE, notification on power up, logging, gps trace on map, graphs, etc :)

User avatar
ekman   1 mW

1 mW
Posts: 18
Joined: Jun 02 2013 1:42pm
Location: Sweden

Re: VESC Open Source - Android App Features?!?!

Post by ekman » Apr 29 2015 4:54am

@Benj sounds great, hey why don't you join the project it's all ment to be collaborative and open-source anyways. My expertise is mostly in industrial design + software design and some in electrical engineering (PCBs). My coding skills are not up to snuff yet and I was planing on taking the summer to learn Swift coding. But if you are a part of the project I think we could progress a lot quicker! I can do all of the design parts for the software if you are willing to code. Are you willing to do it in Swift so we later can port it to the Apple Watch maybe? Also I'm looking at producing some prototype PCB's pretty soon, as soon as I get my hands on a pair of VESCs. I can send one over to you for free to build on if you join!
Designer by day, Nerd by night

User avatar
benj   100 W

100 W
Posts: 242
Joined: Jun 06 2013 3:32am

Re: VESC Open Source - Android App Features?!?!

Post by benj » Apr 29 2015 7:02am

@ekman - sure I'll join the gang :) I've got a beta VESC on order with onloop, so hope that arrives in May. I currently use a LightBlue Bean for bluetooth which is awesome for me as I'm a tinkerer, not a pro like you! https://punchthrough.com/bean/prototype-production/. If you want to send a board when you're done then awesome, thanks.

My current project is Objective-C - I am still pretty new to Swift so I'd prefer to stick with C for now....it will still work on Apple Watch (which is a cool idea!) We've got 2 watches here for testing already so super keen to get cracking on some fun with them.

Happy for you to concentrate on design and I code. Whatever works :) My design is not so great :lol:

torqueboards   100 MW

100 MW
Posts: 2940
Joined: May 27 2013 10:02pm
Location: San Francisco, CA
Contact:

Re: VESC Open Source - Android App Features?!?!

Post by torqueboards » Apr 29 2015 8:19am

Nice guys! It's going to be amazing what comes out of it all. Guess, we're just waiting on more VESC's to circulate and we can start getting things working.

Benj/Ekman - You both are focusing on an app for iOS specifically? I can probably have my guy work on the Android version.

Benj the map overlay looks great! You've got it all down already.
DIYElectricSkateboard.com Electric Skateboard Kits

User avatar
ekman   1 mW

1 mW
Posts: 18
Joined: Jun 02 2013 1:42pm
Location: Sweden

Re: VESC Open Source - Android App Features?!?!

Post by ekman » Apr 29 2015 8:39am

Torque, well my speciality is designing for minimalism and for ecosystems similar to that of Apples. But that being said there is no obstacle from porting my design to Android. We just need to nail down a clear set of API's and system calls in general and we can basically build a universal solution. BLE in and of itself is completely open and as long as we try to follow Bluetooth SIG's guidelines and protocols we should be all in the clear. Sending over a PCB to you torque too as soon as I have verified my design with the VESC setup.

Benj, sure Objective-C would work too, shouldn't be an issue for at least a year or two before Apple starts phasing it out from the iOS platform (if they get their wish). I've toyed around with the LightBlue Bean myself, but for this project I'm looking at a custom solution as I have a friend at Nordic Semiconductor (Makers of Bluetooth LE chips). The ultimate goal at the moment is to have a strong flexible platform and right now it's looking like we are going to be using an ARM Cortex chip together with the Nordic chip. As for power consumption and performance of the board I'm designing it with a lot of headroom to open it up to customisation. I'm aiming for a steady state power consumption of around 60uA (for all you non-techies thats at least two years of battery life from two AA batteries), the max consumption is calculated at around 20mA depending on the LDO/power conversion used.
Designer by day, Nerd by night

User avatar
onloop   10 kW

10 kW
Posts: 600
Joined: Jun 24 2013 5:24am
Location: Australia
Contact:

Re: VESC Open Source - Android App Features?!?!

Post by onloop » Apr 29 2015 11:19am

Finally VESC now in transit to enertion HQ.

Had some really stupid delays... Just super keen to ship them out ASAP so everyone can start hacking away.

next week I'll be rather busy....

!phone app should make use of phone accelerometerss.... and/or on screen soft button for acceleration/brake. ego cruiser did a really nice job on their application. Has anyone tried it? It actually works great for acceleration and brake.... better than expected.

!Update firmware via BT/WiFi From app.

!Entire BLDC tool ported into app.. hidden in advanced menu..

!current limit control

!Traction control on/off

!temp limit control.

!beginner mode. Economy mode. Advanced etc. Available in simple mode.

torqueboards   100 MW

100 MW
Posts: 2940
Joined: May 27 2013 10:02pm
Location: San Francisco, CA
Contact:

Re: VESC Open Source - Android App Features?!?!

Post by torqueboards » Apr 29 2015 11:35am

Sounds like a plan onloop. :mrgreen:
DIYElectricSkateboard.com Electric Skateboard Kits

furp   100 W

100 W
Posts: 201
Joined: Jun 30 2013 2:44pm
Location: Germany

Re: VESC Open Source - Android App Features?!?!

Post by furp » Apr 29 2015 12:02pm

I agree with the full bldc tool on phnoe, that would be awesome, also presets, share your motor specs and all that nice stuff!

On the aux channel: just a simple on/off switch for lights (or horn, lol) would be awesome, maybe it can be coupled with other variables on the phone side as well like time of day, time of sundown/up and stuff.

The best option: on/off switch for the board! I know it would drain a little power over time, but maybe there can be a cutoff point, sending a messega that the board needs to be recharged and cutting off power to switch until it is sufficiently charged. I have no clue on the requirements and power drain of this, but the less mechanical switches the better! Think of a board with no other 'outlets' of the enclosure than the charging port, anything else can be viewed/controlled via phone. And then add induction charging ofc.

Theft protection would be nice, maybe something like we got on some new laptops that it is automatically unlocked if the right device (phone, smartwatch whatever) is near it.

User avatar
ekman   1 mW

1 mW
Posts: 18
Joined: Jun 02 2013 1:42pm
Location: Sweden

Re: VESC Open Source - Android App Features?!?!

Post by ekman » Apr 29 2015 2:55pm

onloop wrote: ...phone accelerometerss.... and/or on screen soft button for acceleration/brake. ego cruiser did a really nice job on their application. Has anyone tried it? It actually works great for acceleration and brake.... better than expected.

!Update firmware via BT/WiFi From app.

!Entire BLDC tool ported into app.. hidden in advanced menu..
@ onloop We can do a lot of these things, but as for the accelerometer stuff I'm not so sure about it. Coming from a designer standpoint it's unwise to use an interface like a phone for the purpose of controlling a moving object. Mostly because the design of a phone is made to be used in a stationary setting plus inherent problems with the accelerometer data. I actually have a E-Go too and I always revert back to the dedicated remote. Plus who want to risk a $800 phone whilst riding? As for firmware updates this is not advised in the way the VESC is structured. We would need to stream the firmware data live over bluetooth serial (we have no buffer storage) and having no options to do ECC or similar operations which is just hazardous. I get why it would be nice, but it poses a to big of a hurdle at the moment. As for the other stuff, we plan on introducing the option to do all of the modifications from the VESC tool into the bluetooth interface, everything that does not involve direct firmware modification can be done with the CAN-Bus.

@furp I've looked at the On/Off problem and I have some ideas but nothing that we can say at the moment is working. I have the ability to trigger on/off digitally via bluetooth with the help of torque boards on/off switch. The problem here being that we loose regen by doing this. Regarding auxiliary channels, we will have around 15-20 maybe configurable pins on the expansion PCB. This will give you the ability to control basically anything you can imagine without having to write new updates to the VESC firmware or wait for Vedder to develop something for you. The idea is to have the board that we are designing to be fully open-source and use a language similar to Arduino so people freely can hack/modify it to fit their needs. Theft protection, that I will leave for others in the team to figure out.
Designer by day, Nerd by night

User avatar
onloop   10 kW

10 kW
Posts: 600
Joined: Jun 24 2013 5:24am
Location: Australia
Contact:

Re: VESC Open Source - Android App Features?!?!

Post by onloop » Apr 29 2015 6:12pm

Ok then. How about Firmware update via USB from phone.

ALSO. reason you switch back to the ego remote is because it is actually nice to use, nice design and it is actually an option for you.. But none of us have this option on DIY. People keep dismissing the idea of using phone to control eboard.... i think that is wrong... i think phone software can actually work very well in my opinion. And I'm not strickly talking about using the accelerometers. Just software slider on screen. Ego nailed it!.

Search "cheapest android phone" in google. It is possible to buy for about $50 a phone with touch screen. So any software that you develop really should have option to control board with phone.

Software slider and maybe haptic feedback!

At least then you give people an option. Some folks may use it on their primary device. Others will buy 2ndary device. But the point is make it available & let People decide.

User avatar
onloop   10 kW

10 kW
Posts: 600
Joined: Jun 24 2013 5:24am
Location: Australia
Contact:

Re: VESC Open Source - Android App Features?!?!

Post by onloop » Apr 29 2015 6:18pm

I'm not sure what you guys are talking about with the on/off switch for the power?

Do you mean so when the battery is near empty it shuts down so you can't over discharge?

This is the default function of battery BMS. Impossible to over discharge/charge. Also it is likely the VESC has LVC. I haven't bothered to check because my battery has BMS.

torqueboards   100 MW

100 MW
Posts: 2940
Joined: May 27 2013 10:02pm
Location: San Francisco, CA
Contact:

Re: VESC Open Source - Android App Features?!?!

Post by torqueboards » Apr 29 2015 7:04pm

The current on off switch we sell depending on if it's simply just mosfets do not have the ability to send power back into the battery. It's a one way route. I'm going to add in app control for the board whether or not people want to use it or not.

Its nice to have.
DIYElectricSkateboard.com Electric Skateboard Kits

User avatar
onloop   10 kW

10 kW
Posts: 600
Joined: Jun 24 2013 5:24am
Location: Australia
Contact:

Re: VESC Open Source - Android App Features?!?!

Post by onloop » Apr 29 2015 8:58pm

torqueboards wrote: Its nice to have.
It is confusing me.

so you mean no physical switch (on/off) on board anywhere at all? what if you lose your phone, or left your phone at work, you can't turn the board power on now?

Or you still do have physical on/off switch on the board as well? so now you have two of the same thing right?, so you turn the board 'on' with the physical switch, so what does the software switch do now? does it turn the board off? Then how you turn board back on? physical switch already in "on" position.

So now your physical switch needs to be a switch without the locking in "on" position? Always off momentary switch?

but if high current switch is OFF you can't get any power to the vesc for system to function? VESC totally isolated.

So now the VESC needs a separate power supply from battery, bypassing the main switch? so eventually if you leave your board long enough in storage you battery slowly dies?

what is the main purpose of having this feature? is it meant for security? so only you can turn on the board?

what else does it achieve?

torqueboards   100 MW

100 MW
Posts: 2940
Joined: May 27 2013 10:02pm
Location: San Francisco, CA
Contact:

Re: VESC Open Source - Android App Features?!?!

Post by torqueboards » Apr 29 2015 9:08pm

Sorry 2 separate issues.

On board remote control
I'm adding it in even if I don't use it myself.

High voltage esc switch
The current switch we use if designed with just mosfets it doesn't have regen since the diode is one directional. Power in but no power back for regen.
DIYElectricSkateboard.com Electric Skateboard Kits

User avatar
Vanarian   10 kW

10 kW
Posts: 556
Joined: Nov 26 2014 12:24pm
Location: France!

Re: VESC Open Source - Android App Features?!?!

Post by Vanarian » Apr 30 2015 11:43am

Hi :D

I don't know if this has already been requested (I'll look back) but the first thing I would love from this is a Kill Switch for Emergency cases if the motor goes wild and decide to max out alone without responding to the transmitter!

Then something to actually be able to determine a set of power presets for your ride, simple mode for being able to change power on the go from 10% increments, riding mode for only 3 big buttons on screen to choose your level (ex : 20%, 50%, Max power).

How about this?
-+AT-One project : electric inline skates - no remote, hub motors, one frame for various wheel sizes & quasi-universal boot mount

Rollo Ergo Sum!

vedder   100 W

100 W
Posts: 249
Joined: Nov 05 2011 9:37pm

Re: VESC Open Source - Android App Features?!?!

Post by vedder » Apr 30 2015 11:46am

It is nice that you are working on a BLE extension board. Personally, I would like to see an android app before or at the same time as an apple app since I don't like apple, their very closed products and their way of trying to force everyone to use only their products once you have one. Google is not my favourite company either, but at least the base of android is open and hacking friendly. The reason I have spent so much of my spare time the past years on making an open ESC is that I really believe in sharing information and that I want to be able to examine and hack technology without the need to invent my own wheel. This is why announcing that there is an apple app available and not an android app goes against my principles. I really don't want to discourage anyone and I think it is awesome that you develop new and cool features, I just don't like apple and their very closed products.

So, what I would like to do is to make sure that an android app gets developed soon and help out with that. As soon as I have some time, I will try to make a very basic VESC app, but with the interface implemented to control and access everything that BLDC Tool can do. I will share the code and if anyone is interested, it would be awesome if they could work on developing the user interface.

For communication between android and VESC, either a USB host cable can be used or a bluetooth module like this one:
http://www.ebay.com/itm/Wireless-Serial ... 339177720b
The BT module can be connected to the uart port of VESC as it is, and no modification is required for the VESC firmware. That bt module is also very inexpensive. BLE and wifi options would also be nice to add later.
As for firmware updates this is not advised in the way the VESC is structured. We would need to stream the firmware data live over bluetooth serial (we have no buffer storage) and having no options to do ECC or similar operations which is just hazardous. I get why it would be nice, but it poses a to big of a hurdle at the moment. As for the other stuff, we plan on introducing the option to do all of the modifications from the VESC tool into the bluetooth interface, everything that does not involve direct firmware modification can be done with the CAN-Bus.
I think a bootloader would be an awesome feature, and I think it can be implemented quite easily. The STM32F4 can write to its own flash memory and has 1MB flash while the firmware only requires 110kB, so the whole firmware could be uploaded to flash together with a checksum. Then, the firmware can jump to a bootloader that reads that new firmware, checks the checksum and replaces the old firmware with it if the checksum is correct. After that, it can start the new firmware. I will try to implement a bootloader like that this weekend, but I'm not sure if I will be able to finish.
Some of my projects: http://vedder.se
Support my open source ESC development with a small donation

torqueboards   100 MW

100 MW
Posts: 2940
Joined: May 27 2013 10:02pm
Location: San Francisco, CA
Contact:

Re: VESC Open Source - Android App Features?!?!

Post by torqueboards » Apr 30 2015 12:00pm

Nice! Woot! :mrgreen:
DIYElectricSkateboard.com Electric Skateboard Kits

User avatar
onloop   10 kW

10 kW
Posts: 600
Joined: Jun 24 2013 5:24am
Location: Australia
Contact:

Re: VESC Open Source - Android App Features?!?!

Post by onloop » Apr 30 2015 5:47pm

Yeah boy!

Post Reply