![]() By the time the welcome screen has dissapeared, the 1430ms period has elapsed, and the arduino will immediately request engine RPM. If the arduino sees this value, it will not be drawn. I set the default value for temp to be 999. When you turn the device on, there will be no data for temp. The important takeaway is this: the engine temp only updates at roughly ten second intervals. I have found that the CAN bus transciever has a hard time reporting multiple responses when multiple CAN bus frames are recieved at one time. I chose these values so that there is a low chance of two signals being sent within a short time of each other. It will poll for engine temp every 9,930 ms. The device will poll for RPM data every 1,430 ms. Try designing your own for a custom place in your vehicle! Note on Operation It is nicely sloped so that the screen is perfectly angled with my dashboard above the steering wheel. one for the microcontroller and one for the oled. Don't run the wire in front of anything important. Mind knee curtain airbags! Parking brake. Once you hook everything up, run a wire up the steering column (or even thru the dash) for your OLED. Who knows what a current draw would do! Check with oscilliscope to make sure your "12volt source" is a steady DC power supply, not a signal, before you hook arduino power to any other pin besides batt on the OBD port. However, don't just try the multimeter and hook your arduino up to anything with 12 volts! Your vehicle may have a J1699 or other serial bus that uses 12v logic level. Depending on the current draw of the arduino, it may kill your battery in a matter of days or weeks if you let your car sit! You may have a vehicle with an ACC/ignition power pin on the OBD port. You can use the Vbatt on the OBD port, but beware! That is hooked to the battery, so the device will never turn off. I used a fuse tap on the windshield wiper circuit since my prius has many circuits fused in a box right next to OBD port. There are signal gnd and chassis gnd in the obd port by default. Hook the CAN Hi and Lo up to the CAN bus of your car. If it shows up on the scanner, make sure your i2c addres in THIS sketch has been changed to match the address of your oled. OLED not showing up? First upload an I2c scanner sketch. Keep in mind that you must adjust the draw functions for size/position so that the values fit on the screen. To find PIDs for your vehicle, you can visit Excel sheet of codes for Prius and some Subaru (switch to appropriate tab on sheet for your subi/toy) and Wikipedia: general codes for most vehicles. If you're getting wrong/no data, try changing the PID that you are requesting. Look at the #define starting w/ PID to see some various different values that can be requested from the ecu. That is what the Arduino is listening for!Įach PID corresponds to a different measurement. The ecu will then send a return message on the CAN bus with an ID of 0x7eA with your requested PID encoded. See the third byte set to var pid? That's the PID you are asking for. Encoded in that message is your PID that you are requesting.Look at function called requestDataOBD(). ![]() Works like this: Arduino sends out a msg on the CAN bus with a CAN ID of 0x7DF. Buy a premade bluetooth OBD dongle and use that instead. If you don't know what any part of the instructions or code means, it's probably a sign that you should not be messing with your car's electrical system! Don't take this project on. Try this while the vehicle is PARKED FIRST! This project is actually fairly safe if you simply do a little research about what you are doing. Messing around with your vehicle/can bus can cause damage and/or unintentional operation of your vehicle! I am providing this code and instruction to you with no warranty or guarantee. YOU ARE OPENING A SERIOUS CAN OF WORMS HERE. Please visit this project on Instructables for further instructions.ĭesktop utility is available here on GitHub. Currently configured for TOYOTA Prius 2020. It uses the CAN bus interface to send requests to the ECU using OBD protocol. This is the code for an Arduino-powered tachometer/scan gauge. Alex Neiman's Real time diagnostics OBD Scan gauge tool
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |