Snapmaker 2.0 CAN bus communication (to Air Purifier)

Hey everyone,

This is my first post and I am still undecided if I should try to bite off more than I can chew with the following project:

I recently acquired a Snapmaker Air Purifier. I also pre-ordered a snapmaker ray, but am not sure if I’ll still cancel the laser machine due to the newly announced xtool S1. I also have an older, lower power laser engraver/cutter and had to sadly realise the Snapmaker air purifier has no way of control (not even on/off) without a main snapmaker device, effectlively making this device (so far) useless for any machine aside from snapmaker’s. The website of the Snapmaker Air purifier kind of hints at this, but well… Might be a questionable choice to limit what is effectively a glorified fan so much to snapmakers devices, but no point on dwelling on this!

So what would any insane person do? Think about building a controller for the air purifier so it can be used for a variety of use cases :slight_smile:
Therefore, I have spent the past few days reading up about all the great minds in this forum that have attempted to build custom add-ons and modules that can communicate with the snapmaker eco-system:
@Streupfeffer’s Poking around in CAN Bus
@Streupfeffer’s Custom Extension Module
@Ronin’s DIY enclosure controller - prototype on Arduino
@mpi’s DIY Emergency Stop Button
@brvdboss’s 3D touch probe connected to can bus
and many more…
Thanks to all for the inspiring threads, posts, and updates without which I would have never considered starting this project!

While I could just use the brute force method and bypass the air purifiers electronics and use pwm to control the fan with an arduino, I would prefer a controller (possibly esp32 based) that communicates over CAN (the 4 Pin CAN Bus the add-ons use) and can also read out filter status (possibly connected to the smart home and/or with a small display). An added bonus to the non-invasive mode would be the cool looking front lights of the device would remain and the device would be untouched (warranty and all).

Sadly, my coding skills are quite a bit more limited than my hands on crafting skills, while I have been successfully tinkering with small projects with arduino and esp for a few years. This is my first delve into CAN. I am confident that I would achieve the ESP/Arduino implementation if or when the CAN messages are known to me.

I was quite excited when I came accross @Ronin’s P.S. in the following post: DIY enclosure controller - prototype on Arduino - #6 by Ronin. Sadly, I have so far not found the hinted at article/tutorial about the snapmaker CAN codes and therefore suspect that it is still unposted at 80% finished :confused:

Anyways, I have purchased a USB CAN Bus adapter (USBtin) to try to communicate with the machine. One thing to note: It appears as if @Streupfeffer’s pin-schematic here wrongly refers to the 24V pin as longer. In accordance to @Ronin’s Image in this post, my longer pin in the add-on cable is directly connected to Gnd. When connecting up the USBtin, however, I do not get any messages from the air purifier. Most likely, it is just waiting for the controller to initiate communication?

I have tried to understand the Snapmaker controller github code (yay - open source ^^). However, that’s where my limited coding experience restircts my understanding… The Snapmaker-Controller/snapmaker/src/module/module_base.h shows a ModuleDeviceID (MODULE_DEVICE_ID_PURIFIER) of 7 and ModuleFonctionIDs of 23 for MODULE_FUNC_SET_PURIFIER and 24 for MODULE_FUNC_REPORT_PURIFIER for the air purifier. Sadly, this does not yet get me the CAN messages or even message IDs.

Therefore, my questions to all the great minds of this forum:

  1. What is the baud rate of the snapmaker 4Pin CAN Bus? Are the 500Kbps in @Streupfeffer’s screenshot of this post correct?
  2. Can anyone tell me the CAN ID of the Snapmaker Air Purifier?
  3. Does someone know the kind of message data/length the module expects for an initial handshake/requesting data/setting fan speeds? Possibly even the full message structures of the communication?

Sadly, I cannot do a full network sniff, as I do not have a Snapmaker main machine and am not even sure anymore if I want one :upside_down_face:

Anywho, thanks to everyone for reading so far and I would greatly appreciate any support during this project - I fear the project won’t be able to come to life without a little help… :pray: Thanks in advance! :smiling_face_with_three_hearts:

Cheers and best regards from Germany,
Nils

1 Like

We’ve been asking for snapmaker to release communication spec and add a range of custom g-code commands, that would generate CAN commands to be able to communicate with DIY accessories, like time-lapse triggers and enclosure accessories. But nothing so far.
You did a lot of work by going through the posts. It’s amazing :slight_smile:
Many tried and gave up due to limited documentation and time resources.

did you try to ask snapmaker support? They could help…

Hey,

Thanks for the quick reply.

Yes, I tried contacting Snapmaker at the same time and just heard back from them:

Hi,

Thanks for reaching out to Snapmaker. I am sorry that you encountered such a problem.

The CAN message of the purifier is more complicated to interpret. This is relatively low-level R&D information. There is not much information available for technical support. You can directly refer to the code information on Github.

If you just want the purifier to work, you can only purchase a main control + power supply for the smallest system, and use a computer to send instructions to control it. The cost is expected to be around US$200, so you can also consider this.

Please feel free to contact us if there are further questions.

Have a nice day.

I could definitely consider this, although I am not sure if the CAN messages are as complicated to interpret, as advertised… Or if the 200$ are worth it for a CAN interface…

Well, maybe someone of “the many that tried and gave up to limited documentation and time resources” (as you correctly stated) still finds time to comment their two cents to my problem :slight_smile:

Cheers, Nils

1 Like

Sounds like tech support doesn’t have access to this information. It might be considered a trade secret by snapmaker, maybe that’s why we didn’t here anything coming through.
I’m sure more tickets they get about it - more attention it will receive internally.
:crossed_fingers:somebody from forum members will reply

1 Like

Yep. You’re probably right ^^ :crossed_fingers: