Welcome! Log In Create A New Profile

Advanced

Robin Nano v3.1 + 3Dtouch + SmartFilamentSensor, USB connection

Posted by cysign 
Robin Nano v3.1 + 3Dtouch + SmartFilamentSensor, USB connection
January 19, 2024 07:19PM
Since I use my Anet A8 Plus (upgraded with Robin Nano v3.1 + TMC2209 + Wifi + TS35 v2 Touchscreen) a lot, I'd like to upgrade it using

  1. 3Dtouch
  2. Bigtreetech Smart Filament Sensor V2.0
  3. USB connection

1. The 3D touch is already mounted, but not connected, since I wasn't shure if I'd need a voltage devider. Not as I'm sure I need to add one, it's time to get into it.
I'd also like to keep the z-endstop for safety reasons (probably one day I'll start a print and the 3Dtouch won't work properly...so I'd like the printer so stop moving z-axis 1mm below bed, to prevent it from bigger damage).
So how would I need to connect the 3Dtouch and what would I have to setup in the firmware?

2. Also I'd like to use a Smart Filament Sensor.
Looks like it can be powered by 3.3V as well as 5V. Since the Robin nano v3.1 uses a STm32, I'll need to go for the 3.3V.
But how should I connect it to the board and what do I need to config in the firmware?

3. When I connect the Robin Nano v3.1 using a USB cable, it won't respond to any serial commands.
I think this depends on the config, since there seems to be some hassle with the comports.
I'm using the wifi module - so would I be able to connect it via USB anyway?
I'd like to read the config - just for backup reason. Also I might need to access the comport via USB one day - not yet important, but worth some work.
For the moment I connect Cura with Robin using the MKS wifi plugin. It works somehow...but it also has some bugs.
Once a print is finished, I need to restart Cura as well as the printer, to get another printjob started. Also uploading large files using wifi takes some time (about 100kb/s) - maybe using USB it would be faster.
So any chance I could use USB along wifi?
Re: Robin Nano v3.1 + 3Dtouch + SmartFilamentSensor, USB connection
January 20, 2024 05:47PM
3) Its a serial port, -1

In Configuration.h you have to have
one of these SERIAL_PORT , SERIAL_PORT_2 or SERIAL_PORT_3 set to -1
Re: Robin Nano v3.1 + 3Dtouch + SmartFilamentSensor, USB connection
January 28, 2024 10:56AM
There's one port set to -1, but I didn't have success.
Probably this one is used by the wifi module?

I'd rather like to access config commands and settings by ssh, since my printer now moved 4m far away from my computer. So if possible, I'd prefer ssh or something like this using wifi.




// @section machine

/**
 * Select the serial port on the board to use for communication with the host.
 * This allows the connection of wireless adapters (for instance) to non-default port pins.
 * Serial port -1 is the USB emulated serial port, if available.
 * Note: The first serial port (-1 or 0) will always be used by the Arduino bootloader.
 *
 * :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
 */
#define SERIAL_PORT -1

/**
 * Serial Port Baud Rate
 * This is the default communication speed for all serial ports.
 * Set the baud rate defaults for additional serial ports below.
 *
 * 250000 works in most cases, but you might try a lower speed if
 * you commonly experience drop-outs during host printing.
 * You may try up to 1000000 to speed up SD file transfer.
 *
 * :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000]
 */
#define BAUDRATE 115200
//#define BAUD_RATE_GCODE     // Enable G-code M575 to set the baud rate

/**
 * Select a secondary serial port on the board to use for communication with the host.
 * Currently Ethernet (-2) is only supported on Teensy 4.1 boards.
 * :[-2, -1, 0, 1, 2, 3, 4, 5, 6, 7]
 */
//#define SERIAL_PORT_2 1
//#define BAUDRATE_2 250000   // Enable to override BAUDRATE

/**
 * Select a third serial port on the board to use for communication with the host.
 * Currently only supported for AVR, DUE, LPC1768/9 and STM32/STM32F1
 * :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
 */
//#define SERIAL_PORT_3 1
//#define BAUDRATE_3 250000   // Enable to override BAUDRATE

