I checked all 16 pins with a oscilloscope and found that pin 8 gets +5v when ignition is on in my Mazda. This is even more convenient than analog reading.
Man, if this could post directly to MQTT instead of ESP-NOW, that would be nice. Then I can drive around in my Tesla and essentially get a cheaper and more versatile version of the S3XY buttons. Maybe since it's using an ESP32, it could connect to your phone, and since your phone always has internet, that could be the gateway.
Just make sure it's secure. Leaving your Chinese made, security scarce, WIFI+Bluetooth enabled microcontroller connected directly to CAN network of your car is overall not a great security practice
Very interesting. Subbed to follow what you do next. I've always wanted to do more with the OBDII port but ended up selling my P3 vent gauge because using more than one device was glitchy and I loved my Navdy HUD. Dashcams should have the ability of recording signals and braking etc. Lukas make them but again more than one device and becomes glitchy.
@3:50 - You don't want to say 6mA is what ESP32 consumes during the deep sleep, right? it is 1000 times less, unless your board has tons of other circuits there ;-) You can achieve this i.e. by turning ON/OFF the LDO (that converts 12V to 3.3V) - this LDO will consume around 5-20uA depends on which one you use. Still: hundreds of times less than 6mA in mode: "I am doing nothing" ;-)
Ya, get rid of that ESP32 dev board LDO. It's consuming 99% of that 6ma. Seems like you have a switching regulator on the board you made. Lots of options to think about for quiescent current and fixing it. Good luck!
thanks for the feedback! Oh, the 6mA can totally be lowered, but let's be real, I'd rather focus on making the gadgets than diving into power optimization. I went down that road for another project, and man it was like weeks of dry desert of mathematics, slopes, and datasheets - definitely not the fun kind of adventure. 6mA would drain the battery in 9 months - good enough for now
very cool... i think it would be cool to have an alternative firmware here that publishes directly to your MQTT broker and skips the ESPnow middleware. Thanks for sharing!
Nice projects! I have a question for you. At the point around 6:30 where you talk about using just random numbers for the MESH_ID, since that is hard coded, is there not a way to obtain the VIN number or some other unique ID number from the OBD2 or Tesla ports? I know that the VIN can be obtained as my OBD2 scanner/analyzer is able to pick it up. As VIN numbers are unique, their format also indicates the manufacturer and even the model of the vehicle. i.e. Honda CRV. If you are able to capture the VIN, you could use that instead of a hard-coded number. ????
It is doable but highly dependent on the CAN bus decoding and not all CAN buses have access to the VIN. Since this video, I changed the hard-coded value to use the MAC address of the ESP32 instead.
This is amazing! You are making me get back to the Arduino game! I have been looking for a way to have two OBD2 gadgets (one for diagnostics and the the other for my connected insurance) to the same car!
You gather those codes from the scan… an example would be you have connected ….you operate are the driver side window and view the corresponding action and then replay that action. It would put the window down. You Want to record both actions up and down. Just an example.
I've ordered the Sheild, a couple of the dev kits. Wondering where I get the OBDB plug. I have a 2016 Kia Soul EV (Electric). Because it's an older vehicle it doesn't have the fancy app that newer EVs have. I want to build a monitor that will monitor that battery charging and let me know when the vehicle is fully charged.
I'm not sure if there's a dedicated OBDII adapter for your EV. Try looking on Kia Soul forums for help. You can always connect directly to the CAN bus if you know where it is - just be super careful and check your local laws. Online forums are great for DIY projects like this. Thank you for your order and support!
To build this, do I need to purchase the dev board from Amazon? And if I buy the can shield from your store will it include a wiring diagram? And do the dev board and your can shield go together? I'm an IT guy with some coding experience, so I get some of the stuff you are saying but I want to make sure I am getting it right
Just make sure it's secure. Leaving your Chinese made, security scarce, WIFI+Bluetooth enabled microcontroller connected directly to CAN network of your car is overall not a great security practice
Maybe it would be better to do all decoding of can messages on the gateway. Then send decoded events across to the gadgets. I was thinking of using this for my car. I would decode messages on the gateway and turn them into events I want widgets to respond to. For isntance if i hold my traction control button for 10 seconds I would send a "TRACTION_CONTROL_FULL_DISABLE" event out of the gateway. Any widget would listen to that event and do something like disconnect a relay. Then only the devices attached to the gateway needs to understand CAN. Also I was thinking gadgets could also publish events of their own and be listened to by any other gadget. Like a widget places in my console could be connected to a momentary button that when i press it, it sends an event "LINE_LOCK_ENABLED" which would be listened to by a gadget in my engine bay attached to a solenoid for line lock function.
Picked this up along with the esp32 from you a couple of weeks back. I found a cheap ODB2 cable and spliced that onto the little plug you include with the kit. I copied your simple example from your web site (the one that logs the CAN messages over the serial console). It works but I get an exception every few seconds and the esp32 reboots. Have you had issues like that before? I have never used an esp32 before and am not sure if I set everything up right in the Arduino IDE.
The reboot issue could have a few causes. Could you shoot me an email? It'd be easier to discuss details and help you out. Just reply to the order confirmation email
Got the new generation board a couple weeks ago and assembled it all. Programmed the gateway code from your online programmer and it boots up fine. But no messages being shown in the log interface. I can see CAN transactions with a scope on the bus wires. It’s not a Tesla. Ideas for debugging steps ??
Is there any OBD device directly can connect with a mobile hotspot and internet and i can access the car data anywhere from the world from an app? ... thanks
Hmm if you integrate an attiny into the hw to monitor the voltage you could maybe cut of the power to the esp32 if the car is off and lower the consumption even more as the attiny consumes even less.
HELP PLEASE! Who can help me? Where can I find simple programs, compatible with this board, to experiment with CANbus step by step? Many thanks! (Initialize if necessary, write a simple message, receive a simple message...
So, in case of if we need to detect engine ignition status, we can read the power voltage if it is more than e.g. 13.5 V else ignition is OFF, right ? IS there another way to read the ignition status from the car using OBD PID codes ?
Hi, I have got to of the CAN boards from you. is there any reason it would be bad to have the boards facing each other so the component free backs are facing out instead of the way you show in your other video on were all components are on the outside of the sandwich?
I would start with learning about microcontrollers like ESP32/ESP8266. You can get a dev kit ( like amzn.to/3OITBI7) and play with it! I am sure you will find your way. You are already ahead by knowing js!
hey, nice project I found your code on git, but it would be nice if your shield (gerber files/schematics) is also open source. Do you plan to publish it in the near future?
He is Business man bro.... Any business man does what ever to keep his business in a leadership position across competition. I see professionalism and ethics in the content they publish 🎉
What I would love is a esp32 with lorawan so I could use it to control my HVAC, windows, stop and start car and such. Should have much better range then those off the shelf units. Only issue is making the transmitter small enough for the key chain.
I have your module and could not get it to work, tried it on multiple cars. It simply will not receive any data. I purchased a $10 CAN BUS module from Amazon and connected it to an ESP32 and using ESPNOW, send the data over to M5 Core2 (ESP32 with a battery and display in a nice little package) and now it works great. The great thing about this setup is that the ESP32+CANBUS is powered on when the car is running, and I have the display that shows real-time data, and could log to SD card. I was inspired by your device, but disappointed that it doesn’t work.
Sorry to hear my shield didn't work for you, but happy to see your ESPNow solution. Please reach out by email (reply to the order confirmation) so I can make it right