Remora - Rpi Software Stepping Using External Microcontroller via SPI

More
03 Jul 2021 15:55 #213569 by tjtr33
no motion yet.
Axis DRO remains at 0 untill f-error limit is reached.
No steps at all.
I have to see if the command is received at MKS m
and if any feedback is sent back to Pi.
thanks, tomp

Please Log in or Create an account to join the conversation.

More
03 Jul 2021 17:04 - 04 Jul 2021 00:23 #213575 by Doogie
Are you new to LinuxCNC?  Asking because I am and following errors were driving me nuts considering there are no encoders so there's no feedback to create following errors. Are you using the remora-xyz LinuxCNC sample configuration files?

I would not expect those to be throwing off following errors. If no maybe consider it or maybe you'd like to look at some LinuxCNC hal and ini files I've used to see if sections fit your needs and illuminate possible changes to your setup. github.com/dlarue/Remora/tree/ender3-updates

It is handy to have the rPi rx/tx setup for debugging but I've also found that you will see Remora output on the console window you started LinuxCNC on when things go wrong.
Last edit: 04 Jul 2021 00:23 by Doogie.

Please Log in or Create an account to join the conversation.

More
03 Jul 2021 21:48 #213595 by scotta

STM32's are also hard to find right now, but that won't last forever.

I'm looking at porting this to STM32 for the future. Feel free to beat me too it :)

Help with a port to the STM32 would be greatly appreciated. Mbed gives some head start but there is no MODDMA version for the STM32 so the whole DMA communication will need to be coded from scratch. Can be done as this is how I started with the Arduino Due.

Porting the threads would be less involved I think.

Please Log in or Create an account to join the conversation.

More
03 Jul 2021 21:52 #213598 by scotta

Hello,
Is there a difference between the diagram for skrv1.3 spi cable and your cable foto?
The disgram on readthedocs show a wire from what is labeled "p1.31" ( pin 4 of EXP2)
but your foto shows that socket empty., and instead a wire is connected to 3.25. ( pin 6 of EXP2)
Do I correctly see p1.31 is empty in your foto?
I am not geting the expected results and want to try correctly.
I just tried with what i see in the foto and still get bad spi ffffffff hitting F1 estop repreatedly
I then moved the 'reset' wire to the p1.31 and got same
Then I tried external 12V ps for skrv1.3
using screw terminal  '12/14' and GND, moved jumper from 5V to INT.
Result is same ( spi cable is from p1.35 on skr to reset gpio25 on rpi 3B+)
also tried with reset line from p3.25 to rpi gpio25, same ffffffff

it does not work as expected
but i DO need to resolve the diagram vs foto for later

the pin in question really is p1.31 and really is on pin2 of EXP2.
(not on pin 6 ). This is from the SKR V1.3 config.txt.

My skr v1.3 is no longer a candidate for Remora.
I have recieved an MKS v1.3 and will make an SPI cable for that.

thanks,
tomp


 

Hi tomp, 

The reset can be wired to any available pin and setup accordingly in the config.txt file (I'll need to note this in the docs). On the Raspberry Pi it is hard coded in the component though. Really strange, but it would be super helpful to have the output from the debug serial so see if the config.txt file is being de-serialised correctly.

BR
Scott

Please Log in or Create an account to join the conversation.

More
03 Jul 2021 22:53 #213613 by Aaroncnc
Are there any status leds on the board that could be set to blink if it fail to load a good confhg? That way you know without needing serial.
The following user(s) said Thank You: Doogie

Please Log in or Create an account to join the conversation.

More
04 Jul 2021 05:18 #213641 by tjtr33
Doogie,
thanks,
I read I can assign Px.x to any free pin,
and should create the pin in config.txt.

Under what conditions is Reset active?

thanks tomp

Please Log in or Create an account to join the conversation.

More
04 Jul 2021 05:45 #213643 by tjtr33
Hi Doogie

Are you new to LinuxCNC?  Asking because I am and following errors were driving me nuts considering there are no encoders so there's no feedback to create following errors.

no, user for longer than i can remember ( BDI and Paul Corner days )

Are you using the remora-xyz LinuxCNC sample configuration files?

yes, remora-xyz config, unedited
and firmware.bin for LPC1768

I would not expect those to be throwing off following errors. If no maybe consider it or maybe you'd like to look at some LinuxCNC hal and ini files I've used to see if sections fit your needs and illuminate possible changes to your setup. github.com/dlarue/Remora/tree/ender3-updates

thanks, I will look.

It is handy to have the rPi rx/tx setup for debugging
but I've also found that you will see Remora output on the console window you started LinuxCNC on when things go wrong.

Yes, I will add back tx rx but omit gnd to avoid any gnd loop
Yes, I always run from a terminal (I run from a RIP, I may try an installed lcnc today, but RIP's are reliable imo )


imo
the command is not received as expected ( like 0 is sent despite 0.nnn commanded )
and/or
the command is not processed as expected ( some unlnown inhibit )
and/or
the reported feedabck is not as expected.

My f-error is 2mm as per the remora-xyz.hal
and I see the following when I jog using 1mm increments.
press right arrow 1x,
the axis display 'cone' move towrds right,
while DRO shows 0
press right arrow 1x
the axis display moves a further distance, equal to 1st
the dro still shows 0 ( tool tip is obviously away from 0,0,0)
press 3rd time, and get F-error

This result is not seen before in lcnc ( motion w/o dro)

I can hook one motor up to X (say) to look further.

Yes, I been around LCNC a long time, long enuf to know its always surprising.
tomp

 

Please Log in or Create an account to join the conversation.

More
04 Jul 2021 05:53 #213644 by tjtr33
I wonder if SATA cables can be repurposed for SPI?
Great shielding, triple gnds, 4 signals for SPI. cs clk miso mosi
The big benefit would be not having to build it ;-;
tomp

Please Log in or Create an account to join the conversation.

More
04 Jul 2021 15:14 #213696 by Doogie
I first use discrete wires and got things moving but with periodic errors. Then read up on SPI and transmission lines so I then used a 10 wire ribbon cable where I put a ground between every signal wire and it worked better but keeping the wires in the ribbon all the way to the board pins wasn't easy and every now and then I got a SPI error because my taping job was loosening. I taped the ground wires back into position so the grounding/shielding went almost all the way to the signal pins.

Then I said screw it, I took some perf board and some dual row 10pin sockets and dual row 10 pin headers and wired up an adapter so that the stock DIF ribbon cables which come with the graphical LCD of these 3DP boards could be used. Works great but soldering little jumpers between the pins was a PIA. So I designed an adapter in KiCAD and ordered boards 4 weeks ago and still waiting for the boards. I made adapters for MKS and SKR boards and if they work you can probably find someone to make them cheaper and faster. dirtypcbs.com/rendering/details/18noc/Re...MKS_SKR-adapters.zip

Please Log in or Create an account to join the conversation.

More
04 Jul 2021 15:45 #213700 by Aaroncnc
I'm not sure your environment but I justed used pre-made jumper wires with dupont ends. About 5in long too

No spi errors yet.

Please Log in or Create an account to join the conversation.

Time to create page: 0.131 seconds
Powered by Kunena Forum