My Ebike Android App (supports Cycle Analyst)

Sigmacom

10 W
Joined
Aug 8, 2012
Messages
79
Location
Sydney, Australia
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:

EbikeAnalyzer.jpg


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
 
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.
 
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:
export_02.jpg

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

car-retro-digital-dashboards-3.jpg


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
 
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
 
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.
 
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. ;) :)
 
rborger73 said:
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.
 
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?
 
izeman said:
rborger73 said:
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-Color-TFT-Battery-Monitor-and-Alarm/productinfo/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.
 
Here is the iphone product which is closer to what I want. http://www.flytron.com/bluetooth-low-energy/269-icell-battery-cell-monitor.html
 
rborger73 said:
izeman said:
rborger73 said:
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.
 
izeman said:
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.
 
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.
 
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.
 
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.
 
Back
Top