Board logo

Raspberry Pi Car operating system
Mr Whippy - 8/1/14 at 01:40 PM

Hi

I’ve got hold of a Raspberry Pi B and started tinkering with it, seem’s really easy to program and stick stuff onto like sensors and displays. Help also that I use to do programming.

Was thinking of tying it into the landy’s engine to get readouts, put a screen on the dash for the internet etc and maybe even control the engine for fuel injection and timing etc as a project.

Has anyone here tried that kind of thing with a Pi?

Cheers


loggyboy - 8/1/14 at 01:48 PM

I was thinking of it when I first heard about them. Never did it though.
Then I bought my little girl a £45 android tablet (Apptab from Asda) for christmas. After finding it a good cheap item I thought, I could just get one of those, mount it on the dash and it will do the same as a Pi, and no need to add a screen, input etc to it.


deezee - 8/1/14 at 02:19 PM

The raspberry Pi forums have given up on the idea long ago. The 12v car system just won't work on the GPIO and its too slow and weak to power / control the engine directly. The car electrical system is too noisy for the Pi to operate without loads of decoupling, again making it harder to control anything. People do however document connecting to to OBD II for reading off data.

http://www.nikrooz.co.uk/raspberry-pi-car-puter/


Mr Whippy - 8/1/14 at 02:34 PM

Good info there thanks, had thought of quite a few uses on a car. Bit surprised about power issues seeing it's USB powered and currently I use USB devices in my car with no probs. Will have a good read though

Did think it would also be a way of managing an electric/diesel generator hybrid system which I've wanted to build for ages but didn't know a way of making a system to automatically control the charging and switch over.

Thanks


deezee - 8/1/14 at 02:58 PM

You could use Ardiuno with more success. People have been making engine management, solar charging and automation projects for years now. You can find lots of information. You will find that the controller is only 1 small part of the puzzle and you need a load of other parts to properly get these things working.

A quick look on the forum shows an electric / petrol hybrid built by Yale universcity, who have made the project public domain, including the controller coding.

I'm currently building an Arduino interface reader for a Megajolt. Based on the project by David Whitty. Thats pretty tricky. I'm OK at coding, but need to constantly ask advice about 4050 shifters, serial interfaces and RS232 connectors.


James - 8/1/14 at 03:28 PM

Much as I love the Pi (I have a B that I use for XBMC) I think one of the biggest issues is the processor isn't fast enough for engine management.

[Edited on 8/1/14 by James]


Slimy38 - 8/1/14 at 03:38 PM

quote:
Originally posted by deezee
You could use Ardiuno with more success.


I have Pi and Arduino, and I find that I get more success with Arduino. It just seems more suited to IO operations.

What deezee is saying about trouble with power is not necessarily the supply to power it (5 volts is easy to generate), it's more the IO side of things that has to be tidied up, with lots of very small very fast signals jumping around all over the place.


Mr Whippy - 8/1/14 at 03:55 PM

Will have a good look at that hybrid tonight, a lot easier if it's already been done

Great stuff cheers


matt_gsxr - 8/1/14 at 04:48 PM

Agree with most of what has been said before. I've had a play with both and built a few toys.

Arduino A/D is a bit slow and it doesn't have much processing power or the ability to display stuff, although you can add basic stuff for display it doesn't have dedicated hardware to control a screen so is limited. Arduino has a CAN interface card available (http://www.robotshop.com/en/can-bus-shield-arduino.html)

Rasp Pi is great at displaying (although small portable HDMI displays are more expensive than cheap tablets!*) and has more processing power. Have you considered the "gertboard" with Rasp-pi as that adds to its IO capabilities.


Couldn't you do much of this with Android Tablet talking to the CAN bus via Serial/USB/Bluetooth, does Torques not have the functionality you need. https://play.google.com/store/apps/details?id=org.prowl.torque&hl=en_GB

Or is it a "project" that you are looking for.

Matt


*There is a crowdsourced project to sort this out. http://www.kickstarter.com/projects/697708033/hdmipi-affordable-9-high-def-screen-for-the-raspbe


MikeRJ - 8/1/14 at 07:39 PM

quote:
Originally posted by James
Much as I love the Pi (I have a B that I use for XBMC) I think one of the biggest issues is the processor isn't fast enough for engine management.

[Edited on 8/1/14 by James]


It's more than fast enough, in fact the actual processor core is vastly more powerful than the micrcontroller used in most ECU's (remember the original Megasquirt only had a slow 8 bit micro). However it doesn't have any suitable timer peripherals that would be needed (there is one system timer for the OS, and a single very basic timer with no capture/compare options).

You also wouldn't run something like Linux in such a demanding hard real time system, even "real time Linux" is far too unwieldy and bulky for this kind of application.

You can buy an "STM Discovery" board for around £10 that is essentially like a large Arduino, but with a powerful 32 bit ARM core microcontroller on board that would be more than adequate to run a very comprehensive engine controller. However buying the hardware is one thing, writing code to reliably run an engine is another!

quote:
Originally posted by matt_gsxr
Arduino A/D is a bit slow and it doesn't have much processing power or the ability to display stuff, although you can add basic stuff for display it doesn't have dedicated hardware to control a screen so is limited.


You can now get Arduino variants with 32 bit MIPS or ARM core microcontrollers on board!

[Edited on 8/1/14 by MikeRJ]