My Ebike Android App (supports Cycle Analyst)

Get all your technical information about electric bikes here.
Sigmacom   10 W

10 W
Posts: 73
Joined: Aug 08 2012 4:10am
Location: Sydney, Australia

My Ebike Android App (supports Cycle Analyst)

Post by Sigmacom » May 16 2014 4:23am

I've been working on an Android app for a couple of months now, designed to connect via Bluetooth to the CA and also to a 12-24S Bluetooth cell monitoring device I'm working on. It is not intended to be a replacement for the Cycle Analyst's own display, but more to allow some other live measurements and also provide file logging and GPS integration. Eventually I'll include the data from the cell logger I'm building, so that all my ebike data can be collected together. Here's a screenshot from my Galaxy 7.7 tablet running it paired to my ebike:

Image

I decided to make the initial design full of gauges and eye candy, mainly to help me learn writing vector graphics in Android, and to see what would be possible performance-wise. All the graphics are drawn by the code (no bitmaps) so everything should scale nicely to any size screen. While this design is nice on a tablet or a large phone like my Galaxy Note II, it's probably not very practical on a small screen, so I plan to make some other screen designs soon. I have still tried to keep the numeric values large enough to be readable on the bike. This screen grab was taken while decelerating hence the value on the speedo does not match the needle due to the needle's momentum.

With this layout there isn't room to include the power gauge as well so I will add an option to toggle between the Ammeter and the power meter, or possibly the temp gauge and the power meter. It's currently designed for landscape which makes the best attempt at simulating a dash, but portrait works with an alternate layout albeit with harder-to-read gauges.

A lot of the display is user-customisable. The speedo's range can be set in preferences with max values of 40,60,80 or 100 mph/kph.If you exceed the speedo range the needle stops just past the limit but the true value is still displayed (this is true of all the gauges). The voltmeter is designed to read from just under the user's LVC up to just above the max, so as to give the best visualization of sag when riding. These battery voltage limits are completely user-definable in the settings and the gauge should scale appropriately. The red areas on the gauges are determined by these and the other settings for each gauge. When the value moves into these red ranges the displayed value also turns red as a warning. I plan to add an optional audible warning as well soon. Even if the phone is not mounted on the bike the app can still be used purely as a warning system.

The current meter displays both forward and regen current. When in regen, a 'REGEN' indicator appears and the displayed value goes negative and turns green. This is the same on the power meter. The fuel gauge is based purely on the Ah consumed as the more accurate CA battery fuel gauge data is currently not output through the CA's serial port. The red zone on it is set in preferences as a max discharge percentage.

It's almost ready to go to beta and I would love a few others who have a Bluetooth-TTL adaptor for their CA to test it.

I'm currently working on the GPS logging feature, which hopefully I can make output a kml file as Justin has suggested. I'm interested in everyone's feedback. Some of the planned other features are:

- Ability to zoom any one of the gauges to full screen by touching them
- Calibrating the phone's accelerometers as mounted on the bike and logging its orientation to the log file as a means of getting a very rough track gradient
- A live Wh/km and Wh/mile value that is rapidly updated to show current efficiency under different track conditions
- Integration with the Bluetooth cell logger to collect all the data in one place and allow me to get rid of my on-bike celllogs
- Ability to write settings back to the CA

This is going to be a long-term project. Please send me a PM if you are interested in testing the beta. The app requires at least Android 4.0 (Ice Cream Sandwich) and a suitable Bluetooth-TTL adaptor for the CA.

Mark

User avatar
Hyena   100 GW

100 GW
Posts: 5624
Joined: Aug 13 2008 9:10am
Location: Sydney, Australia
Contact:

Re: My Ebike Android App (supports Cycle Analyst)

Post by Hyena » May 16 2014 11:27pm

Very cook Mark!
It goes without saying but you know you have your first beta tester right here :)

A suggestion re: fitting everything, how about a second inner gauge inside the speedo for current ?
Like a radial digital bar graph, with graduated colour towards red at the top end if you like.
www.HyenaElectricBikes.com
Aussie high powered e-bike kits and custom performance ebikes
New FUTR and Hyena special edition Beta frames now available!
My build and HD video thread____. My youtube channel____ Hyena Facebook page
My bike is writing cheques my body can't cash...

User avatar
teslanv   100 MW

100 MW
Posts: 2656
Joined: Nov 03 2013 8:42pm
Location: Bellevue, WA - USA
Contact:

Re: My Ebike Android App (supports Cycle Analyst)

Post by teslanv » May 16 2014 11:31pm

Subscribed. 8)
DD Hubs, Batteries, Controllers & Custom Ebikes.
http://westcoastelectrics.com
West Coast Electric Cycles
Bellevue, WA
USA

mamcinty   10 mW

10 mW
Posts: 25
Joined: Apr 11 2014 3:15am
Location: Greensboro, NC US

Re: My Ebike Android App (supports Cycle Analyst)

Post by mamcinty » May 17 2014 1:17am

Subscribing too!

User avatar
Drunkskunk   100 GW

100 GW
Posts: 6977
Joined: Apr 14 2007 11:37am
Location: Dallas, Texas. U.S.A.

Re: My Ebike Android App (supports Cycle Analyst)

Post by Drunkskunk » May 18 2014 10:49am

Damn that looks cool!
Buy the ticket, take the ride.
Monster Bike:http://endless-sphere.com/forums/viewto ... =6&t=38667

liamcaff   1 kW

1 kW
Posts: 374
Joined: Feb 17 2013 6:21pm
Location: Dublin

Re: My Ebike Android App (supports Cycle Analyst)

Post by liamcaff » May 18 2014 11:01am

Very cool - keep up the good work!

Subscribed!

User avatar
100volts+   10 kW

10 kW
Posts: 722
Joined: Nov 20 2012 10:05pm
Location: Houston

Re: My Ebike Android App (supports Cycle Analyst)

Post by 100volts+ » May 18 2014 12:39pm

Subscribed. Glad it is for Android OS
http://endless-sphere.com/forums/viewto ... =1&t=57440

Unlike puppets we have the possibility of stopping in our movements,
looking up and perceiving the machinery by which we have been moved. In this
act lies the first steps towards freedom. - PETER BERGER Sociologist

Sigmacom   10 W

10 W
Posts: 73
Joined: Aug 08 2012 4:10am
Location: Sydney, Australia

Re: My Ebike Android App (supports Cycle Analyst)

Post by Sigmacom » May 25 2014 5:12am

Thanks. I've fitted the power meter in as shown below and got a portrait landscape laid out. Jay - thanks for the suggestion of bar gauge in the speedo - I might use that idea for the live 'economy' gauge I plan on adding.

Touching the Volt, Amps or Power meters now zooms them to full screen.

I want to use the Play store to distribute the beta version, but I had issues today setting up an account for this and Google has told me they need to migrate my google account to a new database as my account was in the "old" system. This will take up to a week! Doing it this way means I can get the debug logs from each beta tester automatically.

I'm taking a few weeks vacation to Canada and calling in on ebikes.ca, so I probably wont get much more done for a while now.

These are the latest screen grabs:

Portrait:
Image
Landscape:
Image

User avatar
izeman   10 GW

10 GW
Posts: 4790
Joined: Jun 21 2011 8:25am
Location: vienna, austria
Contact:

Re: My Ebike Android App (supports Cycle Analyst)

Post by izeman » May 25 2014 5:29am

you may send the apk to those shown their interest. so we can use your vacation's time to beta test.

User avatar
100volts+   10 kW

10 kW
Posts: 722
Joined: Nov 20 2012 10:05pm
Location: Houston

Re: My Ebike Android App (supports Cycle Analyst)

Post by 100volts+ » May 25 2014 5:06pm

Can you make the watts go to 15,000 or 20,000?
http://endless-sphere.com/forums/viewto ... =1&t=57440

Unlike puppets we have the possibility of stopping in our movements,
looking up and perceiving the machinery by which we have been moved. In this
act lies the first steps towards freedom. - PETER BERGER Sociologist

User avatar
Hyena   100 GW

100 GW
Posts: 5624
Joined: Aug 13 2008 9:10am
Location: Sydney, Australia
Contact:

Re: My Ebike Android App (supports Cycle Analyst)

Post by Hyena » May 25 2014 8:21pm

While I like your clean dials, I say don't be afraid to look to the 80s for inspiration :lol:

Image

Using different shapes (eg horizontal or vertical bars) could also be another good way to maximise visible data for your screen real estate. Is it possible in future to just have the needles and relevant numbers animated and use a custom image background for a snazzy/custom looking dash ?
Eg so you could make it look something like THIS
www.HyenaElectricBikes.com
Aussie high powered e-bike kits and custom performance ebikes
New FUTR and Hyena special edition Beta frames now available!
My build and HD video thread____. My youtube channel____ Hyena Facebook page
My bike is writing cheques my body can't cash...

Animalector   10 kW

10 kW
Posts: 816
Joined: Mar 17 2012 4:50pm
Location: Mareeba - Queensland

Re: My Ebike Android App (supports Cycle Analyst)

Post by Animalector » May 25 2014 9:27pm

Hey Awesome I had an 86 Holden Piazza Turbo.. it had Digital dials like those shown above it was awesome. I feel as though the dials use din the App screen shots are pretty nice. and generating graphics for new dials is pretty time consuming (I would guess).

Anywyas nice work.

Andy

Sigmacom   10 W

10 W
Posts: 73
Joined: Aug 08 2012 4:10am
Location: Sydney, Australia

Re: My Ebike Android App (supports Cycle Analyst)

Post by Sigmacom » Jul 17 2014 5:42am

Sorry it's taken so long folks but the beta is now ready for testing. I'm back from vacation and have my Bomber back up and running so can spend some more time on the app now.

All those who PM'd me should have a reply now with instructions for how to opt-in to the beta test.

Anyone else interested please PM me for instructions.

Jay - I like the alternate style dash. It's not really possible to make an easily "skinable" GUI, but I plan on making at least one alternate interface along these lines in time.
Can you make the watts go to 15,000 or 20,000?
The power gauge automatically scales based on what you have entered for the max battery voltage and max current in the preferences.

User avatar
rborger73   10 kW

10 kW
Posts: 629
Joined: Jun 13 2013 12:19pm
Location: Currently NW of Pittsburgh, next destination unknown..

Re: My Ebike Android App (supports Cycle Analyst)

Post by rborger73 » Jul 17 2014 6:08am

Tried to read real quick to see if it was an option. I use speedict so already have most of these. One thing I see I like is the odometer. I use another app for speedo and mileage odometer tracking. The only issue I have with it is the odometer isn't able to be set. I want to be able to keep the mileage from the bike showing and keeping track. If you have to reinstall an app or do a fresh install on the whole phone or tablet you lose your mileage and have to remember it in your head. So that may be an option to offer so people can update the mileage to what you have on the bike instead of from the app keeping record from first install.

If you are going to get the 12s to 24s cell levels to show I'll be very interested. That is the one thing I want, except while showing 12 cells for 12s I'm wanting to see all 72 cells I have running for 12s. Knowing at all times what each cell is at would be splendid. ;) :)

User avatar
izeman   10 GW

10 GW
Posts: 4790
Joined: Jun 21 2011 8:25am
Location: vienna, austria
Contact:

Re: My Ebike Android App (supports Cycle Analyst)

Post by izeman » Jul 17 2014 10:20am

rborger73 wrote:If you are going to get the 12s to 24s cell levels to show I'll be very interested. That is the one thing I want, except while showing 12 cells for 12s I'm wanting to see all 72 cells I have running for 12s. Knowing at all times what each cell is at would be splendid. ;) :)
this is impossible. as soon as you parallel the cells they are at exactly the same voltage.
but showing those 12 different cell levels from my phone (or some other device/screen) would be great.

User avatar
izeman   10 GW

10 GW
Posts: 4790
Joined: Jun 21 2011 8:25am
Location: vienna, austria
Contact:

Re: My Ebike Android App (supports Cycle Analyst)

Post by izeman » Jul 17 2014 10:29am

mark: what's the minimum display resolution to use it? even though i have a nexus7 tab it don't want to install it on a downhill bike. i thought of buying a 2010' motorola defy mb525 which is a ruggedized phone and has a 480x854 screen resolution. would this work ok, or is your app not designed to work that way?

User avatar
rborger73   10 kW

10 kW
Posts: 629
Joined: Jun 13 2013 12:19pm
Location: Currently NW of Pittsburgh, next destination unknown..

Re: My Ebike Android App (supports Cycle Analyst)

Post by rborger73 » Jul 17 2014 4:55pm

izeman wrote:
rborger73 wrote:If you are going to get the 12s to 24s cell levels to show I'll be very interested. That is the one thing I want, except while showing 12 cells for 12s I'm wanting to see all 72 cells I have running for 12s. Knowing at all times what each cell is at would be splendid. ;) :)
this is impossible. as soon as you parallel the cells they are at exactly the same voltage.
but showing those 12 different cell levels from my phone (or some other device/screen) would be great.
Not impossible. I can check the entire packs levels while all still connected with a cell log. My point is I don't want the balance plugs paralleled I want to know each of the 72 cell levels. If I wanted to just show 12 cells I can do that. It isn't impossible anyways.

I could buy 8 of these and it would work. I want a sensor like this except enough to plug in all 8 packs of 12s and have it shown on my tablet. http://www.heliproz.com/BM12-2s-to-12s- ... info/BM12/

There is also an iphone one that reads back to the phone but android app isn't out yet. I don't balance charge except once or twice a month as my cells all stay very close the way I charge and discharge. I bulk charge and check my cell levels often.

User avatar
rborger73   10 kW

10 kW
Posts: 629
Joined: Jun 13 2013 12:19pm
Location: Currently NW of Pittsburgh, next destination unknown..

Re: My Ebike Android App (supports Cycle Analyst)

Post by rborger73 » Jul 17 2014 4:58pm

Here is the iphone product which is closer to what I want. http://www.flytron.com/bluetooth-low-en ... nitor.html

User avatar
izeman   10 GW

10 GW
Posts: 4790
Joined: Jun 21 2011 8:25am
Location: vienna, austria
Contact:

My Ebike Android App (supports Cycle Analyst)

Post by izeman » Jul 17 2014 5:42pm

rborger73 wrote:
izeman wrote:
rborger73 wrote:If you are going to get the 12s to 24s cell levels to show I'll be very interested. That is the one thing I want, except while showing 12 cells for 12s I'm wanting to see all 72 cells I have running for 12s. Knowing at all times what each cell is at would be splendid. ;) :)
this is impossible. as soon as you parallel the cells they are at exactly the same voltage.
but showing those 12 different cell levels from my phone (or some other device/screen) would be great.
Not impossible. I can check the entire packs levels while all still connected with a cell log. My point is I don't want the balance plugs paralleled I want to know each of the 72 cell levels. If I wanted to just show 12 cells I can do that. It isn't impossible anyways.
ok. if you don't connect the balance lead then you can measure each cell's voltage. i just didn't know anyone doing it, as i would normally connect those to a bms. and i don't know of any (ebike useable) bms that does single cell monitoring for 72 cells. (and i don't think tesla does it with it's 6800+ cells pack!?)
this doesn't mean that i don't see the thought behind your request but it may be hard to fullfill. i do parallel cells with my selfmade balance adapter boards and can disconnect those plugs anytime easily to do a single cell diagnose. for every day use monitoring of the paralleled cells seems enough for me.

User avatar
rborger73   10 kW

10 kW
Posts: 629
Joined: Jun 13 2013 12:19pm
Location: Currently NW of Pittsburgh, next destination unknown..

Re: My Ebike Android App (supports Cycle Analyst)

Post by rborger73 » Jul 17 2014 6:46pm

izeman wrote: ok. if you don't connect the balance lead then you can measure each cell's voltage. i just didn't know anyone doing it, as i would normally connect those to a bms. and i don't know of any (ebike useable) bms that does single cell monitoring for 72 cells. (and i don't think tesla does it with it's 6800+ cells pack!?)
this doesn't mean that i don't see the thought behind your request but it may be hard to fullfill. i do parallel cells with my selfmade balance adapter boards and can disconnect those plugs anytime easily to do a single cell diagnose. for every day use monitoring of the paralleled cells seems enough for me.
Ya I think though the more cells you have the easier it is to have a cell low and not know it or high and not know it. I don't run a bms and at this point am not scared about it at all. I'm trying to wait to see what speedicts new controller / bms all in one ends up like.

