Custom Extension Module

Rev 2 of the Extention arrived today, no parts though so im limited, but i can solderup the temperaturesensor board and then see how to cablerun them already over to it.
The line of PTHs at the bottom is suposed to be a breakaway edge, looking at it in person, a file and some well placed force should allow it to be actually broken away.

This looks great! I’d love to see the community figuring out new/improved modules and I’m very interested in following your journey. I hope the upcoming stages go well!

I got most parts of the new board already, tried to salvage a couple of the parts form the old PCB, much work, sofar not much return. Might do some soldering on the weekend if if i get the time.

Some soldering later and the whole thing works as it should (sofar).
The Board with the Terminals and the D-Sub is for hookup to the NTC Thermal probes, stuck into screwholes as close as possible to the Motor (They will be inacurate because they dont touch the Heatspots directly, sofar they are just there, no implementation).

The Mainboard has the same general layout Teensy in teh middle, rotary and push buttons on the right, SN2 Connection at the top, More Extensionboards on the Bottom.

The Cables for the Termistors are run sorta freestyle. Ive tried to keep it okey looking. The spacer, Cable guides and the Thermistor holders are orange because thats what my SN1 had mounted and i think it looks good on it.

Powerup with 24V works from my Powersupply
Buzzer is annyoing as it should be (up to 15kHz to my surprise for a 4kHz Piezo buzzer)
Buttons work
Rotaryencoder is counting (for what ever reason every notch gives me 4 Pulses but deviding worked sofar)
Temperatures can be read
Canbus not yet tested

Now im working on the OLED screen to see if i can get a somewhat usefull Menu scructire going, Im open for Suggestions what to include there.

Thermistor Board with mounting bracket

Finished wiring of the Board, Toolhead cable fits neatly thoguth it (didnt plant for that)

Mainboard unsolderd, With the NTC Board still attached

Finished Soldering and all Chips on it (before first power up)

Cablerun on the Controller Z-Axis, Added a USB extension for easier access from the Top with all the Cables Passing by on the bottom side of the Controller.

Its been ages since an update, stuff got in the way. Thought recently to work on this Project some more.
Sofar, Buzzer and RGB LEDs “work”,
OLED isnt used to the extent i would like.
Casualty list:
2 Teensy 4.0
8 CAN Transceivers
2 DCDC Converters

Eyecandy:

The Lights are controlled over CANbus via custom M-Function in GCode.
CANbus is sorta saturated so commands arent executed and sent imidietly. Therefor, without actifly asking the CAN device whats up, Security relevant features could be added with lower IDs but turning an LED On/OFF isnt a safetly thing (currently). IO is also an option for my board, havent found a use yet.

May be working on and off at the Project.

What’s saturating the bus?

I think the Teensy has issues handling the two CANbus’. Im currently hookedup to the right Connector for extensions. The teeny is forwarding messages from one to the other with minimal filtering (currently just ID21 for limitswitches). After a while, i can disconnectt the Snapmaker, the Backlog of Messages keeps going for a while. The Loop doesnt have wait statements in it so i dont realy know why its having issues. sofar the Teensy is more or less Idling, the OLED screen function is comented out, ADC is not used either currently.
The snapmaker is sending one or two messages every 500ms

