rasberry pi integration

For discussion of Phil Tobin's Tuner Studio software (Only about the tuning software itself, not about how to tune or firmware features)

Moderator: LT401Vette

UnaClocker
Super MS/Extra'er
Posts: 1933
Joined: Fri May 07, 2004 12:59 pm
Location: Tacoma, WA
Contact:

Re: rasberry pi integration

Post by UnaClocker »

http://youtu.be/KcLYkFeIlyc Video of MTx and TS running on my Pi.. Kind of a boring video, but if you wanted to see it in action..
Brian
'84 Dodge Rampage
retired
Helpful MS/Extra'er
Posts: 142
Joined: Fri Feb 22, 2008 11:49 am
Location: Rural Suffolk, UK

Re: rasberry pi integration

Post by retired »

OK, we have one up and running on a real MS2 (driven by a JimStim) and connected by a fairly simple serial chip and a 12V PSU (based on the MS2 design).

Loads in just under a minute on standard debian with no overclocking.

Guages are a little jerky compared to the XP install but I'm sure we can fix that.

Big thanks to Graham (Graham T) for the 100 plus emails between us to fix this and the emails between Graham and Phil for the final solution

EDIT - video tommorow, it's getting late UK time...
Classic Mini "A" series 5 port 1360 turbo
MS2-E fully sequential siamese code
14point7 SLC widebands, inner and outer cylinders and after turbo
digital AFR data and digital displays via Tiny-IOx
LT401Vette
Super MS/Extra'er
Posts: 12684
Joined: Sat Jul 16, 2005 8:07 am
Location: Moorseville, NC
Contact:

Re: rasberry pi integration

Post by LT401Vette »

Cool, congrats!

Attached is an ini file for the 3.1.1 Extra that is stripped down to gauge mode, there are no settings.

It does better than cut load time in half on my PC.

Normal 3.1.1 project load:
ini parsing takes 50-74ms, time to fully loaded and dash displaying is 550 - 850ms

with the stripped down ini: ini parsing takes 21-25ms, time to fully loaded and displaying dash is 168-290ms

Those times are with TS already started, just opening the projects.

So it does seem to cut it in half and the some. If you turn on lite mode it will skip loading some UI parts you don't need
Phil Tobin
EFI Analytics, helping to simplify EFI
Next Generation tuning software.
Supporting all MegaSquirt versions and firmwares.
http://www.TunerStudio.com
http://www.efiAnalytics.com/MegaLogViewer/
Support the firmware running your engine:
http://www.msextra.com/doc/donations.html
racingmini_mtl
Super MS/Extra'er
Posts: 9127
Joined: Sun May 02, 2004 6:51 am
Location: Quebec, Canada
Contact:

Re: rasberry pi integration

Post by racingmini_mtl »

That's great!

I'm curious to see what frame rate you can get with this setup. So it would be good if you can have a look at what TS reports.

Jean
jbperf.com Main site . . . . . . . . . . . . . . . . . . . . . . jbperf.com Forum
Image
Graham T
MS/Extra Newbie
Posts: 21
Joined: Tue Feb 01, 2011 12:41 pm

Re: rasberry pi integration

Post by Graham T »

I'm getting about 47 seconds now to load TunerStudio using the stripped down ini file. Thats from double click the TunerStudio.sh file to Project-ready.

from startup to project load takes about 19 seconds
Project loads in 11 seconds
Gauge cluster loads in 17 seconds

add -noSplash and time reduces to approximately 43 seconds.

load times do seem to vary on each TunerStudio start up, some times by up to 5 seconds either way.

Thats on the emulated Rpi, using the beta version of TunerStudio in lite mode, so the defalut dash is being displayed.
My emulation was only about 3 seconds different to Rods physical device (slower) using the full ini on the last stable release of TunerStudio.

lite mode seems to make about 7 seconds difference to load times.

Again, this is all on the emulator, so I'm not sure how that will differ on the physical device.

Next up is testing raspbian...
Graham T
MS/Extra Newbie
Posts: 21
Joined: Tue Feb 01, 2011 12:41 pm

Re: rasberry pi integration

Post by Graham T »

Here is a video of the Rpi loading TunerStudio.

http://youtu.be/82dTYbngWQU

Times are a little slower than my previous post.
The OS loads in approx 30 second, which I am sure can be shortened.

There is 15 seconds of me trying to start the TunerStudio script.

Once sync, the guages are fairly smooth at a frame rate of 15 frames per second. 20 was ok.
This is on the debian distro, TunerStudio v1.51

I made the dash layout as minimalistic as possible. No overlap on guages.

