Remora - Rpi Software Stepping Using External Microcontroller via SPI

More
5 years 4 months ago - 5 years 4 months ago #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: 5 years 4 months ago by Doogie.

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

More
5 years 4 months ago #211898 by scotta

cakeslob wrote: 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
5 years 4 months ago #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
5 years 4 months ago #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
5 years 4 months ago #212076 by Doogie

cakeslob wrote: 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
5 years 4 months ago #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

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

Time to create page: 0.230 seconds
Powered by Kunena Forum