Edits:
Started to do some “profiling” (Comenting out code and see what happens), the OLED screen is still drawn but currently not connected. Turnign it off yields a code run from 150Hz to 1.6Mhz :thinking:
Looks like drawing the screen over i2C is EXPENSIVE, so an update every 1-2s has to be enough, or not udpate at all until something displayed changes (aka turnign of the screen after a shortime out of the menu.

Got the Buzzer working, it can now even be configured for volume and off-time (between beeps) via CAN.
RGB LEDs have now the issues that they dont update imidiatly (No safety stuff so not critical). I think the many timechecks are messing with the time keeping for Data sending.

Just stumbled across this project - good work, thanks so much for sharing!

Hi guys,
I am new to this forum. I just found this post and am impressed with the great work done by Streupfeffer. :+1:

I’m also trying to do something similar - but so far it’s only an Arduino based prototype.

@Streupfeffer : I am very curious about the final of your project? What else are you planning to do?

The PCB is just laiyng around currently, i had to ordner new CAN Tranceivers after ive killed all i had around.
I have started to look into making a small IO expander board for CANbus, parts are laying around on my workbench currently. Work is slowly progressing but it isnt a priority.
The IO expander is built on a ATTiny1624 with MCP2515 Module and a MCP23017 i2c IO expander.
I chose the Teensy becuase it had multible CAN interfaces baked in so it can be used as a Bridge if multible Networks are to be hooked up to it.

Hehe, ATTiny now is reacting to Canbus. No Transceivers or other chips died, sofar.

Left is again the SN<->Teensy interface board, Top left is the usual can Analyser, top right are Atmel ICE and Digital Discovery for CAN, SPI and UART decoding/ monitoring as the Tiny doesnt have a serial to USB port to monitor directly.

The small green thing on the Top of the breadboard is the mentioned ATTiny1624 on a Breakoutboard, below is the MCP23017 IOExpander, under the wiring is a CAN transceiver for the Monitoring, the Wiring knot is SPI and CAN “distribution” and another spare Transceiver i didnt use at the end. Below the Breadboard is a MSP2515 CAN Transceiver board.

Testing on something “usefull”
Red LED towards the top left is controlled over CANbus. sofar just what LED and what RGB values each LED on the strip has, no further code sofar.

The whole thing is though to be a “clip on” to be controlled by other modules aswell. Dont know yet what else functions to give it or to add to the network. As i dont realy like to need to configure multible boards in advance, maybe a EEPROM for Storage of settings might be an option even Serialnumber plus a couple bits of storage.

I realy like @Ronin Board aswell. Looks sleek and optimised for its usecase. :heart:

Thanks. PCBs are on the way - should be delivered in about 10 days. Well, we’ll see …
maybe there are some bugs in the pcb design :rofl: and i will have to make some corrections.

But back to your module - as you probably know, the Snapmaker controller has 2 independent CAN buses. The ID messages sent between the controller and linear modules, tool heads, etc. (8 pin cable) are not available on the CAN bus Add-on3 socket (4-pin cable) and vice versa.
Your module will be connected to which CAN bus? :thinking: Maybe both?

My Interface board only reads one of them. currentlyits hooked up to the Module bus on “Addon 2”. I do have both connectors with a DB9 connector. Ive planned to be able to show Stats like Bed and Nozzle Temp on a OLED, If the toolhead is active or not. Laser is controlled over a direct pin so less of an option but turn on warning light at job start and turn off at job end, CNC si reportign its RPM over can and CAN be turned off an on over CAN as well.
The extensionmodule is sortoff to have a IO expansion for other stuff like having mood lighting in the room and have a room environment controller with temp and particulate sensors. As i dont need/want the SN to be turnedon just to have some lights and sensors running, the Interface board has two seperate Interfaces in use. the Teensy 4 has an additional CAN peripheral available but i dotn want to solder to the bottom of it for ease of removal.
I do already have some custom code on the cotnroller to have an additional M command to let gCode send out CAnbus messages.which is shown here. The Interface board has sofar only one filter for Extensions → Snapmaker interface to prevent an accidental ID21 message which woudl be a Endstop trigger. From what ive seen though the Endstops are ignored once homed as the SN never lets the Code or the user get to close to them. (smart choice btw).
From your Demo video, im surprised the SN doesnt lockup when you take out the Emergancy stop. ususally when you takeout a Module the controler crashes. Also if i would lose coms to a “Safety” module as an Estop, Machine lockup and react the same as if it was pressed. You dont know if the cable was just snapped by a bad movement. Thats why Estops are usually hookedup as live connections/ Normaly Closed to detect a trigger or a faulty connection.

I fully agree - I think so too. :ok_hand:
Unfortunately, this is how it was programmed by Snapmaker developers. You’ve probably checked the programs shared on GitHub.

The original emergency button (other modules also) does not send message cyclically. They are also not periodically polled by the controller. Devices only send a specific ID message when some state or status changes.
:thinking: I think that is why in the original button the CAN connection error is so clearly signaled (red blinks alternately with green) to alert the user that the button is not ready.

There are several posts in this forum about what should be changed in the operation of emergency button.

In case of emergency button activation - the controller send CAN (remote request) message ID 0x02.

You can also use the code : M1010 Sx Px ( values P: 101-255 are unused ) Then it would be compatible with the snapmaker controller - no need to modify its code.

I see, that you have everything well under control :+1: Let me know if you need any help.

I though ive seen somewhere that the Cotnroller polls the Button regularly, not sure anymore.
Yeah, users want the Extop button to be mroe like a “Please wait a second let me check what you just did” Button. But im full yiwht the other machinists/ Engineers, Estop is a SAFETY meassure not a “Please dont do that” Meassure.
I did start a list somewhere what ID was corespondign to what but didnt use it in ages as im not activly workgin on the SN/ the extension, the setup with the Tiny is sort of for a trainset i want to have a CANbus inside for controlle.

After reading here on the forums and admitting that i did bite off more then i could chew with my limited knowledge, ive made a smaller IO board with the ATTiny mentioned before. (Memory should be enough, CANbus and ARGB are working, didnt test with a buzzer yet but i think it should wokr out aslong as your not expecint it to do a huge variatey of things.


Suggestions or Things i did wrong are welcomed. This one shoudl also be cheaper if i blow stuff up :smiley:
The MCP2515 Board of Ebay is on the back to give me more space on the Front side.

Cool design. :ok_hand:

If the CAN module will be on the bottom of your PCB as you write, you need to solder all the pin strip in this module :thinking:
Then pin strips should be the opposite of now, i.e. from the bottom of the MCP2515 board. See :

If you mount it from the top of the PCB, you will have a conflict with the J5 (UART) connector.
Think about it - maybe it’s better to move the J5 connector from the bottom?

If the MCP2515 module will be mount from the top, the whole PCB will be easier to mount in some housing - the bottom will be flat. This, of course, is just my opinion.

Just out of curiosity - where do you order PCBs and how long do you have to wait for the shipment?

The Module will need to be changed for the heading of the Pinstrips, i needed it on the backside to have the space on the front. You can leave the screwterminals on but the other two strips have to be resolderd to the back of the module (Bustermination inst used as the SN handles that)
I could look into changing that though so you solder it straight into it but i like access to the ICs

Ive looked into ordering the PCBs from a “local” supplier but they have a minmal size they make for a single board (didnt ask for “rideshare”) and im assuming that they will be quite expensive.

So im using JLCPCB, was happy sofar with the big extension board. Price (as its quite a small board) will be 2$ (no idea how they can do it this cheap) with 16$ for shipping.