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

Updated GPIO pins for v2 using scematics provided and added klipper config file #6

Open
wants to merge 45 commits into
base: main
Choose a base branch
from

Conversation

eddwatts
Copy link

@eddwatts eddwatts commented Jul 4, 2024

Fixed GPIO pins as they did not match the scematics for the V2 board (matched the pinouts for the V1 board)
Added a Klipper config file

Untested as I do not have the board yet but am looking at it as an option for my printer.

eddwatts and others added 10 commits July 4, 2024 12:00
Update to v2 pinouts using schematics provided
updated to GPIO pins for v2 using schematics provided
Added Klipper config
Klipper config example
microstepps:32 and run_current:1.1
add example 5160
@NV4RE
Copy link

NV4RE commented Jul 22, 2024

Hi @eddwatts,

Great job on updating the GPIO pins and adding the Klipper config file! I have a few suggestions and observations:

  1. Typo in printer.cfg:

    • The line endstop_pin: tmc2130_stepper_x:virtual_endstop should be corrected to endstop_pin: TMC5160_stepper_x:virtual_endstop.
  2. Code Block for printer.cfg:

    • It would be helpful to put the printer.cfg content into a code block for better readability. You can use Markdown syntax-highlighting to achieve this.
  3. Sensorless Homing Issue:

    • I am having trouble getting sensorless homing to work. I'm not sure if there are some jumpers that need to be connected or if there is another configuration step that I might be missing. Any insights or additional documentation on this would be greatly appreciated.

Thanks for your efforts on this update!

@eddwatts
Copy link
Author

As my board has now arrived I have started to imploment the changes, added Firmare flashing procedures including Canboot/Katapult to make updates easier.

Moved the klipper to its own config file and a link to its config rather than showing all the code on the readme.
added [display] and [output_pin activity_led] options and corrected the tmc2130 error

Started work on the sensorless homeing, this should be most of the code but I need to confirm the code is working fully.
The sensorless homeing code is based on the voron guide: https://docs.vorondesign.com/community/howto/clee/sensorless_xy_homing.html
and updated using the sampel code I found for the v1 PITB: https://github.com/kageurufu/PITB/blob/main/firmware/sensorless_homing.cfg

@eddwatts
Copy link
Author

eddwatts commented Jul 23, 2024

@NV4RE

Just been reading up as thought the usb was using gpio0&1 but seems on the pico they are diffrent. so could even make a good usb can bridge?

I cant see any errors in the setup but yet its not working.

Tested the display on i2c0g last night and that worked on so another little function the board can do.
have also tested a BME280 sensor on the i2c0g connector as well, tested fan outputs and temp inputs.
untested so far is the rgb output and endstops.

Also thinking that the awg for the 24v supply is to small when being shared with a ebb36, extruder heater and extruder stepper, this could be cauing power brounouts creating odd errors as well.
48v rail is used to create the 12v rail that is only used on the tmc5160
24v rail is used to create 5v rail
5v rail is used to create the 3.3v rail
but then again the chips there using should eb able to be voltage tolrent to an extent.

next step i think is to improve the 24v supply and see if that changes things as seen in the issues section that rewireing it helped. will update if that helps

eddwatts added 2 commits July 24, 2024 08:28
added BME280 i2c sensor option
@eddwatts
Copy link
Author

eddwatts commented Jul 24, 2024

@NV4RE
I have now tested a BME280 and a display on the i2c0g port work fine, so thats fans, temps and i2c tested ok
not tested endstops and rgb yet

Iv also tryed a thicker wire for the 24v and confirmed that i have voltage on the MV (48v) and 24v rail.
checked earth points are ok
checekd canbus from mainboard to PITB to ebb all working and talking ok
checked voltage using the 2nd can port to confirm all wires connected ok

starting the firmware shows no errors on screen but in checking klipper logs I spotted:
TMC stepper_x failed to init: Unable to write tmc spi 'stepper_x' register GLOBALSCALER
TMC stepper_y failed to init: Unable to write tmc spi 'stepper_y' register GLOBALSCALER

so something is def not right
have also tryed changed the spi_speed to 3500000 as found posts talking about the speed being to fast
if you come accross anything please let me know as starting to annoy me now lol - and yes still working on it

the driver damaging your steppersm, have you checked the pinout of motors and the driver board? makesure your connecting the correct coils in order? - checked the ones that came in the pack and they seem to be right for my e3d high torque motors.

A bit of help from the designers or makers of the board would probably help here

@NV4RE
Copy link

NV4RE commented Jul 24, 2024

@NV4RE I have now tested a BME280 and a display on the i2c0g port work fine, so thats fans, temps and i2c tested ok not tested endstops and rgb yet

Iv also tryed a thicker wire for the 24v and confirmed that i have voltage on the MV (48v) and 24v rail. checked earth points are ok checekd canbus from mainboard to PITB to ebb all working and talking ok checked voltage using the 2nd can port to confirm all wires connected ok

starting the firmware shows no errors on screen but in checking klipper logs I spotted: TMC stepper_x failed to init: Unable to write tmc spi 'stepper_x' register GLOBALSCALER TMC stepper_y failed to init: Unable to write tmc spi 'stepper_y' register GLOBALSCALER

so something is def not right have also tryed changed the spi_speed to 3500000 as found posts talking about the speed being to fast if you come accross anything please let me know as starting to annoy me now lol - and yes still working on it

the driver damaging your steppersm, have you checked the pinout of motors and the driver board? makesure your connecting the correct coils in order? - checked the ones that came in the pack and they seem to be right for my e3d high torque motors.

A bit of help from the designers or makers of the board would probably help here

I think I had the same problem with software SPI before but on a different board (BTT Manta M8P). I changed the spi_speed to 2000000, and it fixed the issue.
Note that I did not daisy chain the connector to the EBB36; instead, I crimped new wires directly from the electronics bay.
Also, I have ordered the PITB v1.

@eddwatts
Copy link
Author

eddwatts commented Jul 25, 2024

@NV4RE
Pitty this spi error is causing such a problem, would have been a good board. I hope the V1 works better for you - was it just the spi fault that made you change?

as a side note, last night my printer tryed an update it dint like and wopuld no longer boot, Had backups of all configs, So 1 full reload later from scratch and loading the configs and updating all boards to there new versions im still working on the spi error.

Just tryed the 2000000 speed with no luck. wish they had sued a hardware spi by swapping the fan0 and the RX pins round. (think this was ene right on the v1 board so why change it????)

think the pcb diagram would help just confiurm pins

@NV4RE
Copy link

NV4RE commented Jul 26, 2024

@NV4RE Pitty this spi error is causing such a problem, would have been a good board. I hope the V1 works better for you - was it just the spi fault that made you change?

as a side note, last night my printer tryed an update it dint like and wopuld no longer boot, Had backups of all configs, So 1 full reload later from scratch and loading the configs and updating all boards to there new versions im still working on the spi error.

Just tryed the 2000000 speed with no luck. wish they had sued a hardware spi by swapping the fan0 and the RX pins round. (think this was ene right on the v1 board so why change it????)

think the pcb diagram would help just confiurm pins

No, everything else worked for me, but I can't make the sensorless homing work.

@NV4RE
Copy link

NV4RE commented Jul 28, 2024

Update

After switching to a limit switch as the endstop instead of using sensorless homing, I can confirm that this pull request document is accurate.

Notes for Developers / @FYSETC

  1. Inclusion of Male Terminals: It would be beneficial to include male terminals in the package. Additionally, providing a terminal for the stepper motor would be a great advantage. I personally find this feature quite useful.

  2. MicroFit Connectors: Instead of pre-crimping the MicroFit connectors, consider providing 3 or 4 uncrimped connectors. This allows users to crimp them according to their specific needs, especially since the 24V wire included is too thin for pre-crimped connectors.

  3. Documentation Quality: The current documentation is subpar for a commercial product. It should be improved to reflect the quality and professionalism expected from a product intended for sale, rather than appearing as if it were a charitable effort.

  4. Product Evolution: The V2 version feels more like a cost-cutting measure rather than an upgrade from V1. This perception could be improved by ensuring that the enhancements in V2 are clearly communicated and genuinely add value over V1.

@NV4RE
Copy link

NV4RE commented Aug 4, 2024

Hi, my PITB-V1 arrived and initially worked fine, but I'm getting an error: Unable to write tmc spi 'stepper_x' register GLOBALSCALER. Even after swapping the config from X to Y, the issue persists. I suspect the TMC5160 driver might be faulty. I'm planning to rebuild the printer using BTT parts instead.

@eddwatts
Copy link
Author

eddwatts commented Aug 8, 2024

Working with support to see if Iv done anythig wrong or I have a bad board or there is a fault somewhere.
So far nothing is making the steppers move, even removing the SPI and trying to use the step and dir pins is not working. pitty this looked such a good board.

@NV4RE
Copy link

NV4RE commented Aug 8, 2024

Working with support to see if Iv done anythig wrong or I have a bad board or there is a fault somewhere. So far nothing is making the steppers move, even removing the SPI and trying to use the step and dir pins is not working. pitty this looked such a good board.

It seems like there might be a quality control issue. The first board had problems with the Canbus and the DIAC pin wasn't working, while the second board had issues with the TMC5160.

@ejhoness
Copy link

ejhoness commented Sep 3, 2024

for me at pitbv2 no fan no 5160
only temp and endstops over canbuS, usbcan and usbserial,
vendor tell cfg v1 is same to v2 aff. lost much time :(

@ejhoness
Copy link

ejhoness commented Sep 6, 2024

news pitbv2.cfg but for me no change. and maybe miss ? at
[5160_y
cs_pin: PITB:gpio21

Could you tell me if the fans work?

currently working
3 temperature
2 end of stroke sensor

not tested
rgb and extra ios

not working
2 5160
2 fan

@eddwatts
Copy link
Author

eddwatts commented Sep 20, 2024

@ejhoness sorry for slow responce, life happens at times.

I can confirm all my fans do work
I now have a replacment board and a 48v psu to complete the upgrade (just need to install) so I hope to provide more updates soon. All parts including the i2c disdplay and sensors were tested on my 1st board but I never got the motors working on that board.

Thought on the fans, do you have the jumper set up for the fan voltage? if its missing then now power is being supplyed to the fan.

what was the problem you were vaing with the cs_pin?

@ejhoness
Copy link

Thanks, my board is coming back, sad because 48v source and big motors, for me with new taxes I won't buy other parts any time soon. From what I read this is the solution, include spi pins from pitb in klipper to work.

          Got the spi bus working: https://github.com/Klipper3d/klipper/pull/6683

Originally posted by @KoiosLabs in #2 (comment)

@LadPack
Copy link

LadPack commented Dec 11, 2024

Can anyone confirm whether or not any pins need to be jumpered for sensorless homing to work? I have the steppers working over spi via the above fix, but for the life of me I cannot figure out how to get sensorless to work. Either it doesn't move at all between -64 and 63, or it crashes into the frame

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.

4 participants