Loading...
Pages: [1]   Go Down
Author Topic: Arduino OBDII Bluetooth Car Engine RPM Shift Light  (Read 1583 times)
0 Members and 1 Guest are viewing this topic.
Greece
Offline Offline
Newbie
*
Karma: 3
Posts: 11
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

https://www.youtube.com/watch?v=MeUgWF98Ndw

It 's about an Arduino project connected to an ELM-327 OBDII Bluetooth through a HC-05 bluetooth module.
The HC-05 is connected to Arduino with serial UART, and is configured (with AT commands) as Master to connect to ELM-327 OBDII Bluetooth which is the slave.
As soon as connection established begins the initialitation (with AT commands) of ELM-327.
After that we can read Engine RPM from car's ECU.
Next just display the RPM to 7-segment LEDS.
Shift Lights going ON at the RPM that we configure pressing the button at desired  Engine RPM, value is stored to EEPROM.
Please feel free to comment or suggest or contact me.
Code needs some comments, i hope i can post soon, schematics will post as soon as possible.

Kostas

http://www.ebay.co.uk/itm/251208216925?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1497.l2649

http://www.amazon.co.uk/ELM327-Bluetooth-Wireless-OBD-II-Diagnostic/dp/B006JJZVQE/ref=cm_cr_pr_product_top
Logged

0
Online Online
Jr. Member
**
Karma: 0
Posts: 91
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello, you have the source code available? I liked your project, i have one ELM/327 OBD2 OBDII Bluetooth and i use it with my Android phone, but with your Bluetooth module for arduino i can make something different smiley
Logged

Greece
Offline Offline
Newbie
*
Karma: 3
Posts: 11
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I think that finally i got the code completed.
It is working with great accurancy.

But because i am not pro, be free to suggest any improvement or ask for some explanations.

http://www.kokoras.com/OBD/Arduino_HC-05_ELM327_OBD_RPM_Shift_Light.htm
Logged

0
Online Online
Jr. Member
**
Karma: 0
Posts: 91
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello, in your code you have setupBlueToothConnection where you put the AT commands, it is necessary run this code every time that we start the circuit? The last changes\configurations are not saved on the bluetooth module memory if we dont use the 'Reset' command?

P.S.: How you found the address of your Elm327? for example, if i have this: "00:02:03:ac:a1:d3"..
« Last Edit: May 08, 2013, 10:14:51 am by almamater » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi, I am looking for a similar Project, using an Arduino Uno, one, HC05 Serial BT, an a OBD2 BT device. The fact is if you can use an automated procedure to connect serial BT HC05 and OBD2 BT every time you put power to HC05 serial BT ( or the Arduino in which it is connected). The procedure is simple, first ger the MAC addres of the OBD2 BT, simply connecting to it with a BT device and pairing it, an android phone or a PC, are suitable to do, then in properties of the OBD2 BT device you can find the MAC. When you get it, then you must to insert this MAC as a pairable ítem in the Serial BT HC05, al so a simple fact. First take a RS232 USB module (in DX.com you can find a cheap one), and connect it to de serial BT HC05, put the HC05 in AT command mode shorting pin 34 (pio11) with VCC using a resistance about 470Ohms or so, when short VCC-Pin34 at boot, the module enters in AT command mode, so you can program it, then the short must be opened. With a few googling you can find USB RS232 driver (CP210x Windows XP/2003/Vista(32/64)/7(32/64)/8(32/64) Driver v6.6.1 , file is CP210x_VCP_Windows.zip) that is mandatory to use usb serial. In a Hyperterm sesión, open the COM port that is created, the module BT enters in AT mode, and you can create a Hyperterm sesion with 32800,1,0,None. The AT commands are defined in a tutorial or datasheet of HC05 (see this versión, nor HC06/04) like this (google) HC-0305_serail_module_AT_commamd_set_201104_revised.pdf. The commands AT can be entered in lower case, and after you send it hitting Return. Activate Echo in Hyperterminal sesión to see the commans in screen. Fisrt command to put is AT, an OK is the response. Then put the module in Master mode (slave is the default): AT+ROLE=1, then AT+CMODE=0 to allow the BT module to connect to any BT specified, then AT+BIND=bind MAC, this bind MAC is the one you take of the OBD2 BT, but with a special format. The special format is, i.e. if the MAC is: 00:01:02:03:04:05,  then AT+BIND=0001,02,030405. Then if you powers off the BT Serial, and put power again, the module seeks for OBD2 BT and pairs with it without doing nothing more.
My tries to make work a LCD1604 using program that displays OBD2 parameters but using an RS232 cable instead a BT serial module don´t Works using BT serial, but with Kostas code and a little time, sure I finally make it works. if someone wants to make a working group with me, feel free to contact me at farmaestrada2@yahoo.es.
Logged

0
Online Online
Jr. Member
**
Karma: 0
Posts: 91
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for the info, i configured the HC-05 and now he it is paired and linked with OBDII successfully.. i upload a small test just to send and received the commands correctly with Arduino IDE..:

Code:
#include <SoftwareSerial.h>
#define RxD 7                //Arduino pin connected to Tx of HC-05
#define TxD 8                //Arduino pin connected to Rx of HC-05

SoftwareSerial blueToothSerial(RxD,TxD);

void setup()
{
 Serial.begin(38400);
 blueToothSerial.begin(38400);
 pinMode(RxD, INPUT);
 pinMode(TxD, OUTPUT);
   
 }
 
 void loop() {
 
  if (blueToothSerial.available()) {        //PORTA DO BLUETOOTH RX1 + TX1 (7 e 8)
    char inByte = blueToothSerial.read();
    Serial.write(inByte);
   }
 

  if (Serial.available()) {   // Ler a porta Serial Arduino
    char inByte = Serial.read();
    blueToothSerial.print(inByte);   
  }
}



I think its ok..
Logged

Greece
Offline Offline
Newbie
*
Karma: 3
Posts: 11
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Sorry for not replying for long time...had some laptop problems.

almamater you are doing great as i can see, and thnx aestrada for the very detailed explanation of HC-05 bluetooth module functions.

Hello, in your code you have setupBlueToothConnection where you put the AT commands, it is necessary run this code every time that we start the circuit? The last changes\configurations are not saved on the bluetooth module memory if we dont use the 'Reset' command?

P.S.: How you found the address of your Elm327? for example, if i have this: "00:02:03:ac:a1:d3"..

Well i run this function every time, although it doesnt needed except first time, just in case, simply.
Logged

0
Online Online
Jr. Member
**
Karma: 0
Posts: 91
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

 smiley-mad

My First Test:

http://youtu.be/VxsIu9l7Ipk
Logged

Greece
Offline Offline
Newbie
*
Karma: 3
Posts: 11
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Great Job almamater....
Logged

Pages: [1]   Go Up
Print
 
Jump to: