Printable Version | Subscribe | Add to Favourites
<<  1    2    3    4  >>
New Topic New Poll New Reply
Author: Subject: Megasquirt & Android phones/tablets
matt_gsxr

posted on 8/3/11 at 10:14 AM Reply With Quote
fair enough. It was just one of those thoughts.

Just looking at that picture on my San Francisco now. It looks plenty big enough. The only problem would be the font size.

Some gauges need to have decent resolution (i.e. map, AFR, pulse width), but loads don't matter (e.g. is the temp sensor plugged in? have I got some volts?). A benefit of the TunerStudio type design is that its already been thought about and will include most of what is needed, but there would be considerable implementation effort.

Your plan to hardwire in v0.01 makes good sense.

MAP, AFR, RPM, and whether warmed or not and whether it is logging would pretty much cover it.

Now I need to think about buying a bluetooth serial adapter.

Matt

View User's Profile Visit User's Homepage View All Posts By User U2U Member
scudderfish

posted on 8/3/11 at 10:24 AM Reply With Quote
Please don't spend any money until I've actually got it working If you're prepared to test I've got a spare BT-Serial adapter I could lend to you.

Regards,
Dave






View User's Profile View All Posts By User U2U Member
ashg

posted on 8/3/11 at 11:00 AM Reply With Quote
i think the only way to get more info on screen is to do away with the gauges and just show the numbers kind of like a digital watch display.

in theory if you root your android phone install the full jre you should be able to run the linux version of ts, not sure how you would get ts to use the phones blue-tooth for the serial connection it would either require a code change in ts or a bit of hacking about with the kernel on the phone to spoof the blue-tooth connection into thinking its a serial device so ts can see it.

if i had the time i would offer to help with a bit of coding, did java visual studio .net c++ etc at uni so wouldnt find it hard to get back into the swing of it. unfortunately im up to my eyeballs with work at the minute.

have subscribed to this as im interested to see the progress.

[Edited on 8/3/2011 by ashg]





Anything With Tits or Wheels Will cost you MONEY!!

Haynes Roadster (Finished)
Exocet (Finished & Sold)
New Project (Started)

View User's Profile View All Posts By User U2U Member
scudderfish

posted on 8/3/11 at 11:26 AM Reply With Quote
I got TS running on my Nokia N900, but it relies on a native code library to interface to the serial port, and the UI is designed for PC sized screens. In the end I took the Megatune C++ code for decoding the INI files and translated it to Java. Now it's a matter of connecting the dots between data coming off either BT stack or a network socket, to the MT based guts to whatever UI components are currently displayed to a logging engine.

The gauges really are just a bit of bling to see how it would look, my initial prototype was really just three labels and three numbers. Swapping layouts at runtime is easy to do on Android, it's creating the on phone UI for creating or modifying layouts that is a PITA.






View User's Profile View All Posts By User U2U Member
TimEllershaw

posted on 8/3/11 at 04:38 PM Reply With Quote
Have you had a look at Torque-BHP ?
(http://torque-bhp.com/)


Same idea, but reading from OBD port. We use it at work on a selection of HTC Android phones.
The interface is quite nice. May give you some ideas on what is readable / sensible.


Cheers

tim.

View User's Profile E-Mail User Visit User's Homepage View All Posts By User U2U Member
scudderfish

posted on 17/3/11 at 02:11 PM Reply With Quote
NumericControls
NumericControls





Playing with LCD alike displays. Not using dials gives me more room to play with, I could easily fit another 3 to the display above. Question is, what other 3 would be on your 'must have' display ? Coolant temp, air temp and......






View User's Profile View All Posts By User U2U Member
scudderfish

posted on 17/3/11 at 02:19 PM Reply With Quote
Something like this?

Description
Description


Could do with another field just to balance out the display






View User's Profile View All Posts By User U2U Member
nuvolae36

posted on 17/3/11 at 02:19 PM Reply With Quote
hey I found this thread by google, never thought that there were this kind of discussion here!

I'm following. Need badly some kind of display device for my MS. Multiple physical gauges is a no no, LCDash is not produced anymore (and I don't like it) and megaview is a little sh*tty

Open a thread in msextra too, please, there are a lot of people that would like this and could help to test/build!

Phil (of Tunerstudio) is working on it too and he say something could be out for spring...
http://www.msextra.com/forums/viewtopic.php?f=122&t=34779&start=80

cheers,
I'm nuvolarossa on there

View User's Profile View All Posts By User U2U Member
scudderfish

posted on 17/3/11 at 02:26 PM Reply With Quote
quote:
Originally posted by nuvolae36
hey I found this thread by google, never thought that there were this kind of discussion here!

I'm following. Need badly some kind of display device for my MS. Multiple physical gauges is a no no, LCDash is not produced anymore (and I don't like it) and megaview is a little sh*tty

Open a thread in msextra too, please, there are a lot of people that would like this and could help to test/build!

Phil (of Tunerstudio) is working on it too and he say something could be out for spring...
http://www.msextra.com/forums/viewtopic.php?f=122&t=34779&start=80

cheers,
I'm nuvolarossa on there



Please don't ever rely on my software to replace physical gauges, I don't want that responsibility! You're also going to struggle to find a device that can be read in direct sunlight. This is really a support project for the likes of TS or MLV and not intended to replace either of them

I haven't posted on the msextra forum as I wanted to keep the noise down somewhat whilst I fiddle with this. Damn you Sergy! Once I've got it running for a couple of people here, then I might talk about it in more than a whisper.

I'm aware that Phil is doing something, I'm doing this mainly to scratch an itch to do a bit of dev work that is dissimilar to my day job.

Regards,
Dave






View User's Profile View All Posts By User U2U Member
scudderfish

posted on 17/3/11 at 02:37 PM Reply With Quote
OK, I'm happy with this for now. I've added in spark angle, and a big 'Start Logging' button. It'll say 'Stop Logging' if you currently logging data

Description
Description







View User's Profile View All Posts By User U2U Member
matt_gsxr

posted on 17/3/11 at 02:55 PM Reply With Quote
nice,

Those look good.

TPS might be useful (just as a debug tool), sync errors can be handy, battery voltage (is useful, if you have a rubbish alternator like me). It all depends on what is going on, but I like the ones you have.

Does this actually get signals from anywhere, or is this a mock-up still?

Matt

View User's Profile Visit User's Homepage View All Posts By User U2U Member
scudderfish

posted on 17/3/11 at 04:04 PM Reply With Quote
Right now, this is mostly a mockup so I can play with layouts and colours. However it does connect to my MS simulator, probe it, and then load and parse the associated INI file. I need to set up a timer to query the sim and then connect the returned values to the half dozen displayed controls.

Regards,
Dave






View User's Profile View All Posts By User U2U Member
scudderfish

posted on 25/3/11 at 11:48 AM Reply With Quote
It appears that I was converting the Megatune code, I had stubbed out a big bit that "I'd do later". It turns out later is now so back into the guts with not a lot to show for it






View User's Profile View All Posts By User U2U Member
scudderfish

posted on 28/3/11 at 12:28 PM Reply With Quote
MegaTune is quite a complex beast...

Given an INI file entry such as :-


accDecEnrich = { (engine & 0b00100000) ? tdePct : ((pulseWidth-injOpen) / (pulseWidth-accelEnrich-injOpen) * 100) }, "%" ; In percent, centered on 100% meaning no correction.


It effectively compiles the statement into a datastructure that represents a stack based virtual machine and then 'executes' it at runtime.

However the insidious differences between C++ & Java are making getting this to be a 100% faithful reproduction quite tricky. Tonight I'm going to have a play around with embedding BeanShell and see if I can get that to do all the heavy lifting. It should just need a bit of preprocessing on the statements to Javafy them, so the above becomes

accDecEnrich = (engine & 32) != 0 ? tdePct : ((pulseWidth-injOpen) / (pulseWidth-accelEnrich-injOpen) * 100);

The more I dig into this, the more I'm impressed with the work B&G did to produce the MS.

Regards,
Dave






View User's Profile View All Posts By User U2U Member
scudderfish

posted on 15/4/11 at 11:09 AM Reply With Quote
Aha! Discovered that the bluetooth module I've got plugged into my MS is powerful enough to communicate with my desktop in the house. This should make dev work a bit easier as I can talk with the real thing rather than messing around with the simulator.






View User's Profile View All Posts By User U2U Member
matt_gsxr

posted on 15/4/11 at 04:24 PM Reply With Quote
quote:
Originally posted by scudderfish
Aha! Discovered that the bluetooth module I've got plugged into my MS is powerful enough to communicate with my desktop in the house. This should make dev work a bit easier as I can talk with the real thing rather than messing around with the simulator.


But the simulator is more fuel efficient.

I got a bit lost at the beanshell, java, virtual stack, bit. Its good that one of us understands it

Matt

View User's Profile Visit User's Homepage View All Posts By User U2U Member
scudderfish

posted on 24/6/11 at 03:41 PM Reply With Quote
This project isn't dead yet I've now bought myself an HTC Desire S, and it's making the development a lot easier. I'm now communicating with the MS, and evaluating all the expressions in the associated INI file. Next major hurdle is to connect the internal numbers to the controls on the display. Once that's done, logging to file should be straightforward. I did a side project for a friend for logging GPS position, so I'll slide that code in as well so your MS log will contain location info as well.






View User's Profile View All Posts By User U2U Member
matt_gsxr

posted on 25/6/11 at 10:20 PM Reply With Quote
Awesome news. I have built a speedo with an arduino, so hopefully I can send the speed into to the MS as an additional input, so GPS + speedo + MS should mean pretty nice datalogging.

Looking forward to it.

Matt

View User's Profile Visit User's Homepage View All Posts By User U2U Member
scudderfish

posted on 26/6/11 at 07:07 AM Reply With Quote
quote:
Originally posted by matt_gsxr
Awesome news. I have built a speedo with an arduino, so hopefully I can send the speed into to the MS as an additional input, so GPS + speedo + MS should mean pretty nice datalogging.

Looking forward to it.

Matt


Wow, and I thought _I_ was a geek Speed can come from the GPS. What would be fun would be phone accelerometer data, although I think that may need some calibration to allow for the position the phone is mounted in the car.






View User's Profile View All Posts By User U2U Member
matt_gsxr

posted on 26/6/11 at 08:11 AM Reply With Quote
My reasoning to consider adding direct speed information is that I think that speed from GPS is generally pretty poor.

I loaded up one of those apps for trackdays and logged whilst on a bus on the motorway. The speed wasn't very stable ranging up and down as much as +/-10mph (the bus basically sits just below its speed limiter).

I am told that GPS can determine speed in two ways.
Either using the positions divided by time (simple but differentiation of position amplifies the errors).
or using doppler http://nujournal.net/HighAccuracySpeed.pdf which will be much more precise

I don't think phones do doppler speed stuff and have relatively low frequency basic GPS.

Accelerometer use is interesting idea. For it to work we would need to fix the phone in a single orientation and then combine the accelerometer with the GPS either using a Kalman filter (if we need real-time) or something cleverer if we don't need real-time. I haven't googled on it, but if the problem of velocity drift could be managed then it could work well. I am sure it has been done 1000 times before.


With a direct speedometer it would be easier.

Matt

p.s. I am at one with my inner geek

View User's Profile Visit User's Homepage View All Posts By User U2U Member
scudderfish

posted on 2/7/11 at 09:53 AM Reply With Quote
Comms started
Comms started


Screenshot hot off my phone which is now talking to my MS and attempting to show numbers. The numbers are wrong (my car is sat in the garage with the MS on, but the engine not running), but the major plumbing is now working






View User's Profile View All Posts By User U2U Member
matt_gsxr

posted on 3/7/11 at 09:00 AM Reply With Quote
Awesome news
View User's Profile Visit User's Homepage View All Posts By User U2U Member
ashg

posted on 3/7/11 at 10:50 AM Reply With Quote
thats looking really sweet. if you want to do some testing on ms3 i can do it for you.





Anything With Tits or Wheels Will cost you MONEY!!

Haynes Roadster (Finished)
Exocet (Finished & Sold)
New Project (Started)

View User's Profile View All Posts By User U2U Member
scudderfish

posted on 3/7/11 at 05:27 PM Reply With Quote
I need to get it working with my MS1 before I venture into other areas. I'd be interested in your INI file and an example log file though please to throw into the test cases.

Regards,
Dave






View User's Profile View All Posts By User U2U Member
scudderfish

posted on 3/7/11 at 08:52 PM Reply With Quote
Slight change in direction. My initial aim has always been for log capture. I've gone down a side street with heavyweight INI file processing and expression evaluation that the full TunerStudio does. This has caused me no end of problems. What I've done tonight is cut out those code paths and implemented the raw datalog documented here. These files can be converted by TunerStudio into an MSL file for Megalogviewer to parse. I'm going to strip down the UI just to show logging progress for now, and introduce the other stuff later when I've got a better handle on just how fast I can run this. I think accurate high resolution logging is more important than eye candy.

Regards,
Dave






View User's Profile View All Posts By User U2U Member
<<  1    2    3    4  >>
New Topic New Poll New Reply


go to top






Website design and SEO by Studio Montage

All content © 2001-16 LocostBuilders. Reproduction prohibited
Opinions expressed in public posts are those of the author and do not necessarily represent
the views of other users or any member of the LocostBuilders team.
Running XMB 1.8 Partagium [© 2002 XMB Group] on Apache under CentOS Linux
Founded, built and operated by ChrisW.