MSDroid for Megasquirt -Android dash, tuning, and log viewer [0.3a3 update - 22.2.13]

Discussion in 'Throttle bodies & non-OEM ECUs' started by Trev16v, Dec 19, 2012.

  1. Trev16v

    Trev16v Paid Member Paid Member

    Joined:
    Oct 22, 2003
    Likes Received:
    451
    Location:
    Oxfordshireland
    I thought it is about time I did a formal release thread for this application, considering this Christmas marks the point where I have now spent two years' worth of spare time creating it! [:D]

    Here, at last, is a complete (well, almost - if you bear with me over the bits that are still work in progress!) Android tuning platform for Megasquirt.

    This is a free application for Android 2.2 and upwards, supporting MS1, MS2 and MS3, with user interfaces that adapt well to both small phone displays and tablets. Within, it is a complete Megasquirt tuning engine. It provides you with dashboards that can be customised within the application itself using drag-and-drop. It provides logging, including GPS data. It features a fast and attractive log viewer, that can show you your GPS route on a map with synchronized cursors. The majority of tuning menus are available too, including tables and curve editors. (There are some missing, but this is work in progress.) This application is driven by conventional Megasquirt .ini files. If the application doesn't come with the .ini for your controller, just yell at me or add your own .ini file to /msdroid/ini.

    The Log Viewer can view logs in plain graphical mode or with graph plus map. The log viewer supports pinch zoom, drag and fling, with the cursor also independently draggable. When viewing with a map, the map marker shows the GPS location at the cursor position. The log viewer and datalog facility works with an internal compact format, but export to MSL will come soon if you also need the power of EFI Analytics' Log Viewer. (Credit to aut0m4tic1 for going out for a drive and taking this log for me.)

    [​IMG]

    [​IMG]

    Tuning dialogs are supported for MS1, MS2 and MS3. Most that are built from the ini file are there, though there are a number of special or internally-defined menus that are still missing simply because time constraints mean I need a bit more time to get those done. But most of it is there.

    [​IMG]

    [​IMG]

    The dashboard can be customised with a small range of gauge types to currently choose from. A large part of this project was to create a custom vector image library which means that within time a rich, attractive range of gauges and other widgets are going to be created, so the amount available will expand. Advanced users will also be able to use Inkscape to create widgets. The dashboard layout can be manipulated right on the application itself.

    [​IMG]

    This software is still very much at alpha stage. It is software that will remain free, that I've done for my enjoyment and for Megasquirt users' benefit for no return. If you like what I'm doing here, please let me know and PM any requests you have or about any problems you have encountered.

    The present release, 0.2a0 is now currently on Google Play. If you don't have access to Play on your device, you can get the .apk at http://www.msdroid.com/builds.

    Suitable Bluetooth adapter: Though I'm using various Bluetooth to serial adapters for testing, one that I've had good results with is this one: http://www.ebay.co.uk/itm/Bluetooth-to-RS232-Adapter-Bluetooth-to-Serial-Class1-100m-UK-SELLER-/221168384440?pt=UK_Computing_Parallel_Serial_PS_2&hash=item337ea9b9b8. You will need to ensure it is set to 9600 baud for MS1 and 115200 baud for MS2 / MS3. As long as you're not using an ancient V2.2 Megasquirt PCB, this dongle will power directly off your MS.

    Cheers,

    Trev
     
    Brian.G, beetie and Nige like this.
  2. Toyotec

    Toyotec CGTI Committee - Happy helper at large Admin

    Joined:
    Jul 26, 2006
    Likes Received:
    3,323
    Location:
    Creating Pfredstarke
    Cracking stuff Trev!
     
  3. Admin Guest

    Truly excellent work! Well done getting it this far, I bet it's taken many many hours?
     
  4. Trev16v

    Trev16v Paid Member Paid Member

    Joined:
    Oct 22, 2003
    Likes Received:
    451
    Location:
    Oxfordshireland
    Cheers guys. Hope it's found useful. Yeah in terms of hours I dread to think. The IDE I'm using doesn't seem to have any facility to report how many hours I've spent writing code but crumbs, probably a four-figure number! [:-B]
     
  5. Nige

    Nige Paid Member Paid Member

    Joined:
    Dec 12, 2006
    Likes Received:
    2,138
    Trev, before I take the plunge and buy the Bluetooth adapter, can you confirm that you can export the data ? This looks to be a great bit of software. :thumbup:

    I have a laptop in my car, its used purely to log the Megasquirt. I`d much rather log to my DesireS instead, saves weight AND its convenient ;) However, I log so I can then overlay TPS and RPM (among other things) over my incar video and PBox GPS output.

    If the log is in another format, ie csv, that`d still be fine.
     
    Last edited: Dec 20, 2012
  6. Trev16v

    Trev16v Paid Member Paid Member

    Joined:
    Oct 22, 2003
    Likes Received:
    451
    Location:
    Oxfordshireland
    Hi Nige,

    In what format would you prefer to export the data? I haven't yet done export to standard Megasquirt MSL log format, but to do so will be very easy and is on the list anyway, and to be honest would probably be done by the time you got your Bluetooth adapter. :)

    Am I right in thinking that you can work with anything that's in CSV / XLS format? As a standard Megasquirt MSL file is pretty much just that anyway, so sounds like that would do you. I could also look at exporting data in other formats as well if you let me know what's needed.

    Oh, just going to edit the post to point out that you also need to get a 1.50ish gender changer (oo-er!):

    http://www.ebay.co.uk/itm/Serial-RS...447&pid=100015&prg=1006&rk=1&sd=280763274449&

    Also, your PBox GPS doodah - is that one of those fancy 10Hz GPS receivers? I need to add support for those as a few people have asked for 10Hz Bluetooth GPS support, and it's not too hard to create a driver I think.
     
  7. Nige

    Nige Paid Member Paid Member

    Joined:
    Dec 12, 2006
    Likes Received:
    2,138
    Yeah, .csv would also be fine.

    However, I`ve dealt with Weston (the author) and after several emails and me sending him various datalogs, the software now natively imports .msl files anyway.

    The software is Racerender. http://www.racerender.com/RR2/Download.html

    Its free to try and you can create a 3 minute video. If you wanted to test it, download and install, run, create blank project.
    Right hand side > ADD (Input File), Browse to your exported log and import that.
    Cancel on the screen suggesting templates.
    Right hand side > ADD (Display Object)
    Tachometer
    Top tight and it will mark the `input` in red, click the dropdown, select your imported log
    it SHOULD automatically pick up the column header and select rpm, if not, click the dropdown for Field and pick RPM.

    Same for TPS

    Clicking play should show the log being displayed.

    You can add MAP, IAT or any other logged value as a gauge, graph etc.


    My PBox is a 10hz GPS model. Not sure how you can incorporate that into your files ? I add it in Racerender after some file repairing in the Racelogic software.
     
  8. Trev16v

    Trev16v Paid Member Paid Member

    Joined:
    Oct 22, 2003
    Likes Received:
    451
    Location:
    Oxfordshireland
    That's really interesting; it will be great to integrate with that. I'll definitely have a play with it.

    Is your PBox a Bluetooth device? As it's quite easy to interface with a 10Hz Bluetooth GPS receiver, as I just have the app connect to it and then I initialise it with some AT commands and have to decode the location notifications I get back. However if your PBox is say an SD card device then I guess the data has to be logged separately and merged at the PC. Once I do a driver for an external Bluetooth GPS receiver, the GPS data would be logged by MSDroid in exactly the same way as the phone / tablet's internal 1Hz GPS data is logged at the moment.
     
  9. Nige

    Nige Paid Member Paid Member

    Joined:
    Dec 12, 2006
    Likes Received:
    2,138
    My PBox is one of these. [​IMG]

    It logs to an SD card.

    I do have a 5Hz Bluetooth GPS which I log using RaceChrono to my phone, but now I have the PBox I don`t use that. Would the phone be able to connect via BT to the MS & GPS and then log both ? That`d be useful for those without a standalone GPS, who have a BT 5 or 10HZ one instead.
     
  10. Trev16v

    Trev16v Paid Member Paid Member

    Joined:
    Oct 22, 2003
    Likes Received:
    451
    Location:
    Oxfordshireland
    Yep - the app would connect to both the MS Bluetooth interface and your 5Hz GPS Bluetooth receiver simultaneously. I'll have to look on eBay for a relatively low cost Bluetooth GPS unit or alternatively see if I can beg one from someone to just borrow so I can add the support for it.

    Actually I've just seen the Qstarz BT-Q818XT 10Hz on eBay for fifty quid. That could be the ticket. I think the protocol these devices use is quite standardised so if I develop against that one it should work with yours immediately.
     
  11. WEZ

    Wez Official Friday thread starter

    Joined:
    Oct 23, 2003
    Likes Received:
    67
    I don't understand 3/4 of this thread, but I like android and I like Trev lol
    top work fella
     
    Steve B likes this.
  12. Trev16v

    Trev16v Paid Member Paid Member

    Joined:
    Oct 22, 2003
    Likes Received:
    451
    Location:
    Oxfordshireland
  13. DEX

    Dex Paid Member Paid Member

    Joined:
    Oct 23, 2003
    Likes Received:
    497
    Location:
    United Kingdom
    I have a great solution to understanding Megasquirt/ Android/ MSDroid.

    I'm just gonna kidnap Trev for a bit, feed him tea and biscuits and not let him out of the garage until my MS'd car does something whizzy and clever.
     
  14. WEZ

    Wez Official Friday thread starter

    Joined:
    Oct 23, 2003
    Likes Received:
    67
    seems the only rational option to me :thumbup:
     
  15. Nige

    Nige Paid Member Paid Member

    Joined:
    Dec 12, 2006
    Likes Received:
    2,138
    Trev, been thinking about the use I`d put this to.

    How about an option to enable a `logging mode`

    Ie, load the App, pair with BT and ensure everything is working OK.
    Enable `Auto Logging Mode`
    When the MS is paired, automatically Log using the date/time as a filename.

    Once you turn off the car, it stops as BT is lost.

    The car is restarted (I`m thinking next session on a trackday here...), the BT automatically pairs, MSDroid sees this and starts logging.

    The phone can be left in the glovebox, happily logging away all day everytime the car is started.

    A quick check of the screen to show it is connected and seeing MS data and logging would be all you`d need to display.
     
  16. Trev16v

    Trev16v Paid Member Paid Member

    Joined:
    Oct 22, 2003
    Likes Received:
    451
    Location:
    Oxfordshireland
    The tricky thing there is that it's the phone that initiates the Bluetooth connection, so it would potentially have to sit there trying to make a socket connection every few tens of seconds. The phone battery would be dead quite quickly.

    However... I've got an idea for a solution that could well work.
     
  17. Nige

    Nige Paid Member Paid Member

    Joined:
    Dec 12, 2006
    Likes Received:
    2,138
    When I`m logging on a trackday, i`d leave my phone plugged in to a 12V charger anyway, but I can see that if you didn`t have it charging, that could be an issue.

    Heck, at the moment, I have a laptop and power supply in the boot that`s logging away lol
     
  18. Trev16v

    Trev16v Paid Member Paid Member

    Joined:
    Oct 22, 2003
    Likes Received:
    451
    Location:
    Oxfordshireland
    Update 0.2a1 - alpha build

    MSDroid 0.2a1 now pushed to Google Play. This version fixes a problem for a few users where the "No .ini" message is always shown even when msDroid/ini/ contains a matching .ini file. In addition, there is a minor fix to prevent rare corruption of timestamps in the logs.
     
  19. Trev16v

    Trev16v Paid Member Paid Member

    Joined:
    Oct 22, 2003
    Likes Received:
    451
    Location:
    Oxfordshireland
    Update 0.3a2 - alpha build

    MSDroid 0.3a2 now pushed to Google Play.

    This application now has two more developers on board: Dave Smith and Sebastien Giroux. Therefore, development is happening a lot faster.
     
  20. DEX

    Dex Paid Member Paid Member

    Joined:
    Oct 23, 2003
    Likes Received:
    497
    Location:
    United Kingdom
    Great news on the coordinated development :) I shall expect the app to take over the world shortly.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice