Rp2040 with THC Plasma posibble?
Hello
I would make a cnc plasma with thc on a pico w rp2040. Is this possible? Until now, I worked with linuxcnc (7C81 and THCAD2). Is is able to connect the THCAD2 with the Rp2040? I build the uf2 firmware by webbuilder, how can i get connect with the pico? And where can I get the pinout?
Thanks for your big effort with this repo.
Greets Christoph
It is possible.
Is is able to connect the THCAD2 with the Rp2040?
Code has to be added for that. The product page is incorrect in describing it is a frequency to voltage converter? It looks like the output is a frequency, not a voltage - and if it is code has to be added that converts the frequency to a digital value readable via the ioports analog input API - lsimilar to this that reads input from an ADC.
And where can I get the pinout?
Pinout for the Pico? Or for the currently supported boards?
Thank you for your feedback. I have loaded the firmware onto the Generic Pico W with THC Plasma. I would like to try it out with a normal Pico W first. Later, I would like to switch to the RP23CNC.
- I'm not sure how to connect the THCAD2. The ADCs are connected via i2c. Can I just connect the F+ to an analog input and select it with GCode $366?
- I can then set the offset and scale via $361 and $362
- The pinout in the h-file shows the direction pins but not the step pins.
- The post-processor for Fusion360 is designed for a milling machine. Is there one suitable for plasma? How can I connect to the Pico after loading the firmware? Via WiFi or USB? Is it possible to display it via OpenBuilds or something similar?
Sorry for all the questions. I have never dealt with GRBL before and am grateful for any help.
Can I just connect the F+ to an analog input and select it with GCode $366?
I do not think so, a frequency to digital value (voltage) converter has to be implemented if THCAD2 is to be used. From a quick glance at the manual it seems counting the number of pulses every 1-10ms would be possible with a 16-bit Pico PWM timer.
I can then set the offset and scale via $361 and $362
Yes.
The pinout in the h-file shows the direction pins but not the step pins.
It only shows the start pin (X) - the rest (Y, Z, ...) are consecutive (grblHAL use PIO for step pulse generation). Use the $pins command to list them.
The post-processor for Fusion360 is designed for a milling machine. Is there one suitable for plasma?
I do not know, I have started building a plasma table and I am going to use SheetCam. Ask on a Fuison360 forum?
How can I connect to the Pico after loading the firmware?
Initially via USB (virual serial port), WiFi (Telnet or WebSocket) is possible after configuring the SSID and password for connecting to WiFi.
Is it possible to display it via OpenBuilds or something similar?
Yes. Most Grbl compatible senders can be used.
Would it be possible to smooth the frequency signal with an RC low-pass filter and then read it in at an analog input? Do you know how I could connect the THCAD2 to the RP23CNC? According to $366, an analog signal is expected.
Would it be possible to smooth the frequency signal with an RC low-pass filter and then read it in at an analog input?
No - a PWM signal can, but not a constant duty cycle signal. Code, such as this, has to be integrated with the ioports code linked above.
Is it possible to add a new file in Webbuilder, or do i have to clone the entire project and compile the project manually? Do you have a list of which repos i need to clone if i want to use a generic rp2040 with plasma?
Is it possible to add a new file in Webbuilder
No, only paths are via a PR or as a third party plugin published on github.
or do i have to clone the entire project and compile the project manually?
Yes.
Do you have a list of which repos i need to clone if i want to use a generic rp2040 with plasma?
Clone the RP2040 repo including the submodules. Edit my_machine.h to enable functionality.
Here is an initial attempt at adding the above mentioned code as an ioports plugin:
Thank you for the file. I tried to implement it. It is be able to flash on the rp2040, but the action $366 can't found. I've done the following steps:
- move the thcad2.c to plugins
- initialize theh thcad2_init(void) in expanders_init.h
- add ${CMAKE_CURRENT_LIST_DIR}/thcad2.c to CmakeLists in plugins
- #define THCAD2_ENABLE 1 in my_machine.h
I've define the generic_4xis_board.
do you get any idea, what is wrong or missing? Is the G38.2Z code for probing the z-axis not supported in grblhal?
I have committed the file and the neccesary changes to enable it.
Currently the input pin is hardcoded to 11, it must be changed to 21 for the generic map and #define AUXINPUT1_PIN 21 commented out. When I get more time I will have to update map files to handle THCAD2_ENABLE seamleasly.
FYI when enabled the $pins command should include the thcad2 pin in its output, and if there $366 should show up. It does for me.
I have not tested thcad2 with the plasma plugin, and currently the value returned is frequency in KHz * 10. The value should be shifted and scaled to return the voltage? 100KHz = 0V and 800kHz is either 10V or 5V from what I have read in the manual. FYI I have tested with a signal generator and the returned value matches exactly for the ten or so different frequencies I have tested with.
Is the G38.2Z code for probing the z-axis not supported in grblhal?
It is supported.
Thanks I'll try it out with my CNC as soon as possible. The material parameter M190 is also supported. Is the arc voltage defined automatically there if i have saved the Material 0 and set the M190 P0 at the beginning? Or is it possible to activate it with a g-code? Or is auto volts detecting active? The parameters $361 and $362 for scaling and offset do not work. I will programming this parameters permanently into the thcad2 file. I have activated the virtual ports, but the THC M-codes are not readable.
Is the arc voltage defined automatically there if i have saved the Material 0 and set the M190 P0 at the beginning?
It is if "cv" (cut voltage) is defined in the material, if not it is measured at the start of THC.
Or is it possible to activate it with a g-code?
Only with M190.
The parameters $361 and $362 for scaling and offset do not work.
Works for me in bench testing - the value does not change at all with different settings?
I have activated the virtual ports, but the THC M-codes are not readable.
I'll soon commit an update for those, I would like to fix any issues with $361/$362 first.
My plasma with the generic map rp2040 is not functionable. I got the following problems. That is my pinout over the iosender:
The homing process with soft limits does not change the direction, however the switch ist detected. The homing switch pull-off distance is written to 3mm. The THCAD Monitor shows nothing either.
Do you have any idea, what the problem can be?
Do you have any idea, what the problem can be?
Wiring? Check the Signal LEDs in ioSender to see if they change as expected when the limit switches/probe is triggered:
The arc voltage displays a valid value for me, did you change the thcad2 plugin code?