Remora - Rpi Software Stepping Using External Microcontroller via SPI

More
12 Jun 2021 20:12 #211885 by Doogie
Sorry I can't help but @Aaroncnc and @scotta are the two I know of who have encoders setup and working in Remora. I've seen Aaroncnc on IRC but don't now if he's moved to the new IRC server or not. I did see him on the old server when I stated to figure out setting up an irc client but just reconfigured for the new server, libera, and don't see him nor scotta there at the moment.

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

More
12 Jun 2021 20:30 #211888 by cakeslob
Thanks,its no rush or anything, just foolin around with some cheap motors from banggood that looked kinda neat
www.banggood.com/BUJIATE-DC-12~24V-3100-...ehouse=CN&ID=6294119

Looks like he actually just added a PWM component today, so a reinstall is needed. ok as expected, I need to use a hardware PWM pin. For my CW/CCW can I just change one of the endstops or something from input to output ? I need to figure out the hal for this as well
{
	"Thread": "Servo",
	"Type": "Digital Pin",
		"Comment":			"X Direction",
		"Pin":				"1.26",
		"Mode":				"Output",
		"Data Bit":			3
	},

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

More
12 Jun 2021 20:46 - 12 Jun 2021 20:49 #211889 by Doogie
not really a "reinstall" needed just update the firmware.bin on the uSD in your controller and if you want to use the new fix freq PWM you update a pin configuration in config.txt also on your uSD card.

I validated the fixed freq capailbity now works and then jumped right to trying to do a raster engraving but ran into a problem related to the speeds not being maintained so trying to fix that. Only then can I call the laser cutter capabilities pseudo-done and move onto my CNC.

here's an example for pin 2.5 -
{
“Thread”: “Servo”,
“Type”: “PWM”,
“Comment”: “Bed heater PWM”,
“Hardware PWM”: “True”,
“Variable Freq”: “True”,
“Period us”: 200,
“SP”: 0,
“Period SP”: 1,
“PWM Pin”: “2.5”
},
Last edit: 12 Jun 2021 20:49 by Doogie.

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

More
12 Jun 2021 22:00 #211898 by scotta

Ok, got some packages in the mail this week, so time to try some things out. If some assistance could be provided that would be helpful and appreciated, because this setup is new to me.
Trying to set up a small BLDC/encoder with driver for axis, using aarons config as reference. The encoder is 100ppr, 2 channels. Max Rpm is 3000-6000. Im getting a little confused reading through the 2 github threads, is 100ppr/2channels going to be too much?
github.com/scottalford75/Remora/issues/12
github.com/scottalford75/Remora/issues/13


The pinout

PWN - pwn, 0v is max rpm, 5v is 0rpm
RUN/BRAKE - i/o output
CW/CCW - i/o output
EN_A - encoder count
EN_B - encoder count

, so encoder config looks straight forward, but how do I do the control pins? Am I hooking up PWM to a servo pin and then RUN to x enable pin? How can I handle the cw/ccw output io?


Hi, an interesting exercise indeed.

When we were getting Aaroncn spindle up and running I did propose a spindle module so take a signed SP (set point) value to output a CW/CWW output and a PWM output to eliminate some of the work he has done in HAL on the LinuxCNC side.

The software encoder capture runs in the base thread at 40khz. You can calculate if this will be fast enough for these motors. Aaroncnc wanted to count faster so I implemented the hardware QEI module. He's now counting happily up to 10,000rpm. Unfortunately there is only one QEI module on the chip. Multiple motors would mean you're stuck with the software counting.

For the PWM a couple of considerations. The being inverted and a 5V range. But the following may be the solution:

os.mbed.com/questions/77532/Mbed-LPC1768...ocoupler-for-5-V-ou/

Happy to look at a "spindle" module, as I still need to get to look at a brushed DC servo proposal from Doogie.

On the LinuxCNC side this is more standard closed loop PID control.

BR
Scott

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

More
12 Jun 2021 22:08 #211900 by scotta
BTW, the specs for these motors is really vague. Size?

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

More
14 Jun 2021 23:20 #212071 by cakeslob
Ah I see, only one encoder module per chip. Perhaps its better suited to an fpga. Physically, they are close to nema17, electrically, they are 10w and 20w
The following user(s) said Thank You: gtt38

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

More
15 Jun 2021 00:22 #212076 by Doogie

Ah I see, only one encoder module per chip. Perhaps its better suited to an fpga. Physically, they are close to nema17, electrically, they are 10w and 20w


What he said was only 1 high speed(0-10Krpm) encoder can be supported because of a hardware limitation on the LPC1768/69.
There's already support for encoders for each stepper motor.

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

More
15 Jun 2021 17:38 #212133 by tjtr33
Make sure your Big Tree Tech SKR says BIG TREE on the silk screen next to the 6 3pin header array. I made sure mine was SKR v1,3 with LPC1768 but missed that the ad did not say BTT or Big Tree Tech. And it doesnt work, F1 gets me Bad Payload FFFFFFFF. The cable ohms out and the files are as prescribed.

. arrrgh!

I'll hook up the serial port before burying it.

re: 'cursor type file"
my firmware.bin got renamed FIRMWARE.CUR
that may mean 'current'
is that what you mean?

I tried with no drivers ( pololu style stepper drivers) installed.
And I set the jumper to 5V and USB, and used a cable from RPi3B+
to SKR. The P/S was official white with micro usb connector.
Is that workable to test that the remora comp is working?

tomp
Attachments:

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

More
15 Jun 2021 17:43 - 15 Jun 2021 17:44 #212134 by Aaroncnc
I have not tried on a RPI3 only 4.
did you enable SPI?
www.raspberrypi-spy.co.uk/2014/08/enabli...on-the-raspberry-pi/

I would setup serial and double and triple check your wiring.

Also going to try and play with the new PWM stuff and see how it works.
Last edit: 15 Jun 2021 17:44 by Aaroncnc.
The following user(s) said Thank You: Doogie

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

More
15 Jun 2021 19:51 #212140 by Doogie
They should have a pinout layout just like you'll find for the BT SKR v1.4 and then you just need to see that the signal/pin numbers are the same as the official BT SKR v1.4 and if they are it should work. Sames goes for the v1.3 although I'm not sure that's been tested. The MKS Sbase v1.3 is the only "v1.3" I've verified works.

If the pin numbers are different then it's still possible it'd work but you might need to build the firmware from source and adjust pin numbers accordingly.

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

Time to create page: 0.195 seconds
Powered by Kunena Forum