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

CAN Transceiver MCP2562 8mb/s #408

Open
greenhouse69 opened this issue Jun 28, 2024 · 13 comments
Open

CAN Transceiver MCP2562 8mb/s #408

greenhouse69 opened this issue Jun 28, 2024 · 13 comments

Comments

@greenhouse69
Copy link

I am having problems with my new 8mb/s MCP2562 (MICROCHIP MCP2562FD-E/MF). The problem is that when I connect power from nmea2000 the board does not boot and it is necessary to press the reset of the esp32 to get it to start working. If I connect directly to the usb of the esp32 it works correctly. Originally I used a 1 mb/s MCP2562 and everything worked fine. My question is whether the 8mb/s MCP2562s produce errors or if it could be something else.

Thanks

@ttlappalainen
Copy link
Owner

I have noticed some esp32 versions getting stuck on error. I have auto reset feature for library, but I have not published it.

@jiauka
Copy link

jiauka commented Jun 29, 2024

Do you have the schematic? Could be that CAN bus transceiver is connected to some bootstrap pins.

@greenhouse69
Copy link
Author

greenhouse69 commented Jun 29, 2024

I have noticed some esp32 versions getting stuck on error. I have auto reset feature for library, but I have not published it.

Timo, yes I have been studying the firmware of the esp32 in its different versions (the most modern ones have some boot problems). I have updated the firmware with esptool, and I have tried several esp32 (some new ones and some old ones that worked) but the problem remains.
The automatic reboot option is very interesting for these cases. If you can send me a code example to help me to understand the automatic restart it would be much appreciated.
In my case when I connect it from the mains from N2k it blocks it completely, it doesn't start anything (neither the wifi) until I press the reset, then it works perfect.
Thanks for your help.

@greenhouse69
Copy link
Author

greenhouse69 commented Jun 29, 2024

jiauka

Jiauka, esp32 wroom-32D version, this is the schematic:
mcp2562_1

@greenhouse69
Copy link
Author

Has anyone tried the MCP2562 version H, speed 8mb/s?

@ttlappalainen
Copy link
Owner

I actually meant that CAN controller gets stuck on bus error and needs to reset. If your WiFi does not work, then it sounds strange.

Is your system isolated or should you actually use ISO1050?

@svdrummer
Copy link

svdrummer commented Jun 30, 2024 via email

@ttlappalainen
Copy link
Owner

One can not change CAN controller on ESP32 except by using external one. Did you mean "CAN transceiver"?

@svdrummer
Copy link

svdrummer commented Jun 30, 2024

Apologies, I meant CAN tranciever. Isolated units are the only way to go, if you want to avoid stay current loops. I have seen quite a few laptops blow thier USB ports because they dont use idolated USB interfaces. I just play a numbers game, if I am the only one having an issue, then the issue must be related to my hardware.

@ttlappalainen
Copy link
Owner

?? CAN controller ?? You make isolation by using isolated CAN transceiver. You do not need to change CAN controller!

If one has just N2k->WiFi converter or just e.g., optoisolated digital inputs, one does not need isolation. Anyway as you said it is risky to have device unisolated device connected to USB and N2k bus at same time.

@jiauka
Copy link

jiauka commented Jun 30, 2024

But the MCP2562FD is not isolated... Could you share full schematic?

@greenhouse69
Copy link
Author

My project does not require an isolated tranciever. I only use the usb for test and control of the esp32. The system gets the current from the N2k network (12v) which is converted with a 5v current regulator, type Lm7805, which is connected to the esp32. Sensors do not need to be isolated, gnd is taken from the esp32 board.

@greenhouse69
Copy link
Author

My project works correctly with a 1mb/s MCP2562, I upgraded the board to get different improvements like touch switches, control led and upgraded to a smaller 8mb/s MCP2562 in DFN format with 8 pins + Thermal pad. I think I have connected something wrong on the thermal pad that makes it crash the system.

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

No branches or pull requests

4 participants