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 »

Yes, I've been saying that they should use CAN bus for awhile now. There is a group of guys on the RPi forum working on getting the MCP2551 (or is is 2515?) to work with the Pi. That'd use the Pi's SPI bus to talk to the CAN chip. There's a kernel driver for that particular chip, so it shouldn't be too hard to get it working.
Brian
'84 Dodge Rampage
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 »

But CAN uses a different protocol than the RS-232 link. Even when using CAN passthrough, it is not the CAN protocol that is used. And you need to interface with the SPI bus. So it would require an api specific to the raspberry pi CAN interface and adding the CAN protocol.

So it may not be too hard but it could be very time consuming.

Jean
jbperf.com Main site . . . . . . . . . . . . . . . . . . . . . . jbperf.com Forum
Image
jsmcortina
Site Admin
Posts: 39569
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: rasberry pi integration

Post by jsmcortina »

There's numerous things to work on there.

The CAN chip might help with the physical layer, but how is the data link layer going to be implemented? (Freescale chips have a dedicated MSCAN module for that.)

Once that is working then you would need to implment the Megasquirt-CAN presentation layer. That's a simpler task and there are details in the MS3 CAN technical manual page.

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".
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 »

jsmcortina wrote:The CAN chip might help with the physical layer, but how is the data link layer going to be implemented? (Freescale chips have a dedicated MSCAN module for that.)
As far as I can see, the MCP2515 would take care of the data link layer. But I haven't checked the details.

And the MCP2551 is a simple transceiver which is what I use on some of my boards (with a Freescale CPU).

Jean
jbperf.com Main site . . . . . . . . . . . . . . . . . . . . . . jbperf.com Forum
Image
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 was meaning the CAN data transmission, buffering, line contention etc. That's all handled by the Freescale CPUs we use. But on the Pi, it doesn't exist.

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".
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 »

jsmcortina wrote:I was meaning the CAN data transmission, buffering, line contention etc. That's all handled by the Freescale CPUs we use. But on the Pi, it doesn't exist.

James
I understand what you meant and that's what the MCP2515 does. You just send it the packet content and it takes care of the rest. They call it a standalone CAN controller and it basically does the same thing as the CAN module inside the Freescale CPU with the difference that it's done over SPI. So for the Pi, it would be like writing/reading to/from registers over SPI.

My comment about the MCP2551 was in response to UnaClocker's post about which part number is the correct one.

Jean
jbperf.com Main site . . . . . . . . . . . . . . . . . . . . . . jbperf.com Forum
Image
jsmcortina
Site Admin
Posts: 39569
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: rasberry pi integration

Post by jsmcortina »

Ah that makes sense. I thought it was a typo, not two parts.

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 »

my raspberry pi just arrived :yeah!:
v2.2 box, ms2, dual wheel, sequential ignition, staged injection, boost control, maf
'87 VW scirocco, 2L16V, TD0-14T turbo, itbs
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 »

weeblebiker wrote:my raspberry pi just arrived :yeah!:
I just got mine yesterday too.
Now lets see when I can find time to play with it.
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
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 got my 5th one. I hear they're opening up bulk orders within a week or two.
Brian
'84 Dodge Rampage
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 »

I got mine working with TS on raspbian. If anyone is wondering whether to take a "normal" debian or this, take raspbian as it uses the FPU of the Broadcom CPU. TS is much more "responsive" (reacts on clicks within several seconds :D ) and with a little bit of overclocking, i could achieve load times (TS start + load msq + going online / difference report) of roughly one minute.

Best Regards, 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
weeblebiker
Master MS/Extra'er
Posts: 421
Joined: Sun May 11, 2008 4:03 pm

Re: rasberry pi integration

Post by weeblebiker »

sounds like this project still needs alot of work by the hardware/software engineers.
I'm considering just picking up a atom chipped mini itxmotherboard with windows and shovin it in my glove box instead.
v2.2 box, ms2, dual wheel, sequential ignition, staged injection, boost control, maf
'87 VW scirocco, 2L16V, TD0-14T turbo, itbs
cygnus x-1
Helpful MS/Extra'er
Posts: 121
Joined: Thu Sep 04, 2008 10:09 pm

Re: rasberry pi integration

Post by cygnus x-1 »