I tried it with less gauges, but over all you do not see much difference once the gauge cluster has loaded, though any more gauges than I have on the layout and it starts to struggle - The gauge movements become very jittery.

Using lite mode restricts me to the default dash and with all the gauges on there it really was not smooth - and took longer to load.
Also, once you have the profile set to load in full screen mode, you are pretty much stuck. try to double click to go back to normal view and TS is locking up. - I've not yet been able to recover from that with out rebuilding the OS. Even deleting the TS folder and project folder and starting from scratch with TunerStudio, it still opens in full screen...
Is there a way - key stroke? - to get out of full screen to be able to get the menus back? Or is there a file outside of the TunerStudio folders that would be setting to full screen even with a "clean" TunerStudio install?

I bought one of the "proven" class 10 SD cards off of the Rpi wiki proven peripherals list, but that will not let me run. Rpi does not even see the card, let alone getting fail on boot, so for now I am stuck with Class 6.

I'm also stuck with loading TunerStudio at startup.
You can see a failure during boot in the video, which is TunerStudio trying to start before X.
I have no idea how to load X, then run a script. Anyone?
xrattiracer
Experienced MS/Extra'er
Posts: 301
Joined: Fri Aug 01, 2008 2:25 pm

Re: rasberry pi integration

Post by xrattiracer »

if all you are going to be running is tuner studio, then you likely dont even need a window manager. just have the system launch tunerstudio by itself when X starts. various distros do this differently so I couldnt say exactly how to accomplish that, but it could save significant amounts of memory and cpu power.
I have been kinda watching this thread with interest, although I do not have a Pi yet. I have been involved with qt/qml, and have half a mind to make some kind of virtual dash application with that, if only I knew c++ better... I think performance could be improved dramatically, especially since it is easy to leverage opengl for ui acceleration.
LT401Vette
Super MS/Extra'er
Posts: 12684
Joined: Sat Jul 16, 2005 8:07 am
Location: Moorseville, NC
Contact:

Re: rasberry pi integration

Post by LT401Vette »

especially since it is easy to leverage opengl for ui acceleration.
OpenGL is used, that is why video drivers that support it in hardware is so critical to performance.
Phil Tobin
EFI Analytics, helping to simplify EFI
Next Generation tuning software.
Supporting all MegaSquirt versions and firmwares.
http://www.TunerStudio.com
http://www.efiAnalytics.com/MegaLogViewer/
Support the firmware running your engine:
http://www.msextra.com/doc/donations.html
weeblebiker
Master MS/Extra'er
Posts: 421
Joined: Sun May 11, 2008 4:03 pm

Re: rasberry pi integration

Post by weeblebiker »

my release date has moved up to July 5.
looks like they are really making headway catching up with demand.
v2.2 box, ms2, dual wheel, sequential ignition, staged injection, boost control, maf
'87 VW scirocco, 2L16V, TD0-14T turbo, itbs
weeblebiker
Master MS/Extra'er
Posts: 421
Joined: Sun May 11, 2008 4:03 pm

Re: rasberry pi integration

Post by weeblebiker »

and now comes the $50 via apc raspberry pi competitor has a few more i/o's and a regular video port.

http://www.pcmag.com/article2/0,2817,2404770,00.asp
Last edited by weeblebiker on Tue Jun 19, 2012 2:50 pm, edited 1 time in total.
v2.2 box, ms2, dual wheel, sequential ignition, staged injection, boost control, maf
'87 VW scirocco, 2L16V, TD0-14T turbo, itbs
UnaClocker
Super MS/Extra'er
Posts: 1933
Joined: Fri May 07, 2004 12:59 pm
Location: Tacoma, WA
Contact:

Re: rasberry pi integration

Post by UnaClocker »

Just like the OLPC started the Netbook fad, I suspect the Pi will do likewise for really cheap really tiny embedded style computers.
Brian
'84 Dodge Rampage
jsmcortina
Site Admin
Posts: 39569
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: rasberry pi integration

Post by jsmcortina »

I bet they don't have a "Model B" though. That's cool to kids of the 70s who remember the original BBC model B.

James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
weeblebiker
Master MS/Extra'er
Posts: 421
Joined: Sun May 11, 2008 4:03 pm

Re: rasberry pi integration

Post by weeblebiker »

jsmcortina wrote:I bet they don't have a "Model B" though. That's cool to kids of the 70s who remember the original BBC model B.

James
true dat
v2.2 box, ms2, dual wheel, sequential ignition, staged injection, boost control, maf
'87 VW scirocco, 2L16V, TD0-14T turbo, itbs
ashford
Super MS/Extra'er
Posts: 1603
Joined: Sun Apr 27, 2008 4:29 pm

