- Posts: 106
- Thank you received: 0
Remora - Rpi Software Stepping Using External Microcontroller via SPI
Please Log in to join the conversation.
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
Please Log in to join the conversation.
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”
},
Please Log in to join the conversation.
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 to join the conversation.
Please Log in to join the conversation.
Please Log in to join the conversation.
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 to join the conversation.
. 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 to join the conversation.
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.
Please Log in to join the conversation.
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 to join the conversation.
