EcoModder.com

EcoModder.com (https://ecomodder.com/forum/)
-   OpenGauge / MPGuino FE computer (https://ecomodder.com/forum/opengauge-mpguino-fe-computer.html)
-   -   USB Adapter using PIC18F2480 question (https://ecomodder.com/forum/showthread.php/usb-adapter-using-pic18f2480-question-22375.html)

SuperCharger 06-25-2012 04:18 AM

USB Adapter using PIC18F2480 question
 
I bought a ELM327 USB adapter from Amazon which is using PIC18F2480. Firmware version is v1.4b. Band rate is 38400.

I opened up the adapter case, disconnected pin17, pin18 from PCB. Then, I connected the PIC18F2480 pin17(Tx) to Arduino Rx(0), pin18(Rx) to Arduino Tx(1). I also connect the pin19 from the PIC18F2480 to the Arduino Gnd. But it did not work at all.

PIC18F2480 ---------------- Arduino
pin17(Tx) ------------------ Rx(0)
Pin18(Rx) ------------------ Tx(1)
pin19 ---------------------- Gnd

1. Do I need connect other pin/pins from PIC18F2480 to Arduino?

2. If I don't connect the Arduino to the EML327 adapter. The 16x2 LCD connected to the Arduino will display "OBDuino32k v198". Nothing show up on the second line. Even I press the control button nothing happened. Is it normal?

3. I uncomment the "#define ELM", and comment the "#define useECUState". Also I changed "Serial.begin(9600)" to "Serial.begin(38400)". What else code do I need to modify?

4. We need get the +12v source from OBD-II to power the Arduino. Should I use VIN or +5v on the Arduino?

5. Could I use +5v USB power on the adapter to power the Arduino?

SuperCharger 06-25-2012 09:42 PM

Ok, with no wire modification made from #1 post. I successfully made the OBD-II adapter talk to the Arduino today. The led on the ELM327 flash when I power up the Arduino. It means Arduino talks to the ELM327. But all dates are zero on LCD. I think I need change the header from elm_init function to make it work.

I will keep update for my work :)

4 and 5 questions still need answer. Would anyone can?

SuperCharger 06-27-2012 04:40 PM

Today. I made MPGunio finally work with the modified ELM327 OBD-II USB adapter bought frome Amazon.
If you want use this $20 usb adapter work with your Arduino. You need do following modifications.


ELM327 adapter:
Disconnected the PIC18F2480 pin17, pin18 from PCB. Then, connect pin17(Tx) to Arduino Rx(0), pin18(Rx) to Arduino Tx(1). Also connect the pin19 from the PIC18F2480 to the Arduino Gnd.
PIC18F2480 ---------------- Arduino
pin17(Tx) ------------------ Rx(0)
Pin18(Rx) ------------------ Tx(1)
pin19 ---------------------- Gnd

OBDunio32K Code:
(1) Uncomment the "#define ELM"
(2) Comment the "#define useECUState"
(3) Change "Serial.begin(9600)" to "Serial.begin(38400)".
(4)
else if(str[1]=='3') // ISO 9141
elm_command(str, PSTR("ATSH6810F1\r"));
== Change to: ==
else if(str[1]=='3') // ISO 9141
elm_command(str, PSTR("ATSH686AF1\r")); // "6810F1"


BTW, My car is 2004 Honda S2000, If the code(4) don't work on your car. Change "6810F1" to "6810F0" and give a try.


All times are GMT -4. The time now is 11:32 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Content Relevant URLs by vBSEO 3.5.2
All content copyright EcoModder.com