Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jeby mazdamx5nc #1

Open
wants to merge 29 commits into
base: master
Choose a base branch
from
Open

Jeby mazdamx5nc #1

wants to merge 29 commits into from

Conversation

jeby
Copy link

@jeby jeby commented Mar 10, 2021

@timurrrr this is my first pull request ever :D I'm a git-hub n00b so maybe I'm doing something wrong :)
I've created the mazda_mx5_nc.md as discussed over the RaceChrono.
I've also added a sort of reverse engineering how to that might help others in finding can id codes for their cars. I've a 2016 Golf so I think I'll start digging in that one once I finish with the NC. Please bear in mind English is not my mother tongue (I'm Italian) so there may be some odd sentence constructions...

Of course the min Read Me and RaceChronoDiyBleDevice.ino were edited to reflect the differences on the two devices assembly and destinations. I'm going to investigate if I really need the 120 ohm terminator on the device when connected to the OBD port. I'm not familiar with my car diagram but if it is somewhat similar to industrial CAN-Bus the terminator is already on the car. By the way, the system is working with or without the terminator jumper.

I've also digged a bit on ND CAN-Bus. I found something interesting on miata.net forum: it is partial and possibly only for ND and not for ND2, I'm going to write to the author, maybe he is interested in extending the database collection.

Finally, do you think it is possible to drop the filtering at MCP2515 level? I'm also going to try faster rates for more IDs (steering and accelerator) and see what is happening.

Thank you,
Sebastian

@timurrrr
Copy link
Owner

Thanks a lot for working on this.
I'm also a GitHub n00b, but let's figure it out :)

Here are some ideas:

  1. The can_db/mazda_mx5_nc.md file is great as is!
    If you're ok with that, I can just pull that one file and check it in mentioning you in the commit description — just to simplify things.

  2. The can_db/reverse_engineering_how_to.md should be a very useful resource!
    It does however reference a bunch of JPGs that are pretty large.
    See the existing files in /images — they are 150k–250k each.
    A possible solution here is that you can create your own GitHub project with just that doc and images, and I'll be happy to reference it — instead of making it part of this project.
    I think this option makes sense, as many users of the main project will not necessarily have the necessity to reverse-engineer their car's protocol (hopefully the PIDs for their car will already be documented! :))

  3. We'll need to figure out how to merge changes to README.
    It looks like you've changed the README to be along the lines of "hey there's this project for FT86, and this is a fork for NC Miata". If I merge this now, my project will "become" an NC Miata project.
    So there's some work needed here.
    Assuming more cars will be added in the future (e.g. I'm thinking about adding ND2 Miata), I'd prefer the README to be less detailed, and more car-agnostic; and put the details on car-specific pages.

  4. re: CAN filtering — it might not be needed anymore, but before Reduce the number of bytes over SPI for MCP2515Class::parsePacket() by up to 2.8x sandeepmistry/arduino-CAN#46 and some fixes to my hardware layout this was necessary to improve stability.
    We do need to do filtering at some point, as the Bluetooth transmit rate is not sufficient to send everything we get from CAN.

@jeby
Copy link
Author

jeby commented Mar 11, 2021

Hi Timurr,

  1. Yes go ahead. I know there is some minor changes to do to equations, but I'll have the opportunity to do that later in the year... here in Italy we still have periodic lock downs, I don't know when I'll be able to hit the race track.

  2. Done that https://github.com/jeby/CANBUS_RevEng with smaller pics :) also smaller in the RaceChronoBLE repository, but I agree, let's keep things simple

  3. Yes, as said, git-hub n00b here, I didn't think about merging! Actually the real changes in the read me are related to the alternative building with OBD port and 12v-5v step down for powering the device via OBD. I used a white breadboard to make clear it was an alternative. I agree the read me shall be car agnostic. If you agree I'll edit my version of the Read Me as soon as possible to reflect this philosophy, and then we'll check again!
    3b. Then this issue will be also in the RaceChronoDiyBleDevice.ino, if you merge then it will work for MX5 NC only. I still have to catch up with C++ coding (it seems I'm a n00b of everything related to this project... well, yes, I am!) but do you think it will be possible to have the car selectable? Like storing IDs and update rates divider in a support file that the user will edit? Oooor... I just rename RaceChronoDiyBleDevice.ino to RaceChronoDiyBleDevice_MazdMX5NC.ino 😄

  4. I understand that filtering has to be done, but when you do it at MCP2515 level I understand you can filter up to 6 IDs, while maybe one may want to receive 7 or 8, with the additional 2 being refreshed only 1 or 2 time per second. That one is me 😄 I understand that AOL is filtering at Arduino level, but I didn't his code yet.

@timurrrr
Copy link
Owner

Committed 6d400b9, please rebase before uploading a new version.
Also would appreciate if you squash your local commits into one.

Thanks for your help!

@jeby
Copy link
Author

jeby commented Mar 19, 2021 via email

@jeby
Copy link
Author

jeby commented Mar 19, 2021 via email

@timurrrr
Copy link
Owner

Filed issue #4 to refactor the code before we can customize the code for more than one car

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants