Remora - Rpi Software Stepping Using External Microcontroller via SPI

More
20 Apr 2022 02:44 - 20 Apr 2022 02:47 #240715 by gtt38
The Black VE with w5500 work very good, I tested yesterday on a Nucleo F411 too.
edit : btw I updated to OSmbed 6 as I’m not using any LPC targets anymore. It works very good, even if the w5500 library is made for OSmbed5
Last edit: 20 Apr 2022 02:47 by gtt38.

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

More
20 Apr 2022 03:14 #240716 by eng
Could you tell me your settings to be able to study with the Black VE with w5500, here in Brazil it is 5 times cheaper than a raspberry.

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

More
20 Apr 2022 11:11 #240728 by elovalvo
Following this thread, I ask you, and in particular Jeff Epler who has worked a lot in this field, if it is possible to use as an external microcontroller via SPI through Remora also the Raspberry Pi Pico
www.tomshardware.com/news/raspberry-pi-p...ing-you-need-to-know

Given the characteristics
CPU: Dual-core Arm Cortex-M0+ @ 133MHz
Memory: 264KB on-chip SRAM; 2MB on-board QSPI Flash
Interfacing: 26 GPIO pins, including 3 analogue inputs
Peripherals: • 2 × UART
• 2 × SPI controllers
• 2 × I2C controllers
• 16 × PWM channels
• 1 × USB 1.1 controller and PHY, with host and
device support
• 8 × PIO state machines

and taking into account that there are numerous programming modes available (C/C++ SDK, MicroPython, CircuitPython, Arduino Mbed ) I believe that this should be possible.



Personally I tried some simple sketches with Arduino IDE and I easily reached the generation of over 25 thousand steps per second in driving a stepper motor in step / dir microstepping mode with an A4988 driver.

Others have used PIO mode
blues.io/blog/raspberry-pi-pico-pio/
also via microPython
danielwilczak101.medium.com/introduction...ncluded-af4eb9abfe86


Taking into account that the cost is about $ 5, what could be the advantages and disadvantages of using it?

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

More
20 Apr 2022 17:28 #240741 by Aaroncnc
the 8 × PIO state machines are what interest me the most.
seems to me these could be used for very highspeed encoders or for very fast step gens.
The price is right, tho a breakout board would be nice.

I think thats one of the advantages to a printer boards and the nvem board is they provide a quickway to hookup. also the amount of them already being made.
If someone made a main board with the pico that hit large production it would be interesting to see how the state machines could be used.

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

More
21 Apr 2022 15:14 - 21 Apr 2022 15:21 #240801 by gtt38
I testing the ethernet version on a small F4 blackpill STM32F411ceu6 and it works very good, i'm trying to reduce the remora firmware size (not easy with mbed) to try on an inexpensive bluepill. I'm trying to remove the SD card to save 4 pins and load directly the module in the program without SD, like the Remora NVEM code. It will allow me to load only the wanted modules without the need to have unwanted modules in the firmware (for exemple why storing tmc2209 if i don't need it). Maybe we could find a way to specify a config txt before the compilation to have a better firmware size.

I worked on the NVEM version  with CubeIDE (love it) and was able to get it work on a Nucleo F207ZG and a F429ZI (but the tftp config upload still don't work) The firmware size is very light with cubeide, that's a good thing.

 
Last edit: 21 Apr 2022 15:21 by gtt38.

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

More
21 Apr 2022 21:14 #240812 by scotta
I'll look to include the Flash storage of the config into the Remora code. This will allow for SD card removal and support boards without an SD card at all. 

Trimming down the modules that are redundant on some targets could be done using #if defined TARGET_ logic in to limit the #include's and then in the loadModules() function. Possible, but would add a level of maintenance to the code.

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

More
21 Apr 2022 23:57 #240840 by gtt38
In the loadModules() function if I need to load only an stepper module how can I do ? Can you give me an exemple to load a simple endstop and a stepper joint ?
I looked to the raspberry pico and pio looks promising for encoders and fast PWM generation. I was impressed by the possibilities.

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

More
22 Apr 2022 00:59 #240843 by eng
Could you help me with the settings of Black VE with w5500? here for me, I prefer to break my head with these two.

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

More
22 Apr 2022 01:16 #240846 by gtt38
There is nothing to set, just compiles it with the Blackve profile without any modifications.

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

More
22 Apr 2022 08:05 #240861 by gtt38
made some progress 
void loadModules()
{
    //Stepgen
    int joint;
    ptrInputs = &txData.inputs;
    ptrOutputs = &rxData.outputs;
    joint = 0;
    printf("\nCreate step generator for Joint %d\n", joint);
    ptrJointFreqCmd[joint] = &rxData.jointFreqCmd[joint];
    ptrJointFeedback[joint] = &txData.jointFeedback[joint];
    ptrJointEnable = &rxData.jointEnable;
    Module* joint0 = new Stepgen(PRU_BASEFREQ, joint, "PB_12", "PB_13", "PB_14", STEPBIT, *ptrJointFreqCmd[joint], *ptrJointFeedback[joint], *ptrJointEnable);
    baseThread->registerModule(joint0);
    
    //Blink
    Module* blinkServo = new Blink("PB_0", PRU_SERVOFREQ, 1);
    servoThread->registerModule(blinkServo);
    //Input
    Module* IN1 = new DigitalPin(*ptrInputs, 0, "PD_12", 0, true, NONE);
    servoThread->registerModule(IN1);
    // OUTPUTS
    Module* OUT1 = new DigitalPin(*ptrOutputs, 1, "PC_3", 0, false, NONE);
    servoThread->registerModule(OUT1);
    // PWM (not working)
    Module* pwm = new PWM(*ptrSetPoint, "PC_4");
    servoThread->registerModule(pwm);
@ Scott : everything works except PWM if you can help me

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

Time to create page: 0.328 seconds
Powered by Kunena Forum