User avatar
Hyena   100 GW

100 GW
Posts: 5624
Joined: Aug 13 2008 9:10am
Location: Sydney, Australia
Contact:

Re: My Ebike Android App (supports Cycle Analyst)

Post by Hyena » Jul 17 2014 7:52pm

You can't really / practically monitor each cell once they're put into a parallel group. The best you could hope for is having each parallel string removable for replacement if that string goes bad. Or ideally if you catch it early enough some sort of modular assembly (like the 18650 blocks) with a pressure contact / non-welded solution so if you're enthused you could remove individual cells somewhat easily.
Either way pulling a battery down is a pain in the arse but given their huge expense (especially for a big one) it's usually worth your time and effort.

Mark, any thoughts / news on making this USB connectable instead of bluetooth ? Given the close proximity of things on our bikes and the need for power to the tablet anyway I reckon USB would make a good solution.
www.HyenaElectricBikes.com
Aussie high powered e-bike kits and custom performance ebikes
New FUTR and Hyena special edition Beta frames now available!
My build and HD video thread____. My youtube channel____ Hyena Facebook page
My bike is writing cheques my body can't cash...

Sigmacom   10 W

10 W
Posts: 73
Joined: Aug 08 2012 4:10am
Location: Sydney, Australia

Re: My Ebike Android App (supports Cycle Analyst)

Post by Sigmacom » Jul 18 2014 2:20am

If you are going to get the 12s to 24s cell levels to show I'll be very interested
My device will have 4 x 6 way JST connectors with pass-thrus so it can monitor all cells in a 24S pack. It's not designed to be increased beyond 24S though so cant monitor 72S!
what's the minimum display resolution to use it?
There is no minimum as the graphics are all vector based (not bitmaps). However a very lo-res screen probably wont look too good and wont be readable. The minimum usable screen res would probably be around 640 x 480. Also the physical size of the screen needs to be large enough to be readable while riding.
Mark, any thoughts / news on making this USB connectable instead of bluetooth
It can be done but would be quite a lot of work. You would still need to purchase a 5V TTL to USB adaptor (though these are very cheap) which could be powered from the phone/tablet and would remove the need to provide a power supply to a bluetooth module.

There is a somewhat cheaper TTL to bluetooth adapter available (less than the one I sent you before) which easily has enough range:

https://www.sparkfun.com/products/12577

If anyone finds a lower cost module that supports level shifting to 5V TTL like these do please let me know.

I still like Bluetooth since when I start using the cell logging device I probably will put my phone in my pocket while riding and rely on an audible/vibration alert for cell LVC etc.

User avatar
gwhy!   1 MW

1 MW
Posts: 1651
Joined: Jun 08 2011 3:47pm
Location: Bristol, Uk

Re: My Ebike Android App (supports Cycle Analyst)

Post by gwhy! » Jul 18 2014 4:25am

Will you provide the relevant information to connect to your app and what relevant commands and values needs to the sent to the app to make use of the dials ?

If so I would like to help beta test it.

Deanwvu   100 W

100 W
Posts: 182
Joined: Sep 11 2013 1:07pm
Location: Silver Spring, MD, USA

Re: My Ebike Android App (supports Cycle Analyst)

Post by Deanwvu » Jul 18 2014 5:21am

I'd love to beta test this software as well. It will be a month or so before my bike is built, however.
http://www.endless-sphere.com/forums/vi ... 28&t=70368 My Big Dummy drive by LightningRods.

Deanwvu   100 W

100 W
Posts: 182
Joined: Sep 11 2013 1:07pm
Location: Silver Spring, MD, USA

Re: My Ebike Android App (supports Cycle Analyst)

Post by Deanwvu » Jul 18 2014 5:29am

Will this one work?

HC-05 Wireless Bluetooth Serial Transceiver Module Slave And Master https://www.amazon.com/dp/B00INWZRNC/re ... 1RP34VQD89
http://www.endless-sphere.com/forums/vi ... 28&t=70368 My Big Dummy drive by LightningRods.

Post Reply