arduino/obd-ii (can-bus) cruise control for cars

Hello world,

Anybody want to help make an open-source cruise control based on Arduino and interfaceing to obd-ii (can-bus)?
Based on GitHub - Magister54/opengauge: Automatically exported from code.google.com/p/opengauge as an expansion possibility.

3 hardware componets and some Code

  • User Interface
  • Arduino Controller
  • Car Interface

Theory of operation
Car Interface: h/w logic for watchdog from arduino, "dead mans siwtch" and "panic button" so that it can monitor Controller/Driver
Bypasses physical pedal with Controller output under certain conditions.
Has to be the safety net for bad programming on Controller ...

Controller: uses rev/speed information from Can-Bus and User Interface to create a speed output to be used instead of speeder pedal output.

  • note: analog rev/speed outputs from car could also be used if available (but then no OBD-II)

My Car is a Citroen C1: a Toyota/Peugoet/Citroen collaberation with Can-Bus (? gotta check this ?)
So the question is, can it be any safer that Toyota products :o

User Interface:
The switch(es) to control Cruise Control (set/increas/decrease/memory for speed)

Probably a good place to start.

My present obd-ii car is a Citroen C1 (the same as Peugot 107/Toyota Aygo).
My driving position, when cruising, is my left foot on a piece of carpet that gets worn through with use (right foot on the speeder...)

So, a "plate" where my left foot is when cruising, which has 3 switches:
Top: Increase speed
Bottom: Decrease speed
"Middle": Dead mans switch/panic button. Safety feature.

Let's take the safety feature first: Middle button
It should be "on" if their is pressure on the plate.

  • I wrote "on" but this would probably be closed circuit, to indicating Plate physically attached and "on".
    The signal should be sent to the Car Interface and should disable cruise control (perhaps after some seconds).
    As such, the Middle Button is a safety feature, but could be disabled if one felt it foils the purpose of a cruise control.
    See also switches for clutch/brake for other safety features in Car Interface

Top and Bottom Buttons are signals to the Controller and perhaps be used as memory set/recall otherwise one may need other switches for memory functions (place them where you want).

I almost forgot user feadback:

  • lights
  • buzzer
  • electrical shock (for Dead Man)

That's my User Interface, but one can put the lights/buttons "where you want": gearknob/Driving Wheel/etc

Arduino Controller with Can-bus (ref: GitHub - Magister54/opengauge: Automatically exported from code.google.com/p/opengauge)
Signals IN/OUT

  • to be done
  • Note: remember to reserve pins for optional analogue rev/speed outputs from car electronics

OBD-II (Can-bus)
Choose:

For the time being, using the ELM would speed up developement of the hardware, decreasing costs comes later

Car Interface: Connections to clutch/brake switches, Can-bus and Controller Output(s)

Self contained safety first hardware.
Cruise Control Disabled with clutch/brake, no watchdog from Controller or "Dead Man Switch" indicates Dead Man.
Cruise Control obtained by breaking the accelerater pedels signal and send Controller signal.

Hardware: create from above

Controller box:
Connecters

User/Car Interface could be same connector to save costs

Voltage for major components (ref: GitHub - Magister54/opengauge: Automatically exported from code.google.com/p/opengauge )
12 v from Car Interface connector (some 12v source) or from OBD-II connector on car -> can give 9v with basic circuit
9v -> Arduino -> can give 5v output
5v ->ELM 327 and MCP2551

So, let's not reinvent the wheel and go for the circuit @ GitHub - Magister54/opengauge: Automatically exported from code.google.com/p/opengauge

Note to myself: "jumpers" for tx/rx on ardhuino/ELM to RS-232 converter to allow usage as Serial OBD-II interface or Arduino Serial Interface: so add place for a RS-232 section on circuit board (or USB)

Car Interface
No real big ideas here.
When I think of cars, I think of small relay packages which should be ok. So, small pcb relays that can handle 12v ...

Developement Hardware
Choose one of the following
Version "I have"
I already have
1 "ebay" Bluetooth OBD-II device (sorry elm elektronics)

  • Panic Button: pull OBD-II device out (no signal to Car Interface, back to pedal power)
    1 Arduino Mini Light from http://www.let-elektronik.dk/
    Costs: pennies as I have it
  • otherwise, under 50 pounds.

So, all I need is a magnifing glass, some jumpers, 9 pin connectors and leads.
Almost forgot, code for the Arduino ...(svn checkout http://opengauge.googlecode.com/svn/trunk/ opengauge-read-only
)

Version "find a kit"
Find some kit that contains the controller components (Arduino with ELM/OBD and some LCD)

Just some Notes
Developement Environment: deserted empty space!!!

revs: no/or little response with increasing/decreasing speed signal = Error
speed: 0->min speed = Error

You should check this shield:
http://www.skpang.co.uk/catalog/product_info.php?cPath=140_142&products_id=706

Thanks sk_uk: looks perfect to me for the CAN solution and there seems to be a lot of nice sample code :sunglasses:

Hi sk_uk
I have sent you a PM
br

Just in case nobody noticed, the ELM 327 is available with 2 prices
Version 1.3 ( 19 can dollars) is OK for this application

http://www.elmelectronics.com/obdic.html#ELM327

Let's name the idea/project/beast:
idoob2
A name that doesn't mean anything except the way arduino sound like:
aarhduino
the aar goes to "i", also the end of obd-ii (but at the start)
do, well that's do
ob: the initials of my real name and the start of obd
2: the end of obd-2 or just too

My "front end" could be python on windows/linux/mac/symbian

  • SymBtELM is the name of a project I have @ symbtelm download | SourceForge.net
    I kind of regretted the name, the program runs on all python platforms
  • Sym becomes misleading
    Bt is bluetooth, but when running on other platforms apart from Symbian, the connection can be serial/usb. And even Symbian can use wifi connection
    ELM is the only part that is good: elmelectronics.com rocks

So idoob2 doesn't mean anything, but it names the beast.

I hope google will one day give hits for the name:
http://www.google.com/search?q=idoob2
And not some french

idoob.com permets aux utilisateurs du Chatroulette de rester en contact, partager des photos et vidéos.

(can't find a way to add a signature, otherwise it would be www.moxoed.com )

In http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1276318702/2#2, I commented on:

"The version that support CAN bus for newer cars is only released as a full commercial product for the moment"

I'm guessing the commercial product is http://www.scangauge.com/
-which is a nice product at about $160 ( or about $197 in Denmark).

I wonder if it contains an Arduino (or similiar controller) ... :-?

The commercial product is the OBDuino at http://OBDuino.ca and available soon :wink:

Thats great.
I hope you make the hardware reusable/hackable:

  • own scetches
  • some easy access to pins that are not used (also to add an ELM)
    PM me when I can buy ...

I think that the problem it's the ecu. For your operation the best solution it's to by-pass the pedal position potentiomiter. You need to know that it's normal to have 2 potentiomiter, and normaly the work in corss position. ( raise pedal 0V pot1-5v pot2 : full pedal 5v pot1 - 0v pot2). Usually that signal go directly in to the engine ecu. In the stqandard cruise control the control it's inside the engine ecu. The signal that you see it's only a copy of that signal, converted in degree position and send in the C-Can .

That is indeed the idea
See http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1276318702/3#3

Cruise Control obtained by breaking the accelerater pedels signal and send Controller signal

Thanks for your input: every bit of information or ok of my "ideas" is great
:slight_smile: