Page 5 of 6

Re: Building a low cost OBD2 ECU Simulator

PostPosted: Wed Nov 04, 2015 3:25 pm
by ybpvin
Hi friends! I have I similar problem like Juanko http://techtinker.co.za/forum/viewtopic.php?f=14&t=10#p403 . Arduino writes the initialization, but does not transmit OBD Elm327 data on the scanmaster. I bought a Chinese clone can bus on which the unknown frequency of the quartz. In the photos the seller 8 MHz, and 16 MHz originals.

Re: Building a low cost OBD2 ECU Simulator

PostPosted: Thu Mar 03, 2016 9:06 am
by lithium
I have the same CAN module. It works fine with arduino nano. I think, that quartz frequency is not important.
You just need to connect INT pin to D2 on arduino.

btw; great project! :D

Re: Building a low cost OBD2 ECU Simulator

PostPosted: Tue Mar 08, 2016 3:06 pm
by lithium
I want to return 17 characters long VIN. But don't know, how to return 17 characters...
With following code I get "X" as VIN number in ScanmasterELM. How to return complete 17 characters long string??

unsigned char SupportedVI[4] = {4, 73, 0, 208}; // this enables VIN support
// mode 9, pid 2
unsigned char vin[5] = {4, 73, 2, 0, 88}; // 88=X

if(BuildMessage=="2,9,0,0,0,0,0,0,") {CAN.sendMsgBuf(0x7E8, 0, 4, SupportedVI);}
if(BuildMessage=="2,9,2,0,0,0,0,0,") {CAN.sendMsgBuf(0x7E8, 0, 5, vin);}

Re: Building a low cost OBD2 ECU Simulator

PostPosted: Tue Mar 08, 2016 9:19 pm
by MartinViljoen
lithium wrote:I want to return 17 characters long VIN. But don't know, how to return 17 characters...
With following code I get "X" as VIN number in ScanmasterELM. How to return complete 17 characters long string??

unsigned char SupportedVI[4] = {4, 73, 0, 208}; // this enables VIN support
// mode 9, pid 2
unsigned char vin[5] = {4, 73, 2, 0, 88}; // 88=X

if(BuildMessage=="2,9,0,0,0,0,0,0,") {CAN.sendMsgBuf(0x7E8, 0, 4, SupportedVI);}
if(BuildMessage=="2,9,2,0,0,0,0,0,") {CAN.sendMsgBuf(0x7E8, 0, 5, vin);}


Usually a VIN number is returned over 2 or more messages because a VIN is too long to be sent as one message.

In my Jeep's case it gets sent over 2 Messages.

See this where I'm showing how I got my VIN
viewtopic.php?f=14&t=11

Re: Building a low cost OBD2 ECU Simulator

PostPosted: Fri Mar 11, 2016 8:33 am
by lithium
I see...

I got now working VIN :) My ECU simulator is now almost perfect :)

if(BuildMessage.substring(0,6)=="2,9,2,") { // mode 09, pid 02
CAN.sendMsgBuf(0x7E8, 0, 8, vin_msg1);
CAN.sendMsgBuf(0x7E8, 0, 8, vin_msg2);
CAN.sendMsgBuf(0x7E8, 0, 8, vin_msg3);
}

Re: Building a low cost OBD2 ECU Simulator

PostPosted: Thu Mar 31, 2016 12:01 am
by bman101
Do you know if it would be possible to connect this to a raspberry pi without using the CAN-BUS shield? Thanks.

Re: Building a low cost OBD2 ECU Simulator

PostPosted: Wed Jul 20, 2016 1:08 am
by lcooper
lithium wrote:I see...

I got now working VIN :) My ECU simulator is now almost perfect :)

if(BuildMessage.substring(0,6)=="2,9,2,") { // mode 09, pid 02
CAN.sendMsgBuf(0x7E8, 0, 8, vin_msg1);
CAN.sendMsgBuf(0x7E8, 0, 8, vin_msg2);
CAN.sendMsgBuf(0x7E8, 0, 8, vin_msg3);
}


Could you further help with your variables and other snippets of code, I'm trying to build an ECU simulator.

Re: Building a low cost OBD2 ECU Simulator

PostPosted: Wed Jul 20, 2016 5:38 am
by lcooper
MartinViljoen wrote:Enjoy!!!

Comments Please!


I have a couple of questions.

I'm sending the monitor status, however just the first 2 bytes are getting to the scanner, do I have to split it up or what else I'm missing.

What is the last 2 parts of the message for? Is there a limit on the length?

Thank you.

Re: Building a low cost OBD2 ECU Simulator

PostPosted: Mon Apr 16, 2018 10:23 pm
by chris62
Hi MArtin, thank you for sharing this great project.

I plan to simulate an ECU on my old cars (French cars from 1958 to 1983) to read all the sensors and display the informations via Torque APP.
My question is about the 12 volts supply. When an ELM dongle is plugged into a real car ECU, I guess it is powered by the 12v supply on the OBD Plug. But how does it work If I plug an ELM dongle into a CAN BUS shield (via a OBD to DB9 cable) ? I can't find any information on this particular point.

If anyone could explain how to bring those 12 volts to the ELM dongle it would help me a lot ;-) maybe the seeed shield has everything built in to do it, Then I missed it...Thanks a lot to anyone taking time to answer me, and once again great project, I hope it will alos work for me !

Re: Building a low cost OBD2 ECU Simulator

PostPosted: Wed May 09, 2018 7:15 am
by MartinViljoen
chris62 wrote:Hi MArtin, thank you for sharing this great project.

I plan to simulate an ECU on my old cars (French cars from 1958 to 1983) to read all the sensors and display the informations via Torque APP.
My question is about the 12 volts supply. When an ELM dongle is plugged into a real car ECU, I guess it is powered by the 12v supply on the OBD Plug. But how does it work If I plug an ELM dongle into a CAN BUS shield (via a OBD to DB9 cable) ? I can't find any information on this particular point.

If anyone could explain how to bring those 12 volts to the ELM dongle it would help me a lot ;-) maybe the seeed shield has everything built in to do it, Then I missed it...Thanks a lot to anyone taking time to answer me, and once again great project, I hope it will alos work for me !


Hi Chris.

When you connect the ELM's USB connector to the PC it power's up with the 5V supplied by your computers USB port. Same with the CAN bus shiled connected to the arduino. It's also getting power from the arduino.