weeblebiker wrote:sounds like this project still needs alot of work by the hardware/software engineers.
I'm considering just picking up a atom chipped mini itxmotherboard with windows and shovin it in my glove box instead.

I'm really torn between the RPi and one of these:

http://www.newegg.com/Product/Product.a ... Tpk=ionitx

The Pi obviously has the price point but I really want to be able to run two displays since two 7" LCDs will fit perfectly in place of my factory cluster. The mobo above runs on straight 12VDC power too.


C|
SymTech Laboratories
Super MS/Extra'er
Posts: 2188
Joined: Sun Aug 31, 2008 4:02 pm
Location: South Florida, USA
Contact:

Re: rasberry pi integration

Post by SymTech Laboratories »

cygnus x-1 wrote:The Pi obviously has the price point but I really want to be able to run two displays since two 7" LCDs will fit perfectly in place of my factory cluster. The mobo above runs on straight 12VDC power too.
According to Zotac, it actually requires 19VDC. Even if it required 12VDC, you would need some sort of a power supply to condition the rather noisy 13.8VDC (nominal) found in most cars.
SymTech Laboratories, LLC ----- MSQ File Repository: megasquirt.symtechlabs.com
Image
chacaman
Helpful MS/Extra'er
Posts: 145
Joined: Sat May 03, 2008 7:35 pm

Re: rasberry pi integration

Post by chacaman »

Rasberry tips and tricks

First i buil my one PSU(Power Supply Unit) using the L4940V5 75% of efficient and Dropout voltage 0.5 and 0.9
i get 1.5A and 5V for Raspeberry power on and supply good a and v to the device

The Rasberry need 700ma for KeyBoard And Mouse if you are using high load of cpu you need more power

Second add Heat Sinks to your RaspBerry and termistor for Fan

Use a SD Card Class 10 For fast acces write and read

use the new Debian version overclock from 700mhz to 1Ghz

and don't use opensdk-6 on this version of debian use the JVM of oracle
use this guide http://www.savagehomeautomation.com/pro ... t-jre.html
Sham
MS/Extra Newbie
Posts: 1
Joined: Mon Feb 11, 2013 2:23 pm
Contact:

Re: rasberry pi integration

Post by Sham »

Hi guys,

I was thinking about such an install for my MS setup (in a '68 VW Ghia), and I just discovered this topic... So I've registered just to be able to follow it! :)
I was more thinking about going "bare metal" on the RPi, to improve the boot delay. The idea is not to run the full TunerStudio, but just a bit of code I would develop to display a few gauges.

What about your recent tests on your RPi? Any progress so far?

Cheers,
Jim
weeblebiker
Master MS/Extra'er
Posts: 421
Joined: Sun May 11, 2008 4:03 pm

Re: rasberry pi integration

Post by weeblebiker »

looks like megatunix may be the better application to run on a raspberry pi than tuner studio. I haven't read up on it much but it appears to be a linux based tuning aplication so will run on the raspbian version of ubuntu.

Multicomp released a case that is good and available through newark.com

looks like the hardware and software are coming together to make a reasonably priced onboard tuning display possible, finally
v2.2 box, ms2, dual wheel, sequential ignition, staged injection, boost control, maf
'87 VW scirocco, 2L16V, TD0-14T turbo, itbs
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 »

A couple things for anyone playing with these:
Make sure you are using the Oracle Java, that wasn't originally available for the PI and you had to use Open Java, the Oracle JRE runs substantially faster.
also, use the beta TS. There were many IO performance improvements that were identified as bottle necks when running on Android, these optimizations are in the TS beta too.

However, I would also say one should look at not using the raspberry pi, but instead one of the other similar boards that has more horse power for just a few dollars more.
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 »

I'm kicking the idea of getting a used netbook with a broken screen to keep in the glove box. use the vga to rca adapter on the video out and run a visor screen, and a little wireless keyboard/touchpad. maybe run a stripped down ubuntu or debian for quick boot time and auto launch TS on power up.
I know a netbook motherboard will do the job
v2.2 box, ms2, dual wheel, sequential ignition, staged injection, boost control, maf
'87 VW scirocco, 2L16V, TD0-14T turbo, itbs
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 »

What about something like this:
http://www.amazon.com/Dual-Core-Motherb ... B005WDTD9Y

(1st result in a search for "carpc atom")
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
Post Reply