Re: rasberry pi integration

Post by ashford »

makes me want to whip out my old ti99-4a and see if it still works
meeki007
MS/Extra Newbie
Posts: 11
Joined: Thu Mar 15, 2012 4:05 pm

Re: rasberry pi integration

Post by meeki007 »

you can run openbox without desktop environment
http://openbox.org/wiki/Help:Getting_started

it will free up a ton of resorces
Puppytune - 220mb linux os packaged with tunnerstudio. yes it auto runs :)
http://forums.turbobricks.com/showthread.php?t=259983
mariob
Experienced MS/Extra'er
Posts: 193
Joined: Wed Nov 11, 2009 11:35 am
Location: Berlin, Germany

Re: rasberry pi integration

Post by mariob »

Here is one more running Debian (soft-FPU) install. But so far i have to admit that it is not really usable as every click or dialog needs several seconds until a reaction can be noticed. I will give it another try on raspbian (with hard-FPU) in the next days.

Mario
Peugeot 106 Sergio_Tacchini, 1124cm³, MS2/Extra pre3.3alpah15, E85
Citroen AX, 954cm³, MS2/Extra pre3.3alpha15, E85
Peugeot 106 Rallye, 1298cm³ ... waiting for ITBs and full sequential injection
retired
Helpful MS/Extra'er
Posts: 142
Joined: Fri Feb 22, 2008 11:49 am
Location: Rural Suffolk, UK

Re: rasberry pi integration

Post by retired »

Over here we now have two running fairly well on raspbian - Graham and I now actually have an RPi each, despite the delays in delivery and us being UK.

Both running in-car with running engines (MS2 with Jean's siamese code as we both run A series turbos so the msq's etc may not be as common as some) but everything looks good.

A few problems with the PSU and interfaces when in car (affects Graham in-car and not me, but allways OK on the JimStim) but we'll resolve that shortly.

We also have added comms load as we both use Jean's IOx (or IOx-OEM) but the gauge refresh seem as good as a cheap laptop at the moment.

Lots of work still to be done to perfect it, but a question for Phil....


We thought it would be nice to have the RPi connected all the time as a display only but still be able to plug in a laptop for tuning. I tried hooking the RPi to the Rx line only (ie, just to recieve data from the MS2) but, as I kind of expected, it won't work without the Tx line.

Presumably TS sends responses back to the MS2 data even if we are not burning new settings ??? So fails to recieve data without the two way comms ???

Any easy solution ???


Rod.
Classic Mini "A" series 5 port 1360 turbo
MS2-E fully sequential siamese code
14point7 SLC widebands, inner and outer cylinders and after turbo
digital AFR data and digital displays via Tiny-IOx
LT401Vette
Super MS/Extra'er
Posts: 12684
Joined: Sat Jul 16, 2005 8:07 am
Location: Moorseville, NC
Contact:

Re: rasberry pi integration

Post by LT401Vette »

Yes the TX is needed. The firmware send the runtime data after TS sends a request for it. Also TS runs an interrogation on connect.

I don't think the IOExtender supports CAN Passthrough, or you could connect and read through that for the Pi then plug into the main controller with the tuning laptop.


Alternatively, perhaps a switch to change what has access to the serial.
Phil Tobin
EFI Analytics, helping to simplify EFI
Next Generation tuning software.
Supporting all MegaSquirt versions and firmwares.
http://www.TunerStudio.com
http://www.efiAnalytics.com/MegaLogViewer/
Support the firmware running your engine:
http://www.msextra.com/doc/donations.html
retired
Helpful MS/Extra'er
Posts: 142
Joined: Fri Feb 22, 2008 11:49 am
Location: Rural Suffolk, UK

Re: rasberry pi integration

Post by retired »

LT401Vette wrote:Alternatively, perhaps a switch to change what has access to the serial.
Yes, that was our first thought :D

We were just trying to make the wiring easier.

But it's still looking good overall.
Classic Mini "A" series 5 port 1360 turbo
MS2-E fully sequential siamese code
14point7 SLC widebands, inner and outer cylinders and after turbo
digital AFR data and digital displays via Tiny-IOx
xrattiracer
Experienced MS/Extra'er
Posts: 301
Joined: Fri Aug 01, 2008 2:25 pm

Re: rasberry pi integration

Post by xrattiracer »

has anyone considered using CAN bus instead? would it be possible for tuner studio to do its thing over that?
I am working on building my own mechanical gauge dash setup, and it is very important to me to leave the serial port open for a laptop or whatever so any permanently installed electronics need to use something else.
or failing that, maybe it would be possible to do some kind of serial pass through.
Post Reply