Need help on figuring out what connectors / boards i need.

Hey,
So i am working on connecting to my cars ecu. i have a consult to USB cable. (Consult is like OBD but for nissan)

So i know the Arduino mega 2560 runs at 5v but the car runs at 12v and requires 12v to communicate. according to this.

TX data to ECU level is 12v, idle low (see interface schematic). ECU output is open collector and can be sourced from the interface logic level (5v). the ECU data output is idle high.
Clock to the ECU seems fine with a 5v source from the interface.

So from the looks of it using USB is just not going to happen. so i was thinking about connecting the USB to a serial cable and connecting to the board that way.

Need help on trying to figure out how to connect it all together. i need to use the Consult to USB because i cant find a Consult to serial anywhere.

What car is this for? Can you provide more detail on the ECU itself? What is the exact communication standard used (i.e. RS232, RS485, etc)? Where did you find that quote?

Delta_G:
Are you sure that the adapter you have isn't already handling the voltage level shifting? It would be quite abnormal to have a USB and not have it at 5V.

I am not sure, i will email the person who makes them and ask.

i have used the cable connected to a pc and have being able to stream data from the ECU if that helps.

Power_Broker:
What car is this for? Can you provide more detail on the ECU itself? What is the exact communication standard used (i.e. RS232, RS485, etc)? Where did you find that quote?

Nissan Skyline R34 GTT, i am not sure what the exact communication standard is (i am very new to this side of stuff.) i am fairly certain i have seen people use RS232.
that quote came from the official documentation Nissan released on Nissan consult

Not sure if it will help but here is a picture of the USB board

Google says that the Nissan "Consult" port (looks like OBDII, smells like OBDII, is not OBDII) is +/- 12V.

In your picture that chip probably says "MAX232" on it, and then I assume there's an FTDI chip on the other side. The FTDI chip converts USB signals to serial data, and then the MAX232 steps it up from TTL levels (5V) to 12V.

Chagrin:
Google says that the Nissan "Consult" port (looks like OBDII, smells like OBDII, is not OBDII) is +/- 12V.

In your picture that chip probably says "MAX232" on it, and then I assume there's an FTDI chip on the other side. The FTDI chip converts USB signals to serial data, and then the MAX232 steps it up from TTL levels (5V) to 12V.

Yeah i just got an email back from the creator of the cable, he confirmed that the cable handles the voltage shifting from 12v to 5v and back to 12v.

so with that information, what would be the best way to connect the USB to a Arduino Mega 2560 ?

Delta_G:
USB host shield.

That's absurd. Take serial to USB to serial to RS232 levels? All he needs is a MAX232 or MAX485 chip. Well, the chip and some kind of grasp of the communications protocol for Consult.

Programming side of things i am fairly good at, ive already written a program that streams data from the ECU to a windows form program.

i am very new to Arduino's, Why would a USB host shield be absurd ?? how i think the host shield works, plugs into the board, then i can just program the Arduino to use the 0 serial port ? or am i completely off the mark with how the shield works ?

or would i be able to use something like this

and connect my cable and it with this

then just wire it directly to the board's rx tx 5v gnd ??

Chagrin:
That's absurd. Take serial to USB to serial to RS232 levels? All he needs is a MAX232 or MAX485 chip. Well, the chip and some kind of grasp of the communications protocol for Consult.

It's not absurd if op wants to use the existing adapter.

But I agree that just a level converter will probably do.

Here's a schematic I found: Evo and Tuning Resources. Of note here is the use of the transistor on the TX line to invert the signal (like you mentioned the TX of the Consult is "open collector").

The parts I don't understand is why your dongle only appears to have four wires when the schematic above shows five. I don't understand where the "clock" line fits in or what its purpose is. And lastly we don't know if the serial data is the standard 8-bits-no-parity-1-stop-bit and what the baud rate is. That's the stuff you need to find the answers to.

Chagrin:
Here's a schematic I found: Evo and Tuning Resources. Of note here is the use of the transistor on the TX line to invert the signal (like you mentioned the TX of the Consult is "open collector").

The parts I don't understand is why your dongle only appears to have four wires when the schematic above shows five. I don't understand where the "clock" line fits in or what its purpose is. And lastly we don't know if the serial data is the standard 8-bits-no-parity-1-stop-bit and what the baud rate is. That's the stuff you need to find the answers to.

In the picture i posted of the USB dongle you can see the 5th wire is just cut off and does nothing, not sure of its purpose. Since its just cut off im guessing it just need to be plugged it but not do anything ?
The serial data is the standard 8-bits-no-parity-1-stop-bit, the buad rate is 9600. ive got all that information.

im just completely clueless when it comes to trying to connect it to the Arduino, and what to use to connect it. using the USB cable i have, what would i need to connect it to the Arduino so i can use it ??

.

A USB Host shield would work but it is using a sledgehammer to crack a nut. You're adding a lot of complication on top of the basic serial protocol.

A RS232-to-TTL (or RS232-to-Arduino) converter is what you need. Chose one that's got a MAX232 chip (or one of the MAX232 family members). Wire that to the ground, RX and TX lines coming from the car connector. You may need to cut the cable that you have if the Consult connector is a strange one that's difficult to obtain.

MorganS:
A USB Host shield would work but it is using a sledgehammer to crack a nut. You're adding a lot of complication on top of the basic serial protocol.

A RS232-to-TTL (or RS232-to-Arduino) converter is what you need. Chose one that's got a MAX232 chip (or one of the MAX232 family members). Wire that to the ground, RX and TX lines coming from the car connector. You may need to cut the cable that you have if the Consult connector is a strange one that's difficult to obtain.

Cheers i will look into that and give it ago :slight_smile:

MorganS:
A RS232-to-TTL (or RS232-to-Arduino) converter is what you need. Chose one that's got a MAX232 chip (or one of the MAX232 family members). Wire that to the ground, RX and TX lines coming from the car connector. You may need to cut the cable that you have if the Consult connector is a strange one that's difficult to obtain.

Do you really need the MAX232 though? He's only using 9600 baud.

I linked a schematic earlier and I'm trying to understand what value the MAX232 has. I can't see a reason for it other than to create a bit of a safety barrier between the Consult and serial port.

Adhering to a spec (RS232 in this case) is always a good idea :wink:

And in the given schematic, it still inverts the TX output to the PC as well.

Chagrin:
Do you really need the MAX232 though? He's only using 9600 baud.

I linked a schematic earlier and I'm trying to understand what value the MAX232 has. I can't see a reason for it other than to create a bit of a safety barrier between the Consult and serial port.

Yeah the MAX232 is needed, the signal going back to the car needs to be 12v.

MorganS:
A USB Host shield would work but it is using a sledgehammer to crack a nut. You're adding a lot of complication on top of the basic serial protocol.

A RS232-to-TTL (or RS232-to-Arduino) converter is what you need. Chose one that's got a MAX232 chip (or one of the MAX232 family members). Wire that to the ground, RX and TX lines coming from the car connector. You may need to cut the cable that you have if the Consult connector is a strange one that's difficult to obtain.

Would connecting the USB to a USB-to-ttl work ? as the first USB has the MAX232 board in it already.

Ruinned:
Yeah the MAX232 is needed, the signal going back to the car needs to be 12v.

Referencing aforementioned schematic again, the transistor handles the conversion to 12V to the TX line on the Consult. Then similarly on the RX line from the Consult there's a resistor divider to bring the 12V voltage down to 5V. That's why it makes no sense to me to include the MAX232.

...well, technically, the resistors chosen actually bring it down to 6V and slightly different values should be used.

Ruinned:
Would connecting the USB to a USB-to-ttl work ? as the first USB has the MAX232 board in it already.

No, for the same reason that plugging two USB memory sticks into each other doesn't transfer any files.

Chagrin:
Referencing aforementioned schematic again, the transistor handles the conversion to 12V to the TX line on the Consult. Then similarly on the RX line from the Consult there's a resistor divider to bring the 12V voltage down to 5V. That's why it makes no sense to me to include the MAX232.

...well, technically, the resistors chosen actually bring it down to 6V and slightly different values should be used.

I think you need to read the RS232 standard, or at least something written about the standard. You need -12V to create normal RS232 signals, although there is a more modern EIA232 standard which allows only +/-6V and interoperates with legacy RS232 equipment. Generating the negative voltage is the clever part of the MAX232 chip.