Comunicación OBD2 Serial

Buenas noches, me encargaron un pequeño proyecto en el que debo crear una aplicación que sea capaz de extraer los datos de la computadora (ECU) del vehículo tales como la velocidad, las RPM y también pueda apagar la luz que indica el mal funcionamiento del motor con la interface ELM327, pero debo hacerlo mediante una comunicación serial, es decir, Teléfono (MIT App Inventor 2) -- cable USB -- Interfase ELM327 (esta interface adquirida en una tienda en internet ya viene con el cable USB). Aún no estoy seguro de los bloque componentes que debo usar o como iniciarlos y es por eso que acudo a ustedes. Tal vez ustedes conozcan de algún archivo que puedan facilitarme para poder guiarme de él o cómo podría hacer para comunicarme con la apicación creada e instalada en mi celular con el Hyperterminal de mi computadora (PC), es decir, Teléfono (MIT App Inventor) -- Cable USB -- Computadora (Hyperterminal) de tal manera de poder visualizar lo que estoy enviando en el Hyperterminal o emulador, de este modo no estaría tan preocupado por introducir un código erroneo a la ECU y dañarla.
Muchas Gracias por su atención.

You might start here> OBDII CANBUS interface

or one of these Search results for 'obde' - MIT App Inventor Community

2 Likes

Hola @Ivan_C,
as per @SteveJG (:+1:) hint, you can take a sight to my app that interfaces an ELM327 (inside a low cost OBD-BT device).
In my app I set a fixed CAN diagnostic protocol, so to speed up the boot. As a matter of fact this enables the OBD device to link the ECU immediately, even before the engine starts. Of course the +15V must be already on (+15v = Key_On). In order to avoid that the OBD-BT device could sink endlessly current from the battery, I've put the power supply of the OBD-BT device under a relay, instead of powering it directly by +CAN. This leads to the need to open the device , de-solder the pin 16 (the power) and connect it to the relay.that is powered by the +15v.
Please be aware that in my app I don't erase DTC's (my app just shows Engine Control Unit data) by using UDS commands. So I don't switch off the Engine failure light; anyway you can do it on your own, once learned how to communicate with the ECU. Provided that the service is available on the vehicle's protocol. To allow you to check the services (PID's) I attach for your perusal the PID's of UDS diagnostic protocol.
I wish you success. :muscle:
Cheers, Ugo.
OBD_PIDs.pdf (723.5 KB)