// Enable the Bluetooth serial interface on AT90USB devices
//#define BLUETOOTH

// Choose the name from boards.h that matches your setup
#ifndef MOTHERBOARD
  #define MOTHERBOARD BOARD_MKS_ROBIN_NANO_V3
#endif

Re: Robin Nano v3.1 + 3Dtouch + SmartFilamentSensor, USB connection
January 28, 2024 11:19AM
Also uncommenting the other serial ports leads to other issues (screenshots attached).
Attachments:
open | download - Serial_2_before_3.jpg (103.2 KB)
open | download - Serial_2_issue.jpg (112 KB)
Re: Robin Nano v3.1 + 3Dtouch + SmartFilamentSensor, USB connection
November 16, 2024 01:40PM
Winter is coming...
...so is time to work on the machine, again winking smiley

Attached you'll find an overview of all the infos I found for connecting the 3D Touch.
But I couldn'd find a clear pinout - so I also attached an image of my sensor to identify it.

I'd need to start with the 3D touch, since I have issues with PLA warping in the middle of the bed.

So what might be my sensor's pinout?
white: ???
black: ???
yellow: ???
red: ???
blue: ???

Once I know the pinout, I'm going to solder a voltage devider to it's output.

No clue what the R85 (100 Ohm) on the BLtouch input (??) is good for, so I'm going to add a 3.3V voltage devider to the output (and just ignore R85). Or is thie the control pin for the touch sensor? So z-max will be the 3DTouch input?

Edited 2 time(s). Last edit at 11/16/2024 02:00PM by cysign.
Re: Robin Nano v3.1 + 3Dtouch + SmartFilamentSensor, USB connection
November 16, 2024 02:06PM
Also added the schematics part for z_max. See attachment smiling smiley
Re: Robin Nano v3.1 + 3Dtouch + SmartFilamentSensor, USB connection
November 16, 2024 02:23PM
Oh, stupid me. Just disconnected the cable to measure if I can find out the pinout...and there it is printed on the PCB:

white: Z
black: G
yellow: S
red: 5V
blue: G

Attached an updated picture overview_03.jpg where you can see the pinout.

//Edit: Updated the overview image to v4 - added the exact pinout for Robin Nano v3.1 - so I can see where ground and 5V is.

//Edit 2: R34 and R36 (both connected to Z+) are 4k7 and 1k. I assume 1k is connected to MC whilst 4k7 should be the pullup (but not sure yet - there are no values in the schematics of the board...).

Edited 3 time(s). Last edit at 11/16/2024 03:18PM by cysign.
Attachments:
open | download - Overview_v04.jpg (2.1 MB)
Re: Robin Nano v3.1 + 3Dtouch + SmartFilamentSensor, USB connection
November 16, 2024 03:35PM
Just measured PC4 to MCU and to 3.3V. Both seem to have 4k7. So I'm not sure why is there an 1K resistor close to Z+ connector.
Re: Robin Nano v3.1 + 3Dtouch + SmartFilamentSensor, USB connection
November 16, 2024 03:55PM
Ok, just needed to connect the 3D Touch to the pins without adding any resistor.
When I turn on my printer, BL touch probes two times and the red and blue LEDs do work. Looks like I didn't damage anything - so it's time to connect the SFS v2.0 now, before I go on with the firmware.

Edited 1 time(s). Last edit at 11/16/2024 04:09PM by cysign.
Re: Robin Nano v3.1 + 3Dtouch + SmartFilamentSensor, USB connection
November 16, 2024 07:43PM
BTT SKS v2 also connected to my machine properly.
Since I prepared the hardware, I'd now like to start with the software.

Which branch/release should I use?
Just downloaded Marlin 2.1.2.4 but couldn't find any config_adv.h for MKS Robin Nano v3...

Or should I better use Marlin 2.1.x pached source?
Re: Robin Nano v3.1 + 3Dtouch + SmartFilamentSensor, USB connection
November 19, 2024 07:52PM
Since the MKS fork of marlin is 2 years old (https://github.com/makerbase-mks/Mks-Robin-Nano-Marlin2.0-Firmware) and I'd like to try out input shaping, I wonder which version of marlin would be best for now (and available - I'm not sure is Robin Nano v3.1 is fully merges within the Marlin code?).

Edited 1 time(s). Last edit at 11/19/2024 07:52PM by cysign.
Re: Robin Nano v3.1 + 3Dtouch + SmartFilamentSensor, USB connection
November 21, 2024 10:13PM
Currently I'm trying to get Marlin 2.1.2.5 (Nov 18, 24) up and running.

When I first extracted the folder, the config was set to ramps. Compiling worked fine.
Then I replaced:

#define MOTHERBOARD BOARD_MKS_ROBIN_NANO_V3_1

#define MKS_TS35_V2_0

//#define TFT_GENERIC

That's the only changed I did for testing.


// Edit: Also I wonder why there are 3 compile options. nothing, with usb flash drive, usb flashdrive and msc

Edited 1 time(s). Last edit at 11/21/2024 10:14PM by cysign.
Attachments:
open | download - compile error.jpg (470.2 KB)
open | download - marlin_config.zip (90.2 KB)
Re: Robin Nano v3.1 + 3Dtouch + SmartFilamentSensor, USB connection
November 21, 2024 11:01PM
Just downloaded and tested Marlin-2.1.x patched version. It shows the exact same behavior.
Re: Robin Nano v3.1 + 3Dtouch + SmartFilamentSensor, USB connection
November 22, 2024 01:23AM
You have added #define ONBOARD_SDIO to the Configuration.h

The BOARD_MKS_ROBIN_NANO_V3_1 does not have the SDIO feature.

This is the robin onboard sdcard circuit diagram from [github.com]



And this is from a btt octopus that does have SDIO from [github.com]



Note how the btt octopus has Data0,Data1,Data2 and Data3 This allows for 4 bit data transfers ie SDIO while the Robin only has a single data bit, so it is only standard SPI

Your need to remove "#define ONBOARD_SDIO" from your configuration file.

Edited 7 time(s). Last edit at 11/22/2024 01:45AM by Dust.
Re: Robin Nano v3.1 + 3Dtouch + SmartFilamentSensor, USB connection
November 22, 2024 07:54PM
Thanks, now compiling works.
But I do use a micro-sd card on the printer. Will this still work?

//edit: Is this also the reason the sd card is so slow when transferring my gcode using wifi?

Edited 1 time(s). Last edit at 11/22/2024 07:55PM by cysign.
Re: Robin Nano v3.1 + 3Dtouch + SmartFilamentSensor, USB connection
November 22, 2024 10:20PM
The original MKS Marlin 2.0 firmware (https://github.com/makerbase-mks/Mks-Robin-Nano-Marlin2.0-Firmware) mentions:
Quote
Update firmware: Enter the .pio\\build\\mks_robin_nano35 directory, copy the assets folder and Robin_nano_v3.bin to the sd card or usb disk

But there is no assets folder for the current Marlin version.
What's the assets folder good for? Do I really need it?

//Edit: Flashing works fine. But looks like I deactivated the finger-friendly UI on the touchscreen - or at least I have a terrible offset. The casual Marlin-UI isn't easy to use on the touchscreen...I really liked the MKS look (see screenshot on the link above).

And is there a method to test the runout sensor? It's enablet in the menu, but I'm not sure yet if I swapped the pins, since it has filament movement and runout. I'd like to test both.

Edited 5 time(s). Last edit at 11/22/2024 10:43PM by cysign.
Re: Robin Nano v3.1 + 3Dtouch + SmartFilamentSensor, USB connection
November 22, 2024 10:42PM
the MKS_TS35_V2_0 screen is driven by marlin firmware, there are 3 user interface options

* TFT_CLASSIC_UI - Emulated DOGM - 128x64 Upscaled
* TFT_COLOR_UI - Marlin Default Menus, Touch Friendly, using full TFT capabilities
* TFT_LVGL_UI - A Modern UI using LVGL

only TFT_LVGL_UI uses has assets to be copied to the sdcard

You selected TFT_COLOR_UI in the provided Configuration.h so no assets folder.

The assets are all the elements of the TFT_LVGL_UI user interface, bootscreens, fonts and the icons. These are copied from the sdcard to the motherboard spi flash chip.
Once in the flash chip they are used by the display.
Without them you get a mostly blank display!

Edited 2 time(s). Last edit at 11/22/2024 10:46PM by Dust.
Re: Robin Nano v3.1 + 3Dtouch + SmartFilamentSensor, USB connection
November 22, 2024 10:49PM
"But I do use a micro-sd card on the printer. Will this still work?"
Yes it works fine, you just tried to tell marlin you have the deluxe hyper speed sdcard when you only have the standard slower one.

Edited 1 time(s). Last edit at 11/22/2024 10:51PM by Dust.
Re: Robin Nano v3.1 + 3Dtouch + SmartFilamentSensor, USB connection
November 22, 2024 10:53PM
Thanks!
But looks like I couldn't compile for LVGL UI, since I needed to activate advanced_pause_feature.

Here's the instruction for the SFS v2.0:
https://github.com/bigtreetech/smart-filament-detection-module:

Quote
The filament sensor feature of Marlin also needs to enable #define NOZZLE_PARK_FEATURE and #define ADVANCED_PAUSE_FEATURE. please uncomment #define NOZZLE_PARK_FEATURE and #define ADVANCED_PAUSE_FEATURE and set specific parameters according to your printer.

which leads to:
Quote
PS C:\SyncFolder\Code\3D Drucker\Marlin 20241120\Marlin-2.1.2.5> platformio run --silent -e mks_robin_nano_v3_1 In file included from Marlin\src\HAL\STM32\../../inc/MarlinConfig.h:52, from Marlin\src\HAL\STM32\Servo.cpp:26: Marlin\src\HAL\STM32\../../inc/SanityCheck.h:554:6: error: #error "ADVANCED_PAUSE_FEATURE requires a supported LCD controller (or EMERGENCY_PARSER)." 554 | #error "ADVANCED_PAUSE_FEATURE requires a supported LCD controller (or EMERGENCY_PARSER)."
Attachments:
open | download - Marlin_advanced_pause_feature.zip (90.3 KB)
Re: Robin Nano v3.1 + 3Dtouch + SmartFilamentSensor, USB connection
November 23, 2024 07:08PM
Just tried

Quote
#define EMERGENCY_PARSER

Attached a screenshot of the compiling result.


//Edit: After disabling Serial 2, I got another bunch of output messages...screenshot attached.

Edited 1 time(s). Last edit at 11/23/2024 07:13PM by cysign.
Attachments:
open | download - Emergency parser.jpg (365.3 KB)
open | download - deactiveted serial 2.jpg (306.5 KB)
Re: Robin Nano v3.1 + 3Dtouch + SmartFilamentSensor, USB connection
November 24, 2024 04:22PM
Might this be a bug which I sould open a git-ticket for?
Re: Robin Nano v3.1 + 3Dtouch + SmartFilamentSensor, USB connection
December 09, 2024 03:45PM
Again I tried Marlin 2.1.x-patched. Looks like X & Y would be nice.

Even homing works fine on X&Y.
But after moving z to save homing distance and homing X&Y, the printhead moves to the middle of the printbed, but doesn't decrease Z value. But it tries probing with the 3Dtouch in midair several times (see video file attached).

I tried not to use the filament motion sensor, but the runout sensor. Also old colurful UI, so I'm able to compile, since I need to print several parts urgently.

Any idea why Z axis isn't decreasing for leveling/homing?
On Z-min there is still my endstop. Z-max is attached to the 3Dtouch.

Edited 3 time(s). Last edit at 12/09/2024 04:29PM by cysign.
Attachments:
open | download - Configuration.h (127 KB)
open | download - Configuration_adv.h (173.3 KB)
open | download - auto homing.mp4 (3.9 MB)
Sorry, only registered users may post in this forum.

